COPASI API  4.16.103
CQParameterOverviewDM.h
Go to the documentation of this file.
1 // Copyright (C) 2012 - 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 COPASI_CQParameterOverviewDM
7 #define COPASI_CQParameterOverviewDM
8 
9 #include <QtGui/QSortFilterProxyModel>
10 
11 #include "copasi/UI/listviews.h"
12 
13 class CModelParameterSet;
15 class CModelParameter;
16 
17 class CQParameterOverviewDM : public QAbstractItemModel
18 {
19  Q_OBJECT
20 
21 public:
22  CQParameterOverviewDM(QObject * pParent);
23 
24  virtual ~CQParameterOverviewDM();
25 
26  virtual int columnCount(const QModelIndex & parent = QModelIndex()) const;
27 
28  virtual QVariant data(const QModelIndex & index, int role = Qt::DisplayRole) const;
29 
30  virtual Qt::ItemFlags flags(const QModelIndex &index) const;
31 
32  virtual QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
33 
34  virtual QModelIndex index(int row, int column, const QModelIndex & parent = QModelIndex()) const;
35 
36  virtual QModelIndex parent(const QModelIndex & index) const;
37 
38  virtual int rowCount(const QModelIndex & parent = QModelIndex()) const;
39 
40  virtual bool setData(const QModelIndex &index, const QVariant &value,
41  int role = Qt::EditRole);
42 
43  void setModelParameterset(CModelParameterSet * pModelParameterSet);
44 
45  void setFramework(const int & framework);
46 
47  static CModelParameter * nodeFromIndex(const QModelIndex & index);
48 
49 signals:
50  void signalOpenEditor(const QModelIndex &) const;
51  void signalCloseEditor(const QModelIndex &) const;
52 
53 private:
54  QModelIndex index(CModelParameter * pNode) const;
55 
56  static int getRow(const CModelParameter * pNode);
57 
58  static QVariant nameData(const CModelParameter * pNode, int role);
59 
60  static QVariant diffData(const CModelParameter * pNode, int role);
61 
62  static QVariant typeData(const CModelParameter * pNode, int role);
63 
64  QVariant valueData(const CModelParameter * pNode, int role) const;
65 
66  QVariant unitData(const CModelParameter * pNode, int role) const;
67 
68  static QVariant assignmentData(const CModelParameter * pNode, int role);
69 
70 private:
72 
74 };
75 
76 #endif // COPASI_CQParameterOverviewDM
virtual Qt::ItemFlags flags(const QModelIndex &index) const
void signalOpenEditor(const QModelIndex &) const
virtual QModelIndex parent(const QModelIndex &index) const
virtual bool setData(const QModelIndex &index, const QVariant &value, int role=Qt::EditRole)
virtual QVariant headerData(int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const
static QVariant typeData(const CModelParameter *pNode, int role)
virtual int columnCount(const QModelIndex &parent=QModelIndex()) const
QVariant valueData(const CModelParameter *pNode, int role) const
static QVariant diffData(const CModelParameter *pNode, int role)
static QVariant assignmentData(const CModelParameter *pNode, int role)
virtual QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const
void signalCloseEditor(const QModelIndex &) const
static CModelParameter * nodeFromIndex(const QModelIndex &index)
void setFramework(const int &framework)
virtual QModelIndex index(int row, int column, const QModelIndex &parent=QModelIndex()) const
static int getRow(const CModelParameter *pNode)
CQParameterOverviewDM(QObject *pParent)
CModelParameterGroup * mpModelParameterSet
QVariant unitData(const CModelParameter *pNode, int role) const
void setModelParameterset(CModelParameterSet *pModelParameterSet)
virtual int rowCount(const QModelIndex &parent=QModelIndex()) const
static QVariant nameData(const CModelParameter *pNode, int role)