UltraScan III
us_ramp_gui.h
Go to the documentation of this file.
1 #ifndef US_RAMP_GUI_H
3 #define US_RAMP_GUI_H
4 
5 #include <QtGui>
6 
7 #include "us_extern.h"
8 #include "us_widgets.h"
9 #include "us_help.h"
10 #include "us_plot.h"
11 #include "us_ramp.h"
12 #include "us_mwlramp.h"
13 #include "us_experiment_ra.h"
14 #include "us_dataIO.h"
15 #include "us_solution.h"
16 #include "us_selectbox_ra.h"
17 #ifndef DbgLv
18 #define DbgLv(a) if(dbg_level>=a)qDebug()
19 #endif
20 
21 class US_RampGui : public US_Widgets
22 {
23  Q_OBJECT
24 
25  public:
26 
28  enum aucStatus
29  {
34  };
35 
37  US_RampGui();
38 
40  bool save_diskDB;
41 
42  QList< double > subsets;
43 
44  signals:
45 
46  public slots:
47 
48  private:
49 
50  enum { SPLIT, REFERENCE, NONE } step;
51 
55 
56  QString runType;
57  QString oldRunType;
58  QString runID;
59 
60  QLabel* lb_description;
61  QLineEdit* le_description;
62  QLabel* lb_Meniscus;
63  QLineEdit* le_Meniscus;
64  QLabel* lb_Bottom;
65  QLineEdit* le_Bottom;
66  QLabel* lb_Radius;
67  QLineEdit* le_Radius;
68 
69  QLineEdit* le_investigator;
70  QLineEdit* le_status;
71  QLineEdit* le_runID;
72  QLineEdit* le_runID2;
73  QLineEdit* le_dir;
74 
75  QLineEdit* le_solutionDesc;
76 
77  QLabel* lb_triple;
78  QListWidget* lw_triple; // cell, channel, wavelength
79  QListWidget* lw_todoinfo; // to do list
80 
81  QLabel* lb_scan;
82  QLabel* lb_from;
83  QLabel* lb_to;
84  QwtCounter* ct_from;
85  QwtCounter* ct_to;
86 
87  QwtCounter* ct_tolerance;
88 
89  QLabel* lb_mwlctrl;
90  QLabel* lb_mwlctre;
91  QLabel* lb_lambstrt;
92  QLabel* lb_lambstop;
93  QLabel* lb_lambplot;
94  QLineEdit* le_lambraw;
95  QComboBox* cb_lambstrt;
96  QComboBox* cb_lambstop;
97  QComboBox* cb_lambplot;
98  QCheckBox* ck_average;
99  QPushButton* pb_lambprev;
100  QPushButton* pb_lambnext;
101  QGridLayout* lo_average;
102  QVector< int > all_lambdas;
103  QVector< int > exp_lambdas;
104 
105  QPushButton* pb_editRuninfo;
106  QPushButton* pb_importlechner;
107  QPushButton* pb_loadUS3;
108  QPushButton* pb_importmwlramp;
109  QPushButton* pb_details;
110  QPushButton* pb_applyAll;
111  QPushButton* pb_solution;
112  QPushButton* pb_exclude;
113  QPushButton* pb_include;
114  QPushButton* pb_define;
115  QPushButton* pb_process;
116  QPushButton* pb_reference;
117  QPushButton* pb_intensity;
118  QPushButton* pb_cancelref;
119  QPushButton* pb_dropScan;
120  QLineEdit* le_dropScan;
121  QPushButton* pb_saveUS3;
122 
124 
125  QVector< US_mwlRamp::RampRawData > allData;
126  QVector< US_mwlRamp::RampRawData* > outData;
127  QList< US_Ramp::TripleInfo > all_chaninfo;
128 // QList< US_Ramp::TripleInfo > out_chaninfo; //!< output channel info
129  QStringList all_triples;
130  QStringList all_channels;
131 
132 
133  QwtPlot* data_plot;
134  QwtPlotGrid* grid;
135 
136 
137 
138  int reference_cellchan; // index of reference cell
139  bool referenceDefined; // True if RI averages done
140  int Pseudo_reference_triple; // Number of reference triple
141  bool isPseudo; // Is RI data pseudo-absorbance?
142  bool toleranceChanged; // Has the tolerance changed?
143  double scanTolerance; // Remember scan tolerance value
144  int countSubsets; // Number of subsets maximum = 4
145  bool isMwl; // Is Multi-Wavelength?
146  int tripDatax; // Triple data index
147  int tripListx; // Triple list index
148  int nlambda; // Lambda (wavelength) count
149  int slambda; // Start Lambda on output
150  int elambda; // End Lambda on output
151  int nlamb_i; // Lambda count for raw input
152  int dbg_level; // Debug level
153  int cellchan; // cellchan index
154  int lambda; // lambda index
155  QString currentDir; // Current data file directory
156  QString saveDescription; // Saved channel description
157 
158  bool show_plot_progress; // Flag to show plot progress
159  US_ExperimentRa ExpData; // ExperimentRa data object
160 
161  US_mwlRamp ramp; //KL - to get this one working I had to add us_ramp.h/.cpp to .pro!
162 
163 
164  void reset ( void );
165  void enableRunIDControl( bool );
166 // void enableScanControls( void );
167  void enableSaveBtn ( void );
168  void getExpInfo ( void );
169  void setTripleInfo ( void );
170 // void checkTemperature( void );
171 // int findTripleIndex ( void );
172 // void focus ( int, int );
173 // void init_excludes ( void );
174 // void start_reference ( const QwtDoublePoint& );
175 // void process_reference( const QwtDoublePoint& );
176 // void PseudoCalcAvg ( void );
177 // void PseudoCalcAvgMWL( void );
178 // bool read ( void );
179 // bool read ( QString dir );
180 // bool convert ( void );
181 // void initTriples ( void );
182  bool centerpieceInfo ( void );
183  bool centerpieceInfoDB ( void );
184  bool centerpieceInfoDisk( void );
185  void plot_current ( void );
186 // void plot_titles ( void );
187 // void plot_all ( void );
188 // void replot ( void );
189 // void set_colors ( const QList< int >& );
190 // void draw_vline ( double );
191 // void db_error ( const QString& );
192 // void triple_index ( void );
193 
194  private slots:
196  void sel_investigator( void );
197 //
198 // /*! \brief Assign the selected investigator as current
199 // \param invID The ID of the selected investigator
200 // */
201  void assign_investigator( int );
202  void importMWL ( void ); //KL
203 // void selectRotor ( void );
204 // void importMWL ( void );
205 
206 // void import ( QString dir = "" );
207 // void reimport ( void );
208  void enableControls ( void );
209  void runIDChanged ( void );
210 // void toleranceValueChanged( double ); // signal to notify of change
211 // void lambdaStartChanged( int );
212 // void lambdaEndChanged ( int );
213  void lambdaPlotChanged ( int );
214  void lambdaPrevClicked ( void );
215  void lambdaNextClicked ( void );
216  void editRuninfo ( void );
217  void loadUS3 ( QString dir = "" );
218  void loadUS3Disk ( void );
219  void loadUS3Disk ( QString );
220 // void loadUS3DB ( void );
221  void updateExpInfo ( US_ExperimentRa& );
222  void cancelExpInfo ( void );
223  void getSolutionInfo ( void );
225  void cancelSolutionInfo( void );
226  void tripleApplyAll ( void );
227 // void runDetails ( void );
228  void changeDescription ( void );
229  void changeCellchan ( void );
230  void getCenterpieceIndex( int );
231 // void include ( void );
232 // void define_subsets ( void );
233 // void cClick ( const QwtDoublePoint& );
234 // void process_subsets ( void );
235  void define_reference ( void );
236 // void show_intensity ( void );
237 // void cancel_reference ( void );
238  void drop_reference ( void );
239  void saveUS3 ( void );
240  int saveUS3Disk ( void );
241  void saveUS3DB ( void );
242 // void saveReportsToDB ( void );
243  void resetAll ( void );
244 // void source_changed ( bool );
245 // void update_disk_db ( bool );
246  void show_mwl_control ( bool );
247  void mwl_connect ( bool );
248 // void reset_lambdas ( void );
249 // void mwl_setup ( void );
250  void init_output_data ( void );
251 // void build_output_data ( void );
252 // void help ( void )
253 // { showHelp.show_help( "convert.html" ); };
254 };
255 #endif