COPASI API  4.16.103
CQEventDM.h
Go to the documentation of this file.
1 // Begin CVS Header
2 // $Source: /Volumes/Home/Users/shoops/cvs/copasi_dev/copasi/UI/CQEventDM.h,v $
3 // $Revision: 1.3 $
4 // $Name: $
5 // $Author: shoops $
6 // $Date: 2011/03/29 16:17:20 $
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 CQEventDM_H
20 #define CQEventDM_H
21 
22 #include "model/CModel.h"
23 #include "CQBaseDataModel.h"
24 
25 #define COL_NAME_EVENTS 1
26 #define COL_TRIGGER_EVENTS 2
27 #define COL_DELAYED_EVENTS 3
28 #define COL_DELAY_EXPRESSION_EVENTS 4
29 #define COL_ASSIGNTARGET_EVENTS 5
30 #define COL_ASSIGNEXPRESSION_EVENTS 6
31 #define TOTAL_COLS_EVENTS 7
32 
33 class CQEventDM : public CQBaseDataModel
34 {
35  Q_OBJECT
36 
37 public:
38  CQEventDM(QObject *parent = 0);
39  virtual int rowCount(const QModelIndex &parent = QModelIndex()) const;
40  virtual int columnCount(const QModelIndex &parent = QModelIndex()) const;
41  Qt::ItemFlags flags(const QModelIndex &index) const;
42  QVariant data(const QModelIndex &index, int role) const;
43  QVariant headerData(int section, Qt::Orientation orientation,
44  int role = Qt::DisplayRole) const;
45  bool setData(const QModelIndex &index, const QVariant &value,
46  int role = Qt::EditRole);
47  bool removeRows(QModelIndexList rows, const QModelIndex &index = QModelIndex());
48 
49 protected:
50  bool insertRows(int position, int rows, const QModelIndex &index = QModelIndex());
51  bool removeRows(int position, int rows, const QModelIndex &index = QModelIndex());
52 };
53 
54 #endif //CQEventDM_H
bool setData(const QModelIndex &index, const QVariant &value, int role=Qt::EditRole)
Definition: CQEventDM.cpp:197
virtual int rowCount(const QModelIndex &parent=QModelIndex()) const
Definition: CQEventDM.cpp:27
QVariant headerData(int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const
Definition: CQEventDM.cpp:158
virtual int columnCount(const QModelIndex &parent=QModelIndex()) const
Definition: CQEventDM.cpp:31
bool insertRows(int position, int rows, const QModelIndex &index=QModelIndex())
Definition: CQEventDM.cpp:228
bool removeRows(QModelIndexList rows, const QModelIndex &index=QModelIndex())
Definition: CQEventDM.cpp:277
QVariant data(const QModelIndex &index, int role) const
Definition: CQEventDM.cpp:47
Qt::ItemFlags flags(const QModelIndex &index) const
Definition: CQEventDM.cpp:36
CQEventDM(QObject *parent=0)
Definition: CQEventDM.cpp:21