[us-commits] r2789 - in trunk: gui gui/images programs/us_com_project programs/us_convert

svn at svn.aucsolutions.com svn at svn.aucsolutions.com
Fri Jul 5 22:52:33 MDT 2019


Author: alexey
Date: 2019-07-06 04:52:30 +0000 (Sat, 06 Jul 2019)
New Revision: 2789

Added:
   trunk/gui/images/editing.png
   trunk/gui/images/import_1.png
   trunk/gui/images/import_2.png
Modified:
   trunk/gui/images.qrc
   trunk/gui/us_images.cpp
   trunk/gui/us_images.h
   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
Log:
Autoflow GUI: extra stage Editing added...



Added: trunk/gui/images/editing.png
===================================================================
(Binary files differ)

Index: trunk/gui/images/editing.png
===================================================================
--- trunk/gui/images/editing.png	2019-07-05 14:13:28 UTC (rev 2788)
+++ trunk/gui/images/editing.png	2019-07-06 04:52:30 UTC (rev 2789)

Property changes on: trunk/gui/images/editing.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Added: trunk/gui/images/import_1.png
===================================================================
(Binary files differ)

Index: trunk/gui/images/import_1.png
===================================================================
--- trunk/gui/images/import_1.png	2019-07-05 14:13:28 UTC (rev 2788)
+++ trunk/gui/images/import_1.png	2019-07-06 04:52:30 UTC (rev 2789)

Property changes on: trunk/gui/images/import_1.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Added: trunk/gui/images/import_2.png
===================================================================
(Binary files differ)

Index: trunk/gui/images/import_2.png
===================================================================
--- trunk/gui/images/import_2.png	2019-07-05 14:13:28 UTC (rev 2788)
+++ trunk/gui/images/import_2.png	2019-07-06 04:52:30 UTC (rev 2789)

Property changes on: trunk/gui/images/import_2.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Modified: trunk/gui/images.qrc
===================================================================
--- trunk/gui/images.qrc	2019-07-05 14:13:28 UTC (rev 2788)
+++ trunk/gui/images.qrc	2019-07-06 04:52:30 UTC (rev 2789)
@@ -35,7 +35,10 @@
         <file>images/us3-icon-48x48.png</file>
         <file>images/arrow_left.png</file>
         <file>images/arrow_right.png</file>
-	<file>images/analysis.png</file>
+	<file>images/analysis.png</file>	
+	<file>images/editing.png</file>
+	<file>images/import_1.png</file>
+	<file>images/import_2.png</file>
 	<file>images/analysis_2.png</file>
 	<file>images/report.png</file>
 	<file>images/live_update.png</file>

Modified: trunk/gui/us_images.cpp
===================================================================
--- trunk/gui/us_images.cpp	2019-07-05 14:13:28 UTC (rev 2788)
+++ trunk/gui/us_images.cpp	2019-07-06 04:52:30 UTC (rev 2789)
@@ -74,8 +74,11 @@
       { ARROW_RIGHT,     "arrow_right" },
       { SETUP_COM,       "setup"       },
       { ANALYSIS_COM,    "analysis"    },
+      { EDITING_COM,     "editing"     },
       { ANALYSIS_COM_2,  "analysis_2"  },
       { LIVE_UPDATE_COM, "live_update" },
+      { IMPORT_COM_1,    "import_1" },
+      { IMPORT_COM_2,    "import_2" },
       { REPORT_COM,      "report" },
       { NEW_ITEM_COM,    "new_item2" }
    }; 

Modified: trunk/gui/us_images.h
===================================================================
--- trunk/gui/us_images.h	2019-07-05 14:13:28 UTC (rev 2788)
+++ trunk/gui/us_images.h	2019-07-06 04:52:30 UTC (rev 2789)
@@ -57,7 +57,8 @@
          MESH_POLYGON,  MESH_SCATTERED,  MESH_WIRE,
          MOVIE,  SAVE_CONTENT,  ICON_PROP,
          QWTPLOT, US3_ICON, ARROW_LEFT, ARROW_RIGHT,
-	 SETUP_COM, ANALYSIS_COM, ANALYSIS_COM_2, LIVE_UPDATE_COM, NEW_ITEM_COM, REPORT_COM
+	 SETUP_COM, ANALYSIS_COM, EDITING_COM, ANALYSIS_COM_2,
+	 IMPORT_COM_1, IMPORT_COM_2, LIVE_UPDATE_COM, NEW_ITEM_COM, REPORT_COM
       };
 
       //! \brief Get image (embedded or from file) as a pixmap

