COPASI API  4.16.103
CQSimpleSelectionTree.h
Go to the documentation of this file.
1 // Copyright (C) 2011 - 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 #ifndef SimpleSelectionTree_H__
7 #define SimpleSelectionTree_H__
8 
9 #include <QtGui/QTreeWidget>
10 #include <vector>
11 #include <map>
12 #include <string>
13 
14 template <class CType> class CCopasiVector;
15 
16 class CCopasiObject;
17 class QTreeWidgetItem;
18 class QWidget;
19 class CModel;
20 class CMetab;
21 
22 class CQSimpleSelectionTree: public QTreeWidget
23 {
24  Q_OBJECT
25 
26 public:
28  {
29  InitialTime = 0x01,
30  Parameters = 0x02,
31  Variables = 0x04,
33  Time = 0x10,
35  Results = 0x40,
36  NumericValues = 0x80,
37  AnyObject = 0x100,
38  EventTarget = 0x200
39  };
40 
41  typedef int ObjectClasses;
42 
43  CQSimpleSelectionTree(QWidget* parent);
45 
46  void populateTree(const CModel * pModel, const ObjectClasses & classes);
47  void setOutputVector(std::vector< const CCopasiObject * > * outputVector);
48 
49 public slots:
50  virtual void commitClicked();
51 
52 protected:
53  QTreeWidgetItem* mpTimeSubtree;
54  QTreeWidgetItem* mpReactionSubtree;
55  QTreeWidgetItem* mpReactionParameterSubtree;
57  QTreeWidgetItem* mpReactionFluxNumberSubtree;
58  QTreeWidgetItem* mpMetaboliteSubtree;
65  QTreeWidgetItem* mpModelQuantitySubtree;
68  QTreeWidgetItem* mpModelQuantityRateSubtree;
69  QTreeWidgetItem* mpCompartmentSubtree;
72  QTreeWidgetItem* mpCompartmentRateSubtree;
73  QTreeWidgetItem* mpExpertSubtree;
74  QTreeWidgetItem* mpModelMatrixSubtree;
75  QTreeWidgetItem* mpResultMatrixSubtree;
76  QTreeWidgetItem* mpResultSteadyStateSubtree;
77  QTreeWidgetItem* mpResultSensitivitySubtree;
78  QTreeWidgetItem* mpResultMCASubtree;
79  QTreeWidgetItem* mpResultTSSASubtree;
80 
81  std::map< QTreeWidgetItem *, const CCopasiObject * > treeItems;
82  std::vector< const CCopasiObject * > * mpOutputVector;
83 
84  bool treeHasSelection();
85  bool isMetaboliteNameUnique(const std::string & name, const CCopasiVector<CMetab> & metabolites);
86  QTreeWidgetItem * findListViewItem(const CCopasiObject * object);
87  void selectObjects(std::vector< const CCopasiObject * > * objects);
88  std::vector<const CCopasiObject * > * getTreeSelection();
89  void removeEmptySubTree(QTreeWidgetItem ** ppSubTree);
90 protected:
91 
92 public:
93  static bool filter(const ObjectClasses & classes, const CCopasiObject * pObject);
94 };
95 
96 #endif
QTreeWidgetItem * mpCompartmentInitialVolumeSubtree
QTreeWidgetItem * mpMetaboliteTransientNumberSubtree
QTreeWidgetItem * mpReactionSubtree
QTreeWidgetItem * mpModelQuantityTransientValueSubtree
QTreeWidgetItem * mpModelMatrixSubtree
QTreeWidgetItem * mpCompartmentSubtree
QTreeWidgetItem * mpTimeSubtree
QTreeWidgetItem * mpMetaboliteInitialConcentrationSubtree
QTreeWidgetItem * mpCompartmentRateSubtree
void selectObjects(std::vector< const CCopasiObject * > *objects)
bool isMetaboliteNameUnique(const std::string &name, const CCopasiVector< CMetab > &metabolites)
void setOutputVector(std::vector< const CCopasiObject * > *outputVector)
CQSimpleSelectionTree(QWidget *parent)
QTreeWidgetItem * mpResultMCASubtree
QTreeWidgetItem * mpResultMatrixSubtree
Definition: CMetab.h:178
QTreeWidgetItem * mpMetaboliteInitialNumberSubtree
QTreeWidgetItem * mpModelQuantityRateSubtree
static bool filter(const ObjectClasses &classes, const CCopasiObject *pObject)
QTreeWidgetItem * mpMetaboliteTransientConcentrationSubtree
QTreeWidgetItem * mpMetaboliteRateNumberSubtree
QTreeWidgetItem * mpResultSteadyStateSubtree
QTreeWidgetItem * mpResultTSSASubtree
std::vector< const CCopasiObject * > * getTreeSelection()
QTreeWidgetItem * mpReactionFluxNumberSubtree
QTreeWidgetItem * mpCompartmentTransientVolumeSubtree
QTreeWidgetItem * mpModelQuantitySubtree
QTreeWidgetItem * findListViewItem(const CCopasiObject *object)
QTreeWidgetItem * mpMetaboliteRateConcentrationSubtree
QTreeWidgetItem * mpMetaboliteSubtree
QTreeWidgetItem * mpReactionParameterSubtree
std::vector< const CCopasiObject * > * mpOutputVector
QTreeWidgetItem * mpModelQuantityInitialValueSubtree
void populateTree(const CModel *pModel, const ObjectClasses &classes)
Definition: CModel.h:50
void removeEmptySubTree(QTreeWidgetItem **ppSubTree)
QTreeWidgetItem * mpExpertSubtree
QTreeWidgetItem * mpResultSensitivitySubtree
std::map< QTreeWidgetItem *, const CCopasiObject * > treeItems
QTreeWidgetItem * mpReactionFluxConcentrationSubtree