[us-commits] r2817 - in trunk/programs: us_com_project us_xpn_viewer
svn at svn.aucsolutions.com
svn at svn.aucsolutions.com
Thu Aug 15 12:24:50 MDT 2019
Author: alexey
Date: 2019-08-15 18:24:50 +0000 (Thu, 15 Aug 2019)
New Revision: 2817
Modified:
trunk/programs/us_com_project/us_com_project_gui.cpp
trunk/programs/us_com_project/us_com_project_gui.h
trunk/programs/us_xpn_viewer/us_xpn_viewer_gui.cpp
trunk/programs/us_xpn_viewer/us_xpn_viewer_gui.h
Log:
These 4 files were reverted to v2802 as they may contain bugs...
Modified: trunk/programs/us_com_project/us_com_project_gui.cpp
===================================================================
--- trunk/programs/us_com_project/us_com_project_gui.cpp 2019-08-15 16:42:34 UTC (rev 2816)
+++ trunk/programs/us_com_project/us_com_project_gui.cpp 2019-08-15 18:24:50 UTC (rev 2817)
@@ -27,6 +27,8 @@
#endif
+//ALEXEY: reverted, based on v2802
+
//// Constructor: ACADEMIC: 'Data Acquision' / us_comproject_academic programs
US_ComProjectMain::US_ComProjectMain(QString us_mode) : US_Widgets()
{
@@ -384,16 +386,12 @@
/*
1. Avaiting for run to be launched ("Back to Managing Optima Runs") -- SET
2. More complex: Back to Managing runs from active LIVE_UPDATE stage -- stop all timers and other processes...
- */
-
+ */
qDebug() << "Jumping from LIVE UPDATE.";
//2. Stop all timers/threads, reset GUI - when stopping fully working LIVE UPDATE
if ( !xpn_viewer_closed_soft )
- {
- //emit reset_live_update();
- epanObserv->sdiag->reset_liveupdate_panel_public();
- }
+ emit reset_live_update();
}
if ( curr_panx == 3 )
Modified: trunk/programs/us_com_project/us_com_project_gui.h
===================================================================
--- trunk/programs/us_com_project/us_com_project_gui.h 2019-08-15 16:42:34 UTC (rev 2816)
+++ trunk/programs/us_com_project/us_com_project_gui.h 2019-08-15 18:24:50 UTC (rev 2817)
@@ -35,6 +35,8 @@
#include "us_license.h"
#include "us_select_item.h"
+//ALEXEY: reverted, based on v2802
+
class US_ComProjectMain;
class VerticalTabStyle : public QProxyStyle {
@@ -172,11 +174,9 @@
US_ObservGui( QWidget* );
~US_ObservGui() {};
- US_XpnDataViewer* sdiag;
-
private:
US_ComProjectMain* mainw; // Parent to all panels
- //US_XpnDataViewer* sdiag;
+ US_XpnDataViewer* sdiag;
int offset;
protected:
Modified: trunk/programs/us_xpn_viewer/us_xpn_viewer_gui.cpp
===================================================================
--- trunk/programs/us_xpn_viewer/us_xpn_viewer_gui.cpp 2019-08-15 16:42:34 UTC (rev 2816)
+++ trunk/programs/us_xpn_viewer/us_xpn_viewer_gui.cpp 2019-08-15 18:24:50 UTC (rev 2817)
@@ -45,6 +45,8 @@
#define DbgLv(a) if(dbg_level>=a)qDebug()
#endif
+//ALEXEY: reverted, based on v2802
+
// DialBox
DialBox::DialBox( QWidget *parent ):
QWidget( parent )
@@ -244,8 +246,7 @@
in_reload_all_data = false;
in_reload_data_init = false;
in_reload_check_sysdata = false;
- in_reload_end_processes = false;
-
+
ElapsedTimeOffset = 0;
//ALEXEY: new way
@@ -1163,11 +1164,6 @@
le_runID ->setText( runID );
//le_dbhost ->setText( xpnhost + ":" + xpnport + " (" + xpndesc + ")" ); //New
- //Also clear Wavelengths && Lambda ranges:
- cb_pltrec ->clear();
- le_lrange ->setText("");
-
-
pb_loadXpn ->setEnabled( true );
pb_loadAUC ->setEnabled( true );
pb_details ->setEnabled( false );
@@ -1586,17 +1582,6 @@
msg_data_avail->accept();
//msg_data_avail->close();
//ok_msg_data->click();
-
- //ALEXEY: make sure ExpID is coupled to the RunID which is already in the autoflow DB
- if ( !runID_passed.isEmpty() || runID_passed != "NULL" )
- {
- if ( runID_passed.toInt() != RunID_to_retrieve.toInt() )
- {
- RunID_to_retrieve = runID_passed;
- qDebug() << "Correcting RunID to : " << RunID_to_retrieve;
- }
- }
-
//ALEXEY: need to update 'autoflow' table with the unique RunID_to_retrieve && Start Run Time fields !!!
//Conditional: Do it ONLY once !!!
@@ -2000,7 +1985,7 @@
updateautoflow_record_atLiveUpdate();
//emit experiment_complete_auto( currentDir, ProtocolName, invID_passed, correctRadii ); // Updtade later: what should be passed with signal ??
- //reset_auto();
+ reset_auto();
emit experiment_complete_auto( details_at_live_update );
return;
@@ -2094,9 +2079,6 @@
//Query for Optima DB periodically, see if data available
void US_XpnDataViewer::check_for_data( QMap < QString, QString > & protocol_details)
{
- //Also reset the panel before reattachement
- reset_auto();
-
xpn_data->setEtimOffZero(); //ALEXEY: intialize etimoff to zero for the first time
experimentAborted = false;
@@ -2154,22 +2136,14 @@
timer_data_init->stop();
disconnect(timer_data_init, SIGNAL(timeout()), 0, 0); //Disconnect timer from anything
- //reset_auto();
+ reset_auto();
emit close_program();
}
}
}
-
// Reset LIVE UPDATE panel && stop timers && quit threads
-void US_XpnDataViewer::reset_liveupdate_panel_public ( void )
-{
- reset_liveupdate_panel();
-}
-
-
-// Reset LIVE UPDATE panel && stop timers && quit threads
void US_XpnDataViewer::reset_liveupdate_panel ( void )
{
//Quit sys_thread, emit finished() to stop timer_check_sysdata from withing thread
@@ -2223,45 +2197,17 @@
if ( !timer_data_reload->isActive() )
qDebug() << "QTimer timer_data_reload STOPPED by clickig Manage Optima runs !!! ";
/*************************************/
-
- qDebug() << "BEFORE: " << in_reload_auto << ", " << in_reload_all_data << ", " << in_reload_data_init << ", " << in_reload_check_sysdata;
- //ALEXEY: should wait for execution of all below variables to be false (end of all timer functions) BEFORE reset_all();
- // Introduce QTimer which checks for all abpve vartibales to be false (check all related functions to always reset them to false on completion)
- // Put reset_auto() into the timer && and stop/disconnect timer from within connected SLOT.
- timer_end_processes = new QTimer;
- connect(timer_end_processes, SIGNAL(timeout()), this, SLOT( end_processes ( ) ));
- timer_end_processes->start(2000); // 5 sec
-
- //reset_auto();
- //qApp->processEvents();
-}
+ reset_auto();
-//to end all existing update processes
-void US_XpnDataViewer::end_processes( void )
-{
- if ( in_reload_end_processes ) // If already doing a reload,
- return; // skip starting a new one
+ qDebug() << in_reload_auto << ", " << in_reload_all_data << ", " << in_reload_data_init << ", " << in_reload_check_sysdata;
- in_reload_end_processes = true; // Flag in the midst of a reload
+ in_reload_auto = false;
+ in_reload_all_data = false;
+ in_reload_data_init = false;
+ in_reload_check_sysdata = false;
- if ( !in_reload_auto && !in_reload_all_data && !in_reload_data_init && !in_reload_check_sysdata )
- {
-
- timer_end_processes->stop();
- disconnect(timer_end_processes, SIGNAL(timeout()), 0, 0); //Disconnect timer from anything
-
- //ALEXEY: may not be needed
- //reset_auto();
- qDebug() << "LIVE UPDATE panel has been reset!";
- qDebug() << "AFTER: " << in_reload_auto << ", " << in_reload_all_data << ", " << in_reload_data_init << ", " << in_reload_check_sysdata;
-
- qApp->processEvents();
-
- //in_reload_end_processes = false;
- }
- else
- in_reload_end_processes = false;
+ qApp->processEvents();
}
@@ -2567,7 +2513,7 @@
export_auc_auto();
updateautoflow_record_atLiveUpdate();
- //reset_auto();
+ reset_auto();
emit experiment_complete_auto( details_at_live_update );
return;
}
@@ -3983,9 +3929,7 @@
// QMessageBox::information( this, mtitle_complete, message_done );
updateautoflow_record_atLiveUpdate();
- //reset_auto();
-
- in_reload_auto = false;
+ reset_auto();
//emit experiment_complete_auto( currentDir, ProtocolName, invID_passed, correctRadii ); // Updtade later: what should be passed with signal ??
emit experiment_complete_auto( details_at_live_update );
Modified: trunk/programs/us_xpn_viewer/us_xpn_viewer_gui.h
===================================================================
--- trunk/programs/us_xpn_viewer/us_xpn_viewer_gui.h 2019-08-15 16:42:34 UTC (rev 2816)
+++ trunk/programs/us_xpn_viewer/us_xpn_viewer_gui.h 2019-08-15 18:24:50 UTC (rev 2817)
@@ -25,6 +25,8 @@
#include "us_xpn_run_auc.h"
+//ALEXEY: reverted, based on v2802
+
class SpeedoMeter: public QwtDial
{
@@ -95,8 +97,6 @@
// New constructor for automated read/upload/update
US_XpnDataViewer(QString auto_mode);
- void reset_liveupdate_panel_public ( void );
-
private:
bool auto_mode_bool;
@@ -255,7 +255,6 @@
bool in_reload_data_init;
bool in_reload_all_data;
bool in_reload_check_sysdata;
- bool in_reload_end_processes;
double last_xmin;
@@ -270,8 +269,6 @@
QTimer* timer_all_data_avail;
QTimer* timer_check_sysdata;
- QTimer* timer_end_processes;
-
QElapsedTimer* elapsed_timer;
QTimer* timer_sys_thread;
@@ -313,7 +310,6 @@
//void retrieve_xpn_raw_auto ( QString & );
void retrieve_xpn_raw_auto ( void );
- void end_processes ( void );
void reloadData_auto ( void );
int CheckExpComplete_auto( QString & );
void update_autoflow_runId_timeStarted( void );
More information about the us-commits
mailing list