[us-commits] r2748 - trunk/programs/us_xpn_viewer

svn at svn.aucsolutions.com svn at svn.aucsolutions.com
Tue Apr 30 17:47:36 MDT 2019


Author: alexey
Date: 2019-04-30 23:47:36 +0000 (Tue, 30 Apr 2019)
New Revision: 2748

Modified:
   trunk/programs/us_xpn_viewer/us_xpn_viewer_gui.cpp
Log:
autoflow further updates on reattacjement



Modified: trunk/programs/us_xpn_viewer/us_xpn_viewer_gui.cpp
===================================================================
--- trunk/programs/us_xpn_viewer/us_xpn_viewer_gui.cpp	2019-04-30 23:31:05 UTC (rev 2747)
+++ trunk/programs/us_xpn_viewer/us_xpn_viewer_gui.cpp	2019-04-30 23:47:36 UTC (rev 2748)
@@ -1795,9 +1795,9 @@
 
   qDebug() << "SYS_STAT: After replot(), BEFORE CheExpStat!! ";
   
-  //int exp_status = CheckExpComplete_auto( RunID_to_retrieve  );
+  int exp_status = CheckExpComplete_auto( RunID_to_retrieve  );
    
-  if ( CheckExpComplete_auto( RunID_to_retrieve ) == 5 )
+  if ( exp_status == 5 )
     {
       timer_check_sysdata->stop();
       disconnect(timer_check_sysdata, SIGNAL(timeout()), 0, 0);   //Disconnect timer from anything
@@ -1828,7 +1828,7 @@
     }
   
   
-  if ( CheckExpComplete_auto( RunID_to_retrieve ) == 3 )
+  if ( exp_status == 3 )
     {
       timer_check_sysdata->stop();
       disconnect(timer_check_sysdata, SIGNAL(timeout()), 0, 0);   //Disconnect timer from anything
@@ -2326,7 +2326,52 @@
 
    qDebug() << "CellChNumber, cellchans.count() " << CellChNumber.toInt() << ", " << cellchans.count();
    qDebug() << "TripleNumber, ntriple " << TripleNumber.toInt() << ", " << ntriple;
+
+   //ALEXEY: Add Exp. Abortion Exception HERE... 
+   if ( CheckExpComplete_auto( RunID_to_retrieve ) == 3 )
+     {
+       timer_all_data_avail->stop();
+       disconnect(timer_all_data_avail, SIGNAL(timeout()), 0, 0);   //Disconnect timer from anything
+       
+       if ( !timer_check_sysdata->isActive()  ) // Check if sys_data Timer is stopped
+	 {
+	   // Ask if data retrived so far should be saved:
+	   
+	   QMessageBox msgBox;
+	   msgBox.setText(tr("Experiment was aborted!"));
+	   msgBox.setInformativeText("The data retrieved so far can be saved or disregarded. If saved, the program will proceed to the next stage (Editing). Otherwise, it will return to the initial stage (Experiment).");
+	   msgBox.setWindowTitle(tr("Experiment Abortion"));
+	   QPushButton *Save      = msgBox.addButton(tr("Save Data"), QMessageBox::YesRole);
+	   QPushButton *Ignore    = msgBox.addButton(tr("Ignore Data"), QMessageBox::RejectRole);
+	   
+	   msgBox.setIcon(QMessageBox::Question);
+	   msgBox.exec();
+	   
+	   if (msgBox.clickedButton() == Save)
+	     {
+	       export_auc_auto();
+	       
+	       QString mtitle_complete  = tr( "Complete!" );
+	       QString message_done     = tr( "Experiment was completed. Optima data saved..." );
+	       QMessageBox::information( this, mtitle_complete, message_done );
+	       
+	       updateautoflow_record_atLiveUpdate();
+	       emit experiment_complete_auto( currentDir, ProtocolName, invID_passed  );  // Updtade later: what should be passed with signal ??
+	       return;
+	     }
+	   
+	   else if (msgBox.clickedButton() == Ignore)
+	     {
+	       reset();
+	       delete_autoflow_record();
+	       emit return_to_experiment( ProtocolName  ); 
+	       return;
+	     }
+	 }
+     }      
    
+   
+   
    if ( cellchans.count() == CellChNumber.toInt() && ntriple == TripleNumber.toInt() )                // <--- Change to the values from the protocol
      {
        //stop timer



More information about the us-commits mailing list