Ejemplo n.º 1
0
 def __init__(self, core):
     self.core = core
     self.welcome_dialog = WelcomeDialog(self)
     self.main_window = MainWindow(self)
     self.preferences_window = PreferencesWindow()
     self.systray = SystemTrayIcon(self)
     self.debug_exporter = DebugExporter(core)
Ejemplo n.º 2
0
class Gui():
    def __init__(self, core):
        self.core = core
        self.welcome_dialog = WelcomeDialog(self)
        self.main_window = MainWindow(self)
        self.preferences_window = PreferencesWindow()
        self.systray = SystemTrayIcon(self)
        self.debug_exporter = DebugExporter(core)

    def show_message(self, title, message, duration=5000):
        notify(self.systray, title, message, duration)

    def show_welcome_dialog(self):
        self.welcome_dialog.show()
        self.welcome_dialog.raise_()

    def show_main_window(self):
        self.main_window.show()
        self.main_window.raise_()

    def show_preferences_window(self):
        self.preferences_window.show()
        self.preferences_window.raise_()

    def show_systray(self):
        if self.systray.isSystemTrayAvailable():
            self.systray.show()
        else:
            self.show_main_window()

    def show(self):
        self.systray.show()
        if self.main_window.gateways:
            self.show_main_window()
        else:
            self.show_welcome_dialog()

    def hide(self):
        self.systray.hide()
        self.main_window.hide()
        self.preferences_window.hide()

    def toggle(self):
        if self.main_window.isVisible():
            self.main_window.hide()
        else:
            self.show_main_window()

    def populate(self, gateways):
        self.main_window.populate(gateways)

    def show_debug_exporter(self):
        self.debug_exporter.show()
        self.debug_exporter.raise_()
        self.debug_exporter.load()
Ejemplo n.º 3
0
class Gui(object):
    def __init__(self, core):
        self.core = core
        self.welcome_dialog = WelcomeDialog(self)
        self.main_window = MainWindow(self)
        self.systray = SystemTrayIcon(self)

    def show_message(self, title, message, duration=5000):
        notify(self.systray, title, message, duration)

    def show_welcome_dialog(self):
        self.welcome_dialog.show()
        self.welcome_dialog.raise_()

    def show_main_window(self):
        self.main_window.show()
        self.main_window.raise_()

    def show_systray(self):
        if self.systray.isSystemTrayAvailable():
            self.systray.show()
        else:
            self.show_main_window()

    def show(self):
        self.systray.show()
        self.show_main_window()

    def hide(self):
        self.systray.hide()
        self.main_window.hide()

    def toggle(self):
        if self.main_window.isVisible():
            self.main_window.hide()
        else:
            self.show_main_window()

    def populate(self, gateways):
        self.main_window.populate(gateways)
Ejemplo n.º 4
0
 def __init__(self, core):
     self.core = core
     self.welcome_dialog = WelcomeDialog(self)
     self.main_window = MainWindow(self)
     self.systray = SystemTrayIcon(self)
Ejemplo n.º 5
0
 def __init__(self, core):
     self.core = core
     self.setup_form = SetupForm(self)
     self.main_window = MainWindow(self)
     self.systray = SystemTrayIcon(self)