Esempio n. 1
0
    def initToolbar(self):
        self.timeText = QtGui.QLabel('Time: 0.0000', self)
        self.prefix = QtGui.QLineEdit('', self)
        self.postfix = QtGui.QLineEdit('', self)
        # Update self.toolbar_actions
        # "list[x:x] += list2" is Python idiom for add list to the another list

        my_toolbar_actions = [self.timeText, None]
        self.toolbar_actions[4:4] += my_toolbar_actions

        # Call the parent function to initialize the toolbar
        PyDartQtWindow.initToolbar(self)
Esempio n. 2
0
    def initToolbar(self):
        # Print self.toolbar_actions (initialized from the parent)
        for i, action in enumerate(self.toolbar_actions):
            # If action is none, it will become a separator
            if action is not None:
                print i, action.text()

        # Update self.toolbar_actions
        # "list[x:x] += list2" is Python idiom for add list to the another list
        my_toolbar_actions = [self.printAction, None]
        self.toolbar_actions[4:4] += my_toolbar_actions

        # Call the parent function to initialize the toolbar
        PyDartQtWindow.initToolbar(self)
Esempio n. 3
0
    def initToolbar(self):
        # Print self.toolbar_actions (initialized from the parent)
        for i, action in enumerate(self.toolbar_actions):
            # If action is none, it will become a separator
            if action is not None:
                print i, action.text()

        # Update self.toolbar_actions
        # "list[x:x] += list2" is Python idiom for add list to the another list
        my_toolbar_actions = [self.printAction, None]
        self.toolbar_actions[4:4] += my_toolbar_actions

        # Call the parent function to initialize the toolbar
        PyDartQtWindow.initToolbar(self)
Esempio n. 4
0
 def initMenu(self):
     PyDartQtWindow.initMenu(self)
     self.fileMenu.addAction(self.loadAction)
     self.fileMenu.addAction(self.saveAction)
Esempio n. 5
0
 def initActions(self):
     PyDartQtWindow.initActions(self)
     self.loadAction = self.createAction('Load', self.printEvent)
     self.saveAction = self.createAction('Save', self.saveEvent)
     self.printAction = self.createAction('Print', self.printEvent)
Esempio n. 6
0
 def idleTimerEvent(self):
     PyDartQtWindow.idleTimerEvent(self)
     self.timeText.setText('T: %.4f' % self.sim.world.t)
Esempio n. 7
0
 def initMenu(self):
     PyDartQtWindow.initMenu(self)
     # self.fileMenu.addAction(self.loadAction)
     # self.fileMenu.addAction(self.saveAction)
     self.fileMenu.addAction(self.exportAction)
Esempio n. 8
0
 def initActions(self):
     PyDartQtWindow.initActions(self)
     self.exportAction = self.createAction('&Export', self.exportEvent)
Esempio n. 9
0
 def initActions(self):
     PyDartQtWindow.initActions(self)
     self.loadAction = self.createAction('Load', self.printEvent)
     self.saveAction = self.createAction('Save', self.saveEvent)
     self.printAction = self.createAction('Print', self.printEvent)