Changeset 8b480d27 in sasview for src/sas/qtgui/Utilities/GridPanel.py
- Timestamp:
- Mar 21, 2018 8:24:36 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:
- 8ac3551
- Parents:
- 3b3b40b
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/Utilities/GridPanel.py
r3b3b40b r8b480d27 4 4 import webbrowser 5 5 6 from PyQt5 import QtCore, Qt Gui, QtWidgets6 from PyQt5 import QtCore, QtWidgets 7 7 8 8 import sas.qtgui.Utilities.GuiUtils as GuiUtils … … 91 91 return 92 92 93 def onHelp(self): 93 @classmethod 94 def onHelp(cls): 94 95 """ 95 96 Open a local url in the default browser … … 119 120 return 120 121 121 def dataFromTable(self, table): 122 @classmethod 123 def dataFromTable(cls, table): 122 124 """ 123 125 Creates a dictionary {<parameter>:[list of values]} from the parameter table … … 125 127 assert(isinstance(table, QtWidgets.QTableWidget)) 126 128 params = {} 127 #return {"sld_solvent":[1.2, 2.0, 0.0], "scale":[1.0, 2.0, 3.0]}128 129 for column in range(table.columnCount()): 129 #pass130 130 value = [table.item(row, column).data(0) for row in range(table.rowCount())] 131 131 key = table.horizontalHeaderItem(column).data(0) … … 144 144 t = time.localtime(time.time()) 145 145 time_str = time.strftime("%b %d %H:%M of %Y", t) 146 details = "File Generated by SasView " 146 details = "File Generated by SasView " 147 147 details += "on %s.\n" % time_str 148 148 self.writeBatchToFile(data=data, tmpfile=tmpfile, details=details) … … 247 247 self.tblParams.resizeColumnsToContents() 248 248 249 def writeBatchToFile(self, data, tmpfile, details=""): 249 @classmethod 250 def writeBatchToFile(cls, data, tmpfile, details=""): 250 251 """ 251 252 Helper to write result from batch into cvs file
Note: See TracChangeset
for help on using the changeset viewer.