Fixed text file permissions
[snark14.git] / tools / Input / projection.h
1 /** @file projection.h
2     @package snark14Input
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 PROJECTIONWINDOW_H
9 #define PROJECTIONWINDOW_H
10
11 #include <qvariant.h>
12 #include <qdialog.h>
13 class QVBoxLayout; 
14 class QHBoxLayout; 
15 class QGridLayout;  
16 class QCheckBox; 
17 class QComboBox;
18 class QButtonGroup;
19 class QFrame;
20 class QLabel;
21 class QLineEdit;
22 class QMultiLineEdit;
23 class QPushButton;
24 class QRadioButton;
25 class QTabWidget;
26
27 class projectionwindow : public QDialog
28
29     Q_OBJECT
30
31 public:
32     projectionwindow( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
33     ~projectionwindow();
34     QString getOutput();
35
36     QTabWidget* tabwidget1;
37
38     QWidget* projTypeWidget;
39     QLabel* projTypeLabel;
40
41     QLabel* projectionlabel;
42     QButtonGroup* projectionbuttongroup;
43     QRadioButton* oldbutton;
44     QRadioButton* realbutton;
45     QCheckBox* bhcbutton;
46     QMultiLineEdit * bhcwindow;
47     QRadioButton* pseudobutton;
48
49     QTabWidget* pseudoCommandsWidget;
50
51     QWidget* idheaderWidget;
52     QLineEdit* idheader;
53     QLabel* idheaderlabel;
54
55     QWidget* geometryWidget;
56     QLabel* geometrylabel;
57     QButtonGroup* geometrybuttongroup;
58     QRadioButton* parallelbutton;
59     QRadioButton* divergentbutton;
60     QButtonGroup* parallelbuttongroup;
61     QRadioButton* uniformbutton;
62     QRadioButton* variablebutton;
63     QButtonGroup* parallelbuttongroup2;
64     QRadioButton* stripbutton;
65     QRadioButton* linebutton;
66     QButtonGroup* divergentbuttongroup;
67     QRadioButton* arcbutton;
68     QRadioButton* tangentbutton;
69     QLineEdit* sourcetoorigin;
70     QLabel* sourcetooriginlabel;
71     QLineEdit* sourcetodetector;
72     QLabel* sourcetodetectorlabel;
73     QLabel* raysumslabel;
74     QButtonGroup* raysumsbuttongroup;
75     QRadioButton* userbutton;
76     QLineEdit* userrays;
77     QLabel* userrayslabel;
78     QRadioButton* programbutton;
79     QLineEdit* raysumsnelem;
80     QLabel* raysumsnelemlabel;
81     QLineEdit* raysumspixelsize;
82     QLabel* raysumspixelsizelabel;
83     QLineEdit* detectorspacing;
84     QLabel* detectorspacinglabel;
85     QLabel* angleslabel;
86     QButtonGroup* anglesbuttongroup;
87     QLineEdit* prjnum;
88     QLabel* prjnumlabel;
89     QRadioButton* linobutton;
90     QRadioButton* equalspacingbutton;
91     QLineEdit* firstangle;
92     QLabel* firstanglelabel;
93     QLineEdit* lastangle;
94     QLabel* lastanglelabel;
95     QRadioButton* nonebutton;
96     QLineEdit* angles;  // DS: make it a regular line edit
97     QWidget* measurementWidget;
98
99     // set 7
100     QWidget* measurementRun;
101     QLabel* measurementlabel;
102     QButtonGroup* measurementbuttongroup;
103     QRadioButton* perfectbutton;
104     QRadioButton* noisybutton;
105     QFrame* noisyframe;
106     QCheckBox* quantumbutton;
107     QLineEdit* quanmn;
108     QLabel* quanmnlabel;
109     QLineEdit* quancm;
110     QLabel* quancmlabel;
111     QLabel* calibrationlabel;
112     QComboBox* quanin;
113     QLabel* quaninlabel;
114     QCheckBox* scatterbutton;
115     QLineEdit* sctnpk;
116     QLabel* sctnpklabel;
117     QLineEdit* sctnwd;
118     QLabel* sctnwdlabel;
119     QCheckBox* additivebutton;
120     QLineEdit* addnmn;
121     QLabel* addnmnlabel;
122     QLineEdit* addnsd;
123     QLabel* addnsdlabel;
124     QCheckBox* multiplicativebutton;
125     QLineEdit* multnmn;
126     QLabel* multnmnlabel;
127     QLineEdit* multnsd;
128     QLabel* multnsdlabel;
129     QLabel* seedlabel;
130     QLineEdit* seed;
131     QLabel* seedlabel1;
132     QLabel* backgroundlabel;
133     QLineEdit* backgr1;
134     QLabel* backgr1label;
135     QLineEdit* backgr2;
136     QLabel* backgr2label;
137     QLineEdit* backgr3;
138     QLabel* backgr3label;
139     QLineEdit* backgr4;
140     QLabel* backgr4label;
141     QLineEdit* backgr5;
142     QLabel* backgr5label;
143     QLineEdit* backgr6;
144     QLabel* backgr6label;
145     QLineEdit* backgr7;
146     QLabel* backgr7label; 
147
148     QFrame* Line4;
149     QPushButton* okbutton;
150     QPushButton* cancelbutton;
151  private:
152     void populate_idheader();
153     void populate_geometry();
154     void populate_measurement();
155
156     bool check_idheader(QString& errs);
157     //    bool check_geometry(QString& errs);
158     //    bool check_measurement(QString& errs);
159
160     QString get_idheader();
161     QString get_geometry();
162     QString get_measurement();
163
164 private slots:
165     void deactivateFields();
166     void activatePseudoFields();
167     void activateRealOptions();
168
169     // for set 6
170     void activateParallelFields();
171     void activateDivergentFields();
172     void activateUserFields();
173     void activateProgramFields();
174     void activateEqualSpacingFields();
175     void deactivateEqualSpacingFields();
176     void deactivateNoisyFields();
177     void activateNoisyFields();
178     void activateQuantumFields();
179     void activateScatterFields();
180     void activateAdditiveFields();
181     void activateMultiplicativeFields();
182
183     // for set 7
184
185     // for everything (mainly if pseudo)
186     void checkValues();
187 };
188
189 #endif // PROJECTIONWINDOW_H