[us-commits] r2797 - in trunk: gui programs/us_com_project programs/us_convert
svn at svn.aucsolutions.com
svn at svn.aucsolutions.com
Tue Jul 23 01:35:45 MDT 2019
Author: alexey
Date: 2019-07-23 07:35:43 +0000 (Tue, 23 Jul 2019)
New Revision: 2797
Modified:
trunk/gui/us_select_item.cpp
trunk/programs/us_com_project/us_com_project_gui.cpp
trunk/programs/us_com_project/us_com_project_gui.h
trunk/programs/us_convert/us_convert_gui.cpp
trunk/programs/us_convert/us_convert_gui.h
Log:
Autoflow:
* some important updates in light of the generally accessible Manage Optima Runs panel
* All but the tab for ongoing stage are blocked (for sake of consistency and more control)
Modified: trunk/gui/us_select_item.cpp
===================================================================
--- trunk/gui/us_select_item.cpp 2019-07-22 02:15:00 UTC (rev 2796)
+++ trunk/gui/us_select_item.cpp 2019-07-23 07:35:43 UTC (rev 2797)
@@ -124,8 +124,8 @@
le_info->setPalette(p);
le_info->setText(tr( "<ul><li>Information on one or more experimental methods submitted to Bechman Optima(s) is available. "
- "You can reattach to the job by selecting the run from the list below. "
- "Alternatively, you can define and submit a new experiment method to the availabale Optima instrument(s). </ul></li>" ));
+ "<br>You can reattach to the job by selecting the run from the list below. "
+ "<br>Alternatively, you can define and submit a new experiment method to the availabale Optima instrument(s). </ul></li>" ));
main->addWidget( le_info );
}
@@ -458,7 +458,14 @@
QMessageBox::warning( this,
tr( "Autoflow Record Not Deleted" ),
tr( "This record could not be deleted since\n"
- "it is not present in the LIMS DB." ) );
+ "it is not present in the LIMS DB. \n"
+ "It will be removed from the list of records." ) );
+
+ items.removeAt( AutoflowRow ); // Remove deleted item row
+ list_data(); // Rebuild protocol list in the dialog
+
+ emit accept_autoflow_deletion(); // Signal to pass to us_comproject to update (re-read reduced) autoflow records
+
return;
}
@@ -467,7 +474,7 @@
QString msg("Autoflow record has been successfully deleted.");
QMessageBox::information( this,
- tr( "Autoflow Record Deleted" ),
+ tr( "Autoflow Record Deleted" ),
msg );
Modified: trunk/programs/us_com_project/us_com_project_gui.cpp
===================================================================
--- trunk/programs/us_com_project/us_com_project_gui.cpp 2019-07-22 02:15:00 UTC (rev 2796)
+++ trunk/programs/us_com_project/us_com_project_gui.cpp 2019-07-23 07:35:43 UTC (rev 2797)
@@ -128,6 +128,15 @@
main->addWidget( tabWidget );
+ for (int i=0; i < tabWidget->count(); ++i )
+ {
+ //ALEXEY: OR enable all tabs ? (e.g. for demonstration, in a read-only mode or the like ?)
+ if ( i == 0 )
+ tabWidget->tabBar()->setTabEnabled(i, true);
+ else
+ tabWidget->tabBar()->setTabEnabled(i, false);
+ }
+
connect( tabWidget, SIGNAL( currentChanged( int ) ), this, SLOT( initPanels( int ) ) );
@@ -162,14 +171,13 @@
connect( epanObserv, SIGNAL( switch_to_post_processing( QMap < QString, QString > & ) ), this, SLOT( switch_to_post_processing( QMap < QString, QString > & ) ) );
connect( this, SIGNAL( import_data_us_convert( QMap < QString, QString > & ) ), epanPostProd, SLOT( import_data_us_convert( QMap < QString, QString > & ) ) );
- connect( epanObserv, SIGNAL( switch_to_experiment( QString &) ), this, SLOT( switch_to_experiment( QString & ) ) );
connect( this, SIGNAL( clear_experiment( QString & ) ), epanExp, SLOT( clear_experiment( QString & ) ) );
connect( epanObserv, SIGNAL( close_everything() ), this, SLOT( close_all() ));
//connect( epanPostProd, SIGNAL( switch_to_analysis( QString &, QString &) ), this, SLOT( switch_to_analysis( QString &, QString & ) ) );
//connect( this, SIGNAL( pass_to_analysis( QString &, QString & ) ), epanAnalysis, SLOT( do_analysis( QString &, QString & ) ) );
- connect( epanPostProd, SIGNAL( switch_to_exp( QString & ) ), this, SLOT( switch_to_experiment( QString & ) ) );
-
+ //connect( epanPostProd, SIGNAL( switch_to_exp( QString & ) ), this, SLOT( switch_to_experiment( QString & ) ) );
+ connect( epanPostProd, SIGNAL( switch_to_initAutoflow( ) ), this, SLOT( close_all( ) ) );
setMinimumSize( QSize( 1350, 800 ) );
adjustSize();
@@ -275,19 +283,24 @@
tabWidget->tabBar()->setIconSize(QSize(50,50));
- tabWidget->tabBar()->setStyleSheet( "QTabBar::tab {min-width: 70;} QTabBar::tab:selected {background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #fafafa, stop: 0.4 #f4f4f4, stop: 0.5 #e7e7e7, stop: 1.0 #fafafa); } QTabBar::tab:hover {background: lightgray;} QTabBar::tab:first {background: blue; color: lightgray; min-width: 50;} ");
+ tabWidget->tabBar()->setStyleSheet( "QTabBar::tab {min-width: 70;} QTabBar::tab:selected {background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #fafafa, stop: 0.4 #f4f4f4, stop: 0.5 #e7e7e7, stop: 1.0 #fafafa); } QTabBar::tab:hover {background: lightgray;} QTabBar::tab:first {background: blue; color: lightgray; min-width: 50;} QTabBar::tab:first:hover {background: #4169E1; color: white} QTabBar::tab:disabled {} ");
-
- //QLabel * init_lbl;
- //init_lbl = new QLabel();
- //init_lbl->setText("Manage Optima Runs");
- //init_lbl->setStyleSheet("QLabel { background-color : blue; color : white; }");
- //tabWidget->tabBar()->setTabButton(0, QTabBar::LeftSide, init_lbl);
-
- //tabWidget->tabBar()->setTabTextColor(0, Qt::white);
+ main->addWidget( tabWidget );
- main->addWidget( tabWidget );
+ for (int i=0; i < tabWidget->count(); ++i )
+ {
+ //ALEXEY: OR enable all tabs ? (e.g. for demonstration, in a read-only mode or the like ?)
+ if ( i == 0 )
+ tabWidget->tabBar()->setTabEnabled(i, true);
+ else
+ tabWidget->tabBar()->setTabEnabled(i, false);
+ }
+ //QPalette pal = tabWidget->tabBar()->palette();
+ //qDebug() << "Palette: color, group: " << pal.color(QPalette::Background) << ", " << pal.currentColorGroup();
+ //pal.setCurrentColorGroup(QPalette::Active);
+ //tabWidget->tabBar()->setPalette(pal);
+
connect( tabWidget, SIGNAL( currentChanged( int ) ), this, SLOT( initPanels( int ) ) );
logWidget = us_textedit();
@@ -322,13 +335,13 @@
connect( epanObserv, SIGNAL( switch_to_post_processing( QMap < QString, QString > & ) ), this, SLOT( switch_to_post_processing( QMap < QString, QString > & ) ) );
connect( this, SIGNAL( import_data_us_convert( QMap < QString, QString > & ) ), epanPostProd, SLOT( import_data_us_convert( QMap < QString, QString > & ) ) );
- connect( epanObserv, SIGNAL( switch_to_experiment( QString &) ), this, SLOT( switch_to_experiment( QString & ) ) );
connect( this, SIGNAL( clear_experiment( QString & ) ), epanExp, SLOT( clear_experiment( QString & ) ) );
connect( epanObserv, SIGNAL( close_everything() ), this, SLOT( close_all() ));
connect( epanPostProd, SIGNAL( switch_to_editing( QString &, QString &) ), this, SLOT( switch_to_editing( QString &, QString & ) ) );
connect( this, SIGNAL( pass_to_editing( QString &, QString & ) ), epanEditing, SLOT( do_editing( QString &, QString & ) ) );
- connect( epanPostProd, SIGNAL( switch_to_exp( QString & ) ), this, SLOT( switch_to_experiment( QString & ) ) );
+ //connect( epanPostProd, SIGNAL( switch_to_exp( QString & ) ), this, SLOT( switch_to_experiment( QString & ) ) );
+ connect( epanPostProd, SIGNAL( switch_to_initAutoflow( ) ), this, SLOT( close_all( ) ) );
setMinimumSize( QSize( 1350, 800 ) );
adjustSize();
@@ -546,6 +559,14 @@
tabWidget->setCurrentIndex( 1 ); // Maybe lock this panel from now on? i.e. tabWidget->tabBar()-setEnabled(false) ??
curr_panx = 1;
+ for (int i = 1; i < tabWidget->count(); ++i )
+ {
+ if ( i == 1 )
+ tabWidget->tabBar()->setTabEnabled(i, true);
+ else
+ tabWidget->tabBar()->setTabEnabled(i, false);
+ }
+
qDebug() << "In define_new_experiment( QStringList & occupied_instruments )";
emit pass_used_instruments( occupied_instruments );
@@ -557,9 +578,24 @@
// Slot to pass submitted to Optima run info to the Live Update tab
void US_ComProjectMain::switch_to_live_update( QMap < QString, QString > & protocol_details)
{
- tabWidget->setCurrentIndex( 2 ); // Maybe lock this panel from now on? i.e. tabWidget->tabBar()-setEnabled(false) ??
+ tabWidget->setCurrentIndex( 2 ); // Maybe lock this panel from now on? i.e. tabWidget->tabBar()->setEnabled(false) ??
curr_panx = 2;
+
+ for (int i = 1; i < tabWidget->count(); ++i )
+ {
+ if ( i == 2 )
+ tabWidget->tabBar()->setTabEnabled(i, true);
+ else
+ tabWidget->tabBar()->setTabEnabled(i, false);
+ }
+
+ // QPalette pal = tabWidget->currentWidget()->palette();
+ // pal.setCurrentColorGroup(QPalette::Disabled);
+ // tabWidget->currentWidget()->setPalette(pal);
+
+ // qDebug() << "LIVE UPDATE palette: " << tabWidget->currentWidget()->palette().currentColorGroup();
+
// ALEXEY:
// (1) Make a record to 'autoflow' table - stage# = 1;
// (2) inside us_xpn_viewer - update 'curDirr' field with generated directory where .auc data saved
@@ -615,20 +651,29 @@
tabWidget->setCurrentIndex( 3 ); // Maybe lock this panel from now on? i.e. tabWidget->tabBar()-setEnabled(false) ??
curr_panx = 3;
+ for (int i = 1; i < tabWidget->count(); ++i )
+ {
+ if ( i == 3 )
+ tabWidget->tabBar()->setTabEnabled(i, true);
+ else
+ tabWidget->tabBar()->setTabEnabled(i, false);
+ }
+
// ALEXEY: Make a record to 'autoflow' table: stage# = 2;
emit import_data_us_convert( protocol_details );
}
-
-// Slot to switch back from the Live Update to Experiment tab
-void US_ComProjectMain::switch_to_experiment( QString & protocolName )
-{
- tabWidget->setCurrentIndex( 1 ); // Maybe lock this panel from now on? i.e. tabWidget->tabBar()-setEnabled(false) ??
- curr_panx = 1;
- //delete_autoflow_record( runID );
+
+// Obsolete
+// // Slot to switch back from the Live Update to Experiment tab
+// void US_ComProjectMain::switch_to_experiment( QString & protocolName )
+// {
+// tabWidget->setCurrentIndex( 1 ); // Maybe lock this panel from now on? i.e. tabWidget->tabBar()-setEnabled(false) ??
+// curr_panx = 1;
+// //delete_autoflow_record( runID );
- emit clear_experiment( protocolName );
-}
+// emit clear_experiment( protocolName );
+// }
// Slot to switch from the Import to Editing tab
@@ -637,6 +682,17 @@
tabWidget->setCurrentIndex( 4 ); // Maybe lock this panel from now on? i.e. tabWidget->tabBar()-setEnabled(false) ??
curr_panx = 4;
+ // ALEXEY: Temporariy NOT lock here... Will need later
+ /*
+ for (int i = 1; i < tabWidget->count(); ++i )
+ {
+ if ( i == 4 )
+ tabWidget->tabBar()->setTabEnabled(i, true);
+ else
+ tabWidget->tabBar()->setTabEnabled(i, false);
+ }
+ */
+
// ALEXEY: Make a record to 'autoflow' table: stage# = 3;
emit pass_to_editing( currDir, protocolName );
@@ -771,6 +827,15 @@
// Init Autoflow records
void US_InitDialogueGui::initRecords( void )
{
+ for (int i=0; i < mainw->tabWidget->count(); ++i )
+ {
+ //ALEXEY: OR enable all tabs ? (e.g. for demonstration, in a read-only mode or the like ?)
+ if ( i == 0 )
+ mainw->tabWidget->tabBar()->setTabEnabled(i, true);
+ else
+ mainw->tabWidget->tabBar()->setTabEnabled(i, false);
+ }
+
// Query 'autoflow': get count of records
autoflow_records = get_autoflow_records();
@@ -886,12 +951,9 @@
autoflow_btn = "AUTOFLOW_DA";
else
autoflow_btn = "AUTOFLOW_GMP";
-
- //US_SelectItem pdiag_autoflow( autoflowdata, hdrs, pdtitle, &prx, autoflow_btn, -2 );
- //US_SelectItem* pdiag_autoflow = new US_SelectItem( autoflowdata, hdrs, pdtitle, &prx, autoflow_btn, -2 );
pdiag_autoflow = new US_SelectItem( autoflowdata, hdrs, pdtitle, &prx, autoflow_btn, -2 );
-
+
connect( pdiag_autoflow, SIGNAL( accept_autoflow_deletion() ), this, SLOT( update_autoflow_data() ));
pdiag_autoflow->setParent(this, Qt::Widget);
@@ -910,6 +972,10 @@
//pdiag_autoflow->setFrameShape( QFrame::Box);
//pdiag_autoflow->setLineWidth(2);
+ // pdiag_autoflow->setObjectName("hello");
+ // pdiag_autoflow->setWindowFlags(Qt::FramelessWindowHint);
+ // pdiag_autoflow->setStyleSheet("#hello{border:4px solid darkgrey}");
+
//disable 'Define Another Exp.' button if all instruments are in use
if ( occupied_instruments.size() >= instruments.size() )
pdiag_autoflow->pb_cancel->setEnabled( false );
@@ -1567,13 +1633,8 @@
connect( this, SIGNAL( to_xpn_viewer( QMap < QString, QString > &) ), sdiag, SLOT( check_for_data ( QMap < QString, QString > & ) ) );
//ALEXEY: devise SLOT saying what to do upon completion of experiment and exporting AUC data to hard drive - Import Experimental Data !!!
- //connect( sdiag, SIGNAL( experiment_complete_auto( QString &, QString &, QString &, QString & ) ), this, SLOT( to_post_processing ( QString &, QString &, QString &, QString & ) ) );
connect( sdiag, SIGNAL( experiment_complete_auto( QMap < QString, QString > & ) ), this, SLOT( to_post_processing ( QMap < QString, QString > & ) ) );
-
- //ALEXEY: return to 1st panel when exp. aborted & no data saved..
- connect( sdiag, SIGNAL( return_to_experiment( QString & ) ), this, SLOT( to_experiment ( QString &) ) );
-
//ALEXEY: close program, emitted from sdiag
connect( sdiag, SIGNAL( close_program() ), this, SLOT( to_close_program() ) );
@@ -1641,10 +1702,6 @@
emit switch_to_post_processing( protocol_details );
}
-void US_ObservGui::to_experiment( QString & protocolName )
-{
- emit switch_to_experiment( protocolName );
-}
void US_ObservGui::to_close_program( void )
{
@@ -1701,7 +1758,8 @@
//ALEXEY: switch to Editing
connect( sdiag, SIGNAL( saving_complete_auto( QString &, QString & ) ), this, SLOT( to_editing ( QString &, QString &) ) );
//ALEXEY: for academic ver. switch back to experiment
- connect( sdiag, SIGNAL( saving_complete_back_to_exp( QString & ) ), this, SLOT( to_experiment ( QString & ) ) );
+ //connect( sdiag, SIGNAL( saving_complete_back_to_exp( QString & ) ), this, SLOT( to_experiment ( QString & ) ) );
+ connect( sdiag, SIGNAL( saving_complete_back_to_initAutoflow( ) ), this, SLOT( to_initAutoflow ( ) ) );
offset = 0;
sdiag->move(offset, 2*offset);
@@ -1730,10 +1788,15 @@
emit switch_to_editing( currDir, protocolName );
}
-void US_PostProdGui::to_experiment( QString & protocolName )
+// void US_PostProdGui::to_experiment( QString & protocolName )
+// {
+// emit switch_to_exp( protocolName );
+// }
+
+void US_PostProdGui::to_initAutoflow( void )
{
- emit switch_to_exp( protocolName );
-}
+ emit switch_to_initAutoflow();
+}
void US_PostProdGui::resizeEvent(QResizeEvent *event)
{
Modified: trunk/programs/us_com_project/us_com_project_gui.h
===================================================================
--- trunk/programs/us_com_project/us_com_project_gui.h 2019-07-22 02:15:00 UTC (rev 2796)
+++ trunk/programs/us_com_project/us_com_project_gui.h 2019-07-23 07:35:43 UTC (rev 2797)
@@ -184,15 +184,11 @@
void process_protocol_details( QMap < QString, QString > & protocol_details );
//void to_post_processing( QString & currDir, QString & protocolName, QString & invID_passed, QString & correctRadii );
void to_post_processing( QMap < QString, QString > & );
-
- void to_experiment( QString & protocolName );
void to_close_program( void );
signals:
void to_xpn_viewer( QMap < QString, QString > & protocol_details );
//void switch_to_post_processing( QString & currDir, QString & protocolName, QString & invID_passed, QString & correctRadii );
void switch_to_post_processing( QMap < QString, QString > & );
-
- void switch_to_experiment( QString & protocolName );
void close_everything( void );
};
@@ -220,14 +216,16 @@
void import_data_us_convert( QMap < QString, QString > &);
void to_editing( QString & currDir, QString & protocolName );
- void to_experiment( QString & protocolName );
+ //void to_experiment( QString & protocolName );
+ void to_initAutoflow( void );
signals:
//void to_post_prod( QString & currDir, QString & protocolName, QString & invID_passed, QString & correctRadii );
void to_post_prod( QMap < QString, QString > & );
void switch_to_editing( QString & currDir, QString & protocolName );
- void switch_to_exp( QString & protocolName );
+ //void switch_to_exp( QString & protocolName );
+ void switch_to_initAutoflow( void);
};
@@ -377,7 +375,7 @@
void switch_to_post_processing( QMap < QString, QString > & );
void switch_to_editing( QString & currDir, QString & protocolName );
- void switch_to_experiment( QString & protocolName );
+ //void switch_to_experiment( QString & protocolName );
//void check_current_stage( void );
void close_all( void );
void closeEvent ( QCloseEvent* );
Modified: trunk/programs/us_convert/us_convert_gui.cpp
===================================================================
--- trunk/programs/us_convert/us_convert_gui.cpp 2019-07-22 02:15:00 UTC (rev 2796)
+++ trunk/programs/us_convert/us_convert_gui.cpp 2019-07-23 07:35:43 UTC (rev 2797)
@@ -1337,7 +1337,8 @@
{
delete_autoflow_record(); // TEMPORARILY - MUST BE UNCOMMENTED!!!
resetAll_auto();
- emit saving_complete_back_to_exp( ProtocolName_auto );
+ //emit saving_complete_back_to_exp( ProtocolName_auto );
+ emit saving_complete_back_to_initAutoflow( );
return;
}
}
@@ -1360,7 +1361,8 @@
//ALEXY: need to delete autoflow record here
delete_autoflow_record();
resetAll_auto();
- emit saving_complete_back_to_exp( ProtocolName_auto );
+ //emit saving_complete_back_to_exp( ProtocolName_auto );
+ emit saving_complete_back_to_initAutoflow();
return;
}
@@ -1391,7 +1393,8 @@
{
delete_autoflow_record();
resetAll_auto();
- emit saving_complete_back_to_exp( ProtocolName_auto );
+ //emit saving_complete_back_to_exp( ProtocolName_auto );
+ emit saving_complete_back_to_initAutoflow( );
return;
}
}
@@ -5068,7 +5071,8 @@
//ALEXY: need to delete autoflow record here
delete_autoflow_record();
resetAll_auto();
- emit saving_complete_back_to_exp( ProtocolName_auto );
+ //emit saving_complete_back_to_exp( ProtocolName_auto );
+ emit saving_complete_back_to_initAutoflow( );
return;
}
else // us_comproject
@@ -5085,7 +5089,8 @@
//ALEXY: need to delete autoflow record here
delete_autoflow_record();
resetAll_auto();
- emit saving_complete_back_to_exp( ProtocolName_auto );
+ //emit saving_complete_back_to_exp( ProtocolName_auto );
+ emit saving_complete_back_to_initAutoflow();
return;
}
else // us_comproject BUT the run IS GMP, so procced
Modified: trunk/programs/us_convert/us_convert_gui.h
===================================================================
--- trunk/programs/us_convert/us_convert_gui.h 2019-07-22 02:15:00 UTC (rev 2796)
+++ trunk/programs/us_convert/us_convert_gui.h 2019-07-23 07:35:43 UTC (rev 2797)
@@ -51,7 +51,8 @@
signals:
void saving_complete_auto( QString &, QString & );
- void saving_complete_back_to_exp( QString & );
+ //void saving_complete_back_to_exp( QString & );
+ void saving_complete_back_to_initAutoflow( void );
public slots:
More information about the us-commits
mailing list