示例#1
0
    def __init__(self, context, view, kind, handler, id, scrollable, args):
        """ Initializes the object.
        """
        self.context = context
        self.view = view
        self.kind = kind
        self.handler = handler
        self.id = id
        self.scrollable = scrollable
        self.args = args

        # FIXME: fbi is wx specific at the moment.
        if os.environ.get('ENABLE_FBI') is not None:
            try:
                from etsdevtools.developer.helper.fbi import enable_fbi
                enable_fbi()
            except:
                pass

        self.ui = self.view.ui(self.context,
                               kind=self.kind,
                               handler=self.handler,
                               id=self.id,
                               scrollable=self.scrollable,
                               args=self.args)

        start_event_loop_qt4()
示例#2
0
    def __init__(self, context, view, kind, handler, id, scrollable, args):
        """ Initializes the object.
        """
        self.context = context
        self.view = view
        self.kind = kind
        self.handler = handler
        self.id = id
        self.scrollable = scrollable
        self.args = args

        # FIXME: fbi is wx specific at the moment.
        if os.environ.get('ENABLE_FBI') is not None:
            try:
                from etsdevtools.developer.helper.fbi import enable_fbi
                enable_fbi()
            except:
                pass

        self.ui = self.view.ui(self.context,
                               kind=self.kind,
                               handler=self.handler,
                               id=self.id,
                               scrollable=self.scrollable,
                               args=self.args)

        start_event_loop_qt4()
示例#3
0
文件: gui.py 项目: jdmarch/pyface
    def start_event_loop(self):
        if self._splash_screen is not None:
            self._splash_screen.close()

        # Make sure that we only set the 'started' trait after the main loop
        # has really started.
        self.set_trait_later(self, "started", True)

        logger.debug("---------- starting GUI event loop ----------")
        start_event_loop_qt4()

        self.started = False
def main():
    app = get_app_qt4()
    main_window = QtGui.QMainWindow()
    main_window.resize(500, 500)

    enable_window = create_chaco_plot(main_window)

    # The .control attribute references a QWidget that gives Chaco events
    # and that Chaco paints into.
    main_window.setCentralWidget(enable_window.control)

    main_window.show()
    start_event_loop_qt4(app)
    return main_window
示例#5
0
文件: qt_example.py 项目: 5n1p/chaco
def main():
    app = get_app_qt4()
    main_window = QtGui.QMainWindow()
    main_window.resize(500,500)

    enable_window = create_chaco_plot(main_window)

    # The .control attribute references a QWidget that gives Chaco events
    # and that Chaco paints into.
    main_window.setCentralWidget(enable_window.control)

    main_window.show()
    start_event_loop_qt4(app)
    return main_window
示例#6
0
    def __init__(self, context, view, kind, handler, id, scrollable, args):
        """ Initializes the object.
        """
        self.context = context
        self.view = view
        self.kind = kind
        self.handler = handler
        self.id = id
        self.scrollable = scrollable
        self.args = args

        # this will block for modal dialogs, but not non-modals
        self.ui = self.view.ui(self.context,
                               kind=self.kind,
                               handler=self.handler,
                               id=self.id,
                               scrollable=self.scrollable,
                               args=self.args)

        # only non-modal UIs need to have an event loop started for them
        if kind not in {'modal', 'livemodal'}:
            start_event_loop_qt4()
示例#7
0
		self.plotter=Plotter(self)
		self.plotLayout.addWidget(self.plotter.widget)
		self.plotWidget=self.plotter.widget
		self.plotWidget.show()
        #self.connectActions()
		
    def main(self):
        self.show()
	
	'''
    def connectActions(self):
        """
        Connect the user interface controls to the logic
        """
        self.cmdWrite.clicked.connect(self.myprint)      
        
    def myprint(self):
        """
        Even handler for the pushButton click
        """
        self.txtLine.setText('Python -- ')        
        self.txtEdit.setText('This')
        self.lblShow.setText('is a test')
	'''
if __name__=='__main__':
    #app = QtGui.QApplication(sys.argv)
	app = get_app_qt4()
	hwl1 = PlotWindow()
	hwl1.main()
	start_event_loop_qt4(app)
	#sys.exit(app.exec_())
示例#8
0
        self.plotWidget = self.plotter.widget
        self.plotWidget.show()

    #self.connectActions()

    def main(self):
        self.show()
        '''
    def connectActions(self):
        """
        Connect the user interface controls to the logic
        """
        self.cmdWrite.clicked.connect(self.myprint)      
        
    def myprint(self):
        """
        Even handler for the pushButton click
        """
        self.txtLine.setText('Python -- ')        
        self.txtEdit.setText('This')
        self.lblShow.setText('is a test')
	'''


if __name__ == '__main__':
    #app = QtGui.QApplication(sys.argv)
    app = get_app_qt4()
    hwl1 = PlotWindow()
    hwl1.main()
    start_event_loop_qt4(app)
    #sys.exit(app.exec_())
 def demo_main(demo_class, size=(400, 400), title="Enable Demo"):
     "Takes the class of the demo to run as an argument."
     app = get_app_qt4()
     frame = demo_class(None, size=size, title=title)
     start_event_loop_qt4(app)
     return frame
示例#10
0
 def demo_main(demo_class, size=(400,400), title="Enable Demo"):
     "Takes the class of the demo to run as an argument."
     app = get_app_qt4()
     frame = demo_class(None, size=size, title=title)
     start_event_loop_qt4(app)
     return frame