Changeset 7969b9c in sasview for src/sas/qtgui/MainWindow
- Timestamp:
- Nov 9, 2017 8:43:07 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:
- fbfc488
- Parents:
- 4992ff2
- git-author:
- Piotr Rozyczko <rozyczko@…> (10/31/17 10:00:59)
- git-committer:
- Piotr Rozyczko <rozyczko@…> (11/09/17 08:43:07)
- Location:
- src/sas/qtgui/MainWindow
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/MainWindow/DataExplorer.py
r4992ff2 r7969b9c 182 182 Opens the Qt "Open File..." dialog 183 183 """ 184 print("A")185 184 path_str = self.chooseFiles() 186 185 if not path_str: … … 193 192 Opens the Qt "Open Folder..." dialog 194 193 """ 195 folder = QtWidgets.QFileDialog.getExistingDirectory(self, "Choose a directory", "", None,194 folder = QtWidgets.QFileDialog.getExistingDirectory(self, "Choose a directory", "", 196 195 QtWidgets.QFileDialog.ShowDirsOnly | QtWidgets.QFileDialog.DontUseNativeDialog) 197 196 if folder is None: … … 398 397 if outer_item.isCheckable() and \ 399 398 outer_item.checkState() == QtCore.Qt.Checked: 399 self.model.beginResetModel() 400 400 theories_copied += 1 401 401 new_item = self.recursivelyCloneItem(outer_item) … … 405 405 new_item.setText(new_name) 406 406 self.model.appendRow(new_item) 407 self.model.reset() 407 self.model.endResetModel() 408 #self.model.reset() 408 409 409 410 freeze_msg = "" … … 577 578 578 579 # Add the plot to the workspace 579 self.parent.workspace().add Window(new_plot)580 self.parent.workspace().addSubWindow(new_plot) 580 581 581 582 # Show the plot … … 626 627 # But only with Qt built-in dialog (non-platform native) 627 628 paths = QtWidgets.QFileDialog.getOpenFileNames(self, "Choose a file", "", 628 wlist, None, QtWidgets.QFileDialog.DontUseNativeDialog) 629 wlist, None, QtWidgets.QFileDialog.DontUseNativeDialog)[0] 630 # [0] is new in Qt5 as getOpenFileNames() returns now a tuple! 629 631 if paths is None: 630 632 return … … 686 688 self.mutex.lock() 687 689 self.updateModel(new_data, p_file) 688 self.model.reset()689 Qt Gui.qApp.processEvents()690 #self.model.reset() 691 QtWidgets.QApplication.processEvents() 690 692 self.mutex.unlock() 691 693 … … 907 909 # Move the slider all the way up, if present 908 910 vertical_scroll_bar = self.txt_widget.verticalScrollBar() 909 vertical_scroll_bar.triggerAction(Qt Gui.QScrollBar.SliderToMinimum)911 vertical_scroll_bar.triggerAction(QtWidgets.QScrollBar.SliderToMinimum) 910 912 911 913 def saveDataAs(self): … … 995 997 996 998 # Reset the model so the view gets updated. 997 self.model.reset()999 #self.model.reset() 998 1000 self.communicator.progressBarUpdateSignal.emit(-1) 999 1001 … … 1005 1007 self.manager.add_data(data_list=output_data) 1006 1008 1007 def load Errback(self, reason):1009 def loadFailed(self, reason): 1008 1010 print("File Load Failed with:\n", reason) 1009 1011 pass … … 1047 1049 1048 1050 # New row in the model 1051 self.model.beginResetModel() 1049 1052 self.model.appendRow(checkbox_item) 1053 self.model.endResetModel() 1050 1054 1051 1055 def updateModelFromPerspective(self, model_item): … … 1062 1066 1063 1067 # Reset the view 1064 self.model.reset()1068 ##self.model.reset() 1065 1069 # Pass acting as a debugger anchor 1066 1070 pass … … 1098 1102 1099 1103 if __name__ == "__main__": 1100 app = Qt Gui.QApplication([])1104 app = QtWidgets.QApplication([]) 1101 1105 dlg = DataExplorerWindow() 1102 1106 dlg.show() -
src/sas/qtgui/MainWindow/GuiManager.py
r4992ff2 r7969b9c 77 77 78 78 # Invoke the initial perspective 79 self.perspectiveChanged("Fitting")79 #self.perspectiveChanged("Fitting") 80 80 self.addWidgets() 81 81 … … 91 91 # Set up the status bar 92 92 self.statusBarSetup() 93 94 93 # Show the Welcome panel 95 94 self.welcomePanel = WelcomePanel() … … 117 116 118 117 self.dockedFilesWidget = QDockWidget("Data Explorer", self._workspace) 119 self.dockedFilesWidget.setFloating( True)118 self.dockedFilesWidget.setFloating(False) 120 119 self.dockedFilesWidget.setWidget(self.filesWidget) 121 120 122 121 # Disable maximize/minimize and close buttons 123 122 self.dockedFilesWidget.setFeatures(QDockWidget.NoDockWidgetFeatures) 124 self.dockedFilesWidget.setFeatures(Qt.LeftDockWidgetArea) 125 126 self._workspace. workspace.addDockWidget(Qt.LeftDockWidgetArea, self.dockedFilesWidget)123 124 #self._workspace.workspace.addDockWidget(Qt.LeftDockWidgetArea, self.dockedFilesWidget) 125 self._workspace.addDockWidget(Qt.LeftDockWidgetArea, self.dockedFilesWidget) 127 126 128 127 # Add the console window as another docked widget … … 132 131 self.listWidget = QTextBrowser() 133 132 self.logDockWidget.setWidget(self.listWidget) 134 self._workspace. workspace.addDockWidget(Qt.BottomDockWidgetAre, self.logDockWidget)133 self._workspace.addDockWidget(Qt.BottomDockWidgetArea, self.logDockWidget) 135 134 136 135 # Add other, minor widgets … … 199 198 200 199 # Resize to the workspace height 201 workspace_height = self._workspace.workspace.sizeHint().height() 202 perspective_size = self._current_perspective.sizeHint() 203 if workspace_height < perspective_size.height(): 204 perspective_width = perspective_size.width() 205 self._current_perspective.resize(perspective_width, workspace_height-10) 200 #workspace_height = self._workspace.workspace.sizeHint().height() 201 #perspective_size = self._current_perspective.sizeHint() 202 #if workspace_height < perspective_size.height(): 203 # perspective_width = perspective_size.width() 204 # self._current_perspective.resize(perspective_width, workspace_height-10) 205 206 206 self._current_perspective.show() 207 207
Note: See TracChangeset
for help on using the changeset viewer.