COPASI API  4.16.103
CQEFMReactionDM.h
Go to the documentation of this file.
1 // Begin CVS Header
2 // $Source: /Volumes/Home/Users/shoops/cvs/copasi_dev/copasi/UI/CQEFMReactionDM.h,v $
3 // $Revision: 1.3 $
4 // $Name: $
5 // $Author: shoops $
6 // $Date: 2011/03/07 19:37:46 $
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 CQEFMReactionDM_H
20 #define CQEFMReactionDM_H
21 
22 #include "CQBaseDataModel.h"
23 
24 #include <vector>
25 
26 class CFluxMode;
27 class CEFMTask;
28 class CReaction;
29 
31 {
32  Q_OBJECT
33 
34 public:
35  CQEFMReactionDM(QObject *parent = 0);
36  virtual int rowCount(const QModelIndex &parent = QModelIndex()) const;
37  virtual int columnCount(const QModelIndex &parent = QModelIndex()) const;
38  Qt::ItemFlags flags(const QModelIndex &index) const;
39  QVariant data(const QModelIndex &index, int role) const;
40  QVariant headerData(int section, Qt::Orientation orientation,
41  int role = Qt::DisplayRole) const;
42 
43  void setTask(const CEFMTask * pTask);
44 
45  bool setData(const QModelIndex &index, const QVariant &value,
46  int role = Qt::EditRole);
47 
48  virtual bool isDefaultRow(const QModelIndex& i) const;
49 
50 protected:
51  virtual bool insertRows(int position, int rows, const QModelIndex &index = QModelIndex());
52  virtual bool removeRows(int position, int rows, const QModelIndex &index = QModelIndex());
53 
54 private:
55  const CEFMTask * mpTask;
56 
57  std::vector< CFluxMode >::const_iterator mBeginModes;
58  size_t mModesSize;
59 
60  std::vector< const CReaction * >::const_iterator mBeginReactions;
62 };
63 
64 #endif //CQEFMReactionDM_H
QVariant headerData(int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const
virtual bool removeRows(int position, int rows, const QModelIndex &index=QModelIndex())
CTSSATask * pTask
CQEFMReactionDM(QObject *parent=0)
bool setData(const QModelIndex &index, const QVariant &value, int role=Qt::EditRole)
const CEFMTask * mpTask
std::vector< CFluxMode >::const_iterator mBeginModes
virtual bool insertRows(int position, int rows, const QModelIndex &index=QModelIndex())
Qt::ItemFlags flags(const QModelIndex &index) const
virtual int rowCount(const QModelIndex &parent=QModelIndex()) const
virtual bool isDefaultRow(const QModelIndex &i) const
virtual int columnCount(const QModelIndex &parent=QModelIndex()) const
std::vector< const CReaction * >::const_iterator mBeginReactions
void setTask(const CEFMTask *pTask)
QVariant data(const QModelIndex &index, int role) const