COPASI API  4.16.103
CQFluxModeDM.h
Go to the documentation of this file.
1 // Begin CVS Header
2 // $Source: /Volumes/Home/Users/shoops/cvs/copasi_dev/copasi/UI/CQFluxModeDM.h,v $
3 // $Revision: 1.5 $
4 // $Name: $
5 // $Author: shoops $
6 // $Date: 2011/11/09 17:56:44 $
7 // End CVS Header
8 
9 // Copyright (C) 2011 - 2010 by Pedro Mendes, Virginia Tech Intellectual
10 // Properties, Inc., University of Heidelberg, and The University
11 // of Manchester.
12 // All rights reserved.
13 
14 // Copyright (C) 2008 by Pedro Mendes, Virginia Tech Intellectual
15 // Properties, Inc., EML Research, gGmbH, University of Heidelberg,
16 // and The University of Manchester.
17 // All rights reserved.
18 
19 #ifndef CQFluxModeDM_H
20 #define CQFluxModeDM_H
21 
22 #include <vector>
23 
25 
26 class CFluxMode;
27 class CEFMTask;
28 
29 #define COL_REVERSIBILITY 1
30 #define COL_REACTION_NAME 2
31 #define COL_REACTION_EQUATION 3
32 #define FluxModeDM_COLUMNS 4
33 
35 {
36  Q_OBJECT
37 
38 public:
39  CQFluxModeDM(QObject *parent = 0);
40  virtual int rowCount(const QModelIndex &parent = QModelIndex()) const;
41  virtual int columnCount(const QModelIndex &parent = QModelIndex()) const;
42  Qt::ItemFlags flags(const QModelIndex &index) const;
43  QVariant data(const QModelIndex &index, int role) const;
44  QVariant headerData(int section, Qt::Orientation orientation,
45  int role = Qt::DisplayRole) const;
46 
47  void setTask(const CEFMTask * pTask);
48 
49  bool setData(const QModelIndex &index, const QVariant &value,
50  int role = Qt::EditRole);
51 
52  virtual bool isDefaultRow(const QModelIndex& i) const;
53 
54 protected:
55  virtual bool insertRows(int position, int rows, const QModelIndex &index = QModelIndex());
56  virtual bool removeRows(int position, int rows, const QModelIndex &index = QModelIndex());
57 
58 private:
59  const CEFMTask * mpTask;
60  std::vector< CFluxMode >::const_iterator mBeginModes;
61  size_t mModesSize;
62 };
63 
64 #endif //CQFluxModeDM_H
virtual bool insertRows(int position, int rows, const QModelIndex &index=QModelIndex())
Qt::ItemFlags flags(const QModelIndex &index) const
size_t mModesSize
Definition: CQFluxModeDM.h:61
void setTask(const CEFMTask *pTask)
bool setData(const QModelIndex &index, const QVariant &value, int role=Qt::EditRole)
CTSSATask * pTask
virtual bool isDefaultRow(const QModelIndex &i) const
const CEFMTask * mpTask
Definition: CQFluxModeDM.h:59
QVariant data(const QModelIndex &index, int role) const
virtual bool removeRows(int position, int rows, const QModelIndex &index=QModelIndex())
std::vector< CFluxMode >::const_iterator mBeginModes
Definition: CQFluxModeDM.h:60
CQFluxModeDM(QObject *parent=0)
QVariant headerData(int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const
virtual int rowCount(const QModelIndex &parent=QModelIndex()) const
virtual int columnCount(const QModelIndex &parent=QModelIndex()) const