Changeset 6b50296 in sasview for src/sas/qtgui/MainWindow
- Timestamp:
- Sep 4, 2018 6:18:49 AM (6 years ago)
- Branches:
- ESS_GUI, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc
- Children:
- e3df84e
- Parents:
- f53bc04
- Location:
- src/sas/qtgui/MainWindow
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/MainWindow/DataExplorer.py
ra24eacf r6b50296 394 394 # Notify the GuiManager about the send request 395 395 self._perspective().setData(data_item=selected_items, is_batch=self.chkBatch.isChecked()) 396 397 def freezeCheckedData(self): 398 """ 399 Convert checked results (fitted model, residuals) into separate dataset. 400 """ 401 outer_index = -1 402 theories_copied = 0 403 orig_model_size = self.model.rowCount() 404 while outer_index < orig_model_size: 405 outer_index += 1 406 outer_item = self.model.item(outer_index) 407 if not outer_item: 408 continue 409 if not outer_item.isCheckable(): 410 continue 411 # Look for checked inner items 412 inner_index = -1 413 while inner_index < outer_item.rowCount(): 414 inner_item = outer_item.child(inner_index) 415 inner_index += 1 416 if not inner_item: 417 continue 418 if not inner_item.isCheckable(): 419 continue 420 if inner_item.checkState() != QtCore.Qt.Checked: 421 continue 422 self.model.beginResetModel() 423 theories_copied += 1 424 new_item = self.cloneTheory(inner_item) 425 self.model.appendRow(new_item) 426 self.model.endResetModel() 427 428 freeze_msg = "" 429 if theories_copied == 0: 430 return 431 elif theories_copied == 1: 432 freeze_msg = "1 theory copied to a separate data set" 433 elif theories_copied > 1: 434 freeze_msg = "%i theories copied to separate data sets" % theories_copied 435 else: 436 freeze_msg = "Unexpected number of theories copied: %i" % theories_copied 437 raise AttributeError(freeze_msg) 438 self.communicator.statusBarUpdateSignal.emit(freeze_msg) 396 439 397 440 def freezeTheory(self, event): -
src/sas/qtgui/MainWindow/GuiManager.py
raa1db44 r6b50296 438 438 self._workspace.actionImage_Viewer.triggered.connect(self.actionImage_Viewer) 439 439 self._workspace.actionOrientation_Viewer.triggered.connect(self.actionOrientation_Viewer) 440 self._workspace.actionFreeze_Theory.triggered.connect(self.actionFreeze_Theory) 440 441 # Fitting 441 442 self._workspace.actionNew_Fit_Page.triggered.connect(self.actionNew_Fit_Page) … … 683 684 self._workspace.addDockWidget(Qt.RightDockWidgetArea, self.ipDockWidget) 684 685 686 def actionFreeze_Theory(self): 687 """ 688 Convert a child index with data into a separate top level dataset 689 """ 690 self.filesWidget.freezeCheckedData() 691 685 692 def actionOrientation_Viewer(self): 686 693 """ -
src/sas/qtgui/MainWindow/UI/MainWindowUI.ui
raa1db44 r6b50296 64 64 <addaction name="actionReport"/> 65 65 <addaction name="actionReset"/> 66 <addaction name="separator"/> 67 <addaction name="actionFreeze_Theory"/> 66 68 </widget> 67 69 <widget class="QMenu" name="menuView"> … … 535 537 </property> 536 538 </action> 539 <action name="actionFreeze_Theory"> 540 <property name="text"> 541 <string>Freeze Theory</string> 542 </property> 543 </action> 537 544 </widget> 538 545 <resources/>
Note: See TracChangeset
for help on using the changeset viewer.