Go to the documentation of this file.
30 #include "../StatechartViewerPlugin/model/StateMimeData.h"
31 #include "../StatechartViewerPlugin/model/stateinstance/StateInstance.h"
36 #include <QAbstractItemModel>
37 #include <QSortFilterProxyModel>
51 class StatechartProfiles;
58 class StateTreeController;
69 QVariant
data(
const QModelIndex&
index,
int role)
const override;
70 Qt::ItemFlags
flags(
const QModelIndex&
index)
const override;
72 QModelIndex
index(
int row,
int column,
const QModelIndex& parentIndex = QModelIndex())
const override;
73 QModelIndex
parent(
const QModelIndex&
index)
const override;
74 int rowCount(
const QModelIndex&
parent = QModelIndex())
const override;
78 StatechartGroupPtr addNewGroup(
const QString& groupName,
const QString& groupPath,
const QString& description,
const QString& packageName,
const QList<QString> proxies,
bool generateContext,
const QMap<QString, QString>& statechartGroupConfigurations);
149 void processOutputReady();
150 void processErrorsReady();
151 void stateAddedOrRemoved();
152 void expandFilterResults(
const QString& filterString);
156 QString buildStateUsageString(QList<statechartmodel::StateInstancePtr> instances);
159 QList<QVariant> headerInfo;
166 QMenu* contextMenuGroup;
167 QMenu* contextMenuFolder;
168 QMenu* contextMenuState;
169 QAction* actionNewStateDefinition;
170 QAction* actionNewDynamicRemoteStateDefinition;
171 QAction* actionNewFolder;
172 QAction* actionDeleteNode;
173 QAction* actionMakeStatePublic;
174 QAction* actionFindStateUsages;
175 QAction* actionRenameState;
176 QAction* actionOpenCMakeProject;
177 QAction* actionShowFullPath;
178 QAction* actionOpenStateCPP;
179 QAction* actionExecuteGroup;
182 QAction* actionGenerateStateCPP;
183 QAction* actionCloneGroup;
184 QAction* actionRenameGroup;
185 QAction* actionGroupProperties;
190 QMap<QString, QProcess*> processes;
200 bool isPublic()
const override;
206 bool retrieveNewStateName(QString& newStateName,
StateTreeNodePtr& node,
bool& createCPPFiles,
bool askForCPPFiles);
212 QIcon getIcon(
const QString& path)
const;
213 mutable QMap<QString, QIcon> icons;
216 QMimeData*
mimeData(
const QModelIndexList& indexes)
const override;
StateTreeNodePtr getNodeByState(statechartmodel::StatePtr state)
The AbstractStateMimeData class is used to transport state data from the treeview to the stateview an...
StateTreeNodePtr getSelectedNode()
std::shared_ptr< StateTreeModel > StateTreeModelPtr
StateTreeNodePtr createNewState(QString name, StateTreeNodePtr parent, bool createDynamicRemoteState=false)
ScalarT Orientation(const VectorXD< 2, ScalarT > &p1, const VectorXD< 2, ScalarT > &p2, const VectorXD< 2, ScalarT > &c)
std::shared_ptr< ArmarXPackageToolInterface > ArmarXPackageToolInterfacePtr
void onStatechartFinished(int exitCode)
std::shared_ptr< StateTreeNode > StateTreeNodePtr
std::shared_ptr< Application > ApplicationPtr
void selectNodeByState(statechartmodel::StatePtr state)
Qt::ItemFlags flags(const QModelIndex &index) const override
bool selectedNodeIsFolder()
bool selectedNodeIsFolderOrGroup()
void removeFolder(StateTreeNodePtr folderNode)
void stopGroupExecutionWithDependencies(StatechartGroupPtr group)
std::shared_ptr< class StatechartProfile > StatechartProfilePtr
The EditorFileOpener class.
bool selectedNodeIsState()
void removeNodeFromTree(StateTreeNodePtr node)
QModelIndex index(int row, int column, const QModelIndex &parentIndex=QModelIndex()) const override
void onMakeStatePublic(bool enable)
~StateTreeController() override
StatechartGroupPtr addNewGroup(const QString &groupName, const QString &groupPath, const QString &description, const QString &packageName, const QList< QString > proxies, bool generateContext, const QMap< QString, QString > &statechartGroupConfigurations)
std::shared_ptr< GroupCloner > GroupClonerPtr
void openStateCPP(StateTreeNodePtr node)
int columnCount(const QModelIndex &parent=QModelIndex()) const override
std::shared_ptr< StatechartProfiles > StatechartProfilesPtr
void onNewStateDefinition()
void closeAllTabsRequested()
bool nodeIsState(StateTreeNodePtr node)
StatechartGroupPtr loadGroup(QString groupDefinitionFile)
void stopGroupExecution(StatechartGroupPtr group)
bool selectedNodeIsGroup()
StateTreeNodePtr tryCreateNewState(QString name)
void onNewDynamicRemoteStateDefinition()
StatechartGroupPtr loadAndAddGroup(QString groupDefinitionFile)
void removeState(StateTreeNodePtr stateNode)
void executeGroup(StatechartGroupPtr group, QString startState="")
std::shared_ptr< StatechartGroup > StatechartGroupPtr
void onContextMenu(const QPoint &point)
QMimeData * mimeData(const QModelIndexList &indexes) const override
StateTreeNodePtr getNode(QModelIndex index) const
StateTreeNodePtr createNewFolder(QString name, StateTreeNodePtr parent)
void onOpenCMakeProject()
bool nodeIsGroup(StateTreeNodePtr node)
std::shared_ptr< VariantInfo > VariantInfoPtr
void onGenerateStateCppFiles()
QModelIndex parent(const QModelIndex &index) const override
QStringList mimeTypes() const override
QVariant data(const QModelIndex &index, int role) const override
std::shared_ptr< State > StatePtr
This proxy model reimplements the filterAcceptsRow function with a new behavior: All elements that fi...
std::shared_ptr< GroupRenamer > GroupRenamerPtr
void selectNode(StateTreeNodePtr node)
QVariant headerData(int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const override
void onOpenGroup(QString groupFile="")
void executeGroupWithDependencies(StatechartGroupPtr group, QString startState)
This file offers overloads of toIce() and fromIce() functions for STL container types.
StateTreeNodePtr getClosestParentFolderOrGroupNode(StateTreeNodePtr node)
int rowCount(const QModelIndex &parent=QModelIndex()) const override
std::shared_ptr< StateTreeController > StateTreeControllerPtr
bool nodeIsFolderOrGroup(StateTreeNodePtr node)
bool nodeIsFolder(StateTreeNodePtr node)
StateTreeController(Ice::CommunicatorPtr ic, VariantInfoPtr variantInfo, QList< QVariant > headerInfo, QTreeView *treeView, QLineEdit *filterLineEdit, const ArmarXPackageToolInterfacePtr &packageTool, const StatechartProfilesPtr &statechartProfiles, StatechartProfilePtr currentProfile, QObject *parent=0)