Exemple #1
0
 def setupSys(self):
     base.stdtee(self, 'stdout')
     try:
         throwaway = sys.ps1
         throwaway = sys.ps2
     except (AttributeError, ):
         sys.ps1 = '>>> '
         sys.ps2 = '... '
     self.writeBanner()
Exemple #2
0
 def setupSys(self):
     base.stdtee(self, 'stdout')
     try:
         throwaway = sys.ps1
         throwaway = sys.ps2
     except (AttributeError, ):
         sys.ps1 = '>>> '
         sys.ps2 = '... '
     self.writeBanner()
Exemple #3
0
    def __init__(self, parent=None, name=None, fl=0):
        plot_form.PlotForm.__init__(self, parent, name, fl)
        base.stdtee(self, 'stdout', 'stderr')
        self.tickersListView.setColumnAlignment(2, qt.Qt.AlignRight)
        self.setCaption(self.title % '')
        self.resize(qt.QSize(400, 700))

        self.connect(self.openButton, qt.SIGNAL('clicked()'),
                     self.handleOpenTickers)
        self.connect(self.tickersListView,
                     qt.SIGNAL('doubleClicked(QListViewItem *)'),
                     self.handleShowTicker)
Exemple #4
0
    def __init__(self, parent=None, name=None, fl=0):
        plot_form.PlotForm.__init__(self, parent, name, fl)
        base.stdtee(self, 'stdout', 'stderr')
        self.tickersListView.setColumnAlignment(2, qt.Qt.AlignRight)
        self.setCaption(self.title % '')
        self.resize(qt.QSize(400, 700))

        self.connect(self.openButton, qt.SIGNAL('clicked()'), 
                     self.handleOpenTickers)
        self.connect(self.tickersListView, 
                     qt.SIGNAL('doubleClicked(QListViewItem *)'),
                     self.handleShowTicker)
    def setupWidgets(self):
        """ setupWidgets() -> create main widgets for the window

        """
        self.manager().setSplitterOpaqueResize(True)
        statusbar.MainStatusBar(self)

        connect = self.connect
        nodeviewer = self.nodeViewer
        docktype = kdeui.KDockWidget
        build = self.buildDock

        shelldock, self.pythonShell = \
            build(util.groups.shell, 'terminal', shell.InteractiveShell)

        sessiondock, self.sessionList = \
            build('Session Tree', 'blockdevice', sessionview.SessionListView)

        summarydock, self.summaryFrame = \
            build('Account Summary', 'whatsnext', summaryview.SummaryLCDFrame)

        stdoutdock, self.stdoutFrame = \
            build(util.groups.output, 'openterm', util.OutputFrame)

        stderrdock, self.stderrFrame = \
            build('Error', 'openterm', util.OutputFrame)

        self.outputDock = stdoutdock
        shelldock.setEnableDocking(docktype.DockNone)
        self.setView(shelldock)
        self.setMainDockWidget(shelldock)

        shelldock.manualDock(sessiondock, dockRight, 30)
        summarydock.manualDock(sessiondock, dockCenter, 20)
        stdoutdock.manualDock(shelldock, dockBottom, 80)
        stderrdock.manualDock(stdoutdock, dockCenter, 80)

        for item in (self.pythonShell, self.stdoutFrame):
            base.stdtee(item, 'stdout')
        for item in (self.pythonShell, self.stderrFrame):
            base.stdtee(item, 'stderr')

        connect(self.sessionList, util.sigViewSource, nodeviewer.viewNode)
        connect(self.sessionList, util.sigDoubleClicked, nodeviewer.viewNode)

        sigNewSess = util.sigNewSession
        connect(self, sigNewSess, self.sessionList.setSession)
        connect(self, sigNewSess, self.pythonShell.sessionToNamespace)
        connect(self, sigNewSess, self.summaryFrame.resetDisplays)
        connect(self, util.sigViewTickerItem, self.nodeViewer.viewNode)
Exemple #6
0
    def setupWidgets(self):
        """ setupWidgets() -> create main widgets for the window

        """
        self.manager().setSplitterOpaqueResize(True)
        statusbar.MainStatusBar(self)

        connect = self.connect
        nodeviewer = self.nodeViewer
        docktype = kdeui.KDockWidget
        build = self.buildDock

        shelldock, self.pythonShell = build(util.groups.shell, "terminal", shell.InteractiveShell)

        sessiondock, self.sessionList = build("Session Tree", "blockdevice", sessionview.SessionListView)

        summarydock, self.summaryFrame = build("Account Summary", "whatsnext", summaryview.SummaryLCDFrame)

        stdoutdock, self.stdoutFrame = build(util.groups.output, "openterm", util.OutputFrame)

        stderrdock, self.stderrFrame = build("Error", "openterm", util.OutputFrame)

        self.outputDock = stdoutdock
        shelldock.setEnableDocking(docktype.DockNone)
        self.setView(shelldock)
        self.setMainDockWidget(shelldock)

        shelldock.manualDock(sessiondock, dockRight, 30)
        summarydock.manualDock(sessiondock, dockCenter, 20)
        stdoutdock.manualDock(shelldock, dockBottom, 80)
        stderrdock.manualDock(stdoutdock, dockCenter, 80)

        for item in (self.pythonShell, self.stdoutFrame):
            base.stdtee(item, "stdout")
        for item in (self.pythonShell, self.stderrFrame):
            base.stdtee(item, "stderr")

        connect(self.sessionList, util.sigViewSource, nodeviewer.viewNode)
        connect(self.sessionList, util.sigDoubleClicked, nodeviewer.viewNode)

        sigNewSess = util.sigNewSession
        connect(self, sigNewSess, self.sessionList.setSession)
        connect(self, sigNewSess, self.pythonShell.sessionToNamespace)
        connect(self, sigNewSess, self.summaryFrame.resetDisplays)
        connect(self, util.sigViewTickerItem, self.nodeViewer.viewNode)