Пример #1
0
    def __init__(self, argv=sys.argv):
        super(Application, self).__init__(argv)
        signal.application_init.send(sender=self)

        debug.info("Application initialize")

        if SIGNALS_DEBUG:
            from dispatch.dispatcher import get_all_signals
            import inspect

            for name, values in get_all_signals().items():
                new_values = []
                for v in values:
                    new_values.append((inspect.getsourcefile(v), "line:%d" % inspect.getsourcelines(v)[-1]))

                debug.info((name, new_values))
Пример #2
0
	def __init__(self, parent=None):
		super(MainWindow, self).__init__(parent)
		register_qt_object('window', self)

		debug.info('send window_before_init signal')

		signal.window_before_init.send(sender=self)

		self.menu_bar = self.menuBar()

		debug.info('send load_menu_bar signal')
		signal.load_menu_bar.send(sender=self, menu_bar=self.menu_bar)


		# main window central
		self.central_widget = CentralWidget(self)

		debug.info('send central_widget_init signal')
		signal.central_widget_init.send(sender=self, central_widget = self.central_widget)

		self.setCentralWidget(self.central_widget)

		# maximum
		self.showMaximized()