Changeset d6b8a1d in sasview for src/sas/qtgui/Perspectives
- Timestamp:
- Nov 9, 2017 8:43:56 AM (7 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:
- 53c771e
- Parents:
- fbfc488
- git-author:
- Piotr Rozyczko <rozyczko@…> (11/07/17 08:29:59)
- git-committer:
- Piotr Rozyczko <rozyczko@…> (11/09/17 08:43:56)
- Location:
- src/sas/qtgui/Perspectives/Fitting
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/Perspectives/Fitting/FittingOptions.py
r4992ff2 rd6b8a1d 88 88 validator.setBottom(0) 89 89 elif f_type == float: 90 validator = QtGui.QDoubleValidator()90 validator = GuiUtils.DoubleValidator() 91 91 validator.setBottom(0) 92 92 else: -
src/sas/qtgui/Perspectives/Fitting/FittingWidget.py
rfbfc488 rd6b8a1d 13 13 from PyQt5 import QtWidgets 14 14 from PyQt5 import QtWebKitWidgets 15 # Officially QtWebEngineWidgets are the way to display HTML in Qt5, 16 # but this module isn't ported to PyQt5 yet... 17 # let's wait. In the meantime no Help. 18 #from PyQt5 import QtWebEngineWidgets 15 19 16 20 from sasmodels import product … … 51 55 DEFAULT_POLYDISP_FUNCTION = 'gaussian' 52 56 53 USING_TWISTED = True 57 #USING_TWISTED = True 58 USING_TWISTED = False 54 59 55 60 class ToolTippedItemModel(QtGui.QStandardItemModel): … … 469 474 menu = QtWidgets.QMenu() 470 475 label = QtWidgets.QLabel(msg) 471 action = Qt Gui.QWidgetAction(self)476 action = QtWidgets.QWidgetAction(self) 472 477 action.setDefaultWidget(label) 473 478 menu.addAction(action) … … 478 483 Respond to select Model from list event 479 484 """ 480 model = s tr(self.cbModel.currentText())485 model = self.cbModel.currentText() 481 486 482 487 # empty combobox forced to be read … … 534 539 Select Category from list 535 540 """ 536 category = s tr(self.cbCategory.currentText())541 category = self.cbCategory.currentText() 537 542 # Check if the user chose "Choose category entry" 538 543 if category == CATEGORY_DEFAULT: … … 680 685 helpfile = "mag_help.html" 681 686 help_location = tree_location + helpfile 687 688 content = QtCore.QUrl(help_location) 682 689 self.helpView.load(QtCore.QUrl(help_location)) 683 690 self.helpView.show() … … 733 740 fitter = Fit() 734 741 data = GuiUtils.dataFromItem(fit_index) 735 fitter.set_model(model, fit_id, params_to_fit, data=data, 742 try: 743 fitter.set_model(model, fit_id, params_to_fit, data=data, 736 744 constraints=constraints) 745 except ValueError as ex: 746 logging.error("Setting model parameters failed with: %s" % ex) 747 return 748 737 749 qmin, qmax, _ = self.logic.computeRangeFromData(data) 738 750 fitter.set_data(data=data, id=fit_id, smearer=smearer, qmin=qmin, … … 1522 1534 residuals_plot.id = "Residual " + residuals_plot.id 1523 1535 self.createNewIndex(residuals_plot) 1524 self.communicate.plotUpdateSignal.emit([residuals_plot])1536 #self.communicate.plotUpdateSignal.emit([residuals_plot]) 1525 1537 1526 1538 def calcException(self, etype, value, tb): -
src/sas/qtgui/Perspectives/Fitting/OptionsWidget.py
r4992ff2 rd6b8a1d 8 8 9 9 from sas.qtgui.Plotting.PlotterData import Data2D 10 import sas.qtgui.Utilities.GuiUtils as GuiUtils 10 11 11 12 # Local UI … … 66 67 67 68 # Let only floats in the range edits 68 self.txtMinRange.setValidator( QtGui.QDoubleValidator())69 self.txtMaxRange.setValidator( QtGui.QDoubleValidator())69 self.txtMinRange.setValidator(GuiUtils.DoubleValidator()) 70 self.txtMaxRange.setValidator(GuiUtils.DoubleValidator()) 70 71 # Let only ints in the number of points edit 71 72 self.txtNpts.setValidator(QtGui.QIntValidator()) -
src/sas/qtgui/Perspectives/Fitting/SmearingWidget.py
r4992ff2 rd6b8a1d 8 8 from sas.qtgui.Plotting.PlotterData import Data1D 9 9 from sas.qtgui.Plotting.PlotterData import Data2D 10 import sas.qtgui.Utilities.GuiUtils as GuiUtils 10 11 11 12 # Local UI … … 51 52 self.parent = parent 52 53 # Let only floats in the line edits 53 self.txtSmearDown.setValidator( QtGui.QDoubleValidator())54 self.txtSmearUp.setValidator( QtGui.QDoubleValidator())54 self.txtSmearDown.setValidator(GuiUtils.DoubleValidator()) 55 self.txtSmearUp.setValidator(GuiUtils.DoubleValidator()) 55 56 56 57 # Attach slots -
src/sas/qtgui/Perspectives/Fitting/ViewDelegate.py
rfbfc488 rd6b8a1d 4 4 5 5 import sas.qtgui.Utilities.GuiUtils as GuiUtils 6 7 class CommaLessValidator(QtGui.QDoubleValidator):8 """9 Custom double validator which doesn't allow for commas to be used as decimal point10 """11 pass12 6 13 7 class ModelViewDelegate(QtWidgets.QStyledItemDelegate): … … 87 81 if index.column() == self.param_value: #only in the value column 88 82 editor = QtWidgets.QLineEdit(widget) 89 validator = QtGui.QDoubleValidator()83 validator = GuiUtils.DoubleValidator() 90 84 editor.setValidator(validator) 91 85 return editor … … 168 162 elif index.column() in self.editableParameters(): 169 163 self.editor = QtWidgets.QLineEdit(widget) 170 validator = QtGui.QDoubleValidator()164 validator = GuiUtils.DoubleValidator() 171 165 self.editor.setValidator(validator) 172 166 return self.editor … … 246 240 if index.column() in self.editableParameters(): 247 241 editor = QtWidgets.QLineEdit(widget) 248 validator = QtGui.QDoubleValidator()242 validator = GuiUtils.DoubleValidator() 249 243 editor.setValidator(validator) 250 244 return editor
Note: See TracChangeset
for help on using the changeset viewer.