[us-commits] r2818 - in trunk/programs: us us_density_match

svn at svn.aucsolutions.com svn at svn.aucsolutions.com
Thu Aug 15 14:42:48 MDT 2019


Author: gegorbet
Date: 2019-08-15 20:42:48 +0000 (Thu, 15 Aug 2019)
New Revision: 2818

Modified:
   trunk/programs/us/us.cpp
   trunk/programs/us/us_win_data.cpp
   trunk/programs/us_density_match/us_density_match.cpp
Log:
add Density Matching to main us3 menu, minor mods to us_density_match

Modified: trunk/programs/us/us.cpp
===================================================================
--- trunk/programs/us/us.cpp	2019-08-15 18:24:50 UTC (rev 2817)
+++ trunk/programs/us/us.cpp	2019-08-15 20:42:48 UTC (rev 2818)
@@ -211,6 +211,7 @@
   addMenu(  P_VIEWCFA ,  tr( "View Raw C&FA Data"                ), utilities );
   addMenu(  P_VIEWXPN ,  tr( "View Raw &Optima Data"             ), utilities );
   addMenu(  P_VIEWTMST,  tr( "View &TimeState"                   ), utilities );
+  addMenu(  P_DENSMTCH,  tr( "%Density Matching"                 ), utilities );
 
   addMenu(  P_VIEWMWL ,  tr( "&View Multiwavelength Data"        ), multiwave );
   addMenu(  P_VIEWMSS ,  tr( "View MWL &S-Spectra"               ), multiwave );

Modified: trunk/programs/us/us_win_data.cpp
===================================================================
--- trunk/programs/us/us_win_data.cpp	2019-08-15 18:24:50 UTC (rev 2817)
+++ trunk/programs/us/us_win_data.cpp	2019-08-15 20:42:48 UTC (rev 2818)
@@ -26,7 +26,7 @@
     P_RPTGEN,       P_ROTORCAL,     P_LICENSE,
     P_VHWCOMB,      P_DDCOMB,       P_GLOMODL,
     P_VIEWCFA,      P_VIEWXPN,      P_VIEWTMST,
-    P_SPECFIT,      P_SPECDEC,
+    P_DENSMTCH,     P_SPECFIT,      P_SPECDEC,
 
     P_VIEWMWL,      P_VIEWMSS,      P_MWSPECF,  // MultiWavelength Menu
     P_MWFSIMU,
@@ -240,6 +240,11 @@
       QObject::tr( "View Time State"         )
     },
 
+    { P_DENSMTCH,  0, 0, "us_density_match",
+      QObject::tr( "Loading Density Matching" ),
+      QObject::tr( "Density Matching"         )
+    },
+
     { P_SPECFIT,   0, 0, "us_extinction",
       QObject::tr( "Loading Extinction Spectrum Fitter"  ),
       QObject::tr( "Fit Wavelength Scans to Extinction Spectrum"  )

Modified: trunk/programs/us_density_match/us_density_match.cpp
===================================================================
--- trunk/programs/us_density_match/us_density_match.cpp	2019-08-15 18:24:50 UTC (rev 2817)
+++ trunk/programs/us_density_match/us_density_match.cpp	2019-08-15 20:42:48 UTC (rev 2818)
@@ -147,17 +147,17 @@
             this,       SLOT( load_distro() ) );
 
    pb_rmvdist    = us_pushbutton( tr( "Remove Distribution(s)" ) );
-   pb_rmvdist->setEnabled( true );
+   pb_rmvdist->setEnabled( false );
    connect( pb_rmvdist, SIGNAL( clicked() ),
             this,       SLOT( remove_distro() ) );
 
    pb_mdlpars    = us_pushbutton( tr( "Set Model Parameters" ) );
-   pb_mdlpars->setEnabled( true );
+   pb_mdlpars->setEnabled( false );
    connect( pb_mdlpars, SIGNAL( clicked() ),
             this,       SLOT( set_mparms()   ) );
 
    pb_save       = us_pushbutton( tr( "Save" ) );
-   pb_save   ->setEnabled( true );
+   pb_save   ->setEnabled( false );
    connect( pb_save,    SIGNAL( clicked() ),
             this,       SLOT( save()         ) );
 
@@ -291,6 +291,8 @@
    alldis.clear();
    pfilts.clear();
    pb_refresh->setEnabled( false );
+   pb_mdlpars->setEnabled( false );
+   pb_save   ->setEnabled( false );
    pb_rmvdist->setEnabled( false );
    le_prefilt->setText( tr( "(no prefilter)" ) );
 }
@@ -719,7 +721,10 @@
 
    curr_distr = alldis.size() - 1;
 //   need_save  = ck_savepl->isChecked()  &&  !cont_loop;
-   pb_rmvdist->setEnabled( models.count() > 0 );
+   bool have_m  = ( models.count() > 0 );
+   pb_rmvdist->setEnabled( have_m );
+   pb_mdlpars->setEnabled( have_m );
+   pb_save   ->setEnabled( have_m );
 
    // Notify user of need to set D2O-percent, label, density model values
    QString qmsg = tr( "%1 models are loaded.\n\nIn the dialog to follow,\n"



More information about the us-commits mailing list