COPASI API  4.16.103
CQPlotDM.h
Go to the documentation of this file.
1 // Begin CVS Header
2 // $Source: /Volumes/Home/Users/shoops/cvs/copasi_dev/copasi/UI/CQPlotDM.h,v $
3 // $Revision: 1.2 $
4 // $Name: $
5 // $Author: shoops $
6 // $Date: 2011/03/07 19:38:00 $
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 CQPlotDM_H
20 #define CQPlotDM_H
21 
22 #include "model/CModel.h"
23 #include "CQBaseDataModel.h"
24 
25 #define COL_NAME_PLOTS 1
26 #define COL_CURVES_PLOTS 2
27 #define COL_ACTIVE_PLOTS 3
28 #define TOTAL_COLS_PLOTS 4
29 
30 class CQPlotDM : public CQBaseDataModel
31 {
32  Q_OBJECT
33 
34 public:
35  CQPlotDM(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  bool setData(const QModelIndex &index, const QVariant &value,
43  int role = Qt::EditRole);
44  bool removeRows(QModelIndexList rows, const QModelIndex &index = QModelIndex());
45 
46 protected:
47  bool insertRows(int position, int rows, const QModelIndex &index = QModelIndex());
48  bool removeRows(int position, int rows, const QModelIndex &index = QModelIndex());
49 };
50 
51 #endif //CQPlotDM_H
virtual int rowCount(const QModelIndex &parent=QModelIndex()) const
Definition: CQPlotDM.cpp:28
CQPlotDM(QObject *parent=0)
Definition: CQPlotDM.cpp:22
QVariant data(const QModelIndex &index, int role) const
Definition: CQPlotDM.cpp:50
Qt::ItemFlags flags(const QModelIndex &index) const
Definition: CQPlotDM.cpp:37
bool removeRows(QModelIndexList rows, const QModelIndex &index=QModelIndex())
Definition: CQPlotDM.cpp:242
virtual int columnCount(const QModelIndex &parent=QModelIndex()) const
Definition: CQPlotDM.cpp:32
bool insertRows(int position, int rows, const QModelIndex &index=QModelIndex())
Definition: CQPlotDM.cpp:206
bool setData(const QModelIndex &index, const QVariant &value, int role=Qt::EditRole)
Definition: CQPlotDM.cpp:138
QVariant headerData(int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const
Definition: CQPlotDM.cpp:112