StateEditorController.h
Go to the documentation of this file.
1 /*
2  * This file is part of ArmarX.
3  *
4  * Copyright (C) 2011-2016, High Performance Humanoid Technologies (H2T), Karlsruhe Institute of Technology (KIT), all rights reserved.
5  *
6  * ArmarX is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License version 2 as
8  * published by the Free Software Foundation.
9  *
10  * ArmarX is distributed in the hope that it will be useful, but
11  * WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program. If not, see <http://www.gnu.org/licenses/>.
17  *
18  * @package
19  * @author
20  * @date
21  * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
22  * GNU General Public License
23  */
24 #pragma once
25 
26 
27 #include <QObject>
28 
31 
35 
36 #include "../StatechartViewerPlugin/model/State.h"
38 
39 namespace armarx
40 {
41 
42  class StateTreeController;
43  using StateTreeControllerPtr = std::shared_ptr<StateTreeController>;
44  class StateTreeNode;
45  using StateTreeNodePtr = std::shared_ptr<StateTreeNode>;
46 
47  class StateTabWidget;
48 
49  class StateEditorController : public QObject
50  {
51  Q_OBJECT
52 
53  public:
59  QPointer<TipDialog> tipDialog,
60  QObject* parent = 0);
61 
62  QList<QString> getRelevantProfiles() const;
63  signals:
64 
65  public slots:
67  QPoint mouseScreenPos,
68  QPointF mouseItemPos);
71  QPoint mouseScreenPos,
72  QPointF mouseItemPos);
73  void setLockRemoteStatesByDefault(bool lock);
74  void editSelectedState();
75  private slots:
76  void connectToStateTab(int index);
77 
78  protected:
80  const armarx::StateDialog& d);
81 
82  QMenu* createStateContextMenu();
84 
91  QPointer<TipDialog> tipDialog;
93  QMenu menu;
94  QAction* editState;
95  QAction* deleteState;
96  QAction* layoutState;
97  QAction* setstartstate;
98 
99  QAction* newEndstate;
100  QAction* replaceState;
101  QAction* openCode;
102  QAction* findStateInTree;
103  };
104 
105  using StateEditorControllerPtr = std::shared_ptr<StateEditorController>;
106 
107 } // namespace armarx
armarx::StateEditorController::editState
QAction * editState
Definition: StateEditorController.h:94
armarx::StateTreeNode
Definition: StateTreeNode.h:40
armarx::StateEditorController::editSelectedState
void editSelectedState()
Definition: StateEditorController.cpp:390
armarx::StateEditorController::replaceState
QAction * replaceState
Definition: StateEditorController.h:100
armarx::StateEditorControllerPtr
std::shared_ptr< StateEditorController > StateEditorControllerPtr
Definition: StateEditorController.h:105
armarx::StateEditorController::getRelevantProfiles
QList< QString > getRelevantProfiles() const
Definition: StateEditorController.cpp:371
armarx::StateTreeNodePtr
std::shared_ptr< StateTreeNode > StateTreeNodePtr
Definition: StatechartGroupDefs.h:31
index
uint8_t index
Definition: EtherCATFrame.h:59
armarx::StateEditorController::communicator
Ice::CommunicatorPtr communicator
Definition: StateEditorController.h:88
armarx::StateEditorController::createStateContextMenu
QMenu * createStateContextMenu()
armarx::StateEditorController::tipDialog
QPointer< TipDialog > tipDialog
Definition: StateEditorController.h:91
armarx::StateEditorController::StateEditorController
StateEditorController(StatechartEditorMainWindow *mainWindow, StateTreeControllerPtr treeController, Ice::CommunicatorPtr communicator, VariantInfoPtr variantInfo, StatechartProfilePtr currentProfile, QPointer< TipDialog > tipDialog, QObject *parent=0)
Definition: StateEditorController.cpp:44
armarx::StateDialog
Definition: StateDialog.h:51
armarx::StatechartProfilePtr
std::shared_ptr< class StatechartProfile > StatechartProfilePtr
Definition: StatechartContext.h:51
StateDialog.h
armarx::EditorFileOpener
The EditorFileOpener class.
Definition: editorfileopener.h:39
armarx::StateEditorController
Definition: StateEditorController.h:49
StatechartEditorMainWindow.h
armarx::StateEditorController::openCode
QAction * openCode
Definition: StateEditorController.h:101
armarx::statechartmodel::StateInstancePtr
std::shared_ptr< StateInstance > StateInstancePtr
Definition: StateInstance.h:146
armarx::StateEditorController::treeController
StateTreeControllerPtr treeController
Definition: StateEditorController.h:86
IceInternal::Handle<::Ice::Communicator >
armarx::StateEditorController::menu
QMenu menu
Definition: StateEditorController.h:93
armarx::StateEditorController::createTransitionContextMenu
QMenu * createTransitionContextMenu()
armarx::StateEditorController::currentProfile
StatechartProfilePtr currentProfile
Definition: StateEditorController.h:90
armarx::StateEditorController::deleteState
QAction * deleteState
Definition: StateEditorController.h:95
armarx::StateEditorController::findStateInTree
QAction * findStateInTree
Definition: StateEditorController.h:102
StatechartProfiles.h
armarx::StateEditorController::variantInfo
VariantInfoPtr variantInfo
Definition: StateEditorController.h:89
armarx::StateEditorController::stateDialogAccepted
void stateDialogAccepted(statechartmodel::StateInstancePtr stateInstance, const armarx::StateDialog &d)
Definition: StateEditorController.cpp:92
armarx::StateEditorController::setstartstate
QAction * setstartstate
Definition: StateEditorController.h:97
editorfileopener.h
armarx::StateTabWidget
Definition: StateTabWidget.h:35
armarx::StatechartEditorMainWindow
Definition: StatechartEditorMainWindow.h:48
armarx::StateEditorController::newEndstate
QAction * newEndstate
Definition: StateEditorController.h:99
armarx::StateEditorController::opener
EditorFileOpener opener
Definition: StateEditorController.h:87
armarx::StateEditorController::mainWindow
StatechartEditorMainWindow * mainWindow
Definition: StateEditorController.h:85
armarx::VariantInfoPtr
std::shared_ptr< VariantInfo > VariantInfoPtr
Definition: VariantInfo.h:39
armarx::statechartmodel::TransitionCPtr
std::shared_ptr< const Transition > TransitionCPtr
Definition: Transition.h:91
armarx::statechartmodel::StatePtr
std::shared_ptr< State > StatePtr
Definition: State.h:48
TipDialog.h
armarx::StateEditorController::showTransitionContextMenu
void showTransitionContextMenu(statechartmodel::TransitionCPtr transition, statechartmodel::StatePtr state, QPoint mouseScreenPos, QPointF mouseItemPos)
Definition: StateEditorController.cpp:239
armarx::StateEditorController::setLockRemoteStatesByDefault
void setLockRemoteStatesByDefault(bool lock)
Definition: StateEditorController.cpp:450
armarx::StateEditorController::layoutState
QAction * layoutState
Definition: StateEditorController.h:96
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition: ArmarXTimeserver.cpp:27
armarx::StateEditorController::lockRemoteStates
bool lockRemoteStates
Definition: StateEditorController.h:92
armarx::StateEditorController::showStateContextMenu
void showStateContextMenu(statechartmodel::StateInstancePtr stateInstance, QPoint mouseScreenPos, QPointF mouseItemPos)
Definition: StateEditorController.cpp:133
armarx::StateTreeControllerPtr
std::shared_ptr< StateTreeController > StateTreeControllerPtr
Definition: StateEditorController.h:43
VariantInfo.h