Ignore:
Timestamp:
Mar 21, 2018 8:24:36 AM (7 years ago)
Author:
Piotr Rozyczko <rozyczko@…>
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
Message:

Code cleanup and minor fixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/qtgui/Utilities/GridPanel.py

    r3b3b40b r8b480d27  
    44import webbrowser 
    55 
    6 from PyQt5 import QtCore, QtGui, QtWidgets 
     6from PyQt5 import QtCore, QtWidgets 
    77 
    88import sas.qtgui.Utilities.GuiUtils as GuiUtils 
     
    9191        return 
    9292 
    93     def onHelp(self): 
     93    @classmethod 
     94    def onHelp(cls): 
    9495        """ 
    9596        Open a local url in the default browser 
     
    119120                return 
    120121 
    121     def dataFromTable(self, table): 
     122    @classmethod 
     123    def dataFromTable(cls, table): 
    122124        """ 
    123125        Creates a dictionary {<parameter>:[list of values]} from the parameter table 
     
    125127        assert(isinstance(table, QtWidgets.QTableWidget)) 
    126128        params = {} 
    127         #return {"sld_solvent":[1.2, 2.0, 0.0], "scale":[1.0, 2.0, 3.0]} 
    128129        for column in range(table.columnCount()): 
    129             #pass 
    130130            value = [table.item(row, column).data(0) for row in range(table.rowCount())] 
    131131            key = table.horizontalHeaderItem(column).data(0) 
     
    144144            t = time.localtime(time.time()) 
    145145            time_str = time.strftime("%b %d %H:%M of %Y", t) 
    146             details = "File Generated by SasView "  
     146            details = "File Generated by SasView " 
    147147            details += "on %s.\n" % time_str 
    148148            self.writeBatchToFile(data=data, tmpfile=tmpfile, details=details) 
     
    247247        self.tblParams.resizeColumnsToContents() 
    248248 
    249     def writeBatchToFile(self, data, tmpfile, details=""): 
     249    @classmethod 
     250    def writeBatchToFile(cls, data, tmpfile, details=""): 
    250251        """ 
    251252        Helper to write result from batch into cvs file 
Note: See TracChangeset for help on using the changeset viewer.