Modified: trunk/programs/us_com_project/us_com_project_gui.cpp
===================================================================
--- trunk/programs/us_com_project/us_com_project_gui.cpp	2019-07-05 14:13:28 UTC (rev 2788)
+++ trunk/programs/us_com_project/us_com_project_gui.cpp	2019-07-06 04:52:30 UTC (rev 2789)
@@ -94,7 +94,7 @@
    // Add panels to the tab widget
    tabWidget->addTab( epanExp,       tr( "1: Experiment"   ) );
    tabWidget->addTab( epanObserv,    tr( "2: Live Update" ) );
-   tabWidget->addTab( epanPostProd,  tr( "3: Editing"  ) );
+   tabWidget->addTab( epanPostProd,  tr( "3: LIMS Import"  ) );
    // tabWidget->addTab( epanAnalysis,  tr( "4: Analysis"  ) );
    // tabWidget->addTab( epanReport,    tr( "5: Report"  ) );
    
@@ -110,7 +110,7 @@
    
    tabWidget->setTabIcon( 0, US_Images::getIcon( US_Images::SETUP_COM  ) );
    tabWidget->setTabIcon( 1, US_Images::getIcon( US_Images::LIVE_UPDATE_COM  ) );
-   tabWidget->setTabIcon( 2, US_Images::getIcon( US_Images::ANALYSIS_COM ) );
+   tabWidget->setTabIcon( 2, US_Images::getIcon( US_Images::IMPORT_COM_1 ) );
    // tabWidget->setTabIcon( 3, US_Images::getIcon( US_Images::ANALYSIS_COM_2 ) );
    // tabWidget->setTabIcon( 4, US_Images::getIcon( US_Images::REPORT_COM ) );
 
@@ -230,6 +230,7 @@
    epanExp             = new US_ExperGui   ( this );
    epanObserv          = new US_ObservGui  ( this );
    epanPostProd        = new US_PostProdGui( this );
+   epanEditing         = new US_EditingGui ( this );
    epanAnalysis        = new US_AnalysisGui( this );
    epanReport          = new US_ReportGui  ( this );
    
@@ -238,9 +239,10 @@
    // Add panels to the tab widget
    tabWidget->addTab( epanExp,       tr( "1: Experiment"   ) );
    tabWidget->addTab( epanObserv,    tr( "2: Live Update" ) );
-   tabWidget->addTab( epanPostProd,  tr( "3: Editing"  ) );
-   tabWidget->addTab( epanAnalysis,  tr( "4: Analysis"  ) );
-   tabWidget->addTab( epanReport,    tr( "5: Report"  ) );
+   tabWidget->addTab( epanPostProd,  tr( "3: LIMS Import"  ) );
+   tabWidget->addTab( epanEditing,   tr( "4: Editing"  ) );
+   tabWidget->addTab( epanAnalysis,  tr( "5: Analysis"  ) );
+   tabWidget->addTab( epanReport,    tr( "6: Report"  ) );
    
    tabWidget->setCurrentIndex( curr_panx );
    tabWidget->tabBar()->setFixedHeight(500);
@@ -254,9 +256,10 @@
    
    tabWidget->setTabIcon( 0, US_Images::getIcon( US_Images::SETUP_COM  ) );
    tabWidget->setTabIcon( 1, US_Images::getIcon( US_Images::LIVE_UPDATE_COM  ) );
-   tabWidget->setTabIcon( 2, US_Images::getIcon( US_Images::ANALYSIS_COM ) );
-   tabWidget->setTabIcon( 3, US_Images::getIcon( US_Images::ANALYSIS_COM_2 ) );
-   tabWidget->setTabIcon( 4, US_Images::getIcon( US_Images::REPORT_COM ) );
+   tabWidget->setTabIcon( 2, US_Images::getIcon( US_Images::IMPORT_COM_1 ) );
+   tabWidget->setTabIcon( 3, US_Images::getIcon( US_Images::EDITING_COM ) );
+   tabWidget->setTabIcon( 4, US_Images::getIcon( US_Images::ANALYSIS_COM_2 ) );
+   tabWidget->setTabIcon( 5, US_Images::getIcon( US_Images::REPORT_COM ) );
    
    tabWidget->tabBar()->setIconSize(QSize(50,50));
 
