[us-commits] r2775 - in trunk/programs: us_com_project us_convert

svn at svn.aucsolutions.com svn at svn.aucsolutions.com
Tue May 21 21:37:33 MDT 2019


Author: alexey
Date: 2019-05-22 03:37:32 +0000 (Wed, 22 May 2019)
New Revision: 2775

Modified:
   trunk/programs/us_com_project/us_com_project_gui.cpp
   trunk/programs/us_convert/us_convert_gui.cpp
   trunk/programs/us_convert/us_convert_gui.h
Log:
autoflow: few important updates..



Modified: trunk/programs/us_com_project/us_com_project_gui.cpp
===================================================================
--- trunk/programs/us_com_project/us_com_project_gui.cpp	2019-05-21 22:53:01 UTC (rev 2774)
+++ trunk/programs/us_com_project/us_com_project_gui.cpp	2019-05-22 03:37:32 UTC (rev 2775)
@@ -296,6 +296,7 @@
       
    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 & )  ) );
    
    setMinimumSize( QSize( 1350, 800 ) );
    adjustSize();
@@ -465,16 +466,21 @@
       //ALEXEY: define what to do if some Optima(s) are occupied
       // should emit signal sending list of optima's in use to us_experiment.
 
-      QString list_instruments_in_use = occupied_instruments.join(", ");
-      QMessageBox::warning( this, tr( "Occupied Instruments" ),
-			    tr( "The following Optima instrument(s) \n"
-				"are currently in use: \n\n"
-				"%1 \n\n"
-				"You will not be able to submit another run \n"
-				"to these instruments at the moment.").arg( list_instruments_in_use ) );
-      
-      define_new_experiment( occupied_instruments );
-      return;
+      if ( occupied_instruments.size() == 0 )
+	return;
+      else
+	{
+	  QString list_instruments_in_use = occupied_instruments.join(", ");
+	  QMessageBox::warning( this, tr( "Occupied Instruments" ),
+				tr( "The following Optima instrument(s) \n"
+				    "are currently in use: \n\n"
+				    "%1 \n\n"
+				    "You will not be able to submit another run \n"
+				    "to these instruments at the moment.").arg( list_instruments_in_use ) );
+	  
+	  define_new_experiment( occupied_instruments );
+	  return;
+	}
     }
 
   // -------------------------------------------------------------------------------------------------
@@ -493,7 +499,7 @@
 
   QDir directory( currDir );
   
-  qDebug() << "CURR DIRECTORY : " << currDir;
+  qDebug() << "CURR DIRECTORY : "   << currDir;
   qDebug() << "1.ExpAborted: "      << protocol_details[ "expAborted" ];
   qDebug() << "1.CorrectRadii: "    << protocol_details[ "correctRadii" ];
 

Modified: trunk/programs/us_convert/us_convert_gui.cpp
===================================================================
--- trunk/programs/us_convert/us_convert_gui.cpp	2019-05-21 22:53:01 UTC (rev 2774)
+++ trunk/programs/us_convert/us_convert_gui.cpp	2019-05-22 03:37:32 UTC (rev 2775)
@@ -1049,6 +1049,43 @@
    data_plot->setTitle( tr( "Absorbance Data" ) );
 }
 
+void US_ConvertGui::resetAll_auto( void )
+{
+   QApplication::restoreOverrideCursor();
+   QApplication::restoreOverrideCursor();
+
+   // if ( allData.size() > 0 )
+   // {  // Output warning when resetting (but only if we have data)
+   //    int status = QMessageBox::information( this,
+   //       tr( "New Data Warning" ),
+   //       tr( "This will erase all data currently on the screen, and "
+   //           "reset the program to its starting condition. No hard-drive "
+   //           "data or database information will be affected. Proceed? " ),
+   //       tr( "&OK" ), tr( "&Cancel" ),
+   //       0, 0, 1 );
+
+   //    if ( status != 0 ) return;
+   // }
+
+   reset();
+
+   le_status->setText( tr( "(no data loaded)" ) );
+   subsets.clear();
+   reference_start = 0;
+   reference_end   = 0;
+
+   connectTolerance( false );
+   ct_tolerance    ->setMinimum (   0.0 );
+   ct_tolerance    ->setMaximum ( 100.0 );
+   ct_tolerance    ->setValue   (   5.0 );
+   ct_tolerance    ->setSingleStep( 1 );
+   connectTolerance( true );
+   scanTolerance   = 5.0;
+   runID           = "";
+   data_plot->setTitle( tr( "Absorbance Data" ) );
+}
+
+
 // Function to select the current investigator
 void US_ConvertGui::sel_investigator( void )
 {
@@ -1153,8 +1190,6 @@
   
   int impType = getImports_auto( details_at_live_update[ "dataPath" ] );
 
-  qDebug() << "ExpAborted: "   << details_at_live_update[ "expAborted" ];
-  qDebug() << "CorrectRadii: " << details_at_live_update[ "correctRadii" ];
 
   /* -------------------------------------------------------------------------------------------------------------------*/
   //ALEXEY: Case when Run was manually aborted from Optima panel:
@@ -1179,7 +1214,8 @@
       
       else if (msgBox.clickedButton() == Ignore)
 	{
-	  delete_autoflow_record();
+	  delete_autoflow_record(); // TEMPORARILY - MUST BE UNCOMMENTED!!!
+	  resetAll_auto();
 	  emit saving_complete_back_to_exp( ProtocolName_auto );
 	  return;
 	}
@@ -1202,6 +1238,7 @@
 	   
 	   //ALEXY: need to delete autoflow record here
 	   delete_autoflow_record();
+	   resetAll_auto();
 	   emit saving_complete_back_to_exp( ProtocolName_auto );
 	   return;
 	  
@@ -1232,6 +1269,7 @@
 	  else if ( msgBox.clickedButton() == Ignore )
 	    {
 	      delete_autoflow_record();
+	      resetAll_auto();
 	      emit saving_complete_back_to_exp( ProtocolName_auto );
 	      return;
 	    }
@@ -4869,6 +4907,7 @@
 	   
 	   //ALEXY: need to delete autoflow record here
 	   delete_autoflow_record();
+	   resetAll_auto();
 	   emit saving_complete_back_to_exp( ProtocolName_auto );
 	   return;
 	 }
@@ -4881,6 +4920,7 @@
 					 "The program will switch to Analysis stage." ) );
 	   
 	   // Either emit ONLY if not US_MODE, or do NOT connect with slot on us_comproject...
+	   resetAll_auto();
 	   emit saving_complete_auto( currentDir, ProtocolName_auto  );   
 	 }
      }

Modified: trunk/programs/us_convert/us_convert_gui.h
===================================================================
--- trunk/programs/us_convert/us_convert_gui.h	2019-05-21 22:53:01 UTC (rev 2774)
+++ trunk/programs/us_convert/us_convert_gui.h	2019-05-22 03:37:32 UTC (rev 2775)
@@ -358,7 +358,10 @@
       int  saveUS3Disk       ( void );
       void saveUS3DB         ( void );
       void saveReportsToDB   ( void );
+
       void resetAll          ( void );
+      void resetAll_auto     ( void );
+      
       void source_changed    ( bool );
       void update_disk_db    ( bool );
       void show_mwl_control  ( bool );



More information about the us-commits mailing list