COPASI API  4.16.103
parametertable.h
Go to the documentation of this file.
1 // Copyright (C) 2010 - 2013 by Pedro Mendes, Virginia Tech Intellectual
2 // Properties, Inc., University of Heidelberg, and The University
3 // of Manchester.
4 // All rights reserved.
5 
6 // Copyright (C) 2008 - 2009 by Pedro Mendes, Virginia Tech Intellectual
7 // Properties, Inc., EML Research, gGmbH, University of Heidelberg,
8 // and The University of Manchester.
9 // All rights reserved.
10 
11 // Copyright (C) 2003 - 2007 by Pedro Mendes, Virginia Tech Intellectual
12 // Properties, Inc. and EML Research, gGmbH.
13 // All rights reserved.
14 
15 #ifndef PARAMETERTABLE_H
16 #define PARAMETERTABLE_H
17 
18 #include <QtGui/QTableWidget>
19 
20 #include "copasi.h"
21 #include "model/CReaction.h"
22 
23 class CReactionInterface;
24 class CQComboDelegate;
25 
26 //class ColorTableItem : public Q3TableItem
27 //{
28 //public:
29 // ColorTableItem(Q3Table *t, EditType et, QColor c, const QString txt);
30 // ~ColorTableItem();
31 // void setColor(QColor col) {color = col; table()->repaint();}
32 
33 //private:
34 // void paint(QPainter *p, const QColorGroup &cg, const QRect &cr, bool selected);
35 
36 // QColor color;
37 //};
38 
39 //class ColorCheckTableItem : public Q3CheckTableItem
40 //{
41 //public:
42 // ColorCheckTableItem(Q3Table *t, QColor c, const QString txt);
43 // ~ColorCheckTableItem();
44 // void setColor(QColor col) {color = col; table()->repaint();}
45 
46 //private:
47 // void paint(QPainter *p, const QColorGroup &cg, const QRect &cr, bool selected);
48 
49 // QColor color;
50 //};
51 
52 //table used in the reactions widget
53 
54 class ParameterTable : public QTableWidget
55 {
56  Q_OBJECT
57 
58 public:
59  ParameterTable(QWidget * parent = 0);
60 
61  void initTable();
62 
63 public slots:
64  void updateTable(const CReactionInterface & ri, const CReaction * mpReaction);
65 
66 private slots:
67  void handleCurrentCell(int row, int col, int, int);
68  void slotCellChanged(int row, int col);
69 
70 signals:
71  void signalChanged(int, int, QString);
72  void parameterStatusChanged(int, bool);
73 
74 protected:
76 
77 private:
78  QStringList mGlobalParameters;
79  QStringList mSubstrates;
80  QStringList mProducts;
81  QStringList mModifiers;
82  QStringList mVolumes;
83 
84  //convenience function. It gets a List of all metab names in the CMetabNameInterface format
85  static const std::vector<std::string> getListOfAllMetabNames(const CModel & model,
86  const CReactionInterface & ri);
87 
88  //convenience function.
89  static QStringList getListOfAllGlobalParameterNames(const CModel & model);
90  //convenience function.
91  static QStringList getListOfAllCompartmentNames(const CModel & model);
92 
93  int mOldRow;
94 
95 public:
96  std::vector<size_t> mLine2Index;
97  std::vector<size_t> mIndex2Line;
98 };
99 
100 #endif
101 //********************************************************************************
ParameterTable(QWidget *parent=0)
void updateTable(const CReactionInterface &ri, const CReaction *mpReaction)
void parameterStatusChanged(int, bool)
std::vector< size_t > mIndex2Line
void handleCurrentCell(int row, int col, int, int)
static QStringList getListOfAllCompartmentNames(const CModel &model)
static const std::vector< std::string > getListOfAllMetabNames(const CModel &model, const CReactionInterface &ri)
std::vector< size_t > mLine2Index
QStringList mGlobalParameters
CQComboDelegate * mpComboDelegate
void signalChanged(int, int, QString)
QStringList mModifiers
QStringList mProducts
Definition: CModel.h:50
QStringList mVolumes
QStringList mSubstrates
static QStringList getListOfAllGlobalParameterNames(const CModel &model)
void slotCellChanged(int row, int col)