53cd861c520a7fbba721989b30032f733fd0e8e6
[snark14.git] / tools / Display / chooseYVar.hpp
1 /** @file chooseYVar.hpp
2     @package snark14Display
3     @author Bruno M. Carvalho and Deniz Sarioz
4     licensed under (open-source) QPL v1.0
5     which accompanies this distribution in the file QPL
6 */
7
8 #ifndef CHOOSEYVAR_H
9 #define CHOOSEYVAR_H
10
11 #include "variables.hpp"
12 #include "displaywidget.hpp"
13
14 #include <qdialog.h>
15
16 #include <qbuttongroup.h>
17 #include <qcolor.h>
18 #include <qcheckbox.h>
19 #include <qcombobox.h>
20 #include <qfiledialog.h>
21 #include <qfont.h>
22 #include <qframe.h>
23 #include <qimage.h>
24 #include <qlabel.h>
25 #include <qlayout.h>
26 #include <qlineedit.h>
27 #include <qlistbox.h>
28 #include <qmessagebox.h>
29 #include <qpainter.h>
30 #include <qpen.h>
31 #include <qpixmap.h>
32 #include <qpoint.h>
33 #include <qpushbutton.h>
34 #include <qradiobutton.h>
35 #include <qtooltip.h>
36 #include <qvariant.h>
37 #include <qwhatsthis.h>
38 #include <qwidget.h>
39
40 class QVBoxLayout;
41 class QHBoxLayout;
42 class QButtonGroup;
43 class QCheckBox;
44 class QComboBox;
45 class QFrame;
46 class QGridLayout; 
47 class QLabel;
48 class QLineEdit;
49 class QListBox;
50 class QListBoxItem;
51 class QPushButton;
52 class QRadioButton;
53 class QPixmap;
54
55 class chooseYVarWindow : public QDialog
56 {
57   Q_OBJECT
58
59 public:
60   chooseYVarWindow( QWidget* parent = 0, const char* name = 0, bool modal = true, WFlags fl = 0 ,int x = 0 , int y = 0 );
61   ~chooseYVarWindow();
62   int id;
63   bool status;
64   globalYVar_t globY;
65   unsigned PBPY;
66   //  double maxval,minval,diffmaxval,diffminval;
67   displayWidget* displaywidget;
68   QBoxLayout* topLayout;
69   QBoxLayout* yaxisbuttonLayout;
70   QBoxLayout* x_extrema_layout;
71   QBoxLayout* y_extrema_layout;
72   QButtonGroup* yaxisbuttongroup;
73   QCheckBox* sameExtremaForAllCheckBox;
74   QRadioButton* globalbutton;
75   QComboBox* globalerrors;
76   QRadioButton* pointbutton;
77   QComboBox* pointerrors;
78   QLabel* minxlabel;
79   QLabel* maxxlabel;
80   QLabel* minylabel;
81   QLabel* maxylabel;
82   QLineEdit* minx;
83   QLineEdit* maxx;
84   QLineEdit* miny;
85   QLineEdit* maxy;
86   QPushButton* proceedbutton;
87   QPushButton* closebutton;
88   QButtonGroup* colorbuttongroup;
89   QRadioButton* grayScaleButton;
90   QRadioButton* colorButton;
91 private:
92   void spawnPlots(bool plotPBP, int minXVal, int maxXVal, double minYVal, double maxYVal);
93   void spawnDialogs(bool plotPBP);
94   void activateExtremaFields();
95   void deactivateExtremaFields();
96   void getCalculatedExtrema();
97 public slots:
98   void activateGlobalErrors();
99   void activatePointErrors();
100   void maybeGetCalculatedExtrema();
101   void sameExtremaClicked();
102   void proceed();
103   void closeWindow();
104     // jk 2/2/2009 adding grayScale option for graphs
105   bool isGrayScaleChecked();
106 protected:
107   virtual void closeEvent(QCloseEvent *e);
108 };
109 #endif // CHOOSEYVAR_H