COPASI API  4.16.103
CQLayoutMainWindow.h
Go to the documentation of this file.
1 // Copyright (C) 2010 - 2013 by Pedro Mendes, Virginia Tech Intellectual
2 // Properties, Inc., University of Heidelberg, and The University
3 // of Manchester.
4 // All rights reserved.
5 
6 // Copyright (C) 2008 - 2009 by Pedro Mendes, Virginia Tech Intellectual
7 // Properties, Inc., EML Research, gGmbH, University of Heidelberg,
8 // and The University of Manchester.
9 // All rights reserved.
10 
11 // Copyright (C) 2007 by Pedro Mendes, Virginia Tech Intellectual
12 // Properties, Inc. and EML Research, gGmbH.
13 // All rights reserved.
14 
15 #ifndef SIMGUI_H_
16 #define SIMGUI_H_
17 
18 #include <QtCore/QObject>
19 
20 #include <QtGui/QFrame>
21 #include <QtCore/QString>
22 #include <QtGui/QIcon>
23 
24 #include <string>
25 
26 #include "CDataEntity.h"
27 #include "CVisParameters.h"
28 #include "copasi.h"
29 
30 class CLayout;
32 class CQGLViewport;
33 class CQParaPanel;
35 class CVisParameters;
36 class QAction;
37 class QActionGroup;
38 class QCloseEvent;
39 class QComboBox;
40 class QFrame;
41 class QMenu;
42 class QSplitter;
43 class QToolBar;
44 class QSlider;
45 class QFrame;
46 class QToolBar;
47 class CLayout;
49 class QCloseEvent;
50 
51 class CQLayoutMainWindow : public QFrame
52 {
53 
54  Q_OBJECT // must include this if you use Qt signals/slots
55 
56 public:
57  CQLayoutMainWindow(QWidget* pParent);
58  void setLayout(CLayout* pLayout);
60  void setIndividualScaling();
61  void setGlobalScaling();
62  void setSizeMode();
63  void setColorMode();
65  void insertValueTable(CDataEntity dataSet);
66  void updateValueTable(CDataEntity dataSet);
67  void setMinValue(C_INT32 minNdSize); // set minimum possible node size
68  void setMaxValue(C_INT32 maxNdSize); // set maximum possible node size
69  void setMinAndMaxValue(C_INT32 minNdSize, C_INT32 maxNdSize);
70  void setFontSizeForLabels(C_INT32 size);
71  bool getAnimationRunning();
72  void setAnimationRunning(bool animationRunningP);
73  void setMinNodeSize(C_FLOAT64 minNdSize);
74  void setMaxNodeSize(C_FLOAT64 minNdSize);
78  void setStepsPerSecond(C_INT16 val);
82  size_t getCurrentStep();
83  void addItemInAnimation(std::string s);
84  void removeItemInAnimation(std::string s);
85 
86  static const char* const ZOOM_FACTOR_STRINGS[];
87  static const double ZOOM_FACTORS[];
88 
89 protected:
90 
91 public:
92  void setZoomFactor(QString s);
93  void setZoomFactor(double zoom);
94 
95 private slots:
96  void loadSBMLFile();
97  void showAnimation();
98  void showStep(int i);
99  void startAnimation();
100  void pauseAnimation();
101  void stopAnimation();
102  void forwardAnimation();
103  void backwardAnimation();
104  void stepForwardAnimation();
105  void stepBackwardAnimation();
106  void parameterTableValueChanged(int row);
107 
108 // for the new code we need the following slots to be public
109 // so that we can use them from the new main window class
110 public slots:
111  void slotResetView();
112 
113  /**
114  * Make the layout fit the screen.
115  */
116  double slotFitToScreen();
117  void loadData();
118  void saveImage();
119  void mapLabelsToCircles();
120  void mapLabelsToRectangles();
121  void changeMinMaxNodeSizes();
122  void changeFontSize();
123  void slotValueTableToggled(bool checked);
124  void slotParameterTableToggled(bool checked);
125  void slotPlayerControlToggled(bool checked);
126  void slotToolbarToggled(bool checked);
127  void slotLoopActivated(bool checked);
128 
129 public slots:
130  void changeStepValue(int i);
131  void endOfAnimationReached();
132 
133 private:
134  bool maybeSave();
135  QIcon createStartIcon();
136  QIcon createStopIcon();
137 
139  QMenu *mpFileMenu;
142  QMenu *mpViewMenu;
143  QMenu *mpZoomMenu;
144  QMenu *mpPlayMenu;
145 
146  QAction *mpCreatePicture;
147  QAction *mpOpenSBMLFile;
148  QAction *mpCloseAction;
150  QAction *mpCircularShape;
151  QAction *mpMimaNodeSizes;
152  QAction *mpSFontSize;
154 
157  QFrame *mpMainBox;
158  QSplitter* mpSplitter;
160  QSlider *mpTimeSlider;
161 
162  QFrame *mpFrame;
163 
164  QFrame *mpInfoBox;
165 
167 
168  bool mDataPresent; // shows whether time series data already load
169  QString mCurrentPlace;
170  QToolBar* mpToolbar;
171  QComboBox* mpZoomComboBox;
172  bool mLooping;
176  QActionGroup* mpZoomActionGroup;
178 };
179 
180 #endif /*SIMGUI_H_*/
void setFontSizeForLabels(C_INT32 size)
CQPlayerControlWidget * getControlWidget()
CQParaPanel * mpParaPanel
void setMaxNodeSize(C_FLOAT64 minNdSize)
QAction * mpParameterTableAction
void slotParameterTableToggled(bool checked)
void setValueOnSlider(C_INT32)
void setZoomFactor(QString s)
void slotLoopActivated(bool checked)
CVisParameters * mpVisParameters
#define C_INT32
Definition: copasi.h:90
void removeItemInAnimation(std::string s)
static const double ZOOM_FACTORS[]
void insertValueTable(CDataEntity dataSet)
void setMinValue(C_INT32 minNdSize)
static const char *const ZOOM_FACTOR_STRINGS[]
void setAnimationRunning(bool animationRunningP)
CQGLViewport * mpGLViewport
#define C_INT16
Definition: copasi.h:91
CVisParameters::SCALING_MODE getScalingMode()
void setMinNodeSize(C_FLOAT64 minNdSize)
void setLayout(CLayout *pLayout)
void setMaxValue(C_INT32 maxNdSize)
CQPlayerControlWidget * mpControlWidget
#define C_FLOAT64
Definition: copasi.h:92
void slotPlayerControlToggled(bool checked)
void slotToolbarToggled(bool checked)
void parameterTableValueChanged(int row)
QActionGroup * mpZoomActionGroup
void updateValueTable(CDataEntity dataSet)
void setStepsPerSecond(C_INT16 val)
CQLayoutMainWindow(QWidget *pParent)
void addItemInAnimation(std::string s)
CQCurrentValueTable * mpValTable
CVisParameters::MAPPING_MODE getMappingMode()
void slotValueTableToggled(bool checked)
void setMinAndMaxValue(C_INT32 minNdSize, C_INT32 maxNdSize)