UltraScan III
Namespaces
Classes
Files
File List
File Members
programs
us_manage_data
us_data_model.h
Go to the documentation of this file.
1
#ifndef US_DATA_MODEL_H
2
#define US_DATA_MODEL_H
3
4
#include <QtGui>
5
6
#include "
us_extern.h
"
7
#include "
us_widgets.h
"
8
#include "
us_db2.h
"
9
#include "
us_model.h
"
10
#include "
us_noise.h
"
11
#include "
us_buffer.h
"
12
#include "
us_analyte.h
"
13
#include "
us_help.h
"
14
#include "
us_dataIO.h
"
15
16
#ifndef DbgLv
17
#define DbgLv(a) if(dbg_level>=a)qDebug()
18
#endif
19
20
class
US_DataModel
:
public
QObject
21
{
22
Q_OBJECT
23
24
public
:
25
US_DataModel
( QWidget* = 0 );
26
27
enum
State
{
NOSTAT
=0,
REC_DB
=1,
REC_LO
=2,
PAR_DB
=4,
PAR_LO
=8,
28
HV_DET
=16,
IS_CON
=32,
ALL_OK
=64 };
29
30
class
DataDesc
31
{
32
public
:
33
int
recordID
;
// record DB Identifier
34
int
recType
;
// record type (1-4)=Raw/Edit/Model/Noise
35
int
parentID
;
// parent's DB Identifier
36
int
recState
;
// record state flag
37
QString
subType
;
// sub-type (e.g., TI,RI for noises)
38
QString
dataGUID
;
// this record data Global Identifier
39
QString
parentGUID
;
// parent's GUID
40
QString
filename
;
// file name if on local disk
41
QString
contents
;
// md5sum() and length of data
42
QString
label
;
// record identifying label
43
QString
description
;
// record description string
44
QString
filemodDate
;
// last modification date/time (file)
45
QString
lastmodDate
;
// last modification date/time (DB/file)
46
};
47
48
void
setDatabase
(
US_DB2
* );
49
void
setProgress
( QProgressBar*, QLabel* );
50
void
setSiblings
( QObject*, QObject* );
51
void
getRunIDs
( QStringList& );
52
void
getTriples
( QStringList&, QString );
53
void
setFilters
( QString, QString, QString );
54
US_DB2
*
dbase
(
void
);
55
QString
invtext
(
void
);
56
QProgressBar*
progrBar
(
void
);
57
QLabel*
statlab
(
void
);
58
QObject*
procobj
(
void
);
59
QObject*
treeobj
(
void
);
60
void
browse_data
(
void
);
61
void
scan_data
(
void
);
62
void
dummy_data
(
void
);
63
void
set_investigator
( QString );
64
QString
investigator_text
(
void
);
65
DataDesc
row_datadesc
(
int
);
66
DataDesc
current_datadesc
(
void
);
67
void
change_datadesc
(
DataDesc
,
int
);
68
void
setCurrent
(
int
);
69
int
recCount
(
void
);
70
int
recCountDB
(
void
);
71
int
recCountLoc
(
void
);
72
73
private
:
74
US_DB2
*
db
;
// pointer to opened DB connection
75
QProgressBar*
progress
;
// progress bar on main window
76
QLabel*
lb_status
;
// status label on main window
77
QWidget*
parentw
;
// parent widget (main window)
78
79
QTreeWidget*
tw_recs
;
// tree widget
80
QTreeWidgetItem*
tw_item
;
// current tree widget item
81
82
DataDesc
cdesc
;
// current record description
83
QVector< DataDesc >
ddescs
;
// DB descriptions
84
QVector< DataDesc >
ldescs
;
// local-disk descriptions
85
QVector< DataDesc >
adescs
;
// all (merged) descriptions
86
QVector< int >
chgrows
;
// changed rows;
87
88
QObject*
ob_process
;
// data processor
89
QObject*
ob_tree
;
// data tree handler
90
QObject*
ob_exper
;
// experiment synchronizer
91
92
US_Buffer
buffer
;
93
US_Analyte
analyte
;
94
95
96
int
personID
;
97
int
dbg_level
;
98
int
maxdlen
;
99
100
QString
invID
;
101
QString
run_name
;
102
QString
cell
;
103
QString
filt_run
;
104
QString
filt_triple
;
105
QString
filt_source
;
106
107
QPoint
cur_pos
;
108
109
private
slots:
110
111
void
scan_dbase
(
void
);
112
void
scan_local
(
void
);
113
void
merge_dblocal
(
void
);
114
void
exclude_trees
(
void
);
115
void
review_dbase
(
void
);
116
117
void
sort_descs
( QVector< DataDesc >& descs );
118
bool
review_descs
( QStringList&, QVector< DataDesc >& );
119
120
int
index_substring
( QString,
int
, QStringList& );
121
QStringList
filter_substring
( QString,
int
, QStringList& );
122
QStringList
list_orphans
( QStringList&, QStringList& );
123
124
int
record_state_flag
(
DataDesc
,
int
);
125
QString
sort_string
(
DataDesc
,
int
);
126
QString
model_type
(
int
,
int
,
int
,
bool
);
127
QString
model_type
(
US_Model
);
128
QString
model_type
( QString );
129
QString
expGUIDauc
( QString );
130
131
};
132
#endif
Generated on Sun Jun 21 2015 11:40:41 for UltraScan III by
1.8.3.1-20130324