26#include <QAbstractItemModel>
27#include <QSortFilterProxyModel>
64 QList<QVariant> headerInfo,
66 QLineEdit* filterLineEdit,
73 QVariant
data(
const QModelIndex&
index,
int role)
const override;
74 Qt::ItemFlags
flags(
const QModelIndex&
index)
const override;
76 Qt::Orientation orientation,
77 int role = Qt::DisplayRole)
const override;
79 index(
int row,
int column,
const QModelIndex& parentIndex = QModelIndex())
const override;
80 QModelIndex
parent(
const QModelIndex&
index)
const override;
81 int rowCount(
const QModelIndex&
parent = QModelIndex())
const override;
86 const QString& groupPath,
87 const QString& description,
88 const QString& packageName,
89 const QList<QString> proxies,
91 const QMap<QString, QString>& statechartGroupConfigurations);
109 bool createDynamicRemoteState =
false);
165 void processOutputReady();
166 void processErrorsReady();
167 void stateAddedOrRemoved();
168 void expandFilterResults(
const QString& filterString);
172 QString buildStateUsageString(QList<statechartmodel::StateInstancePtr> instances);
175 QList<QVariant> headerInfo;
182 QMenu* contextMenuGroup;
183 QMenu* contextMenuFolder;
184 QMenu* contextMenuState;
185 QAction* actionNewStateDefinition;
186 QAction* actionNewDynamicRemoteStateDefinition;
187 QAction* actionNewFolder;
188 QAction* actionDeleteNode;
189 QAction* actionMakeStatePublic;
190 QAction* actionFindStateUsages;
191 QAction* actionRenameState;
192 QAction* actionOpenCMakeProject;
193 QAction* actionShowFullPath;
194 QAction* actionOpenStateCPP;
195 QAction* actionExecuteGroup;
198 QAction* actionGenerateStateCPP;
199 QAction* actionCloneGroup;
200 QAction* actionRenameGroup;
201 QAction* actionGroupProperties;
206 QMap<QString, QProcess*> processes;
216 bool isPublic()
const override;
223 bool retrieveNewStateName(QString& newStateName,
225 bool& createCPPFiles,
226 bool askForCPPFiles);
232 QIcon getIcon(
const QString& path)
const;
233 mutable QMap<QString, QIcon> icons;
237 QMimeData*
mimeData(
const QModelIndexList& indexes)
const override;
The AbstractStateMimeData class is used to transport state data from the treeview to the stateview an...
statechartmodel::StatePtr state
The EditorFileOpener class.
This proxy model reimplements the filterAcceptsRow function with a new behavior: All elements that fi...
void closeAllTabsRequested()
bool selectedNodeIsFolderOrGroup()
QStringList mimeTypes() const override
void stopGroupExecutionWithDependencies(StatechartGroupPtr group)
bool selectedNodeIsGroup()
void onNewStateDefinition()
void onOpenGroup(QString groupFile="")
StateTreeNodePtr getClosestParentFolderOrGroupNode(StateTreeNodePtr node)
StateTreeNodePtr getNodeByState(statechartmodel::StatePtr state)
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)
void stopGroupExecution(StatechartGroupPtr group)
StateTreeNodePtr createNewState(QString name, StateTreeNodePtr parent, bool createDynamicRemoteState=false)
QVariant headerData(int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const override
void onNewDynamicRemoteStateDefinition()
void onOpenCMakeProject()
int rowCount(const QModelIndex &parent=QModelIndex()) const override
void removeFolder(StateTreeNodePtr folderNode)
Qt::ItemFlags flags(const QModelIndex &index) const override
void onMakeStatePublic(bool enable)
bool nodeIsFolderOrGroup(StateTreeNodePtr node)
void executeGroup(StatechartGroupPtr group, QString startState="")
void onGenerateStateCppFiles()
bool selectedNodeIsFolder()
void removeNodeFromTree(StateTreeNodePtr node)
StateTreeNodePtr tryCreateNewState(QString name)
bool selectedNodeIsState()
~StateTreeController() override
StateTreeNodePtr createNewFolder(QString name, StateTreeNodePtr parent)
StatechartGroupPtr loadGroup(QString groupDefinitionFile)
void executeGroupWithDependencies(StatechartGroupPtr group, QString startState)
StateTreeController(Ice::CommunicatorPtr ic, VariantInfoPtr variantInfo, QList< QVariant > headerInfo, QTreeView *treeView, QLineEdit *filterLineEdit, const ArmarXPackageToolInterfacePtr &packageTool, const StatechartProfilesPtr &statechartProfiles, StatechartProfilePtr currentProfile, QObject *parent=0)
int columnCount(const QModelIndex &parent=QModelIndex()) const override
void selectNode(StateTreeNodePtr node)
StateTreeNodePtr getNode(QModelIndex index) const
QModelIndex parent(const QModelIndex &index) const override
void onContextMenu(const QPoint &point)
void selectNodeByState(statechartmodel::StatePtr state)
void openStateCPP(StateTreeNodePtr node)
void onStatechartFinished(int exitCode)
bool nodeIsFolder(StateTreeNodePtr node)
StateTreeNodePtr getSelectedNode()
QModelIndex index(int row, int column, const QModelIndex &parentIndex=QModelIndex()) const override
QVariant data(const QModelIndex &index, int role) const override
StatechartGroupPtr loadAndAddGroup(QString groupDefinitionFile)
bool nodeIsState(StateTreeNodePtr node)
QMimeData * mimeData(const QModelIndexList &indexes) const override
bool nodeIsGroup(StateTreeNodePtr node)
void removeState(StateTreeNodePtr stateNode)
::IceInternal::Handle<::Ice::Communicator > CommunicatorPtr
std::shared_ptr< Application > ApplicationPtr
std::shared_ptr< State > StatePtr
This file offers overloads of toIce() and fromIce() functions for STL container types.
std::shared_ptr< StatechartProfiles > StatechartProfilesPtr
std::shared_ptr< StatechartGroup > StatechartGroupPtr
std::shared_ptr< VariantInfo > VariantInfoPtr
std::shared_ptr< StateTreeModel > StateTreeModelPtr
std::shared_ptr< class StatechartProfile > StatechartProfilePtr
std::shared_ptr< GroupCloner > GroupClonerPtr
std::shared_ptr< StateTreeNode > StateTreeNodePtr
std::shared_ptr< GroupRenamer > GroupRenamerPtr
std::shared_ptr< StateTreeController > StateTreeControllerPtr
std::shared_ptr< ArmarXPackageToolInterface > ArmarXPackageToolInterfacePtr