@@ -294,8 +297,8 @@
    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_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 & )  ) );
    
    setMinimumSize( QSize( 1350, 800 ) );
@@ -970,14 +973,14 @@
 }
    
 
-// Slot to switch from the Editing to Analysis tab
-void US_ComProjectMain::switch_to_analysis( QString  & currDir, QString & protocolName)
+// Slot to switch from the Import to Editing tab
+void US_ComProjectMain::switch_to_editing( QString  & currDir, QString & protocolName)
 {
    tabWidget->setCurrentIndex( 3 );   // Maybe lock this panel from now on? i.e. tabWidget->tabBar()-setEnabled(false) ??
   
    // ALEXEY: Make a record to 'autoflow' table: stage# = 3; 
 
-   emit pass_to_analysis( currDir, protocolName );
+   emit pass_to_editing( currDir, protocolName );
 }
 
 
@@ -1384,8 +1387,8 @@
    //connect( this, SIGNAL( to_post_prod( QString &, QString &, QString &, QString & ) ), sdiag, SLOT( import_data_auto ( QString &, QString &, QString &, QString & )  ) );
    connect( this, SIGNAL( to_post_prod( QMap < QString, QString > & ) ), sdiag, SLOT( import_data_auto ( QMap < QString, QString > & )  ) );
    
-   //ALEXEY: switch to Analysis
-   connect( sdiag, SIGNAL( saving_complete_auto( QString &, QString & ) ), this, SLOT( to_analysis ( QString &, QString &) ) );
+   //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 & ) ) );
    
@@ -1411,9 +1414,9 @@
   emit to_post_prod( protocol_details );
 }
 
-void US_PostProdGui::to_analysis( QString & currDir, QString & protocolName )
+void US_PostProdGui::to_editing( QString & currDir, QString & protocolName )
 {
-  emit switch_to_analysis( currDir, protocolName );
+  emit switch_to_editing( currDir, protocolName );
 }
 
 void US_PostProdGui::to_experiment( QString & protocolName )
@@ -1453,9 +1456,55 @@
 
 
 
+// US_Editing
+US_EditingGui::US_EditingGui( QWidget* topw )
+   : US_WidgetsDialog( topw, 0 )
+{
+   mainw               = (US_ComProjectMain*)topw;
 
+   setPalette( US_GuiSettings::frameColor() );
+   QFont sfont( US_GuiSettings::fontFamily(), US_GuiSettings::fontSize() - 1 );
+   QFontMetrics fmet( sfont );
+   //int fwid     = fmet.maxWidth();
+   //int lwid     = fwid * 4;
+   //int swid     = lwid + fwid;
+   
+   // Main VBox
+   QVBoxLayout* main     = new QVBoxLayout (this);
+   main->setSpacing        ( 2 );
+   main->setContentsMargins( 2, 2, 2, 2 );
+      
+   QGridLayout* genL   = new QGridLayout();
 
+   // //QPlainTextEdit* panel_desc = new QPlainTextEdit(this);
+   QTextEdit* panel_desc = new QTextEdit(this);
+   panel_desc->viewport()->setAutoFillBackground(false);
+   panel_desc->setFrameStyle(QFrame::NoFrame);
+   panel_desc->setPlainText(" Tab to Edit Experimental Data... ---UNDER CONSTRUCTION--- ");
+   panel_desc->setReadOnly(true);
+   //panel_desc->setMaximumHeight(30);
+   QFontMetrics m (panel_desc -> font()) ;
+   int RowHeight = m.lineSpacing() ;
+   panel_desc -> setFixedHeight  (2* RowHeight) ;
 
+   int row = 0;
+   genL->addWidget( panel_desc,  row++,   0, 1, 12);
+ 
+   // assemble main
+   main->addLayout(genL);
+   main->addStretch();
+
+   // //Later - do actual editing form sdiag - whatever it will be: (us_edit.cpp)
+   // connect( this, SIGNAL( start_editing( QString &, QString & ) ), sdiag, SLOT( edit_auto ( QString &, QString & )  ) );
+   
+}
+
+void US_EditingGui::do_editing( QString & currDir, QString & protocolName )
+{
+  emit start_editing( currDir, protocolName );
+}
+
+
 // US_Analysis
 US_AnalysisGui::US_AnalysisGui( QWidget* topw )
    : US_WidgetsDialog( topw, 0 )
