Changeset 91ad45c in sasview for src


Ignore:
Timestamp:
Mar 1, 2018 6:02:28 AM (6 years ago)
Author:
Piotr Rozyczko <rozyczko@…>
Branches:
ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc
Children:
e4c475b7
Parents:
fde5bcd
Message:

Chain fitting for constraint batch fitting

Location:
src/sas/qtgui/Perspectives/Fitting
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • src/sas/qtgui/Perspectives/Fitting/ConstraintWidget.py

    rc736154 r91ad45c  
    3232        self.page_id = 301 
    3333 
     34        # Are we chain fitting? 
     35        self.is_chain_fitting = False 
     36 
    3437        # Remember previous content of modified cell 
    3538        self.current_cell = "" 
     
    6669        self.tblTabList.customContextMenuRequested.connect(self.showModelContextMenu) 
    6770 
     71        # Single Fit is the default, so disable chainfit 
     72        self.chkChain.setVisible(False) 
     73 
    6874        # disabled constraint  
    6975        labels = ['Constraint'] 
     
    8692        self.cmdFit.clicked.connect(self.onFit) 
    8793        self.cmdHelp.clicked.connect(self.onHelp) 
     94        self.chkChain.toggled.connect(self.onChainFit) 
    8895 
    8996        # QTableWidgets 
     
    117124        source = self.sender().objectName() 
    118125        self.currentType = "BatchPage" if source == "btnBatch" else "FitPage" 
     126        self.chkChain.setVisible(source=="btnBatch") 
    119127        self.initializeFitList() 
    120128 
     
    130138        """ 
    131139        return [tab for tab in self.tabs_for_fitting if self.tabs_for_fitting[tab]] 
     140 
     141    def onChainFit(self, is_checked): 
     142        """ 
     143        Respond to selecting the Chain Fit checkbox 
     144        """ 
     145        self.is_chain_fitting = is_checked 
    132146 
    133147    def onFit(self): 
     
    192206                             page_id=page_ids, 
    193207                             updatefn=updater, 
    194                              completefn=completefn) 
     208                             completefn=completefn, 
     209                             reset_flag=self.is_chain_fitting) 
    195210 
    196211        if LocalConfig.USING_TWISTED: 
     
    370385        object = ObjectLibrary.getObject(tab) 
    371386        if not isinstance(object, FittingWidget): return False 
    372         if object.data is None: return False 
     387        if not object.data_is_loaded : return False 
    373388        return True 
    374389 
  • src/sas/qtgui/Perspectives/Fitting/FittingWidget.py

    rfde5bcd r91ad45c  
    11171117                            page_id=[[self.page_id]], 
    11181118                            updatefn=updater, 
    1119                             completefn=completefn) 
     1119                            completefn=completefn, 
     1120                            reset_flag=self.is_chain_fitting) 
    11201121 
    11211122        if LocalConfig.USING_TWISTED: 
  • src/sas/qtgui/Perspectives/Fitting/UI/ConstraintWidgetUI.ui

    rbe8f4b0 r91ad45c  
    77    <x>0</x> 
    88    <y>0</y> 
    9     <width>340</width> 
    10     <height>441</height> 
     9    <width>428</width> 
     10    <height>457</height> 
    1111   </rect> 
    1212  </property> 
     
    1414   <string>Constrained and Simultaneous Fit</string> 
    1515  </property> 
    16   <layout class="QGridLayout" name="gridLayout_3"> 
     16  <layout class="QGridLayout" name="gridLayout"> 
    1717   <item row="0" column="0"> 
    1818    <widget class="QGroupBox" name="groupBox"> 
     
    2020      <string>Source choice for simultaneous fitting</string> 
    2121     </property> 
    22      <layout class="QGridLayout" name="gridLayout"> 
    23       <item row="0" column="0"> 
     22     <layout class="QVBoxLayout" name="verticalLayout"> 
     23      <item> 
    2424       <layout class="QHBoxLayout" name="horizontalLayout_2"> 
    2525        <item> 
     
    4141        </item> 
    4242        <item> 
     43         <widget class="QCheckBox" name="chkChain"> 
     44          <property name="text"> 
     45           <string>Chained fit</string> 
     46          </property> 
     47         </widget> 
     48        </item> 
     49        <item> 
    4350         <spacer name="horizontalSpacer"> 
    4451          <property name="orientation"> 
     
    4754          <property name="sizeHint" stdset="0"> 
    4855           <size> 
    49             <width>198</width> 
    50             <height>20</height> 
     56            <width>18</width> 
     57            <height>17</height> 
    5158           </size> 
    5259          </property> 
     
    5562       </layout> 
    5663      </item> 
    57       <item row="1" column="0"> 
     64      <item> 
    5865       <widget class="QTableWidget" name="tblTabList"> 
    5966        <property name="sizePolicy"> 
Note: See TracChangeset for help on using the changeset viewer.