Changeset 481ff26 in sasview for src/sas/qtgui/GuiManager.py
- Timestamp:
- Jul 4, 2016 5:32:49 AM (8 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:
- f0f309d
- Parents:
- f82ab8c
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/GuiManager.py
rf82ab8c r481ff26 29 29 Main SasView window functionality 30 30 """ 31 HELP_DIRECTORY_LOCATION ="html"31 HELP_DIRECTORY_LOCATION = "html" 32 32 33 33 def __init__(self, mainWindow=None, reactor=None, parent=None): 34 34 """ 35 36 """ 35 """ 36 37 37 self._workspace = mainWindow 38 38 self._parent = parent … … 52 52 53 53 # Populate menus with dynamic data 54 # 54 # 55 55 # Analysis/Perspectives - potentially 56 56 # Window/current windows 57 57 # 58 59 58 # Widgets 60 59 # … … 62 61 self.filesWidget = DataExplorerWindow(parent, self) 63 62 #flags = (QtCore.Qt.Window | QtCore.Qt.WindowTitleHint | QtCore.Qt.WindowMinimizeButtonHint) 64 flags = (QtCore.Qt.CustomizeWindowHint | QtCore.Qt.WindowTitleHint | QtCore.Qt.WindowMinMaxButtonsHint ) 63 flags = (QtCore.Qt.CustomizeWindowHint | QtCore.Qt.WindowTitleHint | 64 QtCore.Qt.WindowMinMaxButtonsHint) 65 65 66 66 self.dockedFilesWidget = QtGui.QDockWidget("Data explorer", self._workspace, flags=flags) … … 95 95 # Default perspective 96 96 self._current_perspective = self.invariantWidget 97 97 98 98 def fileRead(self, data): 99 99 """ … … 101 101 """ 102 102 pass 103 103 104 104 def updatePerspective(self, data): 105 105 """ … … 111 111 msg = "No perspective is currently active." 112 112 logging.info(msg) 113 114 113 114 115 115 def communicator(self): 116 116 """ … … 143 143 """ 144 144 return self._data_manager.create_gui_data(item, p_file) 145 146 def addData(self, data_list):147 """148 receive a dictionary of data from loader149 store them its data manager if possible150 send to data the current active perspective if the data panel151 is not active.152 :param data_list: dictionary of data's ID and value Data153 """154 #Store data into manager155 #self._data_manager.add_data(data_list)156 157 # set data in the data panel158 #if self._data_panel is not None:159 # data_state = self._data_manager.get_data_state(data_list.keys())160 # self._data_panel.load_data_list(data_state)161 162 #if the data panel is shown wait for the user to press a button163 #to send data to the current perspective. if the panel is not164 #show automatically send the data to the current perspective165 #style = self.__gui_style & GUIFRAME.MANAGER_ON166 #if style == GUIFRAME.MANAGER_ON:167 # #wait for button press from the data panel to set_data168 # if self._data_panel is not None:169 # self._data_panel.frame.Show(True)170 #else:171 #automatically send that to the current perspective172 #self.setData(data_id=data_list.keys())173 pass174 145 175 146 def setData(self, data): … … 190 161 quit_msg = "Are you sure you want to exit the application?" 191 162 reply = QtGui.QMessageBox.question( 192 193 194 195 196 163 self._parent, 164 'Warning', 165 quit_msg, 166 QtGui.QMessageBox.Yes, 167 QtGui.QMessageBox.No) 197 168 198 169 if reply == QtGui.QMessageBox.No: … … 201 172 # Exit if yes 202 173 reactor.callFromThread(reactor.stop) 203 sys.exit()204 174 205 175 def checkUpdate(self): … … 221 191 except: 222 192 logging.info("Failed to connect to www.sasview.org") 223 self.processVersion(version_info) 224 193 self.processVersion(version_info) 194 225 195 def processVersion(self, version_info): 226 196 """ … … 365 335 """ 366 336 print("actionSave_Analysis TRIGGERED") 367 337 368 338 pass 369 339
Note: See TracChangeset
for help on using the changeset viewer.