Changeset 1df1025 in sasview
- Timestamp:
- Oct 24, 2017 12:31:38 PM (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:
- 83710be
- Parents:
- a6cd8d1
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/Perspectives/Fitting/GPUOptions.py
ra6cd8d1 r1df1025 28 28 29 29 clicked = False 30 checkBoxes = None31 30 sas_open_cl = None 32 31 … … 46 45 i = 0 47 46 self.sas_open_cl = os.environ.get("SAS_OPENCL", "") 48 self.checkBoxes = []49 47 for title, descr in cl_tuple: 50 48 checkBox = QtGui.QCheckBox(self.openCLCheckBoxGroup) … … 55 53 checkBox.click() 56 54 self.clicked = True 57 self.checkBoxes.append(checkBox)58 55 # Expand group and shift items down as more are added 59 56 self.openCLCheckBoxGroup.resize(391, 60 + i) … … 71 68 self.testButton.clicked.connect(lambda: self.testButtonClicked()) 72 69 self.helpButton.clicked.connect(lambda: self.helpButtonClicked()) 73 self.openCLCheckBoxGroup.clicked.connect(lambda: self.checked()) 70 for item in self.openCLCheckBoxGroup.findChildren(QtGui.QCheckBox): 71 item.clicked.connect(lambda: self.checked()) 74 72 75 73 def checked(self): … … 77 75 Action triggered when box is selected 78 76 """ 79 selected_box = None 80 for box in self.checkBoxes: 81 if box.isChecked() and box.getText() != self.sas_open_cl: 82 selected_box = box 77 checked = None 78 for box in self.openCLCheckBoxGroup.findChildren(QtGui.QCheckBox): 79 if box.isChecked() and (str(box.text()) == self.sas_open_cl or ( 80 str(box.text()) == "No OpenCL" and self.sas_open_cl == "")): 81 box.setChecked(False) 82 elif not box.isChecked(): 83 pass 83 84 else: 84 box.setChecked(False)85 if selected_box.getText():86 self.sas_open_cl = s elf.option_button[selected_box.title]85 checked = box 86 if hasattr(checked, "text"): 87 self.sas_open_cl = str(checked.text()) 87 88 else: 88 89 self.sas_open_cl = None … … 105 106 """ 106 107 self.close() 107 self.parent.gpu_options_widget = GPUOptions(self)108 108 self.open() 109 109 … … 130 130 Overwrite QDialog close method to allow for custom widget close 131 131 """ 132 self.parent.gpu_options_widget = reload(GPUOptions(self)) 132 133 self.reject() 133 134
Note: See TracChangeset
for help on using the changeset viewer.