@@ -1508,7 +1557,6 @@
 
 
 
-
 // US_Report
 US_ReportGui::US_ReportGui( QWidget* topw )
    : US_WidgetsDialog( topw, 0 )

Modified: trunk/programs/us_com_project/us_com_project_gui.h
===================================================================
--- trunk/programs/us_com_project/us_com_project_gui.h	2019-07-05 14:13:28 UTC (rev 2788)
+++ trunk/programs/us_com_project/us_com_project_gui.h	2019-07-06 04:52:30 UTC (rev 2789)
@@ -157,17 +157,43 @@
     //void import_data_us_convert( QString & currDir, QString & protocolName, QString & invID_passed, QString & correctRadii  );
     void import_data_us_convert( QMap < QString, QString > &);
     
-    void to_analysis( QString & currDir, QString & protocolName );
+    void to_editing( QString & currDir, QString & protocolName );
     void to_experiment( QString & protocolName );
     
   signals:
     //void to_post_prod( QString & currDir, QString & protocolName, QString & invID_passed, QString & correctRadii  );
     void to_post_prod( QMap < QString, QString > & ); 
     
-    void switch_to_analysis( QString & currDir, QString & protocolName );
+    void switch_to_editing( QString & currDir, QString & protocolName );
     void switch_to_exp( QString & protocolName );
 };
 
+
+//! \brief Editing panel
+class US_EditingGui : public US_WidgetsDialog 
+{
+  Q_OBJECT
+  
+  public:
+    US_EditingGui( QWidget* );
+    ~US_EditingGui() {};
+  
+         
+  private:
+    US_ComProjectMain*    mainw;      // Parent to all panels
+    int offset;
+
+ protected:
+    //void resizeEvent(QResizeEvent *event) override;
+      
+ private slots:
+   void do_editing( QString & currDir, QString & protocolName );
+
+ signals:
+   void start_editing( QString & currDir, QString & protocolName );
+    
+};
+
 //! \brief Analysis panel
 class US_AnalysisGui : public US_WidgetsDialog 
 {
@@ -249,6 +275,7 @@
   US_ExperGui*      epanExp;         // US_Exp panel
   US_ObservGui*     epanObserv;      // US_Observ panel
   US_PostProdGui*   epanPostProd;    // US_PostProd panel
+  US_EditingGui*    epanEditing;     // US_Editing panel
   US_AnalysisGui*   epanAnalysis;    // US_Analysis panel
   US_ReportGui*     epanReport;      // US_Report panel
   
@@ -278,7 +305,7 @@
   //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_analysis( QString & currDir, QString & protocolName );
+  void switch_to_editing( QString & currDir, QString & protocolName );
   void switch_to_experiment( QString & protocolName );
   //void check_current_stage( void );
   void close_all( void );
@@ -295,7 +322,7 @@
   //void import_data_us_convert( QString & currDir, QString & protocolName, QString & invID_passed, QString & correctRadii );
   void import_data_us_convert(  QMap < QString, QString > & );
 
-  void pass_to_analysis( QString & currDir, QString & protocolName );
+  void pass_to_editing( QString & currDir, QString & protocolName );
   void clear_experiment( QString & protocolName);
   void us_comproject_closed( void );
   void pass_used_instruments( QStringList & );

Modified: trunk/programs/us_convert/us_convert_gui.cpp
===================================================================
--- trunk/programs/us_convert/us_convert_gui.cpp	2019-07-05 14:13:28 UTC (rev 2788)
+++ trunk/programs/us_convert/us_convert_gui.cpp	2019-07-06 04:52:30 UTC (rev 2789)
@@ -5093,7 +5093,7 @@
 	       QMessageBox::information( this,
 					 tr( "Save is Complete" ),
 					 tr( "The save of all data and reports is complete.\n\n"
-					     "The program will switch to Analysis stage." ) );
+					     "The program will switch to Editing stage." ) );
 	       
 	       // Either emit ONLY if not US_MODE, or do NOT connect with slot on us_comproject...
 	       resetAll_auto();



More information about the us-commits mailing list