UltraScan III
us_analyte_gui.h
Go to the documentation of this file.
1 #ifndef US_ANALYTE_GUI_H
3 #define US_ANALYTE_GUI_H
4 
5 #include <QtGui>
6 
7 #include "us_widgets_dialog.h"
8 #include "us_widgets.h"
9 #include "us_extern.h"
10 #include "us_help.h"
11 #include "us_editor.h"
12 #include "us_math2.h"
13 #include "us_db2.h"
14 #include "us_constants.h"
15 #include "us_analyte.h"
16 #include <qwt_counter.h>
17 
20 {
21  Q_OBJECT
22  public:
25  US_SequenceEditor( const QString& );
26 
27  signals:
31  void sequenceChanged( QString new_sequence );
32 
33  private:
35 
36  private slots:
37  void accept( void );
38 };
39 
42 {
43  Q_OBJECT
44 
45  public:
51  US_AnalyteGui( bool = false,
52  const QString& = QString(),
54  double = NORMAL_TEMP );
55 
56  signals:
60  void valueChanged( US_Analyte data );
61 
64  void use_db( bool DB );
65 
66  private:
67  int personID;
69  QString guid;
70  double temperature;
71 
72  bool inReset;
73 
79 
82 
84  {
85  public:
86  QString description;
87  QString guid;
88  QString filename;
89  QString analyteID;
90  int index;
91  };
92 
93  // Populated in list(), new() used in select()
94  QList< AnalyteInfo > info;
95 
96  QStringList files;
97 
98  QStringList filenames; // From list_from_disk()
99  QStringList analyteIDs; // From list_from_DB()
100  QStringList descriptions; // From list(), new()
101  QStringList GUIDs; // From list(), new()
102 
103  QComboBox* cmb_optics;
104 
106 
107  QListWidget* lw_analytes;
108 
109  QLineEdit* le_investigator;
110  QLineEdit* le_search;
111  QLineEdit* le_description;
112  QLineEdit* le_protein_mw;
113  QLineEdit* le_protein_vbar20;
114  QLineEdit* le_protein_vbar;
115  QLineEdit* le_protein_temp;
117  QLineEdit* le_protein_e280;
118  QLineEdit* le_guid;
119 
120  QLineEdit* le_nucle_mw;
121  QLineEdit* le_nucle_vbar;
122  QLineEdit* le_carbs_mw;
123  QLineEdit* le_carbs_vbar;
124 
125  QWidget* protein_widget;
126  QWidget* dna_widget;
127  QWidget* carbs_widget;
128 
130 
131  QRadioButton* rb_protein;
132  QRadioButton* rb_dna;
133  QRadioButton* rb_rna;
134  QRadioButton* rb_carb;
135 
136  QCheckBox* ck_stranded;
137  QCheckBox* ck_mw_only;
138  QCheckBox* ck_grad_form;
139  QRadioButton* rb_3_hydroxyl;
140  QRadioButton* rb_3_phosphate;
141  QRadioButton* rb_5_hydroxyl;
142  QRadioButton* rb_5_phosphate;
143 
144  QPushButton* pb_save;
145  QPushButton* pb_delete;
146  QPushButton* pb_sequence;
147  QPushButton* pb_spectrum;
148  QPushButton* pb_more;
149 
150  QwtCounter* ct_sodium;
151  QwtCounter* ct_potassium;
152  QwtCounter* ct_lithium;
153  QwtCounter* ct_magnesium;
154  QwtCounter* ct_calcium;
155 
156  void parse_dna ( void );
157  void connect_error ( const QString& );
158  bool database_ok ( US_DB2& );
159  bool data_ok ( void );
160  int status_query ( const QStringList& );
161  void load_analyte ( void );
162  void populate ( void );
163  void list_from_disk ( void );
164  void list_from_db ( void );
165  void delete_from_disk( void );
166  void delete_from_db ( void );
167  void select_from_disk( void );
168  void select_from_db ( void );
169  bool discard_changes ( void );
170  bool analyte_in_use ( QString& );
171 
172  private slots:
173  void set_analyte_type ( int );
174  void sel_investigator ( void );
175  void search ( const QString& = QString() );
176  void select_analyte ( QListWidgetItem* );
177  void check_db ( void );
178 
179  void new_analyte ( void );
180  void list ( void );
181  void save ( void );
182  void delete_analyte ( void );
183 
184  void change_description ( void );
185  void value_changed ( const QString& );
186  void manage_sequence ( void );
187  void spectrum ( void );
188  void more_info ( void );
189  void temp_changed ( const QString& );
190  void verify_vbar ( void );
191 
192  void update_stranded ( bool );
193  void update_mw_only ( bool );
194  void update_nucleotide ( bool );
195  void update_nucleotide ( double );
196  void update_nucleotide ( void );
197  void source_changed ( bool );
198 
199  void reset ( void );
200  void close ( void );
201 
202  void help ( void )
203  { showHelp.show_help( "analytes.html" ); };
204 
205  void update_sequence ( QString );
206  void assign_investigator( int );
207 };
208 #endif