UltraScan III
us_vhw_combine.h
Go to the documentation of this file.
1 #ifndef US_VHW_COMBO_H
2 #define US_VHW_COMBO_H
3 
4 #include "us_editor.h"
5 #include "us_math2.h"
6 #include "us_run_details2.h"
7 #include "us_buffer_gui.h"
8 #include "us_plot3d_xyz.h"
9 #include "us_vhwc_pltctl.h"
10 #include "qwt_plot_marker.h"
11 
12 #define PA_POINTS 20 // plateau average points to left and right
13 
14 #ifndef DbgLv
15 #define DbgLv(a) if(dbg_level>=a)qDebug()
16 #endif
17 
18 class US_vHW_Combine : public US_Widgets
19 {
20  Q_OBJECT
21 
22  public:
24 
25  private:
26 
27  // Distribution description object
28  class DistrDesc
29  {
30  public:
31  QString runID; // Run ID
32  QString triple; // Triple
33  QString tdescr; // Triple description string
34  QVector< double > dsedcs; // Distribution sedimentation coeffs.
35  QVector< double > bfracs; // Boundary fractions
36  QVector< double > esedcs; // Envelope sedimentation coeffs.
37  QVector< double > efreqs; // Envelope frequencies
38  QwtSymbol symbol; // Curve symbol
39  QColor color; // Curve color
40  double totconc; // Total concentration
41  };
42 
43  QList< DistrDesc > distros; // All distributions
44  QList< DistrDesc > pdistrs; // Plotted distributions
45 
46  QList< int > symbols; // Possible symbol shapes
47  QList< QColor > colors; // Possible colors
48 
49  US_Disk_DB_Controls* dkdb_cntrls; // Disk-or-DB controls
50 
51  QVector< QVector3D > xyzdat; // XYZ data
52 
53  QPointer< US_VhwCPlotControl > p3d_ctld; // Pointer to 3D control
54  QPointer< US_Plot3Dxyz > p3d_pltw; // Pointer to 3D window
55 
56  QStringList distIDs; // All distribs. IDs
57  QStringList pdisIDs; // Plotted distribs. IDs
58 
59  QPushButton* pb_saveda;
60  QPushButton* pb_resetd;
61  QPushButton* pb_resetp;
62  QPushButton* pb_plot3d;
63 
64  QLineEdit* le_runid;
65 
66  QComboBox* cmb_svproj;
67 
68  QListWidget* lw_runids;
69  QListWidget* lw_triples;
70 
71  QCheckBox* ck_distrib;
72  QCheckBox* ck_envelope;
73  QCheckBox* ck_intconc;
74 
76 
77  QwtPlot* data_plot1;
79 
80  QString runID;
81  QString triple;
82  QString dat1File;
83  QString env1File;
84  QString lis1File;
85 
86  int dbg_level;
87 
88  private slots:
89 
90  void load ( void );
91  void save ( void );
92  void reset_data ( void );
93  void reset_plot ( void );
94  void plot_data ( void );
95  void plot_3d ( void );
96  void plot_distr ( DistrDesc, QString );
97  void runid_select ( int );
98  void triple_select ( int );
99  void setSymbol ( DistrDesc&, int );
100  int envel_data ( DistrDesc& );
101  void possibleSymbols( void );
102  void control_closed ( void );
103  void update_disk_db ( bool );
104  void fill_in_desc ( QTextStream&, QTextStream&, DistrDesc&,
105  bool, int );
106  void write_data ( QString&, QString&, int& );
107  void write_denv ( QString&, int& );
108  QString expandedTriple ( QString );
109  QString collapsedTriple( QString );
110  int reportDocsFromFiles( QString&, QString&, QStringList&,
111  US_DB2*, int&, QString& );
112 
113  void help( void )
114  { showHelp.show_help( "vhw_combine.html" ); };
115 
116 };
117 #endif