Changes in / [d84bc69:dba6e57] in sasview


Ignore:
Location:
src/sas/qtgui
Files:
2 added
5 deleted
5 edited

Legend:

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

    r83d6249 r965fbd8  
    6565        self._helpView = QtWebKit.QWebView() 
    6666 
    67         # Fill in the perspectives combo 
    68         self.initPerspectives() 
    69  
    7067        # Custom context menu 
    7168        self.treeView.setContextMenuPolicy(QtCore.Qt.CustomContextMenu) 
     
    128125        self.cbgraph.setEnabled(len(PlotHelper.currentPlots()) > 0) 
    129126        self.cmdAppend.setEnabled(len(PlotHelper.currentPlots()) > 0) 
    130  
    131     def initPerspectives(self): 
    132         """ 
    133         Populate the Perspective combobox and define callbacks 
    134         """ 
    135         self.cbFitting.currentIndexChanged.connect(self.updatePerspectiveCombo) 
    136         # Set the index so we see the default (Fitting) 
    137         self.updatePerspectiveCombo(0) 
    138127 
    139128    def loadFromURL(self, url): 
     
    400389            self.cbgraph.setCurrentIndex(ind) 
    401390 
    402     def updatePerspectiveCombo(self, index): 
    403         """ 
    404         Notify the gui manager about the new perspective chosen. 
    405         """ 
    406         self.communicator.perspectiveChangedSignal.emit(self.cbFitting.currentText()) 
    407  
    408391    def newPlot(self): 
    409392        """ 
  • src/sas/qtgui/GuiManager.py

    r83d6249 r257bd57  
    2929 
    3030# Perspectives 
    31 import Perspectives 
    3231from sas.qtgui.Perspectives.Invariant.InvariantPerspective import InvariantWindow 
    33 from sas.qtgui.Perspectives.Fitting.FittingPerspective import FittingWindow 
    3432from sas.qtgui.DataExplorer import DataExplorerWindow 
    3533 
     
    10098                                              "_downloads", 
    10199                                              "Tutorial.pdf")) 
    102         # Current displayed perspective 
    103         self._current_perspective = None 
    104  
    105         # Invoke the initial perspective 
    106         self.perspectiveChanged("Fitting") 
     100 
     101        #========================================================== 
     102        # TEMP PROTOTYPE 
     103        # Add InvariantWindow to the workspace. 
     104        self.invariantWidget = InvariantWindow(self) 
     105        self._workspace.workspace.addWindow(self.invariantWidget) 
     106 
     107        # Default perspective 
     108        self._current_perspective = self.invariantWidget 
    107109 
    108110    def addWidgets(self): 
     
    118120        self.dockedFilesWidget = QtGui.QDockWidget("Data Explorer", self._workspace) 
    119121        self.dockedFilesWidget.setWidget(self.filesWidget) 
    120  
    121122        # Disable maximize/minimize and close buttons 
    122123        self.dockedFilesWidget.setFeatures(QtGui.QDockWidget.NoDockWidgetFeatures) 
     
    142143        self.KIESSIGCalculator = KiessigPanel(self) 
    143144        self.SlitSizeCalculator = SlitSizeCalculator(self) 
    144  
    145145    def statusBarSetup(self): 
    146146        """ 
     
    173173        """ 
    174174        return self._workspace.workspace 
    175  
    176     def perspectiveChanged(self, perspective_name): 
    177         """ 
    178         Respond to change of the perspective signal 
    179         """ 
    180         # Close the previous perspective 
    181         if self._current_perspective: 
    182             self._current_perspective.close() 
    183         # Default perspective 
    184         self._current_perspective = Perspectives.PERSPECTIVES[str(perspective_name)](self) 
    185         self._workspace.workspace.addWindow(self._current_perspective) 
    186         self._current_perspective.show() 
    187175 
    188176    def updatePerspective(self, data): 
     
    334322        self.communicate.updatePerspectiveWithDataSignal.connect(self.updatePerspective) 
    335323        self.communicate.progressBarUpdateSignal.connect(self.updateProgressBar) 
    336         self.communicate.perspectiveChangedSignal.connect(self.perspectiveChanged) 
    337324 
    338325    def addTriggers(self): 
  • src/sas/qtgui/GuiUtils.py

    r83d6249 r3bdbfcc  
    233233    # Current workspace chart's name changed 
    234234    activeGraphName = QtCore.pyqtSignal(tuple) 
    235  
    236     # Current perspective changed 
    237     perspectiveChangedSignal = QtCore.pyqtSignal(str) 
    238235 
    239236 
  • src/sas/qtgui/Perspectives/Invariant/InvariantPerspective.py

    r83d6249 rb789967  
    3939    # The controller which is responsible for managing signal slots connections 
    4040    # for the gui and providing an interface to the data model. 
    41     name = "Invariant" # For displaying in the combo box 
    4241    def __init__(self, manager=None, parent=None): 
    4342        super(InvariantWindow, self).__init__(parent) 
     
    103102        self.setupMapper() 
    104103 
    105     #def closeEvent(self, event): 
    106     #    """ 
    107     #    Overwrite the default close method of QWidget 
    108     #    """ 
    109     #    # No close on perspectives - one must always be active. 
    110     #    event.ignore() 
     104    def closeEvent(self, event): 
     105        """ 
     106        Overwrite the default close method of QWidget 
     107        """ 
     108        # No close on perspectives - one must always be active. 
     109        event.ignore() 
    111110 
    112111    def communicator(self): 
  • src/sas/qtgui/Perspectives/__init__.py

    • Property mode changed from 100644 to 100755
    r83d6249 rf721030  
    1 # Available perspectives. 
    2 # When adding a new perspective, this dictionary needs to be updated 
    3  
    4 from Fitting.FittingPerspective import FittingWindow 
    5 from Invariant.InvariantPerspective import InvariantWindow 
    6  
    7 PERSPECTIVES = { 
    8     FittingWindow.name: FittingWindow, 
    9     InvariantWindow.name: InvariantWindow, 
    10 } 
Note: See TracChangeset for help on using the changeset viewer.