StatechartView.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 
25 
26 #include "GraphicsViewZoom.h"
27 #include "../model/State.h"
28 #include "../model/stateinstance/StateInstance.h"
29 #include "../StateScene.h"
30 #include <QGraphicsScene>
31 #include <QWidget>
32 
35 
36 namespace Ui
37 {
38  class StatechartView;
39 }
40 
41 namespace armarx
42 {
43 
44  class StatechartView: public QWidget
45  {
46  Q_OBJECT
47 
48  public:
49  explicit StatechartView(statechartmodel::StatePtr state = statechartmodel::StatePtr(new statechartmodel::State()), bool enableLayouting = true, QWidget* parent = 0);
50  ~StatechartView() override;
51 
55  {
56  return stateScene;
57  }
58  QGraphicsView* getGraphicsView() const;
60 
62  signals:
63  void selectedStateChanged(statechartmodel::StateInstancePtr selectedStateInstance);
64  public slots:
66  void setOriginalZoom();
67  void deleteSelectedStates();
68  void viewAll();
69  void onItemChange();
70  void showSubSubstates(bool show = true);
71  private:
72  // QList<statechartmodel::StatePtr> stateClasses;
73  ::Ui::StatechartView* ui;
74  StateScene* stateScene;
75  Graphics_view_zoom* zoomer;
76  // LayoutController layoutController;
77  LayoutThread layoutThread;
78  // QWidget interface
79  public:
80  QSize sizeHint() const override;
81  };
82 }
83 
armarx::StatechartView::getScene
StateScene * getScene() const
Definition: StatechartView.h:54
armarx::LayoutThread
Definition: LayoutThread.h:35
armarx::StatechartView::viewAll
void viewAll()
Definition: StatechartView.cpp:149
GraphicsViewZoom.h
armarx::LayoutController
Definition: LayoutController.h:45
armarx::statechartmodel::StateInstancePtr
std::shared_ptr< StateInstance > StateInstancePtr
Definition: StateInstance.h:138
armarx::StatechartView::setState
void setState(statechartmodel::StatePtr state)
Definition: StatechartView.cpp:106
armarx::StatechartView::getGraphicsView
QGraphicsView * getGraphicsView() const
Definition: StatechartView.cpp:91
armarx::StatechartView
Definition: StatechartView.h:44
LayoutController.h
Ui
ArmarX Headers.
Definition: ArmarXMainWindow.h:54
armarx::StatechartView::deleteSelectedStates
void deleteSelectedStates()
Definition: StatechartView.cpp:122
armarx::StatechartView::getLayoutController
LayoutController & getLayoutController()
Definition: StatechartView.cpp:101
armarx::StatechartView::getGraphicsViewZoomer
Graphics_view_zoom * getGraphicsViewZoomer() const
Definition: StatechartView.cpp:96
armarx::statechartmodel::State
Definition: State.h:52
armarx::StatechartView::showSubSubstates
void showSubSubstates(bool show=true)
Definition: StatechartView.cpp:169
LayoutThread.h
armarx::Graphics_view_zoom
Definition: GraphicsViewZoom.h:64
armarx::statechartmodel::StatePtr
std::shared_ptr< State > StatePtr
Definition: State.h:46
armarx::StatechartView::~StatechartView
~StatechartView() override
Definition: StatechartView.cpp:81
armarx::StatechartView::getStateInstance
statechartmodel::StateInstancePtr getStateInstance() const
Definition: StatechartView.cpp:86
armarx::StatechartView::setOriginalZoom
void setOriginalZoom()
Definition: StatechartView.cpp:117
armarx::StatechartView::CreateTestStates
static statechartmodel::StatePtr CreateTestStates()
Definition: StatechartView.cpp:175
armarx::StateScene
Definition: StateScene.h:53
armarx::StatechartView::StatechartView
StatechartView(statechartmodel::StatePtr state=statechartmodel::StatePtr(new statechartmodel::State()), bool enableLayouting=true, QWidget *parent=0)
Definition: StatechartView.cpp:46
armarx::StatechartView::sizeHint
QSize sizeHint() const override
Definition: StatechartView.cpp:228
armarx::StatechartView::selectedStateChanged
void selectedStateChanged(statechartmodel::StateInstancePtr selectedStateInstance)
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition: ArmarXTimeserver.cpp:28
armarx::StatechartView::onItemChange
void onItemChange()
Definition: StatechartView.cpp:154