Changeset 9a05a8d5 in sasview


Ignore:
Timestamp:
Feb 9, 2017 6:19:16 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:
cf89cce
Parents:
57b7ee2
Message:

Minor code cleanup of Slicer Parameters Editor

Location:
src/sas/qtgui
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/sas/qtgui/Plotter2D.py

    r57b7ee2 r9a05a8d5  
    226226        self.param_model = self.slicer.model() 
    227227        # Pass the model to the Slicer Parameters widget 
    228         self.slicer_widget = SlicerParameters(self, model=self.param_model) 
     228        self.slicer_widget = SlicerParameters(model=self.param_model) 
    229229        self.slicer_widget.close_signal.connect(slicer_closed) 
     230        # Add the plot to the workspace 
     231        self.manager.parent.workspace().addWindow(self.slicer_widget) 
    230232 
    231233        self.slicer_widget.show() 
  • src/sas/qtgui/SlicerParameters.py

    r57b7ee2 r9a05a8d5  
    1616    """ 
    1717    close_signal = QtCore.pyqtSignal() 
    18     def __init__(self, parent=None, model=None): 
     18    def __init__(self, model=None): 
    1919        super(SlicerParameters, self).__init__() 
    2020 
     
    4141 
    4242        # Close doesn't trigger closeEvent automatically, so force it 
    43         self.buttonBox.button(QtGui.QDialogButtonBox.Close).clicked.connect(functools.partial(self.closeEvent,None)) 
     43        self.buttonBox.button(QtGui.QDialogButtonBox.Close).clicked.connect(functools.partial(self.closeEvent, None)) 
    4444 
    4545        # Disable row number display 
     
    7474        location = "docs/sphinx-docs/build/html" + \ 
    7575            "/user/sasgui/guiframe/graph_help.html#d-data-averaging" 
    76         self._helpView = QtWebKit.QWebView() 
    77         self._helpView.load(QtCore.QUrl(location)) 
    78         self._helpView.show() 
     76        self.helpView = QtWebKit.QWebView() 
     77        self.helpView.load(QtCore.QUrl(location)) 
     78        self.helpView.show() 
    7979 
    8080 
     
    8888 
    8989    def columnReadOnly(self, column): 
     90        '''Returns True if column is read only, false otherwise''' 
    9091        return column in self._columns 
    9192 
    9293    def setColumnReadOnly(self, column, readonly=True): 
     94        '''Add/removes a column from the readonly list''' 
    9395        if readonly: 
    9496            self._columns.add(column) 
     
    9799 
    98100    def flags(self, index): 
     101        '''Sets column flags''' 
    99102        flags = super(ProxyModel, self).flags(index) 
    100103        if self.columnReadOnly(index.column()): 
     
    108111    """ 
    109112    def createEditor(self, widget, option, index): 
     113        '''Overwrite default editor''' 
    110114        if not index.isValid(): 
    111115            return 0 
Note: See TracChangeset for help on using the changeset viewer.