COPASI API  4.16.103
Public Types | Public Slots | Signals | Public Member Functions | Static Public Attributes | Private Slots | Private Member Functions | Private Attributes | Friends | List of all members
ListViews Class Reference

#include <listviews.h>

Inheritance diagram for ListViews:
Inheritance graph
[legend]
Collaboration diagram for ListViews:
Collaboration graph
[legend]

Public Types

enum  Action { CHANGE = 0, ADD, DELETE, RENAME }
 
enum  ObjectType {
  METABOLITE = 0, COMPARTMENT, REACTION, FUNCTION,
  MODEL, STATE, REPORT, PLOT,
  MODELVALUE, EVENT, MIRIAM, LAYOUT,
  PARAMETEROVERVIEW, MODELPARAMETERSET
}
 

Public Slots

void slotFolderChanged (const QModelIndex &index)
 

Signals

void signalFolderChanged (const QModelIndex &index)
 

Public Member Functions

void commit ()
 
CopasiWidgetfindWidgetFromId (const size_t &id) const
 
CQCrossSectionTaskWidgetgetCrossSectionWidget ()
 
size_t getCurrentItemId ()
 
CopasiWidgetgetCurrentWidget ()
 
DataModelGUIgetDataModel ()
 
CQFittingWidgetgetFittingWidget ()
 
CQLNAWidgetgetLNAWidget ()
 
CQMCAWidgetgetMCAWidget ()
 
CQOptimizationWidgetgetOptimizationWidget ()
 
ScanWidgetgetScanWidget ()
 
SteadyStateWidgetgetSteadyStateWidget ()
 
CQTrajectoryWidgetgetTrajectoryWidget ()
 
 ListViews (QWidget *parent=0, const char *name=0)
 
void setDataModel (DataModelGUI *pDM)
 
void setFramework (int framework)
 
void switchToOtherWidget (const size_t &id, const std::string &key)
 
void updateMIRIAMResourceContents ()
 
virtual ~ListViews ()
 

Static Public Attributes

static const std::string ObjectTypeName []
 

Private Slots

bool slotNotify (ListViews::ObjectType objectType, ListViews::Action action, std::string key="")
 
void slotSort (const QModelIndex &index1, const QModelIndex &index2)
 

Private Member Functions

void ConstructNodeWidgets ()
 
CopasiWidgetfindWidgetFromIndex (const QModelIndex &index) const
 
void notifyChildWidgets (ObjectType objectType, Action action, const std::string &key)
 
bool updateCurrentWidget (ObjectType objectType, Action action, const std::string &key="")
 

Private Attributes

CQTabWidgetcompartmentsWidget1
 
CQCrossSectionTaskWidgetcrossSectionTaskWidget
 
CQTimeSeriesWidgetcrossSectionTimeSeriesWidget
 
CQSplashWidgetdefaultWidget
 
CQDifferentialEquationsdifferentialEquations
 
CQEventsWidgeteventsWidget
 
CQTabWidgeteventWidget1
 
CQTabWidgetfunctionWidget1
 
CQLyapResultWidgetlyapResultWidget
 
CQLyapWidgetlyapWidget
 
std::string mCurrentItemKey
 
CQTabWidgetmetabolitesWidget1
 
CQTabWidgetmodelWidget
 
CLNAResultWidgetmpCLNAResultWidget
 
CMCAResultWidgetmpCMCAResultWidget
 
CQCompartmentsWidgetmpCompartmentsWidget
 
CQLNAWidgetmpCQLNAWidget
 
CQMCAWidgetmpCQMCAWidget
 
CopasiWidgetmpCurrentWidget
 
DataModelGUImpDataModelGUI
 
CQEFMResultWidgetmpEFMResultWidget
 
CQEFMWidgetmpEFMWidget
 
CQFittingResultmpFittingResultWidget
 
CQFunctionsWidgetmpFunctionsWidget
 
CQGlobalQuantitiesWidgetmpGlobalQuantitiesWidget
 
CQLayoutsWidgetmpLayoutsWidget
 
CQMathMatrixWidgetmpMathMatrixWidget
 
CMathModelmpMathModel
 
CQTabWidgetmpModelValueWidget
 
CQMoietiesTaskResultmpMoietiesTaskResult
 
CQMoietiesTaskWidgetmpMoietiesTaskWidget
 
CQParameterOverviewWidgetmpParameterOverviewWidget
 
CQParameterSetsWidgetmpParameterSetsWidget
 
CQTabWidgetmpParameterSetWidget
 
CQPlotSubwidgetmpPlotSubwidget
 
CQPlotsWidgetmpPlotsWidget
 
CQReactionsWidgetmpReactionsWidget
 
CQReportsWidgetmpReportsWidget
 
CQSpeciesWidgetmpSpeciesWidget
 
QStackedWidget * mpStackedWidget
 
CQBrowserPaneDMmpTreeDM
 
QSortFilterProxyModel * mpTreeSortDM
 
CQBrowserPanempTreeView
 
CQOptimizationWidgetoptimizationWidget
 
CQOptimizationResultoptResultWidget
 
CQFittingWidgetparamFittingWidget
 
CQTabWidgetreactionsWidget1
 
ScanWidgetscanWidget
 
CQSensResultWidgetsensResultWidget
 
SensitivitiesWidgetsensWidget
 
CQSteadyStateResultstateWidget
 
SteadyStateWidgetsteadystateWidget
 
CQReportDefinitiontableDefinition1
 
CQTimeSeriesWidgettimeSeriesWidget
 
CQTrajectoryWidgettrajectoryWidget
 
CQTSSAResultWidgettssaResultWidget
 
CQTSSAWidgettssaWidget
 

Friends

class CopasiUI3Window
 

Detailed Description

Definition at line 100 of file listviews.h.

Member Enumeration Documentation

Enumerator
CHANGE 
ADD 
DELETE 
RENAME 

Definition at line 116 of file listviews.h.

Enumerator
METABOLITE 
COMPARTMENT 
REACTION 
FUNCTION 
MODEL 
STATE 
REPORT 
PLOT 
MODELVALUE 
EVENT 
MIRIAM 
LAYOUT 
PARAMETEROVERVIEW 
MODELPARAMETERSET 

Definition at line 117 of file listviews.h.

Constructor & Destructor Documentation

ListViews::ListViews ( QWidget *  parent = 0,
const char *  name = 0 
)

Definition at line 143 of file listviews.cpp.

References defaultWidget, mCurrentItemKey, mpCurrentWidget, mpStackedWidget, mpTreeDM, mpTreeSortDM, mpTreeView, and slotSort().

