COPASI API  4.16.103
CQEFMNetReactionDM.h
Go to the documentation of this file.
1 // Begin CVS Header
2 // $Source: /Volumes/Home/Users/shoops/cvs/copasi_dev/copasi/UI/CQEFMNetReactionDM.h,v $
3 // $Revision: 1.3 $
4 // $Name: $
5 // $Author: shoops $
6 // $Date: 2011/03/07 19:37:57 $
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 CQEFMNetReactionDM_H
20 #define CQEFMNetReactionDM_H
21 
22 #include "CQBaseDataModel.h"
23 
24 #include <vector>
25 
26 class CFluxMode;
27 class CEFMTask;
28 class CMetab;
29 
30 #define COL_REACTION 1
31 #define COL_MODIFIER 2
32 #define NetReactionDM_COLUMNS 3
33 
35 {
36  Q_OBJECT
37 
38 public:
39  CQEFMNetReactionDM(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 
61  std::vector< CFluxMode >::const_iterator mBeginModes;
62  size_t mModesSize;
63 };
64 
65 #endif //CQEFMNetReactionDM_H
void setTask(const CEFMTask *pTask)
virtual bool removeRows(int position, int rows, const QModelIndex &index=QModelIndex())
Definition: CMetab.h:178
std::vector< CFluxMode >::const_iterator mBeginModes
CTSSATask * pTask
virtual int columnCount(const QModelIndex &parent=QModelIndex()) const
QVariant data(const QModelIndex &index, int role) const
virtual bool isDefaultRow(const QModelIndex &i) const
bool setData(const QModelIndex &index, const QVariant &value, int role=Qt::EditRole)
virtual int rowCount(const QModelIndex &parent=QModelIndex()) const
const CEFMTask * mpTask
QVariant headerData(int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const
CQEFMNetReactionDM(QObject *parent=0)
virtual bool insertRows(int position, int rows, const QModelIndex &index=QModelIndex())
Qt::ItemFlags flags(const QModelIndex &index) const