Fixed text file permissions
[snark14.git] / tools / Input / create.h
1 /** @file create.h
2     @package snark14Input
3     @author Bruno M. Carvalho and Deniz Sarioz
4     modified by Joanna Klukowska (June 2008)
5         added two fields in LAST line for agreement with snark14
6         removed SAVE and MODIFY options of Run since snark14 does not have file12
7     licensed under (open-source) QPL v1.0
8     which accompanies this distribution in the file QPL
9 */
10
11 #ifndef CREATEWINDOW2_H
12 #define CREATEWINDOW2_H
13
14 #include <qvariant.h>
15 #include <qdialog.h>
16 class QVBoxLayout; 
17 class QHBoxLayout; 
18 class QGridLayout; 
19 class QButtonGroup;
20 class QLabel;
21 class QComboBox;
22 class QLineEdit;
23 class QMultiLineEdit;
24 class QComboBox;
25 class QPushButton;
26 class QRadioButton;
27 class QTabWidget;
28 class QWidget;
29 class QFrame;
30 class QCheckBox;
31
32 class createwindow : public QDialog
33
34     Q_OBJECT
35
36 public:
37     createwindow( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
38     ~createwindow();
39     QString getOutput1();
40     QString getOutput2();
41     QString getOutput3();
42     QString getOutput4();
43     QString getOutput5();
44     QString getOutput6();
45     QString getOutput7();
46     QString getOutput8();
47
48     QTabWidget* tabwidget1;
49
50     /* tab 1 -- sets 1 and 2 of CREATE sequence */
51     QWidget* headerSpectrum;
52     QLabel* idheaderlabel;
53     QLineEdit* idheader;
54     QLabel* spectrumlabel;
55     QButtonGroup* spectrumbuttongroup;
56     QRadioButton* monochromaticbutton;
57     QLineEdit* energy;
58     QLabel* energylabel;
59     QRadioButton* polychromaticbutton;
60     QLineEdit* nergy;
61     QLabel* nergylabel;
62     QLineEdit* energy1;
63     QLabel* energy1label;
64     QLineEdit* percent1;
65     QLabel* percent1label;
66     QLineEdit* energy2;
67     QLabel* energy2label;
68     QLineEdit* percent2;
69     QLabel* percent2label;
70     QLineEdit* energy3;
71     QLabel* energy3label;
72     QLineEdit* percent3;
73     QLabel* percent3label;
74     QLineEdit* energy4;
75     QLabel* energy4label;
76     QLineEdit* percent4;
77     QLabel* percent4label;
78     QLineEdit* energy5;
79     QLabel* energy5label;
80     QLineEdit* percent5;
81     QLabel* percent5label;
82     QLineEdit* energy6;
83     QLabel* energy6label;
84     QLineEdit* percent6;
85     QLabel* percent6label;
86     QLineEdit* energy7;
87     QLabel* energy7label;
88     QLineEdit* percent7;
89     QLabel* percent7label;
90
91     /* tab 2 -- set 3 of CREATE sequence */
92     QWidget* objects;
93     QLabel* objectslabel;
94     QComboBox* shape;
95     QLineEdit* cx;
96     QLineEdit* cy;
97     QLineEdit* u;
98     QLineEdit* v;
99     QLineEdit* ang;
100     QLineEdit* den1;
101     QLineEdit* deni;
102     QLabel* shapelabel;
103     QLabel* cxlabel;
104     QLabel* cylabel;
105     QLabel* ulabel;
106     QLabel* vlabel;
107     QLabel* anglabel;
108     QLabel* den1label;
109     QLabel* denilabel;
110     QPushButton* addshapebutton;
111     QMultiLineEdit* objectsdescription;
112     QLineEdit* scale;
113     QLabel* lastlabel;
114     QLabel* scalelabel;
115     
116     /* jk 06/13/2008 added variabled to reflect tissue variabilit in snark14*/
117     QLineEdit* seedvar;
118     QLabel* seedvarlabel;
119     QLineEdit* var;
120     QLabel* varlabel;
121     
122     /* tab 3 -- sets 4 and 5 of CREATE sequence */
123     QWidget* phantomRaysum;
124     QLabel* phantomlabel;
125     QRadioButton* phantomaveragebutton;
126     QLineEdit* nave1;
127     QLabel* nave1label;
128     QLineEdit* nelem;
129     QLabel* nelemlabel;
130     QLineEdit* pixelsize;
131     QLabel* pixelsizelabel;
132     QLabel* raysumlabel;
133     QRadioButton* raysumaveragebutton;
134     QLineEdit* nave2;
135     QLabel* nave2label;
136     QLineEdit* naper1;
137     QLabel* naper1label;
138     QLineEdit* naper2;
139     QLabel* naper2label;
140     QLineEdit* naper3;
141     QLabel* naper3label;
142     QLineEdit* naper4;
143     QLabel* naper4label;
144     QLineEdit* naper5;
145     QLabel* naper5label;
146     QLineEdit* naper6;
147     QLabel* naper6label;
148     QLineEdit* naper7;
149     QLabel* naper7label;
150     QLineEdit* naper8;
151     QLabel* naper8label;
152     QLineEdit* naper9;
153     QLabel* naper9label;
154     QLineEdit* naper10;
155     QLabel* naper10label;
156     QLineEdit* naper11;
157     QLabel* naper11label;
158     QLineEdit* naper12;
159     QLabel* naper12label;
160     QLineEdit* naper13;
161     QLabel* naper13label;
162
163     /* tab 4 -- set 6 of CREATE sequence */
164     QWidget* geometryRaysums;
165     QLabel* geometrylabel;
166     QButtonGroup* geometrybuttongroup;
167     QRadioButton* parallelbutton;
168     QRadioButton* divergentbutton;
169     QRadioButton* linogrambutton;
170     QButtonGroup* parallelbuttongroup;
171     QRadioButton* uniformbutton;
172     QRadioButton* variablebutton;
173     QButtonGroup* parallelbuttongroup2;
174     QRadioButton* stripbutton;
175     QRadioButton* linebutton;
176     QButtonGroup* divergentbuttongroup;
177     QRadioButton* arcbutton;
178     QRadioButton* tangentbutton;
179     QLineEdit* sourcetoorigin;
180     QLabel* sourcetooriginlabel;
181     QLineEdit* sourcetodetector;
182     QLabel* sourcetodetectorlabel;
183     QLabel* raysumslabel;
184     QButtonGroup* raysumsbuttongroup;
185     QRadioButton* userbutton;
186     QLineEdit* userrays;
187     QLabel* userrayslabel;
188     QRadioButton* programbutton;
189     QLineEdit* raysumsnelem;
190     QLabel* raysumsnelemlabel;
191     QLineEdit* raysumspixelsize;
192     QLabel* raysumspixelsizelabel;
193     QLineEdit* detectorspacing;
194     QLabel* detectorspacinglabel;
195     QLabel* angleslabel;
196     QButtonGroup* anglesbuttongroup;
197     QLineEdit* prjnum;
198     QLabel* prjnumlabel;
199     QRadioButton* linobutton;
200     QRadioButton* equalspacingbutton;
201     QLineEdit* firstangle;
202     QLabel* firstanglelabel;
203     QLineEdit* lastangle;
204     QLabel* lastanglelabel;
205     QRadioButton* nonebutton;
206     //    QMultiLineEdit* angles; // bad idea.  make it a regular line edit
207     QLineEdit* angles;
208
209     /* tab 5 -- sets 7 and 8 of CREATE sequence */
210     QWidget* measurementRun;
211     QLabel* measurementlabel;
212     QButtonGroup* measurementbuttongroup;
213     QRadioButton* perfectbutton;
214     QRadioButton* noisybutton;
215     QFrame* noisyframe;
216     QCheckBox* quantumbutton;
217     QLineEdit* quanmn;
218     QLabel* quanmnlabel;
219     QLineEdit* quancm;
220     QLabel* quancmlabel;
221     QLabel* calibrationlabel;
222     QComboBox* quanin;
223     QLabel* quaninlabel;
224     QCheckBox* scatterbutton;
225     QLineEdit* sctnpk;
226     QLabel* sctnpklabel;
227     QLineEdit* sctnwd;
228     QLabel* sctnwdlabel;
229     QCheckBox* additivebutton;
230     QLineEdit* addnmn;
231     QLabel* addnmnlabel;
232     QLineEdit* addnsd;
233     QLabel* addnsdlabel;
234     QCheckBox* multiplicativebutton;
235     QLineEdit* multnmn;
236     QLabel* multnmnlabel;
237     QLineEdit* multnsd;
238     QLabel* multnsdlabel;
239     QLabel* seedlabel;
240     QLineEdit* seed;
241     QLabel* seedlabel1;
242     QLabel* backgroundlabel;
243     QLineEdit* backgr1;
244     QLabel* backgr1label;
245     QLineEdit* backgr2;
246     QLabel* backgr2label;
247     QLineEdit* backgr3;
248     QLabel* backgr3label;
249     QLineEdit* backgr4;
250     QLabel* backgr4label;
251     QLineEdit* backgr5;
252     QLabel* backgr5label;
253     QLineEdit* backgr6;
254     QLabel* backgr6label;
255     QLineEdit* backgr7;
256     QLabel* backgr7label; 
257     QLabel* runlabel;
258     QButtonGroup* runbuttongroup;
259     QRadioButton* savebutton;
260     QRadioButton* modifybutton;
261     QRadioButton* nonebutton_2;
262
263     QPushButton* okbutton;
264     QPushButton* cancelbutton;
265     
266     bool israysumaveragepresent;
267 public slots:
268     bool isRaysumAveragePresent();
269 private slots:
270     void addShape();
271     void activateMonochromaticFields();
272     void activatePolychromaticFields();
273     void activatePhantomAverageFields();
274     void activateRaysumAverageFields();
275     void activateParallelFields();
276     void activateDivergentFields();
277     void activate__6_3__6_4__6_5( bool enable ); // doesn't need to be a slot really
278     void activateLinogramFields();
279     void activateUserFields();
280     void activateProgramFields();
281     void activateEqualSpacingFields();
282     void deactivateEqualSpacingFields();
283     void deactivateNoisyFields();
284     void activateNoisyFields();
285     void activateQuantumFields();
286     void activateScatterFields();
287     void activateAdditiveFields();
288     void activateMultiplicativeFields();
289     void activateOKButton();
290     void checkValues();
291 };
292
293 #endif // CREATEWINDOW2_H