StatechartEditorMainWindow.h
Go to the documentation of this file.
1 /*
2 * This file is part of ArmarX.
3 *
4 * ArmarX is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
7 *
8 * ArmarX is distributed in the hope that it will be useful, but
9 * WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 *
16 * @package ArmarX::
17 * @author Mirko Waechter ( mirko.waechter at kit dot edu)
18 * @date 2014
19 * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
20 * GNU General Public License
21 */
22 
23 #pragma once
24 
26 #include <QMainWindow>
27 #include <QTreeView>
28 #include <memory>
30 #include <ArmarXGui/gui-plugins/StatechartEditorPlugin/view/ui_StatechartEditorMainWindow.h>
31 
32 
33 namespace armarx
34 {
35  class StateTabWidget;
36  class CppHighlighter;
37 }
38 
39 namespace armarx::Ui
40 {
41  class StatechartEditorMainWindow;
42 }
43 
44 namespace armarx
45 {
46  class StatechartEditorMainWindow : public QMainWindow
47  {
48  Q_OBJECT
49  friend class StateEditorController;
51  public:
52  explicit StatechartEditorMainWindow(QWidget* parent = 0);
53  ~StatechartEditorMainWindow() override;
55 
57  {
58  this->communicator = communicator;
59  }
60  void setVariantInfo(VariantInfoPtr variantInfo)
61  {
62  this->variantInfo = variantInfo;
63  }
65  {
66  this->currentProfile = currentProfile;
67  }
68  void setTipDialog(QPointer<TipDialog> tipDialog);
69  Ui::StatechartEditorMainWindow* getUI() const
70  {
71  return ui;
72  }
73  public slots:
75  void deleteSelectedStates();
76  void zoomToViewAll();
77  void connectOverviewToTab(int tabIndex);
79  void addEndState();
80  private slots:
81  void on_actionSave_as_Image_file_triggered();
82 
83  private:
84  void setupStatechartGroupsToolbar();
85 
86  QToolBar* stGroupToolBar;
87  Ui::StatechartEditorMainWindow* ui;
88  CppHighlighter* highlighter;
89  Ice::CommunicatorPtr communicator;
90  VariantInfoPtr variantInfo;
91  StatechartProfilePtr currentProfile;
92  QPointer<TipDialog> tipDialog;
93  };
94 
95 
96 }
armarx::Ui
Definition: GuiUseCaseSelector.h:33
armarx::StatechartEditorMainWindow::setCurrentProfile
void setCurrentProfile(StatechartProfilePtr currentProfile)
Definition: StatechartEditorMainWindow.h:64
armarx::StatechartEditorMainWindow::originalZoomCurrentState
void originalZoomCurrentState()
Definition: StatechartEditorMainWindow.cpp:70
armarx::StatechartEditorMainWindow::connectOverviewToTab
void connectOverviewToTab(int tabIndex)
Definition: StatechartEditorMainWindow.cpp:94
armarx::StatechartEditorMainWindow::setVariantInfo
void setVariantInfo(VariantInfoPtr variantInfo)
Definition: StatechartEditorMainWindow.h:60
armarx::StatechartProfilePtr
std::shared_ptr< class StatechartProfile > StatechartProfilePtr
Definition: StatechartContext.h:52
armarx::StateEditorController
Definition: StateEditorController.h:51
armarx::statechartmodel::StateInstancePtr
std::shared_ptr< StateInstance > StateInstancePtr
Definition: StateInstance.h:138
IceInternal::Handle< ::Ice::Communicator >
armarx::StatechartEditorMainWindow::getUI
Ui::StatechartEditorMainWindow * getUI() const
Definition: StatechartEditorMainWindow.h:69
armarx::StatechartEditorMainWindow::~StatechartEditorMainWindow
~StatechartEditorMainWindow() override
Definition: StatechartEditorMainWindow.cpp:55
StatechartProfiles.h
armarx::StatechartEditorMainWindow::getStateTabWidget
StateTabWidget * getStateTabWidget() const
Definition: StatechartEditorMainWindow.cpp:60
armarx::StatechartEditorController
The StatechartEditorController class is the controller of the main widget of the Statechart Editor.
Definition: StatechartEditorController.h:134
armarx::StateTabWidget
Definition: StateTabWidget.h:34
armarx::StatechartEditorMainWindow
Definition: StatechartEditorMainWindow.h:46
armarx::StatechartEditorMainWindow::deleteSelectedStates
void deleteSelectedStates()
Definition: StatechartEditorMainWindow.cpp:78
armarx::StatechartEditorMainWindow::setCommunicator
void setCommunicator(Ice::CommunicatorPtr communicator)
Definition: StatechartEditorMainWindow.h:56
armarx::CppHighlighter
Definition: CppHighlighter.h:30
armarx::StatechartEditorMainWindow::zoomToViewAll
void zoomToViewAll()
Definition: StatechartEditorMainWindow.cpp:177
armarx::VariantInfoPtr
std::shared_ptr< VariantInfo > VariantInfoPtr
Definition: VariantInfo.h:39
armarx::StatechartEditorMainWindow::StatechartEditorMainWindow
StatechartEditorMainWindow(QWidget *parent=0)
Definition: StatechartEditorMainWindow.cpp:44
armarx::StatechartEditorMainWindow::layoutState
void layoutState(statechartmodel::StateInstancePtr instance=statechartmodel::StateInstancePtr())
Definition: StatechartEditorMainWindow.cpp:110
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition: ArmarXTimeserver.cpp:28
armarx::StatechartEditorMainWindow::setTipDialog
void setTipDialog(QPointer< TipDialog > tipDialog)
Definition: StatechartEditorMainWindow.cpp:65
VariantInfo.h
armarx::StatechartEditorMainWindow::addEndState
void addEndState()
Definition: StatechartEditorMainWindow.cpp:144