Changeset 5e66738 in sasview
- Timestamp:
- Jan 30, 2018 9:20:14 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:
- 14ec91c5
- Parents:
- da9a0722
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/Perspectives/Fitting/MultiConstraint.py
re147ce2 r5e66738 3 3 """ 4 4 import os 5 import webbrowser 6 7 # numpy methods required for the validator! Don't remove. 8 # pylint: disable=unused-import,unused-wildcard-import,redefined-builtin 5 9 from numpy import * 6 10 7 from PyQt5 import QtCore8 from PyQt5 import QtGui9 11 from PyQt5 import QtWidgets 10 import webbrowser11 12 12 13 import sas.qtgui.Utilities.GuiUtils as GuiUtils … … 16 17 17 18 class MultiConstraint(QtWidgets.QDialog, Ui_MultiConstraintUI): 19 """ 20 Logic class for interacting with MultiConstrainedUI view 21 """ 18 22 def __init__(self, parent=None, params=None): 23 """ 24 parent: ConstraintWidget object 25 params: tuple of strings describing model parameters 26 """ 19 27 super(MultiConstraint, self).__init__() 20 28 … … 23 31 self.setModal(True) 24 32 self.params = params 33 self.parent = parent 25 34 26 35 self.setupLabels() … … 37 46 def revert(self): 38 47 """ 39 switch M1 <-> M248 Swap parameters in the view 40 49 """ 41 50 # Switch parameters … … 103 112 # 3. parameter name should be a separate word, but can have "()[]*+-/ " around 104 113 valid_neighbours = "()[]*+-/ " 105 has_only_parameter = False106 114 start_loc = parameter_string_start -1 107 115 end_loc = parameter_string_end 108 if not any([constraint_text[start_loc] == ch ar for charin valid_neighbours]):116 if not any([constraint_text[start_loc] == ch for ch in valid_neighbours]): 109 117 return False 110 118 if end_loc < len(constraint_text): 111 if not any([constraint_text[end_loc] == ch ar for charin valid_neighbours]):119 if not any([constraint_text[end_loc] == ch for ch in valid_neighbours]): 112 120 return False 113 121
Note: See TracChangeset
for help on using the changeset viewer.