def __init__(self, parent=None):
        """ Initializer.

        @param parent ancestor of this object
        """
        QFrame.__init__(self, parent)
        self.setupUi(self)
        self.splitter.restoreState(defaults.rightSplitterState())
        self.requestTabs.closeTabButton.actionCloseTab.setShortcuts([])
        self.requestTabs.detachTabButton.actionDetachTab.setShortcuts([])
        self.requestSession()
Esempio n. 2
0
    def __init__(self, parent=None):
        """ Initializer.

        @param parent ancestor of this object
        """
        QFrame.__init__(self, parent)
        self.setupUi(self)
        self.splitter.restoreState(defaults.rightSplitterState())
        self.requestTabs.closeTabButton.actionCloseTab.setShortcuts([])
        self.requestTabs.detachTabButton.actionDetachTab.setShortcuts([])
        self.requestSession()
Esempio n. 3
0
    def setupWidgets(self):
        """ Configures our widgets like we like.

        """
        settings = self.settings
        settings.beginGroup(settings.keys.messages)
        self.splitter.restoreState(defaults.rightSplitterState())
        messageDetail = self.messageDetail
        messageDetail.verticalHeader().hide()
        horizHeader = messageDetail.horizontalHeader()
        horizHeader.setResizeMode(horizHeader.Stretch)
        messageTable = self.messageTable
        messageTable.verticalHeader().hide()
        horizHeader = messageTable.horizontalHeader()
        horizHeader.setResizeMode(horizHeader.ResizeToContents)
        for widget in (self.messageTypeDisplay.typesListText,
                       self.messageTypeDisplay.allCheck):
            widget.setText('Display ' + widget.text())
Esempio n. 4
0
    def setupWidgets(self):
        """ Configures our widgets like we like.

        """
        settings = self.settings
        settings.beginGroup(settings.keys.messages)
        self.splitter.restoreState(defaults.rightSplitterState())
        messageDetail = self.messageDetail
        messageDetail.verticalHeader().hide()
        horizHeader = messageDetail.horizontalHeader()
        horizHeader.setResizeMode(horizHeader.Stretch)
        messageTable = self.messageTable
        messageTable.verticalHeader().hide()
        horizHeader = messageTable.horizontalHeader()
        horizHeader.setResizeMode(horizHeader.ResizeToContents)
        for widget in (self.messageTypeDisplay.typesListText,
                       self.messageTypeDisplay.allCheck):
            widget.setText('Display ' + widget.text())
Esempio n. 5
0
    def setSessionPlot(self, session, collection, key, *indexes):
        """ Associate a session with this instance.

        @param session Session instance
        @param key id of ticker as integer
        @param *indexes unused
        @return None
        """
        self.controlsTreeItems = []
        self.highlightMarkers = []
        self.session = session
        self.collection = collection
        self.key = key
        settings = self.settings
        name = self.plotName()
        statekey = '%s/%s' % (name, settings.keys.splitstate)
        state = settings.value(statekey, defaults.rightSplitterState())
        self.plotSplitter.restoreState(state.toByteArray())
        self.setupTree()
        self.loadGrids()
        self.loadSelections()
        self.loadCanvasColor()
        self.loadLegend()
        self.updateAxis()
        scaler = self.plot.axisScaleEngine(xBottom)
        scaler.setMargins(0.0, 0.05)
        axisactions = [self.actionChangeAxesFont, self.actionChangeAxesColor]
        for widget in self.axisWidgets():
            widget.addActions(axisactions)
            widget.setContextMenuPolicy(Qt.ActionsContextMenu)
        color = settings.value('%s/axiscolor' % name)
        if color.isValid():
            self.setAxisColor(QColor(color))
        font = settings.value('%s/axisfont' % name)
        if font.isValid():
            self.setAxisFont(QFont(font))
        self.plot.replot()
        if settings.value('%s/datadialog' % name).toBool():
            ## tab might not be available
            QTimer.singleShot(500, self.actionShowDataDialog.trigger)
        session.registerMeta(self)
Esempio n. 6
0
    def setSessionPlot(self, session, collection, key, *indexes):
        """ Associate a session with this instance.

        @param session Session instance
        @param key id of ticker as integer
        @param *indexes unused
        @return None
        """
        self.controlsTreeItems = []
        self.highlightMarkers = []
        self.session = session
        self.collection = collection
        self.key = key
        settings = self.settings
        name = self.plotName()
        statekey = '%s/%s' % (name, settings.keys.splitstate)
        state = settings.value(statekey, defaults.rightSplitterState())
        self.plotSplitter.restoreState(state.toByteArray())
        self.setupTree()
        self.loadGrids()
        self.loadSelections()
        self.loadCanvasColor()
        self.loadLegend()
        self.updateAxis()
        scaler = self.plot.axisScaleEngine(xBottom)
        scaler.setMargins(0.0, 0.05)
        axisactions = [self.actionChangeAxesFont, self.actionChangeAxesColor]
        for widget in self.axisWidgets():
            widget.addActions(axisactions)
            widget.setContextMenuPolicy(Qt.ActionsContextMenu)
        color = settings.value('%s/axiscolor' % name)
        if color.isValid():
            self.setAxisColor(QColor(color))
        font = settings.value('%s/axisfont' % name)
        if font.isValid():
            self.setAxisFont(QFont(font))
        self.plot.replot()
        if settings.value('%s/datadialog' % name).toBool():
            ## tab might not be available
            QTimer.singleShot(500, self.actionShowDataDialog.trigger)
        session.registerMeta(self)