COPASI API  4.16.103
qwt3dPlot.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 PLOT3D_H
16 #define PLOT3D_H
17 
18 #include <QtCore/QString>
19 #include <qwt3d_surfaceplot.h>
20 
23 
24 class QGridLayout;
25 
26 class CQBarChart : public CQBaseWidget
27 {
28  Q_OBJECT
29 
30 public:
31 
32  struct Data
33  {
34  int columns;
35  int rows;
36  double faktor;
38  double rowAxeLength;
39  int maxItems;
40  double valueZone;
41  double maxValue;
42  double minValue;
43  };
44 
46 
47  CQBarChart(QWidget* parent = 0, const char* name = 0);
48  virtual ~CQBarChart();
50  QString mTitle;
51  double** data;
52  const std::vector<std::string> *mpColumnScale;
53  const std::vector<std::string> *mpRowScale;
55  void setScale(const std::vector<std::string> *columnsDescript, const std::vector<std::string> *rowsDescript);
56  void setColors(std::vector<QColor> mColors, double min, double max);
57  void setData(double** data, int columns, int rows, double valueZone);
58  virtual void sliderMoved(int column, int row);
59  void setData();
60  void setAxes();
61  void setZoom();
62  void plotData();
63  void setLegend();
64  void setSlider();
65  void setPlotTitle();
66  void emptyPlot();
67  void resizeCoordSys();
68  int getColSliderPos();
69  int getRowSliderPos();
70 
71  /**
72  * This method sets the user specified descriptions for the rows and columns.
73  * All axes in bar graph will be marked with this description labels automatically.
74  */
75  void setDescriptions(const std::vector<std::string> *columnsDes, const std::vector<std::string> *rowsDes);
76 
77  /**
78  * If necessary set the title in the middle over the bar graph.
79  */
80  void setPlotTitle(QString title);
81 
82  /**
83  * Option to show or to hide the color legend.
84  */
85  void showColorLegend(bool CLegend);
86 
87 public slots:
88  void saveDataToFile();
89  void showLegend();
90  void hotKeysMessage();
91 
92 private:
93  void contextMenuEvent(QContextMenuEvent *);
94 
95  //signals:
96  // void sliderPosition(int col, int row);
97 };
98 
99 #endif // PLOT3D_H
virtual void sliderMoved(int column, int row)
Definition: qwt3dPlot.cpp:463
void setLegend()
Definition: qwt3dPlot.cpp:258
void contextMenuEvent(QContextMenuEvent *)
Definition: qwt3dPlot.cpp:519
void setZoom()
Definition: qwt3dPlot.cpp:66
void emptyPlot()
Definition: qwt3dPlot.cpp:502
double rowAxeLength
Definition: qwt3dPlot.h:38
Data mData
Definition: qwt3dPlot.h:45
void setSlider()
Definition: qwt3dPlot.cpp:369
double maxValue
Definition: qwt3dPlot.h:41
void resizeCoordSys()
Definition: qwt3dPlot.cpp:396
void saveDataToFile()
Definition: qwt3dPlot.cpp:539
Bar * mpBar
Definition: qwt3dPlot.h:49
double minValue
Definition: qwt3dPlot.h:42
Definition: qwt3dBars.h:23
void hotKeysMessage()
Definition: qwt3dPlot.cpp:605
void setDescriptions(const std::vector< std::string > *columnsDes, const std::vector< std::string > *rowsDes)
Definition: qwt3dPlot.cpp:616
CQBarChart(QWidget *parent=0, const char *name=0)
Definition: qwt3dPlot.cpp:35
int getRowSliderPos()
Definition: qwt3dPlot.cpp:449
void showColorLegend(bool CLegend)
Definition: qwt3dPlot.cpp:621
void plotData()
Definition: qwt3dPlot.cpp:84
int getColSliderPos()
Definition: qwt3dPlot.cpp:435
const std::vector< std::string > * mpRowScale
Definition: qwt3dPlot.h:53
double valueZone
Definition: qwt3dPlot.h:40
double ** data
Definition: qwt3dPlot.h:51
const std::vector< std::string > * mpColumnScale
Definition: qwt3dPlot.h:52
void setAxes()
Definition: qwt3dPlot.cpp:105
void setPlotTitle()
Definition: qwt3dPlot.cpp:278
double columnAxeLength
Definition: qwt3dPlot.h:37
QString mTitle
Definition: qwt3dPlot.h:50
void setData()
#define min(a, b)
Definition: f2c.h:175
void setScale(const std::vector< std::string > *columnsDescript, const std::vector< std::string > *rowsDescript)
Definition: qwt3dPlot.cpp:290
void setColors(std::vector< QColor > mColors, double min, double max)
Definition: qwt3dPlot.cpp:299
bool mColorLegend
Definition: qwt3dPlot.h:54
virtual ~CQBarChart()
Definition: qwt3dPlot.cpp:60
void showLegend()
Definition: qwt3dPlot.cpp:591
#define max(a, b)
Definition: f2c.h:176