143  :
144 
145  QSplitter(Qt::Horizontal, parent),
146  mpDataModelGUI(NULL),
147  mpTreeDM(NULL),
148  mpTreeSortDM(NULL),
149  mpMathModel(NULL),
150  mpCurrentWidget(NULL),
151  mCurrentItemKey(),
152  mpCMCAResultWidget(NULL),
153  mpCQMCAWidget(NULL),
154  mpCQLNAWidget(NULL),
155  mpCLNAResultWidget(NULL),
156  mpCompartmentsWidget(NULL),
157  compartmentsWidget1(NULL),
158  defaultWidget(NULL),
159  differentialEquations(NULL),
160  eventsWidget(NULL),
161  eventWidget1(NULL),
162  mpFunctionsWidget(NULL),
163  functionWidget1(NULL),
164  lyapWidget(NULL),
165  lyapResultWidget(NULL),
166  mpSpeciesWidget(NULL),
167  metabolitesWidget1(NULL),
168  modelWidget(NULL),
170  mpModelValueWidget(NULL),
171  mpEFMWidget(NULL),
172  mpEFMResultWidget(NULL),
173  mpMoietiesTaskResult(NULL),
174  mpMoietiesTaskWidget(NULL),
175  optimizationWidget(NULL),
176  optResultWidget(NULL),
177  paramFittingWidget(NULL),
178  mpFittingResultWidget(NULL),
180  mpParameterSetsWidget(NULL),
181  mpParameterSetWidget(NULL),
182  mpPlotsWidget(NULL),
183  mpPlotSubwidget(NULL),
184  mpReactionsWidget(NULL),
185  reactionsWidget1(NULL),
186  scanWidget(NULL),
187  sensWidget(NULL),
188  sensResultWidget(NULL),
189  stateWidget(NULL),
190  steadystateWidget(NULL),
191  mpReportsWidget(NULL),
192  tableDefinition1(NULL),
193  timeSeriesWidget(NULL),
194  trajectoryWidget(NULL),
195  tssaWidget(NULL),
196  tssaResultWidget(NULL),
199 #ifdef COPASI_NONLIN_DYN_OSCILLATION
200  oscillationTaskWidget(NULL),
201 #endif
202 #ifdef COPASI_DEBUG
203  mpUpdatesWidget(NULL),
204 #endif
205  mpLayoutsWidget(NULL),
206  mpMathMatrixWidget(NULL)
207 {
208  // Qt3 support to Qt4 reference states . . .
209  // "Use the QSizePolicy() constructor and call the setHorizontalStretch(), setVerticalStretch(), and setHeightForWidth() functions instead."
210  // The stretch was set at "1 ,1", before, but maybe it doesn't need to be explicitly set now.
211  this->setSizePolicy(QSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred));
212 
213  setChildrenCollapsible(false);
214 
215  // create a new QListview to be displayed on the screen..and set its property
216  mpTreeView = new CQBrowserPane(this);
217  mpTreeDM = new CQBrowserPaneDM(this);
218  mpTreeSortDM = new QSortFilterProxyModel(this);
219 
220  mpTreeSortDM->setSourceModel(mpTreeDM);
221  mpTreeSortDM->setSortRole(Qt::EditRole);
222  mpTreeSortDM->setSortCaseSensitivity(Qt::CaseInsensitive);
223  // pSortModel->sort(0, Qt::AscendingOrder);
224 
225  mpTreeView->setModel(mpTreeSortDM);
226  mpTreeView->sortByColumn(0, Qt::AscendingOrder);
227 
228  mpStackedWidget = new QStackedWidget(this);
229  addWidget(mpTreeView);
230  addWidget(mpStackedWidget);
231 
232  if (!opaqueResize())
233  setOpaqueResize();
234 
235  defaultWidget = new CQSplashWidget(this);
236  mpStackedWidget->addWidget(defaultWidget);
237 
238  mpCurrentWidget = defaultWidget; // keeps track of the mpCurrentWidget in use
239  mCurrentItemKey = "";
240  mpStackedWidget->setCurrentWidget(defaultWidget);
241 
242  QList<int> Sizes = sizes();
243  Sizes[0] = 240;
244  Sizes[1] = 560;
245  setSizes(Sizes);
246 
247  // establishes the communication between the mpTreeView clicked and the routine called....
248  connect(mpTreeDM, SIGNAL(dataChanged(const QModelIndex &, const QModelIndex &)),
249  this, SLOT(slotSort(const QModelIndex &, const QModelIndex &)));
250 }
ScanWidget * scanWidget
Definition: listviews.h:227
CQTabWidget * modelWidget
Definition: listviews.h:209
CMCAResultWidget * mpCMCAResultWidget
Definition: listviews.h:193
DataModelGUI * mpDataModelGUI
Definition: listviews.h:182
CQOptimizationResult * optResultWidget
Definition: listviews.h:217
CQBrowserPane * mpTreeView
Definition: listviews.h:190
CQOptimizationWidget * optimizationWidget
Definition: listviews.h:216
CQReportsWidget * mpReportsWidget
Definition: listviews.h:232
SensitivitiesWidget * sensWidget
Definition: listviews.h:228
CLNAResultWidget * mpCLNAResultWidget
Definition: listviews.h:196
CQMathMatrixWidget * mpMathMatrixWidget
Definition: listviews.h:250
CQLNAWidget * mpCQLNAWidget
Definition: listviews.h:195
CQMCAWidget * mpCQMCAWidget
Definition: listviews.h:194
CQLyapWidget * lyapWidget
Definition: listviews.h:205
CQBrowserPaneDM * mpTreeDM
Definition: listviews.h:183
CQPlotsWidget * mpPlotsWidget
Definition: listviews.h:223
CQParameterSetsWidget * mpParameterSetsWidget
Definition: listviews.h:221
CQTrajectoryWidget * trajectoryWidget
Definition: listviews.h:235
CQSensResultWidget * sensResultWidget
Definition: listviews.h:229
CQLayoutsWidget * mpLayoutsWidget
Definition: listviews.h:249
CQTabWidget * eventWidget1
Definition: listviews.h:202
CQPlotSubwidget * mpPlotSubwidget
Definition: listviews.h:224
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
CQEventsWidget * eventsWidget
Definition: listviews.h:201
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
CQSplashWidget * defaultWidget
Definition: listviews.h:199
CQDifferentialEquations * differentialEquations
Definition: listviews.h:200
CQFittingResult * mpFittingResultWidget
Definition: listviews.h:219
void slotSort(const QModelIndex &index1, const QModelIndex &index2)
Definition: listviews.cpp:980
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
CQTabWidget * mpModelValueWidget
Definition: listviews.h:211
CQTabWidget * metabolitesWidget1
Definition: listviews.h:208
SteadyStateWidget * steadystateWidget
Definition: listviews.h:231
CQTimeSeriesWidget * crossSectionTimeSeriesWidget
Definition: listviews.h:239
CMathModel * mpMathModel
Definition: listviews.h:185
CQTimeSeriesWidget * timeSeriesWidget
Definition: listviews.h:234
ListViews::~ListViews ( )
virtual

Definition at line 252 of file listviews.cpp.

References CQLayoutsWidget::deleteLayoutWindows(), and mpLayoutsWidget.

253 {
254  //TODO clean up
255  if (mpLayoutsWidget != NULL)
257 }
CQLayoutsWidget * mpLayoutsWidget
Definition: listviews.h:249

Member Function Documentation

void ListViews::commit ( )

Definition at line 998 of file listviews.cpp.

References CopasiWidget::leave(), and mpCurrentWidget.

999 {
1000  if (mpCurrentWidget != NULL)
1002 }
virtual bool leave()
CopasiWidget * mpCurrentWidget
Definition: listviews.h:186
void ListViews::ConstructNodeWidgets ( )
private

Definition at line 298 of file listviews.cpp.

References COMPARTMENT, compartmentsWidget1, crossSectionTaskWidget, crossSectionTimeSeriesWidget, differentialEquations, EVENT, eventsWidget, eventWidget1, FUNCTION, functionWidget1, lyapResultWidget, lyapWidget, METABOLITE, metabolitesWidget1, MODEL, MODELPARAMETERSET, MODELVALUE, modelWidget, mpCLNAResultWidget, mpCMCAResultWidget, mpCompartmentsWidget, mpCQLNAWidget, mpCQMCAWidget, mpEFMResultWidget, mpEFMWidget, mpFittingResultWidget, mpFunctionsWidget, mpGlobalQuantitiesWidget, mpLayoutsWidget, mpMathMatrixWidget, mpModelValueWidget, mpMoietiesTaskResult, mpMoietiesTaskWidget, mpParameterOverviewWidget, mpParameterSetsWidget, mpParameterSetWidget, mpPlotSubwidget, mpPlotsWidget, mpReactionsWidget, mpReportsWidget, mpSpeciesWidget, mpStackedWidget, optimizationWidget, optResultWidget, paramFittingWidget, REACTION, reactionsWidget1, scanWidget, sensResultWidget, sensWidget, stateWidget, steadystateWidget, tableDefinition1, timeSeriesWidget, trajectoryWidget, tssaResultWidget, and tssaWidget.

Referenced by setDataModel().

