Changeset 27313b7 in sasview for src/sas/qtgui/PlotterBase.py


Ignore:
Timestamp:
Dec 13, 2016 4:28:07 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:
63974f0
Parents:
c4e5400
Message:

Added window title GUI for charts

File:
1 edited

Legend:

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

    rc4e5400 r27313b7  
    1414DEFAULT_CMAP = pylab.cm.jet 
    1515from sas.qtgui.ScaleProperties import ScaleProperties 
     16from sas.qtgui.WindowTitle import WindowTitle 
    1617import sas.qtgui.PlotHelper as PlotHelper 
    1718 
     
    251252        self.ax.grid(self.grid_on) 
    252253        self.canvas.draw_idle() 
     254 
     255    def onWindowsTitle(self): 
     256        """ 
     257        Show a dialog allowing chart title customisation 
     258        """ 
     259        current_title = self.windowTitle() 
     260        titleWidget = WindowTitle(self, new_title=current_title) 
     261        result = titleWidget.exec_() 
     262        if result != QtGui.QDialog.Accepted: 
     263            return 
     264 
     265        title = titleWidget.title() 
     266        self.setWindowTitle(title) 
     267        # Notify the listeners about a new graph title 
     268        self.manager.communicator.activeGraphName.emit((current_title, title)) 
Note: See TracChangeset for help on using the changeset viewer.