[us-commits] r2744 - in trunk: gui programs/us_com_project programs/us_com_project_academic
svn at svn.aucsolutions.com
svn at svn.aucsolutions.com
Mon Apr 29 00:50:48 MDT 2019
Author: alexey
Date: 2019-04-29 06:50:48 +0000 (Mon, 29 Apr 2019)
New Revision: 2744
Modified:
trunk/gui/us_select_item.cpp
trunk/gui/us_select_item.h
trunk/programs/us_com_project/us_com_project_gui.cpp
trunk/programs/us_com_project/us_com_project_gui.h
trunk/programs/us_com_project/us_com_project_main.cpp
trunk/programs/us_com_project_academic/us_com_project_academic_main.cpp
Log:
ojb reattachement, minpor updates
Modified: trunk/gui/us_select_item.cpp
===================================================================
--- trunk/gui/us_select_item.cpp 2019-04-29 03:44:16 UTC (rev 2743)
+++ trunk/gui/us_select_item.cpp 2019-04-29 06:50:48 UTC (rev 2744)
@@ -19,6 +19,7 @@
{
multi_sel = false;
deleted_button = false;
+ autoflow_button = false;
selxP = aselxP;
selxsP = NULL;
sort_ord = ( def_sort < 0 ) ? Qt::DescendingOrder
@@ -34,15 +35,23 @@
// Alternate constructor to enable selecting a single item with Delete button
US_SelectItem::US_SelectItem( QList< QStringList >& items,
- QStringList& hdrs, const QString titl, int* aselxP, QString deleted,
+ QStringList& hdrs, const QString titl, int* aselxP, QString add_label,
const int def_sort )
: US_WidgetsDialog( 0, 0 ), items( items ), hdrs( hdrs )
{
multi_sel = false;
-
- if ( !deleted.isEmpty() )
- deleted_button = true;
+ deleted_button = false;
+ autoflow_button = false;
+
+ if ( !add_label.isEmpty() )
+ {
+ if ( add_label == "DELETE" )
+ deleted_button = true;
+ if ( add_label == "AUTOFLOW" )
+ autoflow_button = true;
+ }
+
selxP = aselxP;
selxsP = NULL;
sort_ord = ( def_sort < 0 ) ? Qt::DescendingOrder
@@ -52,7 +61,7 @@
build_layout( titl );
tw_data->setSelectionMode( QAbstractItemView::SingleSelection );
-
+
show();
}
@@ -134,7 +143,11 @@
// Button Row
QHBoxLayout* buttons = new QHBoxLayout;
- QPushButton* pb_cancel = us_pushbutton( tr( "Cancel" ) );
+ QString cancel_pb_label("Cancel");
+ if ( autoflow_button )
+ cancel_pb_label = tr("Define Another Experiment");
+
+ QPushButton* pb_cancel = us_pushbutton( cancel_pb_label );
QPushButton* pb_accept = us_pushbutton( multi_sel ?
tr( "Select Item(s)" ) :
tr( "Select Item" ) );
Modified: trunk/gui/us_select_item.h
===================================================================
--- trunk/gui/us_select_item.h 2019-04-29 03:44:16 UTC (rev 2743)
+++ trunk/gui/us_select_item.h 2019-04-29 06:50:48 UTC (rev 2744)
@@ -61,6 +61,7 @@
bool multi_sel; //!< Flag: multiple selections enabled?
bool deleted_button; //If Delete button is present
+ bool autoflow_button; //If autoflow, Cancel becomes define another Experiment
Qt::SortOrder sort_ord; //!< Default sort order flag
int sort_col; //!< Default sort column
int nitems; //!< Number of items (rows)
Modified: trunk/programs/us_com_project/us_com_project_gui.cpp
===================================================================
--- trunk/programs/us_com_project/us_com_project_gui.cpp 2019-04-29 03:44:16 UTC (rev 2743)
+++ trunk/programs/us_com_project/us_com_project_gui.cpp 2019-04-29 06:50:48 UTC (rev 2744)
@@ -157,7 +157,7 @@
adjustSize();
/* Check for current stage & redirect to specific tab */
- check_current_stage();
+ //check_current_stage();
}
@@ -285,10 +285,7 @@
adjustSize();
/* Check for current stage & redirect to specific tab */
- check_current_stage();
-
- //connect( epanExp, SIGNAL( check_stage() ), this, SLOT( check_current_stage() ) );
- //emit check_stage();
+ //check_current_stage();
}
// Function that checks for current program stage based on US-lims DB entry
@@ -346,7 +343,7 @@
// --------------------------------------------------------------------------------------------
-
+
// Query 'autoflow': get cout of records
int autoflow_records = get_autoflow_records();
@@ -370,10 +367,18 @@
<< "Created"
<< "Started";
- US_SelectItem pdiag( autoflowdata, hdrs, pdtitle, &prx, -2 );
+ QString autoflow_btn = "AUTOFLOW";
+
+ //US_SelectItem pdiag( autoflowdata, hdrs, pdtitle, &prx, autoflow_btn, -2 );
+ US_SelectItem* pdiag = new US_SelectItem( autoflowdata, hdrs, pdtitle, &prx, autoflow_btn, -2 );
+
+ pdiag->setParent(this, Qt::Window);
+ pdiag->setWindowFlags(Qt::Dialog | Qt::WindowMinimizeButtonHint | Qt::WindowMaximizeButtonHint | Qt::WindowCloseButtonHint );
+ //pdiag->setWindowFlags(Qt::Window | Qt::WindowCloseButtonHint | Qt::WindowMinimizeButtonHint | Qt::WindowMaximizeButtonHint );
+
QString autoflow_id_selected("");
- if ( pdiag.exec() == QDialog::Accepted )
+ if ( pdiag->exec() == QDialog::Accepted )
autoflow_id_selected = autoflowdata[ prx ][ 0 ];
else
return;
@@ -1097,5 +1102,6 @@
// assemble main
main->addLayout(genL);
main->addStretch();
+
}
Modified: trunk/programs/us_com_project/us_com_project_gui.h
===================================================================
--- trunk/programs/us_com_project/us_com_project_gui.h 2019-04-29 03:44:16 UTC (rev 2743)
+++ trunk/programs/us_com_project/us_com_project_gui.h 2019-04-29 06:50:48 UTC (rev 2744)
@@ -94,7 +94,6 @@
void switch_to_live_update( QMap < QString, QString > & protocol_details );
void set_auto_mode( void );
void reset_experiment( QString & protocolName);
- void check_stage( void );
};
@@ -200,7 +199,6 @@
signals:
-
};
@@ -224,7 +222,9 @@
bool us_mode_bool;
QList< QStringList > autoflowdata;
-
+
+ void check_current_stage( void );
+
private:
US_ExperGui* epanExp; // US_Exp panel
US_ObservGui* epanObserv; // US_Observ panel
@@ -240,7 +240,8 @@
int get_autoflow_records( void );
QMap < QString, QString > read_autoflow_record( int );
static int list_all_autoflow_records( QList< QStringList >&, US_DB2* );
-
+
+
private slots:
//void reset ( void );
//void newPanel ( int ); // Move to a new panel
@@ -255,14 +256,13 @@
void switch_to_post_processing( QString & currDir, QString & protocolName, QString & invID_passed );
void switch_to_analysis( QString & currDir, QString & protocolName );
void switch_to_experiment( QString & protocolName );
- void check_current_stage( void );
+ //void check_current_stage( void );
signals:
void pass_to_live_update( QMap < QString, QString > & protocol_details );
void import_data_us_convert( QString & currDir, QString & protocolName, QString & invID_passed );
void pass_to_analysis( QString & currDir, QString & protocolName );
void clear_experiment( QString & protocolName);
- //void check_stage( void );
};
Modified: trunk/programs/us_com_project/us_com_project_main.cpp
===================================================================
--- trunk/programs/us_com_project/us_com_project_main.cpp 2019-04-29 03:44:16 UTC (rev 2743)
+++ trunk/programs/us_com_project/us_com_project_main.cpp 2019-04-29 06:50:48 UTC (rev 2744)
@@ -16,6 +16,9 @@
//w.setFrameShape( QFrame::Box);
//w.setLineWidth(1);
w->show(); //!< \memberof QWidget
+
+ w->check_current_stage();
+
return application.exec(); //!< \memberof QApplication
}
Modified: trunk/programs/us_com_project_academic/us_com_project_academic_main.cpp
===================================================================
--- trunk/programs/us_com_project_academic/us_com_project_academic_main.cpp 2019-04-29 03:44:16 UTC (rev 2743)
+++ trunk/programs/us_com_project_academic/us_com_project_academic_main.cpp 2019-04-29 06:50:48 UTC (rev 2744)
@@ -16,6 +16,9 @@
//w.setFrameShape( QFrame::Box);
//w.setLineWidth(1);
w->show(); //!< \memberof QWidget
+
+ w->check_current_stage();
+
return application.exec(); //!< \memberof QApplication
}
More information about the us-commits
mailing list