299 {
300 
301  // create the model widgets
303  {
306  }
307 
308  if (!compartmentsWidget1)
309  {
312  }
313 
314 #ifdef HAVE_MML
315 
317  {
320  }
321 
322 #endif // HAVE_MML
323 
324  if (!eventsWidget)
325  {
326  eventsWidget = new CQEventsWidget(this);
327  mpStackedWidget->addWidget(eventsWidget);
328  }
329 
330  if (!eventWidget1)
331  {
333  mpStackedWidget->addWidget(eventWidget1);
334  }
335 
336  if (!mpFunctionsWidget)
337  {
340  }
341 
342  if (!functionWidget1)
343  {
345  mpStackedWidget->addWidget(functionWidget1);
346  }
347 
348  if (!lyapWidget)
349  {
350  lyapWidget = new CQLyapWidget(this);
351  mpStackedWidget->addWidget(lyapWidget);
352  }
353 
354  if (!lyapResultWidget)
355  {
357  mpStackedWidget->addWidget(lyapResultWidget);
358  }
359 
360  if (!mpSpeciesWidget)
361  {
362  mpSpeciesWidget = new CQSpeciesWidget(this);
363  mpStackedWidget->addWidget(mpSpeciesWidget);
364  }
365 
366  if (!metabolitesWidget1)
367  {
370  }
371 
372  if (!modelWidget)
373  {
374  modelWidget = new CQTabWidget(ListViews::MODEL, new CQModelWidget(this), this);
375  mpStackedWidget->addWidget(modelWidget);
376  }
377 
378  if (!mpModelValueWidget)
379  {
382  }
383 
385  {
388  }
389 
390  if (!mpEFMWidget)
391  {
392  mpEFMWidget = new CQEFMWidget(this);
393  mpStackedWidget->addWidget(mpEFMWidget);
394  }
395 
396  if (!mpEFMResultWidget)
397  {
400  }
401 
403  {
406  }
407 
409  {
412  }
413 
415  {
418  }
419 
421  {
424  }
425 
427  {
430  }
431 
432  if (!mpCMCAResultWidget)
433  {
436  }
437 
438  if (!mpCQMCAWidget)
439  {
440  mpCQMCAWidget = new CQMCAWidget(this);
441  mpStackedWidget->addWidget(mpCQMCAWidget);
442  }
443 
444  if (!mpCLNAResultWidget)
445  {
448  }
449 
450  if (!mpCQLNAWidget)
451  {
452  mpCQLNAWidget = new CQLNAWidget(this);
453  mpStackedWidget->addWidget(mpCQLNAWidget);
454  }
455 
456  if (!optimizationWidget)
457  {
460  }
461 
462  if (!optResultWidget)
463  {
465  mpStackedWidget->addWidget(optResultWidget);
466  }
467 
468  if (!paramFittingWidget)
469  {
472  }
473 
475  {
478  }
479 
480  if (!mpPlotsWidget)
481  {
482  mpPlotsWidget = new CQPlotsWidget(this);
483  mpStackedWidget->addWidget(mpPlotsWidget);
484  }
485 
486  if (!mpPlotSubwidget)
487  {
488  mpPlotSubwidget = new CQPlotSubwidget(this);
489  mpStackedWidget->addWidget(mpPlotSubwidget);
490  }
491 
492  if (!mpReactionsWidget)
493  {
496  }
497 
498  if (!reactionsWidget1)
499  {
501  mpStackedWidget->addWidget(reactionsWidget1);
502  }
503 
504  if (!scanWidget)
505  {
506  scanWidget = new ScanWidget(this);
507  mpStackedWidget->addWidget(scanWidget);
508  }
509 
510  if (!stateWidget)
511  {
512  stateWidget = new CQSteadyStateResult(this);
513  mpStackedWidget->addWidget(stateWidget);
514  }
515 
516  if (!steadystateWidget)
517  {
520  }
521 
522  if (!mpReportsWidget)
523  {
524  mpReportsWidget = new CQReportsWidget(this);
525  mpStackedWidget->addWidget(mpReportsWidget);
526  }
527 
528  if (!tableDefinition1)
529  {
531  mpStackedWidget->addWidget(tableDefinition1);
532  }
533 
534  if (!sensWidget)
535  {
536  sensWidget = new SensitivitiesWidget(this);
537  mpStackedWidget->addWidget(sensWidget);
538  }
539 
540  if (!sensResultWidget)
541  {
543  mpStackedWidget->addWidget(sensResultWidget);
544  }
545 
546  if (!timeSeriesWidget)
547  {
549  mpStackedWidget->addWidget(timeSeriesWidget);
550  }
551 
552  if (!trajectoryWidget)
553  {
555  mpStackedWidget->addWidget(trajectoryWidget);
556  }
557 
558  if (!tssaWidget)
559  {
560  tssaWidget = new CQTSSAWidget(this);
561  mpStackedWidget->addWidget(tssaWidget);
562  }
563 
564  if (!tssaResultWidget)
565  {
567  mpStackedWidget->addWidget(tssaResultWidget);
568  }
569 
571  {
574  }
575 
577  {
580  }
581 
582 #ifdef COPASI_NONLIN_DYN_OSCILLATION
583 
584  if (!oscillationTaskWidget)
585  {
586  oscillationTaskWidget = new CQOscillationTaskWidget(this);
587  mpStackedWidget->addWidget(oscillationTaskWidget);
588  }
589 
590 #endif
591 
592 #ifdef COPASI_DEBUG
593 
594  if (!mpUpdatesWidget)
595  {
596  mpUpdatesWidget = new CQUpdatesWidget(this);
597  mpStackedWidget->addWidget(mpUpdatesWidget);
598  }
599 
600 #endif // COPASI_DEBUG
601 
602  if (!mpMathMatrixWidget)
603  {
606  }
607 
608  if (!mpLayoutsWidget)
609  {
610  mpLayoutsWidget = new CQLayoutsWidget(this);
611  mpStackedWidget->addWidget(mpLayoutsWidget);
612  }
613 }
ScanWidget * scanWidget
Definition: listviews.h:227
CQTabWidget * modelWidget
Definition: listviews.h:209
CMCAResultWidget * mpCMCAResultWidget
Definition: listviews.h:193
CQOptimizationResult * optResultWidget
Definition: listviews.h:217
CQOptimizationWidget * optimizationWidget
Definition: listviews.h:216
CQReportsWidget * mpReportsWidget
Definition: listviews.h:232
A widget class for Functions branch.
SensitivitiesWidget * sensWidget
Definition: listviews.h:228
CLNAResultWidget * mpCLNAResultWidget
Definition: listviews.h:196
CQMathMatrixWidget * mpMathMatrixWidget
Definition: listviews.h:250
CQLNAWidget * mpCQLNAWidget
Definition: listviews.h:195
CQMCAWidget * mpCQMCAWidget
Definition: listviews.h:194
CQLyapWidget * lyapWidget
Definition: listviews.h:205
CQPlotsWidget * mpPlotsWidget
Definition: listviews.h:223
CQParameterSetsWidget * mpParameterSetsWidget
Definition: listviews.h:221
CQTrajectoryWidget * trajectoryWidget
Definition: listviews.h:235
CQSensResultWidget * sensResultWidget
Definition: listviews.h:229
CQLayoutsWidget * mpLayoutsWidget
Definition: listviews.h:249
CQTabWidget * eventWidget1
Definition: listviews.h:202
CQPlotSubwidget * mpPlotSubwidget
Definition: listviews.h:224
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
CQEventsWidget * eventsWidget
Definition: listviews.h:201
CQSpeciesWidget * mpSpeciesWidget
Definition: listviews.h:207
CQCrossSectionTaskWidget * crossSectionTaskWidget
Definition: listviews.h:238
CQGlobalQuantitiesWidget * mpGlobalQuantitiesWidget
Definition: listviews.h:210
CQEFMResultWidget * mpEFMResultWidget
Definition: listviews.h:213
CQTabWidget * functionWidget1
Definition: listviews.h:204
CQFittingWidget * paramFittingWidget
Definition: listviews.h:218
CQCompartmentsWidget * mpCompartmentsWidget
Definition: listviews.h:197
CQDifferentialEquations * differentialEquations
Definition: listviews.h:200
CQFittingResult * mpFittingResultWidget
Definition: listviews.h:219
CQLyapResultWidget * lyapResultWidget
Definition: listviews.h:206
CQSteadyStateResult * stateWidget
Definition: listviews.h:230
CQTabWidget * compartmentsWidget1
Definition: listviews.h:198
CQFunctionsWidget * mpFunctionsWidget
Definition: listviews.h:203
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
CQTabWidget * mpModelValueWidget
Definition: listviews.h:211
CQTabWidget * metabolitesWidget1
Definition: listviews.h:208
SteadyStateWidget * steadystateWidget
Definition: listviews.h:231
CQTimeSeriesWidget * crossSectionTimeSeriesWidget
Definition: listviews.h:239
CQTimeSeriesWidget * timeSeriesWidget
Definition: listviews.h:234
CopasiWidget * ListViews::findWidgetFromId ( const size_t &  id) const

