17 int select_db_disk ) :
23 setWindowTitle( tr(
"Experiment Information" ) );
24 setAttribute( Qt::WA_DeleteOnClose );
27 QGridLayout* experiment =
new QGridLayout;
31 QLabel* lb_experiment_banner =
us_banner( tr(
"Experiment: " ) );
32 experiment->addWidget( lb_experiment_banner, row++, 0, 1, 2 );
35 QLabel* lb_runID =
us_label( tr(
"Run ID " ) );
36 experiment->addWidget( lb_runID, row++, 0, 1, 2 );
39 experiment->addWidget(
le_runID, row++, 0, 1, 2 );
42 QLabel* lb_label =
us_label( tr(
"Label:" ) );
43 experiment->addWidget( lb_label, row++, 0, 1, 2 );
45 connect(
le_label, SIGNAL( editingFinished () ),
47 experiment->addWidget(
le_label, row++, 0, 1, 2 );
50 QLabel* lb_project =
us_label( tr(
"Project:" ) );
51 experiment->addWidget( lb_project, row, 0 );
53 connect( pb_project, SIGNAL( clicked() ), SLOT(
selectProject() ) );
54 pb_project->setEnabled(
true );
55 experiment->addWidget( pb_project, row++, 1 );
58 experiment->addWidget(
le_project, row++, 0, 1, 2 );
61 QLabel* lb_expType =
us_label( tr(
"Experiment Type:" ) );
62 experiment->addWidget( lb_expType, row, 0 );
67 QLabel* lb_opticalSystem =
us_label( tr(
"Optical System:" ) );
68 experiment->addWidget( lb_opticalSystem, row, 0 );
69 QLineEdit* le_opticalSystem =
us_lineedit(
"", 0,
true );
70 experiment->addWidget( le_opticalSystem, row++, 1 );
75 le_opticalSystem->setText(
"Absorbance" );
79 le_opticalSystem->setText(
"Intensity" );
82 le_opticalSystem->setText(
"Interference" );
85 le_opticalSystem->setText(
"Fluorescence" );
88 le_opticalSystem->setText(
"Unsupported" );
91 QGridLayout* hardware =
new QGridLayout;
95 QLabel* lb_hardware_banner =
us_banner( tr(
"Hardware: " ) );
96 hardware->addWidget( lb_hardware_banner, row++, 0, 1, 2 );
99 connect( pb_rotor, SIGNAL( clicked() ), SLOT(
selectRotor() ) );
100 pb_rotor->setEnabled(
true );
101 hardware->addWidget( pb_rotor, row++, 0, 1, 2 );
107 QLabel* lb_rotorSpeeds =
us_label( tr(
"Unique Rotor Speeds:" ) );
108 hardware->addWidget( lb_rotorSpeeds, row++, 0, 1, 2 );
116 QLabel* lb_instrument =
us_label( tr(
"Instrument:" ) );
117 hardware->addWidget( lb_instrument, row, 0 );
124 QLabel* lb_operator =
us_label( tr(
"Operator:" ) );
125 hardware->addWidget( lb_operator, row, 0 );
130 QLabel* lb_runTemp =
us_label( tr(
"Average Run Temperature:" ) );
131 hardware->addWidget( lb_runTemp, row, 0 );
139 QHBoxLayout* buttons =
new QHBoxLayout;
142 connect( pb_help, SIGNAL( clicked() ), SLOT(
help() ) );
143 buttons->addWidget( pb_help );
146 connect( pb_cancel, SIGNAL( clicked() ), SLOT(
cancel() ) );
147 buttons->addWidget( pb_cancel );
154 QGridLayout*
main =
new QGridLayout(
this );
155 main->setSpacing ( 2 );
156 main->setContentsMargins ( 2, 2, 2, 2 );
162 if ( DB.isEmpty() ) DB <<
"Undefined";
163 QLabel* lb_DB =
us_banner( tr(
"Database: " ) + DB.at( 0 ) );
164 main->addWidget( lb_DB, row++, 0, 1, 2 );
169 QPushButton* pb_investigator =
us_pushbutton( tr(
"Select Investigator" ) );
171 main->addWidget( pb_investigator, row, 0 );
175 QLabel* lb_investigator =
us_label( tr(
"Investigator:" ) );
176 main->addWidget( lb_investigator, row, 0 );
188 main->addLayout( experiment, row, 0 );
189 main->addLayout( hardware, row, 1 );
193 QLabel* lb_comment =
us_label( tr(
"Comments:" ) );
194 main->addWidget( lb_comment, row++, 0, 1, 2 );
202 main->addLayout( buttons, row++, 0, 1, 2 );
337 instrument.
name =
"XLA #1";
338 instrument.
serial =
"9999";
341 loperator.
lname =
"operator";
342 loperator.
fname =
"some";
344 labList[ 0 ].instruments << instrument;
346 QMessageBox::warning(
this,
347 tr(
"No Instruments" ),
348 tr(
"There is no instrument record in the database.\n"
349 "At least one instrument record should be added\n"
350 " through the LIMS interface.\n\n"
351 "The current Convert Legacy Data program\n"
352 " WILL NOW BE CLOSED!!!!" ) );
369 qDebug() <<
"ExpG:reload: IN labList size" <<
labList.size();
375 for (
int i = 0; i <
labList.size(); i++ )
392 qDebug() <<
"ExpG:reload: call setInstr";
394 qDebug() <<
"ExpG:reload: call setOper";
397 qDebug() <<
"ExpG:reload: call instr load()";
399 qDebug() <<
"ExpG:reload: call oper load()";
401 qDebug() <<
"ExpG:reload: retn fr open load()";
403 qDebug() <<
"ExpG:reload: RTN";
417 SIGNAL( investigator_accepted(
int ) ),
427 QString number = ( invID > 0 ) ? QString::number( invID ) +
": " :
"";
444 QStringList q(
"get_person_info" );
458 if ( db && ( DB.size() < 5 ) )
460 QMessageBox::warning(
this,
462 tr(
"There is no default database set." ) );
466 qApp->processEvents();
495 SIGNAL( updateProjectGuiSelection(
US_Project& ) ),
499 SIGNAL( cancelProjectGuiSelection( ) ),
502 connect( projInfo, SIGNAL(
use_db (
bool ) ),
554 qDebug() <<
"ExpG: setInstrL: IN labList size" <<
labList.size()
556 QList< listInfo > options;
558 qDebug() <<
"ExpG: setInstrL: instruments size" << instruments.size();
563 option.
ID = QString::number( instrument.
ID );
569 if ( options.size() > 0 )
575 for (
int i = 0; i < options.size(); i++ )
594 QList< listInfo > options;
596 QList< US_Rotor::Operator > operators = instruments[
currentInstrument ].operators;
601 option.
ID = QString::number( oper.
ID );
607 if ( options.size() > 0 )
609 int currentOperator = 0;
614 disk_only.
ID = QString(
"0" );
615 disk_only.
text =
"Local";
627 for (
int i = 0; i < options.size(); i++ )
679 rotor, calibration );
684 connect( rotorInfo, SIGNAL( RotorCalibrationCanceled( ) ),
687 connect( rotorInfo, SIGNAL(
use_db (
bool ) ),
706 calibration.
lastUpdated.toString(
"yyyy-MM-dd" ) );
750 QStringList q(
"get_instrument_info" );
757 q <<
"get_person_info"
779 QMessageBox::warning(
this, tr(
"Connection Problem" ),
780 tr(
"Could not connect to database \n" ) + error );