UltraScan III
us_solution.h
Go to the documentation of this file.
1 #ifndef US_SOLUTION_H
3 #define US_SOLUTION_H
4 
5 #include "us_extern.h"
6 #include "us_db2.h"
7 #include "us_buffer.h"
8 #include "us_analyte.h"
9 
17 {
18  public:
19 
22  {
23  public:
25  double amount;
26 
28  AnalyteInfo();
29 
31  bool operator==( const AnalyteInfo& ) const;
32 
33  };
34 
37  {
42  BOTH
43  };
44 
45  int solutionID;
46  QString solutionGUID;
47  QString solutionDesc;
49  QList< AnalyteInfo > analyteInfo;
50  double commonVbar20;
51  double storageTemp;
52  QString notes;
54 
56  US_Solution();
57 
60 
66  int readFromDisk( QString& );
67 
74  int readFromDB ( int, US_DB2* = 0 );
75 
77  void clear ( void );
78 
80  void saveToDisk ( void );
81 
88  int saveToDB ( int = 1, int = 1, US_DB2* = 0 );
89 
91  int deleteFromDisk ( void );
92 
97  int deleteFromDB ( US_DB2* = 0 );
98 
105  bool diskFilename ( const QString& , QString& );
106 
112  bool diskPath ( QString& );
113 
115  US_Solution& operator=( const US_Solution& );
116 
118  void show ( void );
119 
120 
121  private:
122 
123  void readSolutionInfo ( QXmlStreamReader& xml );
124  int readBufferDiskGUID ( US_Buffer& , QString& );
125  void saveBufferDisk ( void );
126  void saveAnalytesDisk ( void );
127  QString get_filename ( const QString&, bool& );
128  int analyte_type ( QString );
129  QString analyte_typetext( int );
130  bool solutionInUse ( QString& );
131 };
132 #endif