18 int select_db_disk ) :
24 setWindowTitle( tr(
"Experiment Information" ) );
25 setAttribute( Qt::WA_DeleteOnClose );
28 QGridLayout* experiment =
new QGridLayout;
32 QLabel* lb_experiment_banner =
us_banner( tr(
"Experiment: " ) );
33 experiment->addWidget( lb_experiment_banner, row++, 0, 1, 2 );
36 QLabel* lb_runID =
us_label( tr(
"Run ID " ) );
37 experiment->addWidget( lb_runID, row++, 0, 1, 2 );
40 experiment->addWidget(
le_runID, row++, 0, 1, 2 );
43 QLabel* lb_label =
us_label( tr(
"Label:" ) );
44 experiment->addWidget( lb_label, row++, 0, 1, 2 );
46 connect(
le_label, SIGNAL( editingFinished () ),
48 experiment->addWidget(
le_label, row++, 0, 1, 2 );
51 QLabel* lb_project =
us_label( tr(
"Project:" ) );
52 experiment->addWidget( lb_project, row, 0 );
54 connect( pb_project, SIGNAL( clicked() ), SLOT(
selectProject() ) );
55 pb_project->setEnabled(
true );
56 experiment->addWidget( pb_project, row++, 1 );
59 experiment->addWidget(
le_project, row++, 0, 1, 2 );
62 QLabel* lb_expType =
us_label( tr(
"Experiment Type:" ) );
63 experiment->addWidget( lb_expType, row, 0 );
68 QLabel* lb_opticalSystem =
us_label( tr(
"Optical System:" ) );
69 experiment->addWidget( lb_opticalSystem, row, 0 );
70 QLineEdit* le_opticalSystem =
us_lineedit(
"", 0,
true );
71 experiment->addWidget( le_opticalSystem, row++, 1 );
76 le_opticalSystem->setText(
"Absorbance" );
80 le_opticalSystem->setText(
"Intensity" );
83 le_opticalSystem->setText(
"Interference" );
86 le_opticalSystem->setText(
"Fluorescence" );
89 le_opticalSystem->setText(
"Unsupported" );
92 QGridLayout* hardware =
new QGridLayout;
96 QLabel* lb_hardware_banner =
us_banner( tr(
"Hardware: " ) );
97 hardware->addWidget( lb_hardware_banner, row++, 0, 1, 2 );
100 connect( pb_rotor, SIGNAL( clicked() ), SLOT(
selectRotor() ) );
101 pb_rotor->setEnabled(
true );
102 hardware->addWidget( pb_rotor, row++, 0, 1, 2 );
108 QLabel* lb_rotorSpeeds =
us_label( tr(
"Unique Rotor Speeds:" ) );
109 hardware->addWidget( lb_rotorSpeeds, row++, 0, 1, 2 );
121 QLabel* lb_instrument =
us_label( tr(
"Instrument:" ) );
122 hardware->addWidget( lb_instrument, row, 0 );
129 QLabel* lb_operator =
us_label( tr(
"Operator:" ) );
130 hardware->addWidget( lb_operator, row, 0 );
135 QLabel* lb_runTemp =
us_label( tr(
"Average Run Temperature:" ) );
136 hardware->addWidget( lb_runTemp, row, 0 );
144 QHBoxLayout* buttons =
new QHBoxLayout;
147 connect( pb_help, SIGNAL( clicked() ), SLOT(
help() ) );
148 buttons->addWidget( pb_help );
151 connect( pb_cancel, SIGNAL( clicked() ), SLOT(
cancel() ) );
152 buttons->addWidget( pb_cancel );
159 QGridLayout*
main =
new QGridLayout(
this );
160 main->setSpacing ( 2 );
161 main->setContentsMargins ( 2, 2, 2, 2 );
167 if ( DB.isEmpty() ) DB <<
"Undefined";
168 QLabel* lb_DB =
us_banner( tr(
"Database: " ) + DB.at( 0 ) );
169 main->addWidget( lb_DB, row++, 0, 1, 2 );
174 QPushButton* pb_investigator =
us_pushbutton( tr(
"Select Investigator" ) );
176 main->addWidget( pb_investigator, row, 0 );
180 QLabel* lb_investigator =
us_label( tr(
"Investigator:" ) );
181 main->addWidget( lb_investigator, row, 0 );
193 main->addLayout( experiment, row, 0 );
194 main->addLayout( hardware, row, 1 );
198 QLabel* lb_comment =
us_label( tr(
"Comments:" ) );
199 main->addWidget( lb_comment, row++, 0, 1, 2 );
207 main->addLayout( buttons, row++, 0, 1, 2 );
342 instrument.
name =
"XLA #1";
343 instrument.
serial =
"9999";
346 loperator.
lname =
"operator";
347 loperator.
fname =
"some";
349 labList[ 0 ].instruments << instrument;
351 QMessageBox::warning(
this,
352 tr(
"No Instruments" ),
353 tr(
"There is no instrument record in the database.\n"
354 "At least one instrument record should be added\n"
355 " through the LIMS interface.\n\n"
356 "The current Convert Legacy Data program\n"
357 " WILL NOW BE CLOSED!!!!" ) );
374 qDebug() <<
"ExpG:reload: IN labList size" <<
labList.size();
380 for (
int i = 0; i <
labList.size(); i++ )
397 qDebug() <<
"ExpG:reload: call setInstr";
399 qDebug() <<
"ExpG:reload: call setOper";
402 qDebug() <<
"ExpG:reload: call instr load()";
404 qDebug() <<
"ExpG:reload: call oper load()";
406 qDebug() <<
"ExpG:reload: retn fr open load()";
408 qDebug() <<
"ExpG:reload: RTN";
422 SIGNAL( investigator_accepted(
int ) ),
432 QString number = ( invID > 0 ) ? QString::number( invID ) +
": " :
"";
449 QStringList q(
"get_person_info" );
463 if ( db && ( DB.size() < 5 ) )
465 QMessageBox::warning(
this,
467 tr(
"There is no default database set." ) );
471 qApp->processEvents();
500 SIGNAL( updateProjectGuiSelection(
US_Project& ) ),
504 SIGNAL( cancelProjectGuiSelection( ) ),
507 connect( projInfo, SIGNAL(
use_db (
bool ) ),
559 qDebug() <<
"ExpG: setInstrL: IN labList size" <<
labList.size()
561 QList< listInfo > options;
563 qDebug() <<
"ExpG: setInstrL: instruments size" << instruments.size();
568 option.
ID = QString::number( instrument.
ID );
574 if ( options.size() > 0 )
580 for (
int i = 0; i < options.size(); i++ )
599 QList< listInfo > options;
601 QList< US_Rotor::Operator > operators = instruments[
currentInstrument ].operators;
606 option.
ID = QString::number( oper.
ID );
612 if ( options.size() > 0 )
614 int currentOperator = 0;
619 disk_only.
ID = QString(
"0" );
620 disk_only.
text =
"Local";
632 for (
int i = 0; i < options.size(); i++ )
684 rotor, calibration );
689 connect( rotorInfo, SIGNAL( RotorCalibrationCanceled( ) ),
692 connect( rotorInfo, SIGNAL(
use_db (
bool ) ),
711 calibration.
lastUpdated.toString(
"yyyy-MM-dd" ) );
755 QStringList q(
"get_instrument_info" );
762 q <<
"get_person_info"
784 QMessageBox::warning(
this, tr(
"Connection Problem" ),
785 tr(
"Could not connect to database \n" ) + error );