COPASI API  4.16.103
CQFunctionDM.h
Go to the documentation of this file.
1 // Begin CVS Header
2 // $Source: /Volumes/Home/Users/shoops/cvs/copasi_dev/copasi/UI/CQFunctionDM.h,v $
3 // $Revision: 1.2 $
4 // $Name: $
5 // $Author: shoops $
6 // $Date: 2011/03/07 19:37:49 $
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 CQFunctionDM_H
20 #define CQFunctionDM_H
21 
22 #include "model/CModel.h"
23 #include "listviews.h"
24 #include "CQBaseDataModel.h"
25 
26 #define COL_NAME_FUNCTIONS 1
27 #define COL_TYPE_FUNCTIONS 2
28 #define COL_MATH_DESC_FUNCTIONS 3
29 #define COL_SBML_ID_FUNCTIONS 4
30 #define TOTAL_COLS_FUNCTIONS 5
31 
33 {
34  Q_OBJECT
35 
36 public:
37  CQFunctionDM(QObject *parent = 0);
38  virtual int rowCount(const QModelIndex &parent = QModelIndex()) const;
39  virtual int columnCount(const QModelIndex &parent = QModelIndex()) const;
40  Qt::ItemFlags flags(const QModelIndex &index) const;
41  QVariant data(const QModelIndex &index, int role) const;
42  QVariant headerData(int section, Qt::Orientation orientation,
43  int role = Qt::DisplayRole) const;
44  bool setData(const QModelIndex &index, const QVariant &value,
45  int role = Qt::EditRole);
46  bool removeRows(QModelIndexList rows, const QModelIndex &index = QModelIndex());
47 
48 protected:
49  bool insertRows(int position, int rows, const QModelIndex &index = QModelIndex());
50  bool removeRows(int position, int rows, const QModelIndex &index = QModelIndex());
51 
52 private:
53  bool isFunctionReadOnly(const QModelIndex &index) const;
54 };
55 
56 #endif //CQFunctionDM_H
CQFunctionDM(QObject *parent=0)
virtual int rowCount(const QModelIndex &parent=QModelIndex()) const
bool isFunctionReadOnly(const QModelIndex &index) const
bool removeRows(QModelIndexList rows, const QModelIndex &index=QModelIndex())
virtual int columnCount(const QModelIndex &parent=QModelIndex()) const
QVariant data(const QModelIndex &index, int role) const
bool insertRows(int position, int rows, const QModelIndex &index=QModelIndex())
bool setData(const QModelIndex &index, const QVariant &value, int role=Qt::EditRole)
QVariant headerData(int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const
Qt::ItemFlags flags(const QModelIndex &index) const