Changeset a281ab8 in sasview for src/sas/qtgui/DataExplorer.py
- Timestamp:
- Jun 15, 2016 5:57:34 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:
- 1042dba
- Parents:
- 5032ea68
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/DataExplorer.py
r5032ea68 ra281ab8 16 16 # UI 17 17 from UI.TabbedFileLoadUI import DataLoadWidget 18 19 # This is how to get data1/2D from the model item 20 # data = [selected_items[0].child(0).data().toPyObject()] 18 21 19 22 class DataExplorerWindow(DataLoadWidget): … … 150 153 retval = msgbox.exec_() 151 154 return 152 # Dig up data from model 153 data = [selected_items[0].child(0).data().toPyObject()] 155 156 # Dig up the item 157 data = selected_items 154 158 155 159 # TODO … … 157 161 158 162 # Notify the GuiManager about the send request 159 self._perspective.setData(data_ list=data)163 self._perspective.setData(data_item=data) 160 164 161 165 … … 272 276 message = "Loading Data Complete! " 273 277 message += log_msg 274 return (output, message)278 return output, message 275 279 276 280 def getWlist(self): … … 375 379 376 380 377 def loadComplete(self, output , message=""):381 def loadComplete(self, output): 378 382 """ 379 383 Post message to status bar and update the data manager 380 384 """ 381 385 self.model.reset() 386 assert(type(output), tuple) 387 388 output_data = output[0] 389 message = output[1] 382 390 # Notify the manager of the new data available 383 391 self.communicate.statusBarUpdateSignal.emit(message) 384 self.communicate.fileDataReceivedSignal.emit(output )385 self.manager.add_data(data_list=output )392 self.communicate.fileDataReceivedSignal.emit(output_data) 393 self.manager.add_data(data_list=output_data) 386 394 387 395 def updateModel(self, data, p_file): … … 429 437 def updateModelFromPerspective(self, model_item): 430 438 """ 431 """ 432 # Overwrite the index with what we got from the perspective 439 Receive an update model item from a perspective 440 Make sure it is valid and if so, replace it in the model 441 """ 442 # Assert the correct type 433 443 if type(model_item) != QtGui.QStandardItem: 434 444 msg = "Wrong data type returned from calculations." 435 445 raise AttributeError, msg 446 # Assert other properties 447 448 # Remove the original item 449 450 # Add the current item 436 451 # self.model.insertRow(model_item) 452 437 453 # Reset the view 438 454 self.model.reset()
Note: See TracChangeset
for help on using the changeset viewer.