Definition at line 678 of file listviews.cpp.

References crossSectionTaskWidget, crossSectionTimeSeriesWidget, defaultWidget, differentialEquations, eventsWidget, lyapResultWidget, lyapWidget, modelWidget, mpCLNAResultWidget, mpCMCAResultWidget, mpCompartmentsWidget, mpCQLNAWidget, mpCQMCAWidget, mpEFMResultWidget, mpEFMWidget, mpFittingResultWidget, mpFunctionsWidget, mpGlobalQuantitiesWidget, mpLayoutsWidget, mpMathMatrixWidget, mpMoietiesTaskResult, mpMoietiesTaskWidget, mpParameterOverviewWidget, mpParameterSetsWidget, mpPlotsWidget, mpReactionsWidget, mpReportsWidget, mpSpeciesWidget, optimizationWidget, optResultWidget, paramFittingWidget, scanWidget, sensResultWidget, sensWidget, stateWidget, steadystateWidget, timeSeriesWidget, trajectoryWidget, tssaResultWidget, and tssaWidget.

Referenced by findWidgetFromIndex(), CQCrossSectionTaskWidget::init(), SliderDialog::runTask(), CQCrossSectionTaskWidget::taskFinishedEvent(), CQEFMWidget::taskFinishedEvent(), CQLNAWidget::taskFinishedEvent(), CQMCAWidget::taskFinishedEvent(), SensitivitiesWidget::taskFinishedEvent(), SteadyStateWidget::taskFinishedEvent(), CQTSSAWidget::taskFinishedEvent(), and CQTrajectoryWidget::taskFinishedEvent().

679 {
680  switch (id)
681  {
682  case static_cast<size_t>(-1):
683  break; //continue with parent id
684 
685  case 0:
686  return defaultWidget;
687  break;
688 
689  case 1:
690  return modelWidget;
691  break;
692 
693  case 111:
694  return mpCompartmentsWidget;
695  break;
696 
697  case 112:
698  return mpSpeciesWidget;
699  break;
700 
701  case 114:
702  return mpReactionsWidget;
703  break;
704 
705  case 115:
707  break;
708 
709  case 116:
710  return eventsWidget;
711  break;
712 
713  case 118:
715  break;
716 
717  case 119:
718  return mpParameterSetsWidget;
719  break;
720 
721  //case 122:
722  // return functionSymbols;
723  // break;
724 #ifdef HAVE_MML
725 
726  case 126:
727  return differentialEquations;
728  break;
729 #endif // HAVE_MML
730 
731  case 127:
732  return mpMathMatrixWidget;
733  break;
734 #ifdef COPASI_DEBUG
735 
736  case 128:
737  return mpUpdatesWidget;
738  break;
739 #endif
740 
741  case 13:
742  return mpLayoutsWidget;
743  break;
744 
745  case 21:
746  return steadystateWidget;
747  break;
748 
749  case 211:
750  return stateWidget;
751  break;
752 
753  case 221:
754  return mpEFMWidget;
755  break;
756 
757  case 2211:
758  return mpEFMResultWidget;
759  break;
760 
761  case 222:
762  return mpMoietiesTaskWidget;
763  break;
764 
765  case 2221:
766  return mpMoietiesTaskResult;
767  break;
768 
769  case 23:
770  return trajectoryWidget;
771  break;
772 
773  case 231:
774  return timeSeriesWidget;
775  break;
776 
777  case 24:
778  return mpCQMCAWidget;
779  break;
780 
781  case 241:
782  return mpCMCAResultWidget;
783  break;
784 
785  case 26:
786  return lyapWidget;
787  break;
788 
789  case 261:
790  return lyapResultWidget;
791  break;
792 
793  case 27:
794  return tssaWidget;
795  break;
796 
797  case 271:
798  return tssaResultWidget;
799  break;
800 
801  case 28:
802  return crossSectionTaskWidget;
803  break;
804 
805  case 281:
807 
808 #ifdef COPASI_NONLIN_DYN_OSCILLATION
809 
810  case 29:
811  return oscillationTaskWidget;
812  break;
813 #endif
814 
815  case 31:
816  return scanWidget;
817  break;
818 
819  case 32:
820  return optimizationWidget;
821  break;
822 
823  case 321:
824  return optResultWidget;
825  break;
826 
827  case 33:
828  return paramFittingWidget;
829  break;
830 
831  case 331:
832  return mpFittingResultWidget;
833  break;
834 
835  case 34:
836  return sensWidget;
837  break;
838 
839  case 341:
840  return sensResultWidget;
841  break;
842 
843  case 35:
844  return mpCQLNAWidget;
845  break;
846 
847  case 351:
848  return mpCLNAResultWidget;
849  break;
850 
851  case 43: //Report
852  return mpReportsWidget;
853  break;
854 
855  case 42:
856  return mpPlotsWidget;
857  break;
858 
859  case 5:
860  return mpFunctionsWidget;
861  break;
862  }
863 
864  return NULL;
865 }
ScanWidget * scanWidget
Definition: listviews.h:227
CQTabWidget * modelWidget
Definition: listviews.h:209
CMCAResultWidget * mpCMCAResultWidget
Definition: listviews.h:193
CQOptimizationResult * optResultWidget
Definition: listviews.h:217
CQOptimizationWidget * optimizationWidget
Definition: listviews.h:216
CQReportsWidget * mpReportsWidget
Definition: listviews.h:232
SensitivitiesWidget * sensWidget
Definition: listviews.h:228
CLNAResultWidget * mpCLNAResultWidget
Definition: listviews.h:196
CQMathMatrixWidget * mpMathMatrixWidget
Definition: listviews.h:250
CQLNAWidget * mpCQLNAWidget
Definition: listviews.h:195
CQMCAWidget * mpCQMCAWidget
Definition: listviews.h:194
CQLyapWidget * lyapWidget
Definition: listviews.h:205
CQPlotsWidget * mpPlotsWidget
Definition: listviews.h:223
CQParameterSetsWidget * mpParameterSetsWidget
Definition: listviews.h:221
CQTrajectoryWidget * trajectoryWidget
Definition: listviews.h:235
CQSensResultWidget * sensResultWidget
Definition: listviews.h:229
CQLayoutsWidget * mpLayoutsWidget
Definition: listviews.h:249
CQEFMWidget * mpEFMWidget
Definition: listviews.h:212
CQReactionsWidget * mpReactionsWidget
Definition: listviews.h:225
CQTSSAResultWidget * tssaResultWidget
Definition: listviews.h:237
CQTSSAWidget * tssaWidget
Definition: listviews.h:236
CQEventsWidget * eventsWidget
Definition: listviews.h:201
CQSpeciesWidget * mpSpeciesWidget
Definition: listviews.h:207
CQCrossSectionTaskWidget * crossSectionTaskWidget
Definition: listviews.h:238
CQGlobalQuantitiesWidget * mpGlobalQuantitiesWidget
Definition: listviews.h:210
CQEFMResultWidget * mpEFMResultWidget
Definition: listviews.h:213
CQFittingWidget * paramFittingWidget
Definition: listviews.h:218
CQCompartmentsWidget * mpCompartmentsWidget
Definition: listviews.h:197
CQSplashWidget * defaultWidget
Definition: listviews.h:199
CQDifferentialEquations * differentialEquations
Definition: listviews.h:200
CQFittingResult * mpFittingResultWidget
Definition: listviews.h:219
CQLyapResultWidget * lyapResultWidget
Definition: listviews.h:206
CQSteadyStateResult * stateWidget
Definition: listviews.h:230
CQFunctionsWidget * mpFunctionsWidget
Definition: listviews.h:203
CQMoietiesTaskWidget * mpMoietiesTaskWidget
Definition: listviews.h:215
CQMoietiesTaskResult * mpMoietiesTaskResult
Definition: listviews.h:214
CQParameterOverviewWidget * mpParameterOverviewWidget
Definition: listviews.h:220
SteadyStateWidget * steadystateWidget
Definition: listviews.h:231
CQTimeSeriesWidget * crossSectionTimeSeriesWidget
Definition: listviews.h:239
CQTimeSeriesWidget * timeSeriesWidget
Definition: listviews.h:234
CopasiWidget * ListViews::findWidgetFromIndex ( const QModelIndex &  index) const
private

