COPASI API  4.16.103
listviews.h
Go to the documentation of this file.
1 // Copyright (C) 2010 - 2014 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) 2002 - 2007 by Pedro Mendes, Virginia Tech Intellectual
12 // Properties, Inc. and EML Research, gGmbH.
13 // All rights reserved.
14 
15 /****************************************************************************
16  ** $ CopasiUI/listviews.h Modified on : 8th March, 2002
17  ** $ Author : Ankur Gupta
18  *****************************************************************************/
19 #ifndef LISTVIEWS_H
20 #define LISTVIEWS_H
21 
22 #include <set>
23 #include <QtGui/QSplitter>
24 #include <QtGui/QTreeView>
25 #include <QtGui/QStackedWidget>
26 
27 #include "copasi.h"
28 
29 class CQTabWidget;
30 class CQBrowserPane;
31 class CQBrowserPaneDM;
32 
33 class Refresh;
34 class CCopasiObject;
35 
36 class DataModelGUI;
37 class QSortFilterProxyModel;
38 class CQCompartment;
41 class CQEventsWidget;
42 class CQEventWidget1;
43 class FunctionWidget1;
44 class CQFunctionsWidget;
45 class CMathModel;
46 class CQSpeciesDetail;
47 class CQSpeciesWidget;
48 class CQEFMWidget;
49 class CQEFMResultWidget;
55 class ReactionsWidget1;
56 class CQReactionsWidget;
57 class SteadyStateWidget;
58 class ScanWidget;
60 class CQSensResultWidget;
62 class CQTrajectoryWidget;
63 class CQReportsWidget;
64 class CQTSSAWidget;
65 class CQTSSAResultWidget;
68 
69 #ifdef COPASI_NONLIN_DYN_OSCILLATION
71 #endif
72 
73 #ifdef COPASI_DEBUG
74 class CQUpdatesWidget;
75 #endif
76 
79 class CopasiWidget;
80 class CQPlotsWidget;
81 class CQSplashWidget;
82 class CQTimeSeriesWidget;
83 class CQFittingWidget;
84 class CQFittingResult;
85 class CQMCAWidget;
86 class CMCAResultWidget;
87 class CQLNAWidget;
88 class CLNAResultWidget;
89 class CQReportDefinition;
90 class CQLyapWidget;
91 class CQLyapResultWidget;
92 class CQModelValue;
93 class CQMathMatrixWidget;
94 class CQLayoutsWidget;
95 
96 class CQPlotSubwidget;
97 
98 //********************************************************************************
99 
100 class ListViews : public QSplitter
101 {
102  Q_OBJECT
103 
104  friend class CopasiUI3Window;
105 
106 public:
107  static const std::string ObjectTypeName[];
108 
109  ListViews(QWidget *parent = 0, const char *name = 0);
110  virtual ~ListViews();
111 
112 #ifdef DELETE
113 #undef DELETE
114 #endif
115  // CHANGE does not include RENAME
116  enum Action {CHANGE = 0, ADD, DELETE, RENAME};
131  };
132 
133  void setDataModel(DataModelGUI* pDM);
135  void setFramework(int framework);
136 
138  void commit();
139 
140  void switchToOtherWidget(const size_t & id, const std::string & key);
141 
142  size_t getCurrentItemId();
143  CopasiWidget* findWidgetFromId(const size_t & id) const;
144 
145  // return current widget - added 02.07.08
147 
148  //TODO these are convenience methods used by SliderDialog. They should be
149  //replaced by something more generic.
157 
159 
160 signals:
161  void signalFolderChanged(const QModelIndex & index);
162 
163 private:
164  CopasiWidget* findWidgetFromIndex(const QModelIndex & index) const;
165 
166  void ConstructNodeWidgets();
167 
168 public slots:
169  void slotFolderChanged(const QModelIndex & index);
170 
171 private slots:
172  bool slotNotify(ListViews::ObjectType objectType, ListViews::Action action, std::string key = "");
173  void slotSort(const QModelIndex & index1, const QModelIndex & index2);
174 
175 private:
176  bool updateCurrentWidget(ObjectType objectType, Action action, const std::string & key = "");
177 
179  Action action,
180  const std::string & key);
181 
183  CQBrowserPaneDM * mpTreeDM; // create the object of the tree
184  QSortFilterProxyModel * mpTreeSortDM;
187  std::string mCurrentItemKey;
188 
189  //the widgets
191  QStackedWidget *mpStackedWidget;
192 
240 
241 #ifdef COPASI_NONLIN_DYN_OSCILLATION
242  CQOscillationTaskWidget *oscillationTaskWidget;
243 #endif
244 
245 #ifdef COPASI_DEBUG
246  CQUpdatesWidget *mpUpdatesWidget;
247 #endif // COPASI_DEBUG
248 
251 };
252 
253 #endif
ScanWidget * scanWidget
Definition: listviews.h:227
CQTabWidget * modelWidget
Definition: listviews.h:209
SteadyStateWidget * getSteadyStateWidget()
Definition: listviews.cpp:1054
CMCAResultWidget * mpCMCAResultWidget
Definition: listviews.h:193
DataModelGUI * mpDataModelGUI
Definition: listviews.h:182
CQOptimizationResult * optResultWidget
Definition: listviews.h:217
CQLNAWidget * getLNAWidget()
Definition: listviews.cpp:1069
CQBrowserPane * mpTreeView
Definition: listviews.h:190
CQOptimizationWidget * optimizationWidget
Definition: listviews.h:216
objectType
CQReportsWidget * mpReportsWidget
Definition: listviews.h:232
A widget class for Functions branch.
CopasiWidget * getCurrentWidget()
Definition: listviews.cpp:995
SensitivitiesWidget * sensWidget
Definition: listviews.h:228
void switchToOtherWidget(const size_t &id, const std::string &key)
Definition: listviews.cpp:926
CQFittingWidget * getFittingWidget()
Definition: listviews.cpp:1074
CLNAResultWidget * mpCLNAResultWidget
Definition: listviews.h:196
CQMathMatrixWidget * mpMathMatrixWidget
Definition: listviews.h:250
CopasiWidget * findWidgetFromIndex(const QModelIndex &index) const
Definition: listviews.cpp:618
CQMCAWidget * getMCAWidget()
Definition: listviews.cpp:1064
void setDataModel(DataModelGUI *pDM)
Definition: listviews.cpp:267
CQLNAWidget * mpCQLNAWidget
Definition: listviews.h:195
CQMCAWidget * mpCQMCAWidget
Definition: listviews.h:194
bool updateCurrentWidget(ObjectType objectType, Action action, const std::string &key="")
Definition: listviews.cpp:985
CQLyapWidget * lyapWidget
Definition: listviews.h:205
CQBrowserPaneDM * mpTreeDM
Definition: listviews.h:183
void ConstructNodeWidgets()
Definition: listviews.cpp:298
CQPlotsWidget * mpPlotsWidget
Definition: listviews.h:223
void commit()
Definition: listviews.cpp:998
CQParameterSetsWidget * mpParameterSetsWidget
Definition: listviews.h:221
CQTrajectoryWidget * trajectoryWidget
Definition: listviews.h:235
CQSensResultWidget * sensResultWidget
Definition: listviews.h:229
CQLayoutsWidget * mpLayoutsWidget
Definition: listviews.h:249
void setFramework(int framework)
Definition: listviews.cpp:1036
CQTabWidget * eventWidget1
Definition: listviews.h:202
void notifyChildWidgets(ObjectType objectType, Action action, const std::string &key)
Definition: listviews.cpp:1004
CQPlotSubwidget * mpPlotSubwidget
Definition: listviews.h:224
virtual ~ListViews()
Definition: listviews.cpp:252
CQEFMWidget * mpEFMWidget
Definition: listviews.h:212
CQTabWidget * reactionsWidget1
Definition: listviews.h:226
CQReactionsWidget * mpReactionsWidget
Definition: listviews.h:225
CQTSSAResultWidget * tssaResultWidget
Definition: listviews.h:237
CQTabWidget * mpParameterSetWidget
Definition: listviews.h:222
CQTSSAWidget * tssaWidget
Definition: listviews.h:236
void slotFolderChanged(const QModelIndex &index)
Definition: listviews.cpp:875
CQEventsWidget * eventsWidget
Definition: listviews.h:201
CopasiWidget * findWidgetFromId(const size_t &id) const
Definition: listviews.cpp:678
CQSpeciesWidget * mpSpeciesWidget
Definition: listviews.h:207
QSortFilterProxyModel * mpTreeSortDM
Definition: listviews.h:184
CQCrossSectionTaskWidget * crossSectionTaskWidget
Definition: listviews.h:238
CQGlobalQuantitiesWidget * mpGlobalQuantitiesWidget
Definition: listviews.h:210
CQEFMResultWidget * mpEFMResultWidget
Definition: listviews.h:213
CQTabWidget * functionWidget1
Definition: listviews.h:204
CopasiWidget * mpCurrentWidget
Definition: listviews.h:186
CQFittingWidget * paramFittingWidget
Definition: listviews.h:218
CQCompartmentsWidget * mpCompartmentsWidget
Definition: listviews.h:197
CQCrossSectionTaskWidget * getCrossSectionWidget()
Definition: listviews.cpp:1084
CQSplashWidget * defaultWidget
Definition: listviews.h:199
void updateMIRIAMResourceContents()
Definition: listviews.cpp:1021
DataModelGUI * getDataModel()
Definition: listviews.h:134
CQDifferentialEquations * differentialEquations
Definition: listviews.h:200
ListViews(QWidget *parent=0, const char *name=0)
Definition: listviews.cpp:143
CQFittingResult * mpFittingResultWidget
Definition: listviews.h:219
void slotSort(const QModelIndex &index1, const QModelIndex &index2)
Definition: listviews.cpp:980
CQTrajectoryWidget * getTrajectoryWidget()
Definition: listviews.cpp:1049
CQLyapResultWidget * lyapResultWidget
Definition: listviews.h:206
CQSteadyStateResult * stateWidget
Definition: listviews.h:230
CQTabWidget * compartmentsWidget1
Definition: listviews.h:198
CQFunctionsWidget * mpFunctionsWidget
Definition: listviews.h:203
std::string mCurrentItemKey
Definition: listviews.h:187
CQReportDefinition * tableDefinition1
Definition: listviews.h:233
CQMoietiesTaskWidget * mpMoietiesTaskWidget
Definition: listviews.h:215
CQMoietiesTaskResult * mpMoietiesTaskResult
Definition: listviews.h:214
CQParameterOverviewWidget * mpParameterOverviewWidget
Definition: listviews.h:220
QStackedWidget * mpStackedWidget
Definition: listviews.h:191
CQOptimizationWidget * getOptimizationWidget()
Definition: listviews.cpp:1079
static const std::string ObjectTypeName[]
Definition: listviews.h:107
CQTabWidget * mpModelValueWidget
Definition: listviews.h:211
CQTabWidget * metabolitesWidget1
Definition: listviews.h:208
ScanWidget * getScanWidget()
Definition: listviews.cpp:1059
void signalFolderChanged(const QModelIndex &index)
SteadyStateWidget * steadystateWidget
Definition: listviews.h:231
CQTimeSeriesWidget * crossSectionTimeSeriesWidget
Definition: listviews.h:239
CMathModel * mpMathModel
Definition: listviews.h:185
size_t getCurrentItemId()
Definition: listviews.cpp:938
bool slotNotify(ListViews::ObjectType objectType, ListViews::Action action, std::string key="")
Definition: listviews.cpp:952
CQTimeSeriesWidget * timeSeriesWidget
Definition: listviews.h:234