COPASI API  4.16.103
CQCurrentValueTable.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 #ifndef CQCURRENTVALUETABLE_H_
12 #define CQCURRENTVALUETABLE_H_
13 #include <QtGui/QWidget>
14 
15 #include <string>
16 #include <map>
17 
18 #include "copasi.h"
19 
20 #include "layoutUI/CDataEntity.h"
21 
22 class QPushButton;
23 class QTableWidget;
24 class QHeaderView;
25 
26 class CQCurrentValueTable : public QWidget
27 {
28 
29  Q_OBJECT // must include this if you use Qt signals/slots
30 
31 protected:
32  std::map<int, std::string> mIndexMap;
33  QTableWidget* mpTable;
34  QPushButton* mpCheckAllButton;
35  QPushButton* mpUncheckAllButton;
36 
37 public:
38  CQCurrentValueTable(QWidget *parent = 0);
40 
41  void setNumRows(int rows);
42  void setNumCols(int columns);
43  void updateRowInTable(int row, C_FLOAT64 val);
44  void setRowInTable(int row, std::string key, std::string s, C_FLOAT64 val);
45  int numRows() const;
46 
47  QHeaderView* verticalHeader();
48  std::string getKeyForRow(int row) const;
49  bool getValueForRow(int row) const;
50 
51 protected:
52  void setValue(int row, C_FLOAT64 val);
53  void setKeyIndex(std::string key, int row);
54  void setAllBoxesChecked(bool checked = true);
55  void setAllBoxesUnchecked();
56  void init();
57 
58 private slots:
59  //void mouseClickedOverTable(int row, int col , int button, const QPoint & mousepos);
60  void slotCheckAllClicked();
61  void slotUncheckAllClicked();
62  void tableValueChanged(int row, int column);
63 
64 signals:
65  void valueChanged(int row);
66 };
67 
68 #endif /*CQCURRENTVALUETABLE_H_*/
std::string getKeyForRow(int row) const
QHeaderView * verticalHeader()
void setValue(int row, C_FLOAT64 val)
QPushButton * mpUncheckAllButton
bool getValueForRow(int row) const
CQCurrentValueTable(QWidget *parent=0)
void valueChanged(int row)
void setAllBoxesChecked(bool checked=true)
std::map< int, std::string > mIndexMap
void setRowInTable(int row, std::string key, std::string s, C_FLOAT64 val)
void tableValueChanged(int row, int column)
#define C_FLOAT64
Definition: copasi.h:92
void setKeyIndex(std::string key, int row)
QPushButton * mpCheckAllButton
void setNumCols(int columns)
void updateRowInTable(int row, C_FLOAT64 val)