tries to find the right hand side widget that belongs to an item of the tree view

Definition at line 618 of file listviews.cpp.

References C_INVALID_INDEX, compartmentsWidget1, eventWidget1, findWidgetFromId(), functionWidget1, CQBrowserPaneDM::getIdFromIndex(), metabolitesWidget1, mpDataModelGUI, mpModelValueWidget, mpParameterSetWidget, mpPlotSubwidget, mpTreeDM, CQBrowserPaneDM::parent(), reactionsWidget1, and tableDefinition1.

Referenced by slotFolderChanged().

619 {
620  if (!index.isValid() || !mpDataModelGUI)
621  return NULL;
622 
623  // first try ID
624  size_t id = mpTreeDM->getIdFromIndex(index);
625 
626  if (id != C_INVALID_INDEX)
627  {
628 
629  return findWidgetFromId(id);
630  }
631 
632  // then try parent id:
633  id = mpTreeDM->getIdFromIndex(mpTreeDM->parent(index));
634 
635  switch (id)
636  {
637  case 111:
638  return compartmentsWidget1;
639  break;
640 
641  case 112:
642  return metabolitesWidget1;
643  break;
644 
645  case 114:
646  return reactionsWidget1;
647  break;
648 
649  case 115:
650  return mpModelValueWidget;
651  break;
652 
653  case 116:
654  return eventWidget1;
655  break;
656 
657  case 119:
658  return mpParameterSetWidget;
659  break;
660 
661  case 43:
662  return tableDefinition1;
663  break;
664 
665  case 42:
666  return mpPlotSubwidget;
667  break;
668 
669  case 5:
670  return functionWidget1;
671  break;
672  }
673 
674  //give up
675  return NULL;
676 }
virtual QModelIndex parent(const QModelIndex &index) const
DataModelGUI * mpDataModelGUI
Definition: listviews.h:182
CQBrowserPaneDM * mpTreeDM
Definition: listviews.h:183
#define C_INVALID_INDEX
Definition: copasi.h:222
CQTabWidget * eventWidget1
Definition: listviews.h:202
CQPlotSubwidget * mpPlotSubwidget
Definition: listviews.h:224
CQTabWidget * reactionsWidget1
Definition: listviews.h:226
CQTabWidget * mpParameterSetWidget
Definition: listviews.h:222
CopasiWidget * findWidgetFromId(const size_t &id) const
Definition: listviews.cpp:678
CQTabWidget * functionWidget1
Definition: listviews.h:204
size_t getIdFromIndex(const QModelIndex &index) const
CQTabWidget * compartmentsWidget1
Definition: listviews.h:198
CQReportDefinition * tableDefinition1
Definition: listviews.h:233
CQTabWidget * mpModelValueWidget
Definition: listviews.h:211
CQTabWidget * metabolitesWidget1
Definition: listviews.h:208
CQCrossSectionTaskWidget * ListViews::getCrossSectionWidget ( )

Definition at line 1084 of file listviews.cpp.

References crossSectionTaskWidget.

Referenced by SliderDialog::runCrossSectionTask().

1085 {
1086  return crossSectionTaskWidget;
1087 }
CQCrossSectionTaskWidget * crossSectionTaskWidget
Definition: listviews.h:238
size_t ListViews::getCurrentItemId ( )

Definition at line 938 of file listviews.cpp.

References C_INVALID_INDEX, CQBrowserPaneDM::getIdFromIndex(), mpDataModelGUI, mpTreeDM, and mpTreeView.

Referenced by CopasiUI3Window::CopasiUI3Window(), and CopasiUI3Window::listViewsFolderChanged().

939 {
940  QModelIndex index = mpTreeView->currentIndex();
941 
942  if (!index.isValid() || !mpDataModelGUI)
943  return C_INVALID_INDEX;
944 
945  return mpTreeDM->getIdFromIndex(index);
946 }
DataModelGUI * mpDataModelGUI
Definition: listviews.h:182
CQBrowserPane * mpTreeView
Definition: listviews.h:190
CQBrowserPaneDM * mpTreeDM
Definition: listviews.h:183
#define C_INVALID_INDEX
Definition: copasi.h:222
size_t getIdFromIndex(const QModelIndex &index) const
CopasiWidget * ListViews::getCurrentWidget ( )
DataModelGUI* ListViews::getDataModel ( )
inline

Definition at line 134 of file listviews.h.

References mpDataModelGUI.

Referenced by CQReportDefinitionSelect::loadReportDefinitionVector(), and CopasiWidget::protectedNotify().

134 {return mpDataModelGUI;};
DataModelGUI * mpDataModelGUI
Definition: listviews.h:182
CQFittingWidget * ListViews::getFittingWidget ( )

Definition at line 1074 of file listviews.cpp.

References paramFittingWidget.

Referenced by Worker::getWidgetForTask(), and SliderDialog::runParameterEstimationTask().

1075 {
1076  return paramFittingWidget;
1077 }
CQFittingWidget * paramFittingWidget
Definition: listviews.h:218
CQLNAWidget * ListViews::getLNAWidget ( )

Definition at line 1069 of file listviews.cpp.

References mpCQLNAWidget.

Referenced by Worker::getWidgetForTask(), and SliderDialog::runLNATask().

1070 {
1071  return mpCQLNAWidget;
1072 }
CQLNAWidget * mpCQLNAWidget
Definition: listviews.h:195
CQMCAWidget * ListViews::getMCAWidget ( )

Definition at line 1064 of file listviews.cpp.

References mpCQMCAWidget.

Referenced by Worker::getWidgetForTask(), and SliderDialog::runMCATask().

1065 {
1066  return mpCQMCAWidget;
1067 }
CQMCAWidget * mpCQMCAWidget
Definition: listviews.h:194
CQOptimizationWidget * ListViews::getOptimizationWidget ( )

Definition at line 1079 of file listviews.cpp.

References optimizationWidget.

Referenced by Worker::getWidgetForTask(), and SliderDialog::runOptimizationTask().

1080 {
1081  return optimizationWidget;
1082 }
CQOptimizationWidget * optimizationWidget
Definition: listviews.h:216
ScanWidget * ListViews::getScanWidget ( )

Definition at line 1059 of file listviews.cpp.

References scanWidget.

Referenced by Worker::getWidgetForTask(), and SliderDialog::runScanTask().

1060 {
1061  return scanWidget;
1062 }
ScanWidget * scanWidget
Definition: listviews.h:227
SteadyStateWidget * ListViews::getSteadyStateWidget ( )

Definition at line 1054 of file listviews.cpp.

References steadystateWidget.

Referenced by Worker::getWidgetForTask(), and SliderDialog::runSteadyStateTask().

1055 {
1056  return steadystateWidget;
1057 }
SteadyStateWidget * steadystateWidget
Definition: listviews.h:231
CQTrajectoryWidget * ListViews::getTrajectoryWidget ( )

Definition at line 1049 of file listviews.cpp.

References trajectoryWidget.

Referenced by Worker::getWidgetForTask(), and SliderDialog::runTimeCourse().

1050 {
1051  return trajectoryWidget;
1052 }
CQTrajectoryWidget * trajectoryWidget
Definition: listviews.h:235
void ListViews::notifyChildWidgets ( ObjectType  objectType,
Action  action,
const std::string &  key 
)
private

