Changeset 6c8fb2c in sasview
- Timestamp:
- Apr 11, 2017 6:06:56 AM (8 years ago)
- 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:
- 83eb5208
- Parents:
- 9687d58
- Location:
- src/sas/qtgui
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/GuiManager.py
r1970780 r6c8fb2c 30 30 # Perspectives 31 31 import Perspectives 32 #from sas.qtgui.Perspectives.Invariant.InvariantPerspective import InvariantWindow 33 #from sas.qtgui.Perspectives.Fitting.FittingPerspective import FittingWindow 32 from sas.qtgui.Perspectives.Fitting.FittingPerspective import FittingWindow 34 33 from sas.qtgui.DataExplorer import DataExplorerWindow 35 34 -
src/sas/qtgui/Perspectives/Fitting/FittingPerspective.py
r454670d r6c8fb2c 8 8 9 9 from FittingWidget import FittingWidget 10 from FitPage import FitPage 10 11 11 12 class FittingWindow(QtGui.QTabWidget): -
src/sas/qtgui/Perspectives/Fitting/FittingWidget.py
r1970780 r6c8fb2c 164 164 self.updateQRange() 165 165 self.cmdFit.setEnabled(True) 166 self.boxWeighting.setEnabled(True) 167 self.cmdMaskEdit.setEnabled(True) 168 # Switch off txtNpts related controls 169 self.txtNpts.setEnabled(False) 170 self.txtNptsFit.setEnabled(False) 171 self.chkLogData.setEnabled(False) 166 172 167 173 def acceptsData(self): … … 204 210 self.onSelectModel() 205 211 212 def toggleLogData(self, isChecked): 213 """ Toggles between log and linear data sets """ 214 pass 215 206 216 def initializeControls(self): 207 217 """ … … 210 220 self.cmdFit.setEnabled(False) 211 221 self.cmdPlot.setEnabled(True) 222 self.cmdComputePoints.setVisible(False) # probably redundant 212 223 self.chkPolydispersity.setEnabled(True) 213 224 self.chkPolydispersity.setCheckState(False) … … 220 231 self.tabFitting.setTabEnabled(TAB_MAGNETISM, False) 221 232 self.lblChi2Value.setText("---") 233 # group boxes 234 self.boxWeighting.setEnabled(False) 235 self.cmdMaskEdit.setEnabled(False) 222 236 223 237 def initializeSignals(self): … … 229 243 self.cbCategory.currentIndexChanged.connect(self.onSelectCategory) 230 244 self.cbModel.currentIndexChanged.connect(self.onSelectModel) 245 self.cbSmearing.currentIndexChanged.connect(self.onSelectSmearing) 231 246 # Checkboxes 232 247 self.chk2DView.toggled.connect(self.toggle2D) 233 248 self.chkPolydispersity.toggled.connect(self.togglePoly) 234 249 self.chkMagnetism.toggled.connect(self.toggleMagnetism) 250 self.chkLogData.toggled.connect(self.toggleLogData) 235 251 # Buttons 236 252 self.cmdFit.clicked.connect(self.onFit) 237 253 self.cmdPlot.clicked.connect(self.onPlot) 254 self.cmdMaskEdit.clicked.connect(self.onMaskEdit) 255 self.cmdReset.clicked.connect(self.onReset) 238 256 # Line edits 239 257 self.txtNpts.editingFinished.connect(self.onNpts) 240 258 self.txtMinRange.editingFinished.connect(self.onMinRange) 241 259 self.txtMaxRange.editingFinished.connect(self.onMaxRange) 260 self.txtSmearUp.editingFinished.connect(self.onSmearUp) 261 self.txtSmearDown.editingFinished.connect(self.onSmearDown) 242 262 243 263 # Respond to change in parameters from the UI … … 315 335 # Populate the models combobox 316 336 self.cbModel.addItems(sorted([model for (model, _) in model_list])) 337 338 def onSelectSmearing(self): 339 """ 340 Select Smearing type from list 341 """ 342 pass 343 344 def onSmearUp(self): 345 """ 346 Update state based on entered smear value 347 """ 348 pass 349 350 def onSmearDown(self): 351 """ 352 Update state based on entered smear value 353 """ 354 pass 317 355 318 356 def onPolyModelChange(self, item): … … 549 587 return 550 588 # set Q range labels on the main tab 551 self.lblMinRangeDef.setText(str(self.q_range_min))589 #self.lblMinRangeDef.setText(str(self.q_range_min)) 552 590 if self.model_is_loaded: 553 591 self.onPlot() … … 567 605 self.onPlot() 568 606 607 def onMaskEdit(self): 608 """ 609 Callback for running the mask editor 610 """ 611 pass 612 613 def onReset(self): 614 """ 615 Callback for resetting qmin/qmax 616 """ 617 pass 618 569 619 def setDefaultStructureCombo(self): 570 620 """ … … 652 702 self.txtMinRange.setText(str(self.q_range_min)) 653 703 self.txtNpts.setText(str(self.npts)) 704 self.txtNptsFit.setText(str(self.npts)) 654 705 655 706 def SASModelToQModel(self, model_name, structure_factor=None): -
src/sas/qtgui/Perspectives/Fitting/UI/FittingWidgetUI.ui
rf182f93 r6c8fb2c 8 8 <y>0</y> 9 9 <width>514</width> 10 <height> 721</height>10 <height>669</height> 11 11 </rect> 12 12 </property> … … 37 37 <size> 38 38 <width>459</width> 39 <height>20</height> 40 </size> 41 </property> 42 </spacer> 43 </item> 44 <item row="2" column="3"> 45 <widget class="QPushButton" name="cmdPlot"> 46 <property name="sizePolicy"> 47 <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> 48 <horstretch>0</horstretch> 49 <verstretch>0</verstretch> 50 </sizepolicy> 51 </property> 52 <property name="minimumSize"> 53 <size> 54 <width>75</width> 55 <height>23</height> 56 </size> 57 </property> 58 <property name="text"> 59 <string>Show Plot</string> 60 </property> 61 </widget> 62 </item> 63 <item row="2" column="4"> 64 <widget class="QPushButton" name="cmdFit"> 65 <property name="sizePolicy"> 66 <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> 67 <horstretch>0</horstretch> 68 <verstretch>0</verstretch> 69 </sizepolicy> 70 </property> 71 <property name="minimumSize"> 72 <size> 73 <width>75</width> 74 <height>23</height> 75 </size> 76 </property> 77 <property name="text"> 78 <string>Fit</string> 79 </property> 80 </widget> 81 </item> 82 <item row="2" column="5"> 83 <widget class="QPushButton" name="cmdHelp"> 84 <property name="sizePolicy"> 85 <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> 86 <horstretch>0</horstretch> 87 <verstretch>0</verstretch> 88 </sizepolicy> 89 </property> 90 <property name="minimumSize"> 91 <size> 92 <width>75</width> 93 <height>23</height> 94 </size> 95 </property> 96 <property name="text"> 97 <string>Help</string> 98 </property> 99 </widget> 100 </item> 101 <item row="2" column="0" colspan="3"> 102 <spacer name="horizontalSpacer"> 103 <property name="orientation"> 104 <enum>Qt::Horizontal</enum> 105 </property> 106 <property name="sizeHint" stdset="0"> 107 <size> 108 <width>273</width> 39 109 <height>20</height> 40 110 </size> … … 346 416 </item> 347 417 <item row="0" column="2"> 348 <widget class="QPushButton" name=" pushButton_3">418 <widget class="QPushButton" name="cmdReset"> 349 419 <property name="text"> 350 420 <string>Reset</string> … … 353 423 </item> 354 424 <item row="1" column="2"> 355 <widget class="QPushButton" name=" pushButton_4">425 <widget class="QPushButton" name="cmdMaskEdit"> 356 426 <property name="text"> 357 427 <string>Mask Editor</string> … … 381 451 </item> 382 452 <item row="0" column="2"> 383 <widget class="QCheckBox" name="ch eckBox">453 <widget class="QCheckBox" name="chkLogData"> 384 454 <property name="text"> 385 455 <string>Log spaced points</string> … … 408 478 </item> 409 479 <item row="2" column="3"> 410 <widget class="QPushButton" name=" pushButton_5">480 <widget class="QPushButton" name="cmdComputePoints"> 411 481 <property name="text"> 412 482 <string>Compute</string> … … 414 484 </widget> 415 485 </item> 486 <item row="1" column="2"> 487 <spacer name="horizontalSpacer_7"> 488 <property name="orientation"> 489 <enum>Qt::Horizontal</enum> 490 </property> 491 <property name="sizeHint" stdset="0"> 492 <size> 493 <width>40</width> 494 <height>20</height> 495 </size> 496 </property> 497 </spacer> 498 </item> 416 499 </layout> 417 500 </item> … … 420 503 </item> 421 504 <item row="2" column="0"> 422 <widget class="QGroupBox" name=" groupBox_5">505 <widget class="QGroupBox" name="boxWeighting"> 423 506 <property name="title"> 424 507 <string>Weighting</string> … … 490 573 <layout class="QGridLayout" name="gridLayout_13"> 491 574 <item row="0" column="0"> 492 <widget class="QComboBox" name="c omboBox_4">575 <widget class="QComboBox" name="cbSmearing"> 493 576 <property name="currentIndex"> 494 577 <number>0</number> … … 519 602 <layout class="QGridLayout" name="gridLayout_11"> 520 603 <item row="0" column="0"> 521 <widget class="QLabel" name="l abel_9">604 <widget class="QLabel" name="lblSmearUp"> 522 605 <property name="text"> 523 606 <string><html><head/><body><p>dQ<span style=" vertical-align:sub;">low</span></p></body></html></string> … … 526 609 </item> 527 610 <item row="0" column="1"> 528 <widget class="QLineEdit" name=" lineEdit_6"/>611 <widget class="QLineEdit" name="txtSmearUp"/> 529 612 </item> 530 613 <item row="0" column="2"> … … 537 620 </item> 538 621 <item row="1" column="0"> 539 <widget class="QLabel" name="l abel_13">622 <widget class="QLabel" name="lblSmearDown"> 540 623 <property name="text"> 541 624 <string><html><head/><body><p>dQ<span style=" vertical-align:sub;">high</span></p></body></html></string> … … 544 627 </item> 545 628 <item row="1" column="1"> 546 <widget class="QLineEdit" name=" lineEdit_7"/>629 <widget class="QLineEdit" name="txtSmearDown"/> 547 630 </item> 548 631 <item row="1" column="2"> … … 570 653 </item> 571 654 </layout> 572 <zorder>c omboBox_4</zorder>655 <zorder>cbSmearing</zorder> 573 656 <zorder>horizontalSpacer_2</zorder> 574 657 </widget> … … 651 734 </widget> 652 735 </item> 653 <item row="2" column="3">654 <widget class="QPushButton" name="cmdPlot">655 <property name="sizePolicy">656 <sizepolicy hsizetype="Fixed" vsizetype="Fixed">657 <horstretch>0</horstretch>658 <verstretch>0</verstretch>659 </sizepolicy>660 </property>661 <property name="minimumSize">662 <size>663 <width>75</width>664 <height>23</height>665 </size>666 </property>667 <property name="text">668 <string>Show Plot</string>669 </property>670 </widget>671 </item>672 <item row="2" column="4">673 <widget class="QPushButton" name="cmdFit">674 <property name="sizePolicy">675 <sizepolicy hsizetype="Fixed" vsizetype="Fixed">676 <horstretch>0</horstretch>677 <verstretch>0</verstretch>678 </sizepolicy>679 </property>680 <property name="minimumSize">681 <size>682 <width>75</width>683 <height>23</height>684 </size>685 </property>686 <property name="text">687 <string>Fit</string>688 </property>689 </widget>690 </item>691 <item row="2" column="5">692 <widget class="QPushButton" name="cmdHelp">693 <property name="sizePolicy">694 <sizepolicy hsizetype="Fixed" vsizetype="Fixed">695 <horstretch>0</horstretch>696 <verstretch>0</verstretch>697 </sizepolicy>698 </property>699 <property name="minimumSize">700 <size>701 <width>75</width>702 <height>23</height>703 </size>704 </property>705 <property name="text">706 <string>Help</string>707 </property>708 </widget>709 </item>710 <item row="2" column="0" colspan="3">711 <spacer name="horizontalSpacer">712 <property name="orientation">713 <enum>Qt::Horizontal</enum>714 </property>715 <property name="sizeHint" stdset="0">716 <size>717 <width>273</width>718 <height>20</height>719 </size>720 </property>721 </spacer>722 </item>723 736 </layout> 724 737 </widget>
Note: See TracChangeset
for help on using the changeset viewer.