tuchulcha  0.10.1
Graphical Workflow Configuration Editor
FlowWidget.h
Go to the documentation of this file.
1 /* Copyright (C) 2009 Jens-Malte Gottfried
2 
3  This file is part of Tuchulcha.
4 
5  Tuchulcha is free software: you can redistribute it and/or modify
6  it under the terms of the GNU Lesser General Public License as published by
7  the Free Software Foundation, either version 3 of the License, or
8  (at your option) any later version.
9 
10  Tuchulcha is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU Lesser General Public License for more details.
14 
15  You should have received a copy of the GNU Lesser General Public License
16  along with Tuchulcha. If not, see <http://www.gnu.org/licenses/>.
17 */
25 #ifndef FLOWWIDGET_H_
26 #define FLOWWIDGET_H_
27 
28 #include <QMdiSubWindow>
29 
30 class QGraphicsView;
31 class NodeHandler;
32 class GraphModel;
33 
36 class FlowWidget : public QMdiSubWindow {
37  Q_OBJECT
38 
39 public:
41 
44  FlowWidget(GraphModel* model, QWidget* parent = 0);
45 
47  GraphModel* model();
48 
50  const GraphModel* model() const;
51 
52 public slots:
54  void saveFlowChart() const;
55 
57  void zoomIn();
58 
60  void zoomOut();
61 
63  void zoomFit();
64 
66  void zoomFit(Qt::WindowStates oldState, Qt::WindowStates newState);
67 
69  void updateFileName(const QString& fileName );
70 
72  void modify(bool val = true );
73 
74 signals:
77  void modelChanged(GraphModel* model);
78 
81  void statusMessage(QString msg) const;
82 
85  void nodeTypeSelected(QString type) const;
86 
87 protected:
89  QGraphicsView* _viewer;
92 
94  virtual void closeEvent(QCloseEvent* closeEvent);
95 
97  virtual void wheelEvent(QWheelEvent* event);
98 };
99 
100 #endif /* FLOWWIDGET_H_ */
This model wraps a ParameterFile instance and provides access to the data interpreted as a (directed)...
Definition: GraphModel.h:32
NodeHandler * _nodehandler
graphics scene to display
Definition: FlowWidget.h:91
void zoomIn()
zoom in
Definition: FlowWidget.cpp:82
GraphModel * model()
Get used model.
Definition: FlowWidget.cpp:70
QGraphicsView * _viewer
viewer
Definition: FlowWidget.h:89
virtual void wheelEvent(QWheelEvent *event)
zooms in and out on mousewheel event
Definition: FlowWidget.cpp:98
void zoomFit()
fit in view
Definition: FlowWidget.cpp:90
void updateFileName(const QString &fileName)
update title and main window file information
Definition: FlowWidget.cpp:60
void statusMessage(QString msg) const
Send status message.
void saveFlowChart() const
Save flowchart diagram to graphics file.
Definition: FlowWidget.cpp:78
virtual void closeEvent(QCloseEvent *closeEvent)
check modification status and ask to save before closing
Definition: FlowWidget.cpp:110
Widget to display data flow diagram.
Definition: FlowWidget.h:36
void zoomOut()
zoom out
Definition: FlowWidget.cpp:86
void modify(bool val=true)
set modified flag
Definition: FlowWidget.cpp:94
charon_core_DLL_PUBLIC std::string type(const std::string &typeInfo)
FlowWidget(GraphModel *model, QWidget *parent=0)
Default constructor.
Definition: FlowWidget.cpp:35
QGraphicsScene that handles all drag&drop, node move and connect events.
Definition: NodeHandler.h:36
void modelChanged(GraphModel *model)
Inform about changed model.
void nodeTypeSelected(QString type) const
Send type of currently selected node.