Definition at line 1004 of file listviews.cpp.

References CopasiWidget::update().

Referenced by slotNotify().

1007 {
1008  QList <CopasiWidget *> widgets = findChildren<CopasiWidget *>();
1009  QListIterator<CopasiWidget *> it(widgets); // iterate over the CopasiWidgets
1010  CopasiWidget * pCopasiWidget;
1011 
1012  while (it.hasNext())
1013  {
1014  if ((pCopasiWidget = it.next()) != NULL)
1015  {
1016  pCopasiWidget->update(objectType, action, key);
1017  }
1018  }
1019 }
objectType
virtual bool update(ListViews::ObjectType objectType, ListViews::Action action, const std::string &key)
void ListViews::setDataModel ( DataModelGUI pDM)

Definition at line 267 of file listviews.cpp.

References ConstructNodeWidgets(), CCopasiRootContainer::getDatamodelList(), CQBrowserPaneDM::index(), mpDataModelGUI, mpTreeDM, mpTreeSortDM, mpTreeView, CQBrowserPaneDM::setCopasiDM(), CQBrowserPaneDM::setGuiDM(), and slotNotify().

Referenced by DataModelGUI::deregisterListView(), and DataModelGUI::registerListView().

268 {
269  //First Disconnect updateCompleteView() and notifyView() from DataModelGUI
270  if (mpDataModelGUI)
271  {
272  disconnect(mpDataModelGUI, SIGNAL(notifyView(ListViews::ObjectType, ListViews::Action, std::string)),
273  this, SLOT(slotNotify(ListViews::ObjectType, ListViews::Action, std::string)));
274  }
275 
276  mpDataModelGUI = pDM;
278 
280  assert(pDataModel != NULL);
281 
282  //Set Model for the TableView
283  mpTreeDM->setCopasiDM(pDataModel);
284  mpTreeView->expand(mpTreeSortDM->mapFromSource(mpTreeDM->index(0, 0, QModelIndex())));
285 
286  if (mpDataModelGUI)
287  {
288  connect(mpDataModelGUI, SIGNAL(notifyView(ListViews::ObjectType, ListViews::Action, const std::string &)),
289  this, SLOT(slotNotify(ListViews::ObjectType, ListViews::Action, const std::string &)));
290  }
291 
293 }
DataModelGUI * mpDataModelGUI
Definition: listviews.h:182
CQBrowserPane * mpTreeView
Definition: listviews.h:190
void setCopasiDM(const CCopasiDataModel *pDataModel)
virtual QModelIndex index(int row, int column, const QModelIndex &parent=QModelIndex()) const
CQBrowserPaneDM * mpTreeDM
Definition: listviews.h:183
void ConstructNodeWidgets()
Definition: listviews.cpp:298
QSortFilterProxyModel * mpTreeSortDM
Definition: listviews.h:184
static CCopasiVector< CCopasiDataModel > * getDatamodelList()
void setGuiDM(const DataModelGUI *pDataModel)
bool slotNotify(ListViews::ObjectType objectType, ListViews::Action action, std::string key="")
Definition: listviews.cpp:952
void ListViews::setFramework ( int  framework)

Definition at line 1036 of file listviews.cpp.

References CopasiWidget::setFramework().

1037 {
1038  QList <CopasiWidget *> widgets = findChildren<CopasiWidget *>();
1039  QListIterator<CopasiWidget *> it(widgets); // iterate over the CopasiWidgets
1040  CopasiWidget * pCopasiWidget;
1041 
1042  while (it.hasNext())
1043  {
1044  if ((pCopasiWidget = it.next()) != NULL)
1045  pCopasiWidget->setFramework(framework);
1046  }
1047 }
virtual void setFramework(int framework)
void ListViews::signalFolderChanged ( const QModelIndex &  index)
signal

Referenced by slotFolderChanged().

void ListViews::slotFolderChanged ( const QModelIndex &  index)
slot

Definition at line 875 of file listviews.cpp.

References defaultWidget, CopasiWidget::enter(), findWidgetFromIndex(), CQBrowserPaneDM::getKeyFromIndex(), CopasiWidget::leave(), mCurrentItemKey, mpCurrentWidget, mpDataModelGUI, mpStackedWidget, mpTreeDM, mpTreeView, and signalFolderChanged().

876 {
877  bool changeWidget = true;
878 
879  if (!index.isValid() || !mpDataModelGUI) return;
880 
881  // find the widget
882  CopasiWidget* newWidget = findWidgetFromIndex(index);
883 
884  if (!newWidget) return; //do nothing
885 
886  std::string itemKey = mpTreeDM->getKeyFromIndex(index);
887 
888  if (newWidget == mpCurrentWidget)
889  if (itemKey == mCurrentItemKey) return; //do nothing
890 
891  // leave old widget
892  if (mpCurrentWidget)
893  {
894  //item may point to an invalid ListViewItem now
895  QModelIndex newIndex = mpTreeView->currentIndex();
896 
897  // find the widget again (it may have changed)
898  newWidget = findWidgetFromIndex(newIndex);
899 
900  changeWidget = mpCurrentWidget->leave();
901 
902  if (!changeWidget) return;
903  }
904 
905  if (!newWidget) newWidget = defaultWidget; //should never happen
906 
907  // enter new widget
908  if (newWidget)
909  ((CopasiWidget*)newWidget)->enter(itemKey);
910 
911  // fall back
912  if (!newWidget)
913  {newWidget = defaultWidget;}
914 
915  // we emit the signal after the old widget has saved
916  // the changes
917  emit signalFolderChanged(index);
918 
919  mpCurrentWidget = newWidget;
920  mpStackedWidget->setCurrentWidget(mpCurrentWidget);
921  mCurrentItemKey = itemKey;
922 
923  mpTreeView->scrollTo(index);
924 }
DataModelGUI * mpDataModelGUI
Definition: listviews.h:182
CQBrowserPane * mpTreeView
Definition: listviews.h:190
CopasiWidget * findWidgetFromIndex(const QModelIndex &index) const
Definition: listviews.cpp:618
CQBrowserPaneDM * mpTreeDM
Definition: listviews.h:183
virtual bool leave()
CopasiWidget * mpCurrentWidget
Definition: listviews.h:186
CQSplashWidget * defaultWidget
Definition: listviews.h:199
std::string mCurrentItemKey
Definition: listviews.h:187
QStackedWidget * mpStackedWidget
Definition: listviews.h:191
std::string getKeyFromIndex(const QModelIndex &index) const
void signalFolderChanged(const QModelIndex &index)
bool enter(const std::string &key)
bool ListViews::slotNotify ( ListViews::ObjectType  objectType,
ListViews::Action  action,
std::string  key = "" 
)
privateslot

Definition at line 952 of file listviews.cpp.

References ADD, DELETE, CQLayoutsWidget::deleteLayoutWindows(), CCopasiRootContainer::getDatamodelList(), MODEL, mpLayoutsWidget, notifyChildWidgets(), STATE, and updateCurrentWidget().

Referenced by setDataModel().

953 {
954  if (objectType != MODEL &&
955  objectType != STATE &&
956  action != ADD)
957  {
958  assert(CCopasiRootContainer::getDatamodelList()->size() > 0);
959  (*CCopasiRootContainer::getDatamodelList())[0]->changed();
960  }
961 
962  bool success = true;
963 
964  // delete the layout windows when the current model is added
965  // actually it would have been better to do this when a model is deleted, but
966  // the deletion notification is only sent to the listviews if the deleted
967  // model had been changed.
968  if (objectType == MODEL && action == DELETE)
969  {
971  }
972 
973  if (!updateCurrentWidget(objectType, action, key)) success = false;
974 
975  notifyChildWidgets(objectType, action, key);
976 
977  return success;
978 }
objectType
bool updateCurrentWidget(ObjectType objectType, Action action, const std::string &key="")
Definition: listviews.cpp:985
CQLayoutsWidget * mpLayoutsWidget
Definition: listviews.h:249
void notifyChildWidgets(ObjectType objectType, Action action, const std::string &key)
Definition: listviews.cpp:1004
static CCopasiVector< CCopasiDataModel > * getDatamodelList()
void ListViews::slotSort ( const QModelIndex &  index1,
const QModelIndex &  index2 
)
privateslot

