22 setWindowTitle( tr(
"Project Management" ) );
25 QVBoxLayout*
main =
new QVBoxLayout(
this );
26 main->setSpacing ( 2 );
27 main->setContentsMargins ( 2, 2, 2, 2 );
33 if ( DB.isEmpty() ) DB <<
"Undefined";
35 QLabel* lb_DB =
us_banner( tr(
"Database: " ) + DB.at( 0 ) );
37 main->addWidget( lb_DB );
66 QHBoxLayout* buttons =
new QHBoxLayout;
69 connect( pb_reset, SIGNAL( clicked() ), SLOT(
resetAll() ) );
70 buttons->addWidget( pb_reset );
73 connect( pb_help, SIGNAL( clicked() ), SLOT(
help() ) );
74 buttons->addWidget( pb_help );
81 connect( pb_cancel, SIGNAL( clicked() ), SLOT(
cancel() ) );
82 buttons->addWidget( pb_cancel );
112 connect(
goalsTab, SIGNAL( goalsTabChanged ( ) ),
115 connect(
moleculesTab,SIGNAL( moleculesTabChanged ( ) ),
118 connect(
purityTab, SIGNAL( purityTabChanged (
const QString& ) ),
121 connect(
expenseTab, SIGNAL( expenseTabChanged ( ) ),
133 connect(
expDesignTab,SIGNAL( expDesignTabChanged ( ) ),
136 connect(
notesTab, SIGNAL( notesTabChanged ( ) ),
141 main->addLayout( buttons );
149 QList< QListWidgetItem* > items
153 if ( items.size() == 1 )
254 QMessageBox::information(
this,
256 tr(
"Please enter a description for\n"
257 "your project before accepting." ) );
284 "research project and explain the goals "
285 "of your research. We will use this "
286 "information to optimally design your "
287 "experiment. Please provide enough background "
288 "so we can assess the biological significance "
289 "of this research." ) );
293 "would you feel comfortable with?" ) );
295 "MOPS buffer an option?\n"
296 "To minimize absorbance we prefer to run phosphate or "
297 "MOPS buffers in low concentration (~ 5-10 mM). Salts "
298 "also absorb and should be kept to a minimum, although "
299 "a certain ionic sliength (25-50 mM) is desired to aid "
300 "with the hydrodynamic ideality behavior.\n\n"
301 "Do you need to have drugs in your sample, such as "
302 "reductants and nucleotide analogs?\n"
303 "Please list all components in your buffer. If reductants "
304 "are required it is essential that you use TCEP, which "
305 "can be used at 280 nm, but not lower wavelengths.\n\n"
306 "Please use this space to list all buffer components:" ) );
309 "AUC experiments?" ) );
311 notesTab ->
setNotes ( tr(
"Special instructions, questions, and notes (optional)" ) );
342 QStringList filter(
"P*.xml" );
343 QStringList names = dir.entryList( filter, QDir::Files, QDir::Name );
347 for (
int i = 0; i < names.size(); i++ )
349 a_file.setFileName( path +
"/" + names[ i ] );
351 if ( ! a_file.open( QIODevice::ReadOnly | QIODevice::Text) )
continue;
353 QXmlStreamReader xml( &a_file );
355 while ( ! xml.atEnd() )
359 if ( xml.isStartElement() )
361 if ( xml.name() ==
"project" )
363 QXmlStreamAttributes a = xml.attributes();
365 IDs << a.value(
"id" ).toString();
366 GUIDs << a.value(
"guid" ).toString();
371 else if ( xml.name() ==
"description" )
400 QStringList q(
"get_project_desc" );
413 QString newID = db.
value( 0 ).toString();
416 GUIDs << QString(
"" );
453 int projectID =
info[ ndx ].projectID;
454 QString projectGUID =
info[ ndx ].GUID;
477 QMessageBox::information(
this,
479 tr(
"The project was not found.\n"
480 "Please restore and try again.\n" ) );
494 QMessageBox::information(
this,
496 tr(
"The project was not found.\n"
497 "Please select an existing project and try again.\n" ) );
502 QMessageBox::information(
this,
503 tr(
"Disk Read Problem" ),
504 tr(
"Could not read data from the disk.\n"
505 "Disk status: " ) + QString::number( status ) );
561 QMessageBox::information(
this,
563 tr(
"There was a problem saving the project to the database.\n" ) );
578 QMessageBox::information(
this,
579 tr(
"Save results" ),
580 tr(
"Project saved" ) );
587 QList< QListWidgetItem* > items
591 if ( items.size() == 1 )
623 QMessageBox::information(
this,
624 tr(
"Delete results" ),
625 tr(
"Project Deleted" ) );
635 QMessageBox::warning(
this,
637 tr(
"There is no default database set." ) );
641 qApp->processEvents();
660 QMessageBox::warning(
this, tr(
"Database Problem" ),
661 tr(
"Database returned the following error: \n" ) + error );
672 gray.setColor( QPalette::Base, QColor( 0xe0, 0xe0, 0xe0 ) );
674 QGridLayout* general =
new QGridLayout(
this );
675 general->setSpacing ( 2 );
676 general->setContentsMargins ( 2, 2, 2, 2 );
683 QPushButton* pb_investigator =
us_pushbutton( tr(
"Select Investigator" ) );
684 connect( pb_investigator, SIGNAL( clicked() ), SLOT(
sel_investigator() ) );
685 general->addWidget( pb_investigator, row, 0 );
689 QLabel* lb_investigator =
us_label( tr(
"Investigator:" ) );
690 general->addWidget( lb_investigator, row, 0 );
698 QLabel* lb_banner2 =
us_banner( tr(
"Click on project to select" ), -2 );
700 lb_banner2->setMinimumWidth( 400 );
701 general->addWidget( lb_banner2, row, 0 );
712 connect(
lw_projects, SIGNAL( itemClicked ( QListWidgetItem* ) ),
717 general->addWidget(
lw_projects, row, 0, add_rows, 1 );
721 connect(
pb_query, SIGNAL( clicked() ), SIGNAL(
load() ) );
722 general->addWidget(
pb_query, row, 1 );
725 connect(
pb_save, SIGNAL( clicked() ), SIGNAL(
save() ) );
726 general->addWidget(
pb_save, row++, 2 );
735 general->addWidget(
pb_del, row++, 2 );
738 QLabel* lb_projectDesc =
us_label( tr(
"Project Name:" ) );
739 general->addWidget( lb_projectDesc, row++, 1, 1, 2 );
748 QLabel* lb_guid =
us_label( tr(
"Global Identifier:" ) );
749 general->addWidget( lb_guid, row++, 1, 1, 2 );
755 general->addWidget(
le_guid, row++, 1, 1, 2 );
759 lb_guid->setVisible(
false );
787 SIGNAL( investigator_accepted(
int ) ),
822 QVBoxLayout* goals =
new QVBoxLayout;
825 us_label( tr(
"Please provide a detailed description of your research, \n"
826 "including an introduction and goals:" ) );
828 goals->addWidget( lb_goals );
831 connect(
te_goals, SIGNAL( textChanged () ),
837 goals -> addStretch( 1 );
853 QVBoxLayout* molecules =
new QVBoxLayout;
855 QLabel* lb_molecules =
856 us_label( tr(
"What proteins/DNA molecules are involved in the research?" ) );
858 molecules->addWidget( lb_molecules );
867 molecules -> addStretch( 1 );
868 setLayout( molecules );
883 QVBoxLayout* purity =
new QVBoxLayout;
886 us_label( tr(
"Please indicate the approximate purity of your sample(s)." ) );
888 purity->addWidget( lb_purity );
891 connect(
le_purity, SIGNAL( textChanged (
const QString& ) ),
897 purity -> addStretch( 1 );
913 QVBoxLayout* expense =
new QVBoxLayout;
916 us_label( tr(
"Please rate the expense of providing 5 ml at 1 OD 280 concentration:" ) );
918 expense->addWidget( lb_expense );
921 connect(
te_expense, SIGNAL( textChanged () ),
927 expense -> addStretch( 1 );
928 setLayout( expense );
943 QVBoxLayout* bufferComponents =
new QVBoxLayout;
945 QLabel* lb_bufferComponents =
946 us_label( tr(
"What buffers do you plan to use?" ) );
948 bufferComponents->addWidget( lb_bufferComponents );
957 bufferComponents -> addStretch( 1 );
958 setLayout( bufferComponents );
973 QVBoxLayout* saltInformation =
new QVBoxLayout;
975 QLabel* lb_saltInformation =
976 us_label( tr(
"Is a salt concentration between 20-50 mM for your experiment acceptable?" ) );
977 saltInformation->addWidget( lb_saltInformation );
986 saltInformation -> addStretch( 1 );
987 setLayout( saltInformation );
1002 QVBoxLayout* auc_questions =
new QVBoxLayout;
1004 QLabel* lb_auc_questions =
1005 us_label( tr(
"What questions are you trying to answer with AUC?" ) );
1006 auc_questions->addWidget( lb_auc_questions );
1015 auc_questions -> addStretch( 1 );
1016 setLayout( auc_questions );
1031 QVBoxLayout* exp_design =
new QVBoxLayout;
1033 QLabel* lb_exp_design =
1034 us_label( tr(
"Do you have any notes about the design of the experiment?" ) );
1035 exp_design->addWidget( lb_exp_design );
1044 exp_design -> addStretch( 1 );
1045 setLayout( exp_design );
1060 QVBoxLayout* notes =
new QVBoxLayout;
1062 QLabel* lb_notes =
us_label( tr(
"Notes:" ) );
1063 notes->addWidget( lb_notes );
1066 connect(
te_notes, SIGNAL( textChanged () ),
1072 notes -> addStretch( 1 );