COPASI API  4.16.103
CQLayoutsDM.h
Go to the documentation of this file.
1 // Begin CVS Header
2 // $Source: /Volumes/Home/Users/shoops/cvs/copasi_dev/copasi/UI/CQLayoutsDM.h,v $
3 // $Revision: 1.2 $
4 // $Name: $
5 // $Author: bergmann $
6 // $Date: 2012/04/10 15:19:37 $
7 // End CVS Header
8 
9 // Copyright (C) 2012 - 2011 by Pedro Mendes, Virginia Tech Intellectual
10 // Properties, Inc., University of Heidelberg, and The University
11 // of Manchester.
12 // All rights reserved.
13 
14 #ifndef COPASI_CQLayoutsDM
15 #define COPASI_CQLayoutsDM
16 
17 #include "CQBaseDataModel.h"
18 
19 #define COL_ROW_NUMBER 0
20 #define COL_NAME 1
21 #define COL_SHOW 2
22 #define TOTAL_COLS 3
23 
24 class CListOfLayouts;
25 
27 {
28  Q_OBJECT
29 
30 public:
31  CQLayoutsDM(QObject *parent = 0);
32  virtual ~CQLayoutsDM();
33 
34  virtual int rowCount(const QModelIndex &parent = QModelIndex()) const;
35  virtual int columnCount(const QModelIndex &parent = QModelIndex()) const;
36  virtual Qt::ItemFlags flags(const QModelIndex &index) const;
37  virtual QVariant data(const QModelIndex &index, int role) const;
38  virtual QVariant headerData(int section, Qt::Orientation orientation,
39  int role = Qt::DisplayRole) const;
40  virtual bool setData(const QModelIndex &index, const QVariant &value,
41  int role = Qt::EditRole);
42  virtual bool isDefaultRow(const QModelIndex& i) const;
43  bool removeRows(QModelIndexList rows, const QModelIndex &index = QModelIndex());
44  void setListOfLayouts(CListOfLayouts * pListOfLayouts);
45 
46  virtual bool insertRows(int position, int rows, const QModelIndex &index = QModelIndex());
47 
48  virtual bool clear();
49 
50 protected:
51  virtual bool removeRows(int position, int rows, const QModelIndex &index = QModelIndex());
52 
53 private:
55 };
56 
57 #endif // COPASI_CQLayoutsDM
bool removeRows(QModelIndexList rows, const QModelIndex &index=QModelIndex())
virtual int columnCount(const QModelIndex &parent=QModelIndex()) const
Definition: CQLayoutsDM.cpp:36
virtual bool clear()
Definition: CQLayoutsDM.cpp:31
virtual int rowCount(const QModelIndex &parent=QModelIndex()) const
Definition: CQLayoutsDM.cpp:24
CListOfLayouts * mpListOfLayouts
Definition: CQLayoutsDM.h:54
CQLayoutsDM(QObject *parent=0)
Definition: CQLayoutsDM.cpp:16
virtual bool isDefaultRow(const QModelIndex &i) const
virtual Qt::ItemFlags flags(const QModelIndex &index) const
Definition: CQLayoutsDM.cpp:41
virtual bool insertRows(int position, int rows, const QModelIndex &index=QModelIndex())
virtual QVariant data(const QModelIndex &index, int role) const
Definition: CQLayoutsDM.cpp:64
virtual QVariant headerData(int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const
Definition: CQLayoutsDM.cpp:93
void setListOfLayouts(CListOfLayouts *pListOfLayouts)
virtual bool setData(const QModelIndex &index, const QVariant &value, int role=Qt::EditRole)
virtual ~CQLayoutsDM()
Definition: CQLayoutsDM.cpp:21