COPASI API  4.16.103
CQArrayAnnotationsWidget.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) 2007 by Pedro Mendes, Virginia Tech Intellectual
12 // Properties, Inc. and EML Research, gGmbH.
13 // All rights reserved.
14 
15 #ifndef CQARRAYANN_H
16 #define CQARRAYANN_H
17 
18 #include <QtCore/QVariant>
19 
20 #include "copasi/UI/ui_CQArrayAnnotationsWidget.h"
21 #include "copasi/UI/CColorScale.h"
22 
24 
25 class QLabel;
26 
27 class CQBarChart;
28 class CQComboDelegate;
29 
30 /**
31  * This Widget displays a CArrayAnnotation (no editing yet)
32  */
33 class CQArrayAnnotationsWidget : public QWidget, public Ui::CQArrayAnnotationsWidget
34 {
35  Q_OBJECT
36 
37 public:
38 
39  CQArrayAnnotationsWidget(QWidget* parent = 0, bool slider = true);
40 
41  virtual ~CQArrayAnnotationsWidget();
42 
43  void setArrayAnnotation(const CArrayAnnotation * pArray);
44 
45  /**
46  * set an algorithm for color coding. If cs=NULL no color coding is performed. The widget assumes
47  * ownership of the scaler and will delete it in its destructor. This means a CColorScale
48  * can only be used in one widget.
49  */
50  void setColorCoding(CColorScale * cs);
51 
52  /**
53  * returns the color coding algorithm
54  */
56 
57  /**
58  * if true the parameters for the color coding are determined automatically
59  */
61 
62  /**
63  * enable or disable the display of the dimensions annotation (the upper table)
64  */
65  void setLegendEnabled(bool b);
66 
67  void disableBarChart();
68 
69  void disableSlider();
70 
71  void setFocusOnTable();
72 
73  void setFocusOnBars();
74 
75  void switchToTable();
76 
77  void clearWidget();
78 
79 protected slots:
80 
81  void slotRowSelectionChanged(int row);
82 
83  void slotColumnSelectionChanged(int col);
84 
85  void slotCurrentSelectionIndexChanged(int row, int index);
86 
87  void slotContentCellClicked(int row, int col);
88 
90 
91  void changeContents();
92 
93  void setColumnSize(int col, int size0, int size);
94 
95 protected:
96  void fillTable();
97 
98  void fillTableN(size_t rowIndex, size_t colIndex,
99  const CCopasiAbstractArray::index_type & index);
100 
101  void fillTable1(size_t rowIndex,
102  const CCopasiAbstractArray::index_type & index);
103 
104  void fillTable0();
105 
106  void createBarChart();
107 
108  void fillBarChart();
109 
110  /**
111  * only for dimensionality > 2
112  */
113  void initSelectionTable();
114 
115  /**
116  * indicates whether 3d bar chart is activated
117  */
119 
120  /**
121  * indicates whether sliders are used in the 3d bar chart
122  */
124 
125  double** data;
126  std::vector< QColor > mColors;
127  void enableBarChart(bool enable);
128  //void switchToTable();
129  void switchToBarChart();
130 
132 
135 
136  size_t mRowIndex;
137  size_t mColIndex;
139 
141 
144 
145  QStringList mComboEntries;
147 };
148 
149 #endif
void setColumnSize(int col, int size0, int size)
void slotContentCellClicked(int row, int col)
CColorScale * getColorCoding() const
void setColorCoding(CColorScale *cs)
std::vector< size_t > index_type
Definition: CCopasiArray.h:34
const CArrayAnnotation * mpArray
CCopasiAbstractArray::index_type mSelectionIndex
void setArrayAnnotation(const CArrayAnnotation *pArray)
CCopasiAbstractArray::index_type mSelectedCell
void slotCurrentSelectionIndexChanged(int row, int index)
Header file of class CArrayAnnotation.
void fillTableN(size_t rowIndex, size_t colIndex, const CCopasiAbstractArray::index_type &index)
void fillTable1(size_t rowIndex, const CCopasiAbstractArray::index_type &index)
CQArrayAnnotationsWidget(QWidget *parent=0, bool slider=true)