Definition at line 980 of file listviews.cpp.

References mpTreeView.

Referenced by ListViews().

981 {
982  mpTreeView->sortByColumn(0, Qt::AscendingOrder);
983 }
CQBrowserPane * mpTreeView
Definition: listviews.h:190
void ListViews::switchToOtherWidget ( const size_t &  id,
const std::string &  key 
)

Definition at line 926 of file listviews.cpp.

References CQBrowserPaneDM::index(), mpDataModelGUI, mpTreeDM, mpTreeSortDM, and mpTreeView.

Referenced by CQPlotSubwidget::addPlot(), CQReportDefinition::btnCopyReportClicked(), CQReportDefinition::btnNewReportClicked(), CopasiUI3Window::CopasiUI3Window(), CQSpeciesDetail::copy(), CQCompartment::copy(), ReactionsWidget1::copy(), CQPlotSubwidget::copyPlot(), CQSpeciesDetail::enterProtected(), CQReportDefinition::enterProtected(), CQModelValue::enterProtected(), CQEventWidget1::enterProtected(), FunctionWidget1::enterProtected(), ReactionsWidget1::enterProtected(), CQPlotSubwidget::enterProtected(), Worker::finishedLoading(), CopasiUI3Window::importSBMLFromString(), CopasiUI3Window::newDoc(), CQParameterOverviewWidget::slotBtnCopy(), FunctionWidget1::slotBtnNew(), ReactionsWidget1::slotBtnNew(), CQSpeciesDetail::slotBtnNew(), CQCompartment::slotBtnNew(), CQModelValue::slotBtnNew(), CQEventWidget1::slotBtnNew(), CopasiUI3Window::slotConvertToIrreversible(), CQParameterSetsWidget::slotDoubleClicked(), CQPlotsWidget::slotDoubleClicked(), CQReactionsWidget::slotDoubleClicked(), CQReportsWidget::slotDoubleClicked(), CQEventsWidget::slotDoubleClicked(), CQFunctionsWidget::slotDoubleClicked(), CQCompartmentsWidget::slotDoubleClicked(), CQGlobalQuantitiesWidget::slotDoubleClicked(), CQSpeciesWidget::slotDoubleClicked(), CQReportDefinitionSelect::slotEdit(), CopasiUI3Window::slotFileOpen(), CopasiUI3Window::slotFileOpenFinished(), ReactionsWidget1::slotGotoFunction(), CopasiUI3Window::slotImportSBML(), CopasiUI3Window::slotImportSBMLFinished(), CopasiUI3Window::slotImportSBMLFromStringFinished(), CQCompartment::slotMetaboliteTableCurrentChanged(), ReactionsWidget1::slotNewFunction(), CQSpeciesDetail::slotSwitchToReaction(), CopasiUI3Window::slotUpdateMIRIAMFinished(), CQMoietiesTaskWidget::taskFinishedEvent(), CQEFMWidget::taskFinishedEvent(), CQLyapWidget::taskFinishedEvent(), CQLNAWidget::taskFinishedEvent(), CQMCAWidget::taskFinishedEvent(), SensitivitiesWidget::taskFinishedEvent(), SteadyStateWidget::taskFinishedEvent(), CQTSSAWidget::taskFinishedEvent(), and WizardDialog::textBrowser_anchorClicked().

927 {
928  if (!mpDataModelGUI) return;
929 
930  QModelIndex Index = mpTreeDM->index(id, key);
931  QModelIndex SortIndex = mpTreeSortDM->mapFromSource(Index);
932 
933  mpTreeView->setCurrentIndex(SortIndex);
934 }
DataModelGUI * mpDataModelGUI
Definition: listviews.h:182
CQBrowserPane * mpTreeView
Definition: listviews.h:190
virtual QModelIndex index(int row, int column, const QModelIndex &parent=QModelIndex()) const
CQBrowserPaneDM * mpTreeDM
Definition: listviews.h:183
QSortFilterProxyModel * mpTreeSortDM
Definition: listviews.h:184
bool ListViews::updateCurrentWidget ( ObjectType  objectType,
Action  action,
const std::string &  key = "" 
)
private

Definition at line 985 of file listviews.cpp.

References mpCurrentWidget, and CopasiWidget::update().

Referenced by slotNotify().

986 {
987  bool success = true;
988 
989  if (mpCurrentWidget)
990  mpCurrentWidget->update(objectType, action, key);
991 
992  return success;
993 }
objectType
virtual bool update(ListViews::ObjectType objectType, ListViews::Action action, const std::string &key)
CopasiWidget * mpCurrentWidget
Definition: listviews.h:186
void ListViews::updateMIRIAMResourceContents ( )

Definition at line 1021 of file listviews.cpp.

1022 {
1023  QList <CQMiriamWidget *> widgets = findChildren<CQMiriamWidget *>();
1024  QListIterator<CQMiriamWidget *> it(widgets); // iterate over the CQMiriamWidgets
1025  CQMiriamWidget * pWidget;
1026 
1027  while (it.hasNext())
1028  {
1029  pWidget = it.next();
1030 
1031  if (dynamic_cast<CQMiriamWidget* >(pWidget))
1032  dynamic_cast<CQMiriamWidget* >(pWidget)->updateResourcesList();
1033  }
1034 }

Friends And Related Function Documentation

friend class CopasiUI3Window
friend

Definition at line 104 of file listviews.h.

Member Data Documentation

CQTabWidget* ListViews::compartmentsWidget1
private

Definition at line 198 of file listviews.h.

Referenced by ConstructNodeWidgets(), and findWidgetFromIndex().

CQCrossSectionTaskWidget* ListViews::crossSectionTaskWidget
private

Definition at line 238 of file listviews.h.

Referenced by ConstructNodeWidgets(), findWidgetFromId(), and getCrossSectionWidget().

CQTimeSeriesWidget* ListViews::crossSectionTimeSeriesWidget
private

Definition at line 239 of file listviews.h.

Referenced by ConstructNodeWidgets(), and findWidgetFromId().

CQSplashWidget* ListViews::defaultWidget
private

Definition at line 199 of file listviews.h.

Referenced by findWidgetFromId(), ListViews(), and slotFolderChanged().

CQDifferentialEquations* ListViews::differentialEquations
private

Definition at line 200 of file listviews.h.

Referenced by ConstructNodeWidgets(), and findWidgetFromId().

CQEventsWidget* ListViews::eventsWidget
private

Definition at line 201 of file listviews.h.

Referenced by ConstructNodeWidgets(), and findWidgetFromId().

CQTabWidget* ListViews::eventWidget1
private

Definition at line 202 of file listviews.h.

Referenced by ConstructNodeWidgets(), and findWidgetFromIndex().

CQTabWidget* ListViews::functionWidget1
private

Definition at line 204 of file listviews.h.

Referenced by ConstructNodeWidgets(), and findWidgetFromIndex().

CQLyapResultWidget* ListViews::lyapResultWidget
private

Definition at line 206 of file listviews.h.

Referenced by ConstructNodeWidgets(), and findWidgetFromId().

CQLyapWidget* ListViews::lyapWidget
private

Definition at line 205 of file listviews.h.

Referenced by ConstructNodeWidgets(), and findWidgetFromId().

std::string ListViews::mCurrentItemKey
private

Definition at line 187 of file listviews.h.

Referenced by ListViews(), and slotFolderChanged().

CQTabWidget* ListViews::metabolitesWidget1
private

Definition at line 208 of file listviews.h.

Referenced by ConstructNodeWidgets(), and findWidgetFromIndex().

CQTabWidget* ListViews::modelWidget
private

Definition at line 209 of file listviews.h.

Referenced by ConstructNodeWidgets(), and findWidgetFromId().

CLNAResultWidget* ListViews::mpCLNAResultWidget
private

Definition at line 196 of file listviews.h.

