UltraScan III
us_fit_meniscus.h
Go to the documentation of this file.
1 #ifndef US_FIT_MENISCUS_H
2 #define US_FIT_MENISCUS_H
3 
4 #include <QtGui>
5 
6 #include "qwt_plot_marker.h"
7 
8 #include "us_extern.h"
9 #include "us_widgets.h"
10 #include "us_help.h"
11 #include "us_editor.h"
12 #include "us_plot.h"
13 
14 #define DbgLv(a) if(dbg_level>=a)qDebug()
15 
16 class US_FitMeniscus : public US_Widgets
17 {
18  Q_OBJECT
19 
20  public:
22 
23  // Class to hold model descriptions
24  class ModelDesc
25  {
26  public:
27  QString description; // Full model description
28  QString baseDescr; // Base analysis-set description
29  QString fitfname; // Associated fit file name
30  QString modelID; // Model DB ID
31  QString modelGUID; // Model GUID
32  QString filepath; // Full path model file name
33  QString editID; // Edit parent DB ID
34  QString editGUID; // Edit parent GUID
35  QString antime; // Analysis date & time (yymmddHHMM)
36  QDateTime lmtime; // Record lastmod date & time
37  double variance; // Variance value
38  double meniscus; // Meniscus radius value
39 
40  // Less than operator to enable sort
41  bool operator< ( const ModelDesc& md )
42  const { return ( description < md.description ); }
43  };
44 
45  // Class to hold noise description
46  class NoiseDesc
47  {
48  public:
49  QString description; // Full noise description
50  QString baseDescr; // Base analysis-set description
51  QString noiseID; // Noise DB ID
52  QString noiseGUID; // Noise GUID
53  QString filepath; // Full path noise file name
54  QString modelID; // Model parent DB ID
55  QString modelGUID; // Model parent GUID
56  QString antime; // Analysis date & time (yymmddHHMM)
57 
58  // Less than operator to enable sort
59  bool operator< ( const NoiseDesc& nd )
60  const { return ( description < nd.description ); }
61  };
62 
63  private:
64  QLineEdit* le_fit;
65  QLineEdit* le_rms_error;
66  QLineEdit* le_status;
67 
69 
71 
72  QPushButton* pb_update;
73  QPushButton* pb_scandb;
74  QPushButton* pb_plot;
75  QPushButton* pb_reset;
76 
77  QCheckBox* ck_confirm;
78  QCheckBox* ck_applymwl;
79 
80  QSpinBox* sb_order;
81 
82  QwtPlot* meniscus_plot;
83  QwtPlotCurve* raw_curve;
84  QwtPlotCurve* fit_curve;
85  QwtPlotCurve* minimum_curve;
86 
88 
89  QString filedir;
90  QString fname_load;
91  QString fname_edit;
92 
93  QStringList edtfiles;
94 
95  int nedtfs;
96  int idEdit;
97  int dbg_level;
98  private slots:
99  void reset ( void );
100  void plot_data( void );
101  void plot_data( int );
102  void edit_update( void );
103  void scan_dbase( void );
104  void file_loaded( QString );
105  void update_disk_db( bool );
106  void update_db_edit( QString, QString, QString& );
107  void remove_models( void );
108  void noises_in_edit( QString, QStringList&,
109  QStringList&, QStringList& );
110 
111  void help ( void )
112  { showHelp.show_help( "manual/fit_meniscus.html" ); };
113 };
114 #endif