Changeset 1543f0c in sasview
- Timestamp:
- Nov 10, 2017 5:24:52 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:
- f1f3e6a
- Parents:
- 1ba88515
- Location:
- src/sas/qtgui
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/MainWindow/UI/MainWindowUI.ui
r06ce180 r1543f0c 25 25 <y>0</y> 26 26 <width>915</width> 27 <height>2 6</height>27 <height>21</height> 28 28 </rect> 29 29 </property> … … 504 504 <string>GPU Options</string> 505 505 </property> 506 <property name="softKeyRole">507 <enum>QAction::NoSoftKey</enum>508 </property>509 506 </action> 510 507 </widget> -
src/sas/qtgui/Perspectives/Fitting/GPUOptions.py
rf629e62f r1543f0c 7 7 8 8 import sas.qtgui.Utilities.GuiUtils as GuiUtils 9 from PyQt 4 import QtGui, QtCore, QtWebKit9 from PyQt5 import QtGui, QtCore, QtWebKit, QtWidgets 10 10 from sas.qtgui.Perspectives.Fitting.UI.GPUOptionsUI import Ui_GPUOptions 11 11 from sas.qtgui.Perspectives.Fitting.UI.GPUTestResultsUI import Ui_GPUTestResults … … 18 18 19 19 try: 20 _encoding = Qt Gui.QApplication.UnicodeUTF820 _encoding = QtWidgets.QApplication.UnicodeUTF8 21 21 def _translate(context, text, disambig): 22 return Qt Gui.QApplication.translate(context, text, disambig, _encoding)22 return QtWidgets.QApplication.translate(context, text, disambig, _encoding) 23 23 except AttributeError: 24 24 def _translate(context, text, disambig): 25 return Qt Gui.QApplication.translate(context, text, disambig)26 27 28 class GPUOptions(Qt Gui.QDialog, Ui_GPUOptions):25 return QtWidgets.QApplication.translate(context, text, disambig) 26 27 28 class GPUOptions(QtWidgets.QDialog, Ui_GPUOptions): 29 29 """ 30 30 OpenCL Dialog to select the desired OpenCL driver … … 39 39 self.setupUi(self) 40 40 self.addOpenCLOptions() 41 self.setFixedSize(self.size())42 41 self.createLinks() 43 42 … … 51 50 for title, descr in cl_tuple: 52 51 # Create an item for each openCL option 53 check_box = Qt Gui.QCheckBox()52 check_box = QtWidgets.QCheckBox() 54 53 check_box.setObjectName(_fromUtf8(descr)) 55 54 check_box.setText(_translate("GPUOptions", descr, None)) … … 59 58 check_box.click() 60 59 self.clicked = True 61 self.openCLCheckBoxGroup.setMinimumWidth( 62 self.optionsLayout.sizeHint().width()) 63 self.setMinimumWidth(self.verticalLayout.sizeHint().width()) 60 self.openCLCheckBoxGroup.setMinimumWidth(self.optionsLayout.sizeHint().width()+10) 64 61 65 62 def createLinks(self): … … 69 66 self.testButton.clicked.connect(self.testButtonClicked) 70 67 self.helpButton.clicked.connect(self.helpButtonClicked) 71 for item in self.openCLCheckBoxGroup.findChildren(Qt Gui.QCheckBox):68 for item in self.openCLCheckBoxGroup.findChildren(QtWidgets.QCheckBox): 72 69 item.clicked.connect(self.checked) 73 70 … … 77 74 """ 78 75 checked = None 79 for box in self.openCLCheckBoxGroup.findChildren(Qt Gui.QCheckBox):76 for box in self.openCLCheckBoxGroup.findChildren(QtWidgets.QCheckBox): 80 77 if box.isChecked() and (str(box.text()) == self.sas_open_cl or ( 81 78 str(box.text()) == "No OpenCL" and self.sas_open_cl == "")): … … 103 100 if 'sasmodels.kernelcl' in sys.modules: 104 101 sasmodels.kernelcl.ENV = None 102 from importlib import reload # assumed Python > 3.3 105 103 reload(sasmodels.core) 106 104 return no_opencl_msg … … 199 197 200 198 201 class GPUTestResults(Qt Gui.QDialog, Ui_GPUTestResults):199 class GPUTestResults(QtWidgets.QDialog, Ui_GPUTestResults): 202 200 """ 203 201 OpenCL Dialog to modify the OpenCL options … … 207 205 self.setupUi(self) 208 206 self.resultsText.setText(_translate("GPUTestResults", msg, None)) 209 self.setFixedSize(self.size())207 #self.setFixedSize(self.size()) 210 208 self.open() 211 209 -
src/sas/qtgui/Perspectives/Fitting/UI/GPUOptionsUI.ui
rf629e62f r1543f0c 7 7 <x>0</x> 8 8 <y>0</y> 9 <width>4 32</width>10 <height>24 1</height>9 <width>424</width> 10 <height>245</height> 11 11 </rect> 12 12 </property> 13 13 <property name="sizePolicy"> 14 <sizepolicy hsizetype=" Fixed" vsizetype="Fixed">14 <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> 15 15 <horstretch>0</horstretch> 16 16 <verstretch>0</verstretch> … … 22 22 <property name="windowIcon"> 23 23 <iconset> 24 <normaloff>../../../ UI/res/ball.ico</normaloff>../../../UI/res/ball.ico</iconset>24 <normaloff>../../../../../../../../../../../Users/UI/res/ball.ico</normaloff>../../../../../../../../../../../Users/UI/res/ball.ico</iconset> 25 25 </property> 26 <widget class="QWidget" name="verticalLayoutWidget_2"> 27 <property name="geometry"> 28 <rect> 29 <x>0</x> 30 <y>0</y> 31 <width>431</width> 32 <height>241</height> 33 </rect> 34 </property> 35 <layout class="QVBoxLayout" name="verticalLayout" stretch="5,1,0"> 36 <property name="sizeConstraint"> 37 <enum>QLayout::SetMinimumSize</enum> 38 </property> 39 <property name="margin"> 40 <number>10</number> 41 </property> 42 <item> 43 <widget class="QGroupBox" name="openCLCheckBoxGroup"> 44 <property name="title"> 45 <string>Available OpenCL Options</string> 46 </property> 47 <widget class="QWidget" name="verticalLayoutWidget"> 48 <property name="geometry"> 49 <rect> 50 <x>0</x> 51 <y>10</y> 52 <width>411</width> 53 <height>131</height> 54 </rect> 26 <layout class="QGridLayout" name="gridLayout_2"> 27 <item row="0" column="0"> 28 <layout class="QGridLayout" name="gridLayout"> 29 <item row="0" column="0" colspan="2"> 30 <widget class="QGroupBox" name="openCLCheckBoxGroup"> 31 <property name="sizePolicy"> 32 <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> 33 <horstretch>0</horstretch> 34 <verstretch>0</verstretch> 35 </sizepolicy> 55 36 </property> 56 <layout class="QVBoxLayout" name="optionsLayout"> 57 <property name="sizeConstraint"> 58 <enum>QLayout::SetMinimumSize</enum> 37 <property name="minimumSize"> 38 <size> 39 <width>300</width> 40 <height>150</height> 41 </size> 42 </property> 43 <property name="title"> 44 <string>Available OpenCL Options</string> 45 </property> 46 <widget class="QWidget" name="verticalLayoutWidget"> 47 <property name="geometry"> 48 <rect> 49 <x>10</x> 50 <y>20</y> 51 <width>391</width> 52 <height>141</height> 53 </rect> 59 54 </property> 60 <property name="bottomMargin"> 61 <number>0</number> 62 </property> 63 </layout> 55 <layout class="QVBoxLayout" name="optionsLayout"> 56 <property name="sizeConstraint"> 57 <enum>QLayout::SetMinimumSize</enum> 58 </property> 59 <property name="bottomMargin"> 60 <number>0</number> 61 </property> 62 </layout> 63 </widget> 64 64 </widget> 65 </widget> 66 </item> 67 <item> 68 <widget class="QLabel" name="warningMessage"> 69 <property name="sizePolicy"> 70 <sizepolicy hsizetype="Minimum" vsizetype="Preferred"> 71 <horstretch>0</horstretch> 72 <verstretch>0</verstretch> 73 </sizepolicy> 74 </property> 75 <property name="font"> 76 <font> 77 <pointsize>8</pointsize> 78 </font> 79 </property> 80 <property name="text"> 81 <string>WARNING: Running tests can take a few minutes!</string> 82 </property> 83 <property name="alignment"> 84 <set>Qt::AlignCenter</set> 85 </property> 86 </widget> 87 </item> 88 <item> 89 <layout class="QHBoxLayout" name="horizontalLayout"> 90 <property name="sizeConstraint"> 91 <enum>QLayout::SetMinimumSize</enum> 92 </property> 93 <item> 94 <widget class="QPushButton" name="okButton"> 95 <property name="text"> 96 <string>OK</string> 97 </property> 98 </widget> 99 </item> 100 <item> 101 <widget class="QPushButton" name="resetButton"> 102 <property name="text"> 103 <string>Reset</string> 104 </property> 105 </widget> 106 </item> 107 <item> 108 <widget class="QPushButton" name="testButton"> 109 <property name="text"> 110 <string>Test</string> 111 </property> 112 </widget> 113 </item> 114 <item> 115 <widget class="QPushButton" name="helpButton"> 116 <property name="text"> 117 <string>Help</string> 118 </property> 119 <property name="autoDefault"> 120 <bool>true</bool> 121 </property> 122 </widget> 123 </item> 124 </layout> 125 </item> 126 </layout> 127 </widget> 65 </item> 66 <item row="2" column="1"> 67 <layout class="QHBoxLayout" name="horizontalLayout"> 68 <property name="sizeConstraint"> 69 <enum>QLayout::SetMinimumSize</enum> 70 </property> 71 <item> 72 <widget class="QPushButton" name="okButton"> 73 <property name="text"> 74 <string>OK</string> 75 </property> 76 </widget> 77 </item> 78 <item> 79 <widget class="QPushButton" name="resetButton"> 80 <property name="text"> 81 <string>Reset</string> 82 </property> 83 </widget> 84 </item> 85 <item> 86 <widget class="QPushButton" name="testButton"> 87 <property name="text"> 88 <string>Test</string> 89 </property> 90 </widget> 91 </item> 92 <item> 93 <widget class="QPushButton" name="helpButton"> 94 <property name="text"> 95 <string>Help</string> 96 </property> 97 <property name="autoDefault"> 98 <bool>true</bool> 99 </property> 100 </widget> 101 </item> 102 </layout> 103 </item> 104 <item row="2" column="0"> 105 <spacer name="horizontalSpacer"> 106 <property name="orientation"> 107 <enum>Qt::Horizontal</enum> 108 </property> 109 <property name="sizeHint" stdset="0"> 110 <size> 111 <width>78</width> 112 <height>20</height> 113 </size> 114 </property> 115 </spacer> 116 </item> 117 <item row="1" column="0" colspan="2"> 118 <widget class="QLabel" name="warningMessage"> 119 <property name="sizePolicy"> 120 <sizepolicy hsizetype="Minimum" vsizetype="Preferred"> 121 <horstretch>0</horstretch> 122 <verstretch>0</verstretch> 123 </sizepolicy> 124 </property> 125 <property name="font"> 126 <font> 127 <pointsize>8</pointsize> 128 </font> 129 </property> 130 <property name="text"> 131 <string>WARNING: Running tests can take a few minutes!</string> 132 </property> 133 <property name="alignment"> 134 <set>Qt::AlignCenter</set> 135 </property> 136 </widget> 137 </item> 138 </layout> 139 </item> 140 </layout> 128 141 </widget> 129 142 <resources/> 130 143 <connections> 144 <connection> 145 <sender>resetButton</sender> 146 <signal>clicked()</signal> 147 <receiver>GPUOptions</receiver> 148 <slot>reject()</slot> 149 <hints> 150 <hint type="sourcelabel"> 151 <x>266</x> 152 <y>183</y> 153 </hint> 154 <hint type="destinationlabel"> 155 <x>219</x> 156 <y>88</y> 157 </hint> 158 </hints> 159 </connection> 131 160 <connection> 132 161 <sender>okButton</sender> … … 145 174 </hints> 146 175 </connection> 147 <connection>148 <sender>resetButton</sender>149 <signal>clicked()</signal>150 <receiver>GPUOptions</receiver>151 <slot>reject()</slot>152 <hints>153 <hint type="sourcelabel">154 <x>266</x>155 <y>183</y>156 </hint>157 <hint type="destinationlabel">158 <x>219</x>159 <y>88</y>160 </hint>161 </hints>162 </connection>163 176 </connections> 164 177 </ui> -
src/sas/qtgui/Perspectives/Fitting/UI/GPUTestResultsUI.ui
rc31d41e7 r1543f0c 7 7 <x>0</x> 8 8 <y>0</y> 9 <width>4 41</width>10 <height> 439</height>9 <width>487</width> 10 <height>532</height> 11 11 </rect> 12 12 </property> … … 18 18 <normaloff>../../../UI/res/ball.ico</normaloff>../../../UI/res/ball.ico</iconset> 19 19 </property> 20 <widget class="QDialogButtonBox" name="okButton"> 21 <property name="geometry"> 22 <rect> 23 <x>10</x> 24 <y>400</y> 25 <width>411</width> 26 <height>32</height> 27 </rect> 28 </property> 29 <property name="orientation"> 30 <enum>Qt::Horizontal</enum> 31 </property> 32 <property name="standardButtons"> 33 <set>QDialogButtonBox::Ok</set> 34 </property> 35 <property name="centerButtons"> 36 <bool>false</bool> 37 </property> 38 </widget> 39 <widget class="QLabel" name="falingTestsNoOpenCL"> 40 <property name="geometry"> 41 <rect> 42 <x>20</x> 43 <y>330</y> 44 <width>401</width> 45 <height>31</height> 46 </rect> 47 </property> 48 <property name="text"> 49 <string>If tests fail on OpenCL devices, please select the No OpenCL option.</string> 50 </property> 51 <property name="alignment"> 52 <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set> 53 </property> 54 </widget> 55 <widget class="QLabel" name="howToReportIssues"> 56 <property name="geometry"> 57 <rect> 58 <x>20</x> 59 <y>360</y> 60 <width>401</width> 61 <height>41</height> 62 </rect> 63 </property> 64 <property name="text"> 65 <string>In the case where many tests are failing, please consider sending the above report to help@sasview.org.</string> 66 </property> 67 <property name="alignment"> 68 <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set> 69 </property> 70 <property name="wordWrap"> 71 <bool>true</bool> 72 </property> 73 </widget> 74 <widget class="QGroupBox" name="TestResultsBox"> 75 <property name="geometry"> 76 <rect> 77 <x>20</x> 78 <y>10</y> 79 <width>401</width> 80 <height>321</height> 81 </rect> 82 </property> 83 <property name="sizePolicy"> 84 <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> 85 <horstretch>0</horstretch> 86 <verstretch>0</verstretch> 87 </sizepolicy> 88 </property> 89 <property name="title"> 90 <string>OpenCL test results</string> 91 </property> 92 <widget class="QLabel" name="resultsText"> 93 <property name="geometry"> 94 <rect> 95 <x>10</x> 96 <y>20</y> 97 <width>381</width> 98 <height>291</height> 99 </rect> 100 </property> 101 <property name="sizePolicy"> 102 <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> 103 <horstretch>0</horstretch> 104 <verstretch>0</verstretch> 105 </sizepolicy> 106 </property> 107 <property name="frameShape"> 108 <enum>QFrame::StyledPanel</enum> 109 </property> 110 <property name="frameShadow"> 111 <enum>QFrame::Sunken</enum> 112 </property> 113 <property name="text"> 114 <string>TextLabel</string> 115 </property> 116 <property name="alignment"> 117 <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set> 118 </property> 119 <property name="wordWrap"> 120 <bool>true</bool> 121 </property> 122 </widget> 123 </widget> 20 <layout class="QGridLayout" name="gridLayout_3"> 21 <item row="0" column="0"> 22 <layout class="QGridLayout" name="gridLayout_2"> 23 <item row="0" column="0"> 24 <widget class="QGroupBox" name="TestResultsBox"> 25 <property name="sizePolicy"> 26 <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> 27 <horstretch>0</horstretch> 28 <verstretch>0</verstretch> 29 </sizepolicy> 30 </property> 31 <property name="title"> 32 <string>OpenCL test results</string> 33 </property> 34 <layout class="QGridLayout" name="gridLayout"> 35 <item row="0" column="0"> 36 <widget class="QTextEdit" name="resultsText"> 37 <property name="sizePolicy"> 38 <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> 39 <horstretch>0</horstretch> 40 <verstretch>0</verstretch> 41 </sizepolicy> 42 </property> 43 <property name="minimumSize"> 44 <size> 45 <width>300</width> 46 <height>300</height> 47 </size> 48 </property> 49 <property name="readOnly"> 50 <bool>true</bool> 51 </property> 52 </widget> 53 </item> 54 </layout> 55 </widget> 56 </item> 57 <item row="1" column="0"> 58 <widget class="QLabel" name="falingTestsNoOpenCL"> 59 <property name="text"> 60 <string>If tests fail on OpenCL devices, please select the No OpenCL option.</string> 61 </property> 62 <property name="alignment"> 63 <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set> 64 </property> 65 </widget> 66 </item> 67 <item row="2" column="0"> 68 <widget class="QLabel" name="howToReportIssues"> 69 <property name="text"> 70 <string>In the case where many tests are failing, please consider sending the above report to help@sasview.org.</string> 71 </property> 72 <property name="alignment"> 73 <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set> 74 </property> 75 <property name="wordWrap"> 76 <bool>true</bool> 77 </property> 78 </widget> 79 </item> 80 <item row="3" column="0"> 81 <layout class="QHBoxLayout" name="horizontalLayout"> 82 <item> 83 <spacer name="horizontalSpacer"> 84 <property name="orientation"> 85 <enum>Qt::Horizontal</enum> 86 </property> 87 <property name="sizeHint" stdset="0"> 88 <size> 89 <width>218</width> 90 <height>20</height> 91 </size> 92 </property> 93 </spacer> 94 </item> 95 <item> 96 <widget class="QDialogButtonBox" name="okButton"> 97 <property name="orientation"> 98 <enum>Qt::Horizontal</enum> 99 </property> 100 <property name="standardButtons"> 101 <set>QDialogButtonBox::Ok</set> 102 </property> 103 <property name="centerButtons"> 104 <bool>false</bool> 105 </property> 106 </widget> 107 </item> 108 </layout> 109 </item> 110 </layout> 111 </item> 112 </layout> 124 113 </widget> 125 114 <resources/>
Note: See TracChangeset
for help on using the changeset viewer.