Referenced by ConstructNodeWidgets(), and findWidgetFromId().

CMCAResultWidget* ListViews::mpCMCAResultWidget
private

Definition at line 193 of file listviews.h.

Referenced by ConstructNodeWidgets(), and findWidgetFromId().

CQCompartmentsWidget* ListViews::mpCompartmentsWidget
private

Definition at line 197 of file listviews.h.

Referenced by ConstructNodeWidgets(), and findWidgetFromId().

CQLNAWidget* ListViews::mpCQLNAWidget
private

Definition at line 195 of file listviews.h.

Referenced by ConstructNodeWidgets(), findWidgetFromId(), and getLNAWidget().

CQMCAWidget* ListViews::mpCQMCAWidget
private

Definition at line 194 of file listviews.h.

Referenced by ConstructNodeWidgets(), findWidgetFromId(), and getMCAWidget().

CopasiWidget* ListViews::mpCurrentWidget
private
DataModelGUI* ListViews::mpDataModelGUI
private
CQEFMResultWidget* ListViews::mpEFMResultWidget
private

Definition at line 213 of file listviews.h.

Referenced by ConstructNodeWidgets(), and findWidgetFromId().

CQEFMWidget* ListViews::mpEFMWidget
private

Definition at line 212 of file listviews.h.

Referenced by ConstructNodeWidgets(), and findWidgetFromId().

CQFittingResult* ListViews::mpFittingResultWidget
private

Definition at line 219 of file listviews.h.

Referenced by ConstructNodeWidgets(), and findWidgetFromId().

CQFunctionsWidget* ListViews::mpFunctionsWidget
private

Definition at line 203 of file listviews.h.

Referenced by ConstructNodeWidgets(), and findWidgetFromId().

CQGlobalQuantitiesWidget* ListViews::mpGlobalQuantitiesWidget
private

Definition at line 210 of file listviews.h.

Referenced by ConstructNodeWidgets(), and findWidgetFromId().

CQLayoutsWidget* ListViews::mpLayoutsWidget
private

Definition at line 249 of file listviews.h.

Referenced by ConstructNodeWidgets(), findWidgetFromId(), slotNotify(), and ~ListViews().

CQMathMatrixWidget* ListViews::mpMathMatrixWidget
private

Definition at line 250 of file listviews.h.

Referenced by ConstructNodeWidgets(), and findWidgetFromId().

CMathModel* ListViews::mpMathModel
private

Definition at line 185 of file listviews.h.

CQTabWidget* ListViews::mpModelValueWidget
private

Definition at line 211 of file listviews.h.

Referenced by ConstructNodeWidgets(), and findWidgetFromIndex().

CQMoietiesTaskResult* ListViews::mpMoietiesTaskResult
private

Definition at line 214 of file listviews.h.

Referenced by ConstructNodeWidgets(), and findWidgetFromId().

CQMoietiesTaskWidget* ListViews::mpMoietiesTaskWidget
private

Definition at line 215 of file listviews.h.

Referenced by ConstructNodeWidgets(), and findWidgetFromId().

CQParameterOverviewWidget* ListViews::mpParameterOverviewWidget
private

Definition at line 220 of file listviews.h.

Referenced by ConstructNodeWidgets(), and findWidgetFromId().

CQParameterSetsWidget* ListViews::mpParameterSetsWidget
private

Definition at line 221 of file listviews.h.

Referenced by ConstructNodeWidgets(), and findWidgetFromId().

CQTabWidget* ListViews::mpParameterSetWidget
private

Definition at line 222 of file listviews.h.

Referenced by ConstructNodeWidgets(), and findWidgetFromIndex().

CQPlotSubwidget* ListViews::mpPlotSubwidget
private

Definition at line 224 of file listviews.h.

Referenced by ConstructNodeWidgets(), and findWidgetFromIndex().

CQPlotsWidget* ListViews::mpPlotsWidget
private

Definition at line 223 of file listviews.h.

Referenced by ConstructNodeWidgets(), and findWidgetFromId().

CQReactionsWidget* ListViews::mpReactionsWidget
private

Definition at line 225 of file listviews.h.

Referenced by ConstructNodeWidgets(), and findWidgetFromId().

CQReportsWidget* ListViews::mpReportsWidget
private

Definition at line 232 of file listviews.h.

Referenced by ConstructNodeWidgets(), and findWidgetFromId().

CQSpeciesWidget* ListViews::mpSpeciesWidget
private

Definition at line 207 of file listviews.h.

Referenced by ConstructNodeWidgets(), and findWidgetFromId().

QStackedWidget* ListViews::mpStackedWidget
private

Definition at line 191 of file listviews.h.

Referenced by ConstructNodeWidgets(), ListViews(), and slotFolderChanged().

CQBrowserPaneDM* ListViews::mpTreeDM
private
QSortFilterProxyModel* ListViews::mpTreeSortDM
private

Definition at line 184 of file listviews.h.

Referenced by ListViews(), setDataModel(), and switchToOtherWidget().

CQBrowserPane* ListViews::mpTreeView
private
const std::string ListViews::ObjectTypeName
static
Initial value:
=
{
"Species",
"Compartment",
"Reaction",
"Function",
"Model",
"State",
"Report",
"Plot",
"Global Quantity",
"Event",
"Annotation",
"Layout",
"Parameter Overview",
"Parameter Set",
""
}

Definition at line 107 of file listviews.h.

Referenced by CQTabWidget::CQTabWidget(), and CQTabWidget::save().

CQOptimizationWidget* ListViews::optimizationWidget
private

Definition at line 216 of file listviews.h.

Referenced by ConstructNodeWidgets(), findWidgetFromId(), and getOptimizationWidget().

CQOptimizationResult* ListViews::optResultWidget
private

Definition at line 217 of file listviews.h.

Referenced by ConstructNodeWidgets(), and findWidgetFromId().

CQFittingWidget* ListViews::paramFittingWidget
private

Definition at line 218 of file listviews.h.

Referenced by ConstructNodeWidgets(), findWidgetFromId(), and getFittingWidget().

CQTabWidget* ListViews::reactionsWidget1
private

Definition at line 226 of file listviews.h.

Referenced by ConstructNodeWidgets(), and findWidgetFromIndex().

ScanWidget* ListViews::scanWidget
private

Definition at line 227 of file listviews.h.

Referenced by ConstructNodeWidgets(), findWidgetFromId(), and getScanWidget().

CQSensResultWidget* ListViews::sensResultWidget
private

Definition at line 229 of file listviews.h.

Referenced by ConstructNodeWidgets(), and findWidgetFromId().

SensitivitiesWidget* ListViews::sensWidget
private

Definition at line 228 of file listviews.h.

Referenced by ConstructNodeWidgets(), and findWidgetFromId().

CQSteadyStateResult* ListViews::stateWidget
private

Definition at line 230 of file listviews.h.

Referenced by ConstructNodeWidgets(), and findWidgetFromId().

SteadyStateWidget* ListViews::steadystateWidget
private

Definition at line 231 of file listviews.h.

Referenced by ConstructNodeWidgets(), findWidgetFromId(), and getSteadyStateWidget().

CQReportDefinition* ListViews::tableDefinition1
private

Definition at line 233 of file listviews.h.

Referenced by ConstructNodeWidgets(), and findWidgetFromIndex().

CQTimeSeriesWidget* ListViews::timeSeriesWidget
private

Definition at line 234 of file listviews.h.

Referenced by ConstructNodeWidgets(), and findWidgetFromId().

CQTrajectoryWidget* ListViews::trajectoryWidget
private

Definition at line 235 of file listviews.h.

Referenced by ConstructNodeWidgets(), findWidgetFromId(), and getTrajectoryWidget().

CQTSSAResultWidget* ListViews::tssaResultWidget
private

Definition at line 237 of file listviews.h.

Referenced by ConstructNodeWidgets(), and findWidgetFromId().

CQTSSAWidget* ListViews::tssaWidget
private

Definition at line 236 of file listviews.h.

Referenced by ConstructNodeWidgets(), and findWidgetFromId().


The documentation for this class was generated from the following files: