Changeset 33c0561 in sasview for src/sas/qtgui/Perspectives
- Timestamp:
- Jan 9, 2019 6:09:39 AM (6 years ago)
- Branches:
- ESS_GUI, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_opencl, ESS_GUI_sync_sascalc
- Children:
- cf9f39e
- Parents:
- bbcf9f0
- Location:
- src/sas/qtgui/Perspectives/Fitting
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/Perspectives/Fitting/ComplexConstraint.py
r9c207f5 r33c0561 30 30 self.setupUi(self) 31 31 self.setModal(True) 32 33 # disable the context help icon 34 windowFlags = self.windowFlags() 35 self.setWindowFlags(windowFlags & ~QtCore.Qt.WindowContextHelpButtonHint) 32 36 33 37 # Useful globals … … 61 65 self.cmdOK.clicked.connect(self.onApply) 62 66 self.cmdHelp.clicked.connect(self.onHelp) 67 self.cmdAddAll.clicked.connect(self.onSetAll) 68 63 69 self.txtConstraint.editingFinished.connect(self.validateFormula) 64 70 self.cbModel1.currentIndexChanged.connect(self.onModelIndexChange) … … 78 84 self.setupParamWidgets() 79 85 86 80 87 self.setupMenu() 81 88 82 89 def setupMenu(self): 83 # Add menu to the Applybutton, if necessary90 # Show Add All button, if necessary 84 91 if self.cbModel1.currentText() ==self.cbModel2.currentText(): 85 self.cmdOK.setArrowType(QtCore.Qt.NoArrow) 86 self.cmdOK.setPopupMode(QtWidgets.QToolButton.DelayedPopup) 87 self.cmdOK.setMenu(None) 88 return 89 self.all_menu = QtWidgets.QMenu() 90 self.actionAddAll = QtWidgets.QAction(self) 91 self.actionAddAll.setObjectName("actionAddAll") 92 self.actionAddAll.setText(QtCore.QCoreApplication.translate("self", "Add all")) 93 ttip = "Add constraints between all identically named parameters in both fitpages" 94 self.actionAddAll.setToolTip(ttip) 95 self.actionAddAll.triggered.connect(self.onSetAll) 96 self.all_menu.addAction(self.actionAddAll) 97 # https://bugreports.qt.io/browse/QTBUG-13663 98 self.all_menu.setToolTipsVisible(True) 99 self.cmdOK.setPopupMode(QtWidgets.QToolButton.MenuButtonPopup) 100 self.cmdOK.setArrowType(QtCore.Qt.DownArrow) 101 self.cmdOK.setMenu(self.all_menu) 92 self.cmdAddAll.setVisible(False) 93 else: 94 self.cmdAddAll.setVisible(True) 95 return 102 96 103 97 def setupParamWidgets(self): … … 127 121 if len(items1)==0: 128 122 self.cmdOK.setEnabled(False) 123 self.cmdAddAll.setEnabled(False) 129 124 txt = "No parameters in model "+self.tab_names[0] +\ 130 125 " are available for constraining." … … 132 127 else: 133 128 self.cmdOK.setEnabled(True) 129 self.cmdAddAll.setEnabled(True) 134 130 txt = "" 135 131 self.lblWarning.setText(txt) … … 193 189 if not formula_is_valid: 194 190 self.cmdOK.setEnabled(False) 191 self.cmdAddAll.setEnabled(False) 195 192 self.txtConstraint.setStyleSheet("QLineEdit {background-color: red;}") 196 193 else: 197 194 self.cmdOK.setEnabled(True) 195 self.cmdAddAll.setEnabled(True) 198 196 self.txtConstraint.setStyleSheet("QLineEdit {background-color: white;}") 199 197 -
src/sas/qtgui/Perspectives/Fitting/ConstraintWidget.py
rbbcf9f0 r33c0561 112 112 self.parent = parent 113 113 self.setupUi(self) 114 114 115 self.currentType = "FitPage" 115 116 # Page id for fitting -
src/sas/qtgui/Perspectives/Fitting/FittingOptions.py
r8873ab7 r33c0561 41 41 super(FittingOptions, self).__init__(parent) 42 42 self.setupUi(self) 43 # disable the context help icon 44 self.setWindowFlags(self.windowFlags() & ~QtCore.Qt.WindowContextHelpButtonHint) 43 45 44 46 self.config = config -
src/sas/qtgui/Perspectives/Fitting/GPUOptions.py
r8479735 r33c0561 45 45 self.parent = parent 46 46 self.setupUi(self) 47 # disable the context help icon 48 self.setWindowFlags(self.windowFlags() & ~QtCore.Qt.WindowContextHelpButtonHint) 47 49 self.addOpenCLOptions() 48 50 self.createLinks() -
src/sas/qtgui/Perspectives/Fitting/MultiConstraint.py
r09e0c32 r33c0561 10 10 11 11 from PyQt5 import QtWidgets 12 from PyQt5 import QtCore 12 13 13 14 import sas.qtgui.Utilities.GuiUtils as GuiUtils … … 29 30 self.setupUi(self) 30 31 self.setModal(True) 32 33 # disable the context help icon 34 windowFlags = self.windowFlags() 35 self.setWindowFlags(windowFlags & ~QtCore.Qt.WindowContextHelpButtonHint) 36 31 37 self.params = params 32 38 self.parent = parent -
src/sas/qtgui/Perspectives/Fitting/UI/ComplexConstraintUI.ui
r2e5081b r33c0561 139 139 <property name="sizeHint" stdset="0"> 140 140 <size> 141 <width> 88</width>141 <width>58</width> 142 142 <height>20</height> 143 143 </size> … … 146 146 </item> 147 147 <item> 148 <widget class="QToolButton" name="cmdOK"> 148 <widget class="QToolButton" name="cmdAddAll"> 149 <property name="sizePolicy"> 150 <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> 151 <horstretch>0</horstretch> 152 <verstretch>0</verstretch> 153 </sizepolicy> 154 </property> 149 155 <property name="minimumSize"> 150 156 <size> … … 154 160 </property> 155 161 <property name="toolTip"> 162 <string><html><head/><body><p>Add constraints between all identically named parameters in both fitpages</p></body></html></string> 163 </property> 164 <property name="text"> 165 <string>Add All</string> 166 </property> 167 <property name="popupMode"> 168 <enum>QToolButton::InstantPopup</enum> 169 </property> 170 <property name="toolButtonStyle"> 171 <enum>Qt::ToolButtonTextOnly</enum> 172 </property> 173 <property name="autoRaise"> 174 <bool>false</bool> 175 </property> 176 <property name="arrowType"> 177 <enum>Qt::DownArrow</enum> 178 </property> 179 </widget> 180 </item> 181 <item> 182 <widget class="QToolButton" name="cmdOK"> 183 <property name="sizePolicy"> 184 <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> 185 <horstretch>0</horstretch> 186 <verstretch>0</verstretch> 187 </sizepolicy> 188 </property> 189 <property name="minimumSize"> 190 <size> 191 <width>93</width> 192 <height>28</height> 193 </size> 194 </property> 195 <property name="toolTip"> 156 196 <string><html><head/><body><p>Add the constraint as defined by the above expression.</p></body></html></string> 157 197 </property> … … 170 210 <property name="arrowType"> 171 211 <enum>Qt::DownArrow</enum> 172 </property>173 </widget>174 </item>175 <item>176 <widget class="QPushButton" name="cmdCancel">177 <property name="toolTip">178 <string><html><head/><body><p>Close the window.</p></body></html></string>179 </property>180 <property name="text">181 <string>Close</string>182 212 </property> 183 213 </widget> … … 195 225 </widget> 196 226 <resources/> 197 <connections> 198 <connection> 199 <sender>cmdCancel</sender> 200 <signal>clicked()</signal> 201 <receiver>ComplexConstraintUI</receiver> 202 <slot>reject()</slot> 203 <hints> 204 <hint type="sourcelabel"> 205 <x>230</x> 206 <y>144</y> 207 </hint> 208 <hint type="destinationlabel"> 209 <x>179</x> 210 <y>82</y> 211 </hint> 212 </hints> 213 </connection> 214 </connections> 227 <connections/> 215 228 </ui>
Note: See TracChangeset
for help on using the changeset viewer.