UltraScan III
us_eqfit_control.h
Go to the documentation of this file.
1 #ifndef US_EQFITCTRL_H
2 #define US_EQFITCTRL_H
3 
4 #include "us_extern.h"
5 #include "us_globeq_data.h"
6 #include "us_eqmath.h"
7 #include "us_eqreporter.h"
8 #include "us_fit_worker.h"
9 #include "us_widgets_dialog.h"
10 #include "us_dataIO.h"
11 #include "us_plot.h"
12 #include "us_help.h"
13 
15 {
16  Q_OBJECT
17 
18  public:
19  US_EqFitControl( QVector< EqScanFit >&, EqRunFit&,
21  int, QStringList, bool&, int& );
22 
23  void new_scan( int );
24  void new_components( void );
25  void set_float( bool );
26 
27  signals:
28  void update_scan( int );
29 
30  private:
31  QVector< EqScanFit >& scanfits; // Scan Fit vector
32  EqRunFit& runfit; // Run Fit parameters structure
33  US_DataIO::EditedData* edata; // Edited Data pointer
34  US_EqMath* emath; // Equil-Math object pointer
35  US_EqReporter* ereporter; // Equil-Reporter object pointer
36  int modelx; // Selected model index
37  QStringList models; // List of model titles
38  bool& fWidget; // Fitting Widget created flag
39  int& selscan; // Current selected scan
40 
41  QLineEdit* le_iternbr;
42  QLineEdit* le_varianc;
43  QLineEdit* le_stddev;
44  QLineEdit* le_improve;
45  QLineEdit* le_funceva;
46  QLineEdit* le_decompo;
47  QLineEdit* le_clambda;
48  QLineEdit* le_nbrpars;
49  QLineEdit* le_nbrsets;
50  QLineEdit* le_nbrdpts;
51  QLineEdit* le_lamstrt;
52  QLineEdit* le_lamsize;
53  QLineEdit* le_mxiters;
54  QLineEdit* le_fittolr;
55  QLineEdit* le_status;
56  QLineEdit* le_inform;
57 
58  QRadioButton* rb_pltalld;
59  QRadioButton* rb_pltgrp5;
60  QRadioButton* rb_pltsscn;
61  QRadioButton* rb_lincnsn;
62  QRadioButton* rb_lincnsy;
63  QRadioButton* rb_autocnn;
64  QRadioButton* rb_autocny;
65 
66  QCheckBox* ck_monfitg;
67 
68  QComboBox* cb_nlsalgo;
69 
70  QPushButton* pb_strtfit;
71  QPushButton* pb_pause;
72  QPushButton* pb_resume;
73  QPushButton* pb_savefit;
74  QPushButton* pb_viewrep;
75  QPushButton* pb_resids;
76  QPushButton* pb_ovrlays;
77  QPushButton* pb_help;
78  QPushButton* pb_close;
79  QPushButton* pb_lnvsr2;
80  QPushButton* pb_mwvsr2;
81  QPushButton* pb_mwvscv;
82  QPushButton* pb_cmments;
83 
84  QProgressBar* progress;
85 
86  QwtCounter* ct_plotscn;
87 
89  QwtPlot* data_plot;
92 
94 
95  //bool send_signal;
96 
97  int ntpts; // Total data points
98  int ndsets; // Total data sets (scans)
99  int nfpars; // Total fit parameters
100  int nlsmeth; // NLS method flag
101  int mxiters; // Maximum fit iterations
102  int mxspts; // Maximum points in any scan
103  int ipscnn; // Start plot scan number
104  int lpscnn; // Last plot scan number
105  int npscns; // Number of plot scans
106  int plotgrpf; // Plot group flag: -1, 0, 5
107  int plottype; // Plot type 0-4: resids, ...
108 
109  QVector< int > v_dscnx; // Vector of scans' data indecies
110  int* dscnx; // Array of scans' data indecies
111 
112  double fittoler;
113 
114  private slots:
115  void start_fit ( void );
116  void pause_fit ( void );
117  void resume_fit ( void );
118  void save_fit ( void );
119  void view_report ( void );
120  void plot_residuals( void );
121  void plot_overlays ( void );
122  void plot_two ( void );
123  void plot_three ( void );
124  void plot_four ( void );
125  void closed ( void );
126  void new_progress ( int );
127  void fit_completed ( void );
128  void prepare_data ( void );
129  void new_pscan ( void );
130 
131  void help ( void )
132  { showHelp.show_help( "global_equil-fitctrl.html" ); };
133 };
134 #endif
135