Changeset 9e426c1 in sasview for src/sas/qtgui/DataExplorer.py
- Timestamp:
- Jun 21, 2016 8:07:33 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:
- f82ab8c
- Parents:
- 1042dba
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/DataExplorer.py
r1042dba r9e426c1 85 85 """ 86 86 dir = QtGui.QFileDialog.getExistingDirectory(self, "Choose a directory", "", 87 QtGui.QFileDialog.ShowDirsOnly )87 QtGui.QFileDialog.ShowDirsOnly | QtGui.QFileDialog.DontUseNativeDialog) 88 88 if dir is None: 89 89 return … … 171 171 """ 172 172 Create a new matplotlib chart from selected data 173 174 TODO: Add 2D-functionality 173 175 """ 174 176 … … 192 194 # Location is automatically saved - no need to keep track of the last dir 193 195 # But only with Qt built-in dialog (non-platform native) 194 paths = QtGui.QFileDialog.getOpenFileName (self, "Choose a file", "",196 paths = QtGui.QFileDialog.getOpenFileNames(self, "Choose a file", "", 195 197 wlist, None, QtGui.QFileDialog.DontUseNativeDialog) 196 198 if paths is None: 197 199 return 198 200 201 if type(paths) == QtCore.QStringList: 202 paths = [str(f) for f in paths] 203 199 204 if paths.__class__.__name__ != "list": 200 205 paths = [paths] 201 206 202 path_str=[] 203 for path in paths: 204 if str(path): 205 path_str.append(str(path)) 206 207 return path_str 207 return paths 208 208 209 209 def readData(self, path): … … 402 402 Post message to status bar and update the data manager 403 403 """ 404 # Don't show "empty" rows with data objects 405 self.proxy.setFilterRegExp(r"[^()]") 406 407 # Reset the model so the view gets updated. 404 408 self.model.reset() 405 assert (type(output), tuple)409 assert type(output)== tuple 406 410 407 411 output_data = output[0] … … 433 437 checkbox_item.setText(os.path.basename(p_file)) 434 438 435 # Add "Info" item436 # info_item = QtGui.QStandardItem("Info")437 438 439 # Add the actual Data1D/Data2D object 439 440 object_item = QtGui.QStandardItem() … … 443 444 444 445 # Add rows for display in the view 445 # self.addExtraRows(info_item, data)446 446 info_item = infoFromData(data) 447 447 … … 452 452 self.model.appendRow(checkbox_item) 453 453 454 # Don't show "empty" rows with data objects455 self.proxy.setFilterRegExp(r"[^()]")456 457 454 def updateModelFromPerspective(self, model_item): 458 455 """
Note: See TracChangeset
for help on using the changeset viewer.