Ejemplo n.º 1
0
 def newWorkSpace(self):
     if self.workspace == None:
         self.workspace = ws.Workspace(self.root, widgets.StatusBar(self.root, self.images), self.images, gridX = 32, gridY = 32, width = 1920 * 3, height = 1080)
         self.root.config(menu = widgets.MenuBar(self.root, self.workspace, self.images, self.newWorkSpace, self.loadWorkSpace))
     else:
         self.workspace.destroy()
         self.workspace = ws.Workspace(self.root, widgets.StatusBar(self.root, self.images), self.images, gridX = 32, gridY = 32, width = 1920 * 3, height = 1080)
         self.root.config(menu = widgets.MenuBar(self.root, self.workspace, self.images, self.newWorkSpace, self.loadWorkSpace))
Ejemplo n.º 2
0
 def loadWorkSpace(self):
     if self.workspace == None:
         self.workspace = ws.Workspace(self.root, widgets.StatusBar(self.root, self.images), self.images, gridX = 32, gridY = 32, width = 1920 * 3, height = 1080, option = con.WCC["LOAD"], 
                                       file = fd.askopenfilename(parent = self.root, defaultextension = ".blml", title = "Open", filetypes=[("rbr level file", ".blml"), ("All files", ".*")]))
         self.root.config(menu = widgets.MenuBar(self.root, self.workspace, self.images, self.newWorkSpace, self.loadWorkSpace))
     else:
         self.workspace.destroy()
         self.workspace = ws.Workspace(self.root, widgets.StatusBar(self.root, self.images), self.images, gridX = 32, gridY = 32, width = 1920 * 3, height = 1080, option = con.WCC["LOAD"], 
                                       file = fd.askopenfilename(parent = self.root, defaultextension = ".blml", title = "Open", filetypes=[("rbr level file", ".blml"), ("All files", ".*")]))
         self.root.config(menu = widgets.MenuBar(self.root, self.workspace, self.images, self.newWorkSpace, self.loadWorkSpace))
         
Ejemplo n.º 3
0
    def newWorkSpace(self):

        if self.workspace is None:
            self.workspace = ws.Workspace(self.root, widgets.StatusBar(self.root, self.images), self.images,
                                          gridX=self.inDict["gridX"], gridY=self.inDict["gridY"],
                                          width=self.inDict["width"], height=self.inDict["height"])
            self.root.config(menu=widgets.MenuBar(self.root, self.workspace, self.images, self.newDialog,
                                                  self.loadWorkSpace))
        else:
            self.workspace.destroy()
            self.workspace = ws.Workspace(self.root, widgets.StatusBar(self.root, self.images), self.images,
                                          gridX=self.inDict["gridX"], gridY=self.inDict["gridY"],
                                          width=self.inDict["width"], height=self.inDict["height"])
            self.root.config(menu=widgets.MenuBar(self.root, self.workspace, self.images, self.newDialog,
                                                  self.loadWorkSpace))
Ejemplo n.º 4
0
    def __init__(self):
        self.app = None

        self.bar = widgets.StatusBar()

        self.quick_ring = []
        self.launcher = LauncherApp()
        self.launcher_ring = []
        self.notifier = NotificationApp()
        self.notifications = {}
        self.musicstate = {}
        self.musicinfo = {}

        self.blank_after = 15

        self._alarms = []
        self._brightness = 2
        self._button = PinHandler(watch.button)
        self._charging = True
        self._scheduled = False
        self._scheduling = False

        # TODO: Eventually these should move to main.py
        for app, qr in ((ClockApp, True), (StepCounterApp, True),
                        (StopwatchApp, True), (HeartApp, True),
                        (FlashlightApp, False), (SettingsApp, False), (TestApp,
                                                                       False)):
            try:
                self.register(app(), qr)
            except:
                # Let's not bring the whole device down just because there's
                # an exception starting one of the apps...
                pass
Ejemplo n.º 5
0
    def __init__(self):
        self.app = None

        self.bar = widgets.StatusBar()

        self.quick_ring = []
        self.launcher = LauncherApp()
        self.launcher_ring = []
        self.notifier = NotificationApp()
        self.notifications = {}
        self.musicstate = {}
        self.musicinfo = {}
        self.call = PhoneApp()
        self.phonestate = {}

        self._theme = (
            b'\x7b\xef'  # ble
            b'\x7b\xef'  # scroll-indicator
            b'\x7b\xef'  # battery
            b'\xe7\x3c'  # status-clock
            b'\x7b\xef'  # notify-icon
            b'\xff\xff'  # bright
            b'\xbd\xb6'  # mid
            b'\x39\xff'  # ui
            b'\xff\x00'  # spot1
            b'\xdd\xd0'  # spot2
            b'\x00\x0f'  # contrast
        )

        self.blank_after = 15

        self._alarms = []
        self._brightness = 2
        self._notifylevel = 2
        if 'P8' in watch.os.uname().machine:
            self._nfylevels = [0, 225, 450]
        else:
            self._nfylevels = [0, 40, 80]
        self._nfylev_ms = self._nfylevels[self._notifylevel - 1]
        self._button = PinHandler(watch.button)
        self._charging = True
        self._scheduled = False
        self._scheduling = False

        # TODO: Eventually these should move to main.py
        for app, qr in ((ClockApp, True), (StepCounterApp, True),
                        (StopwatchApp, True), (HeartApp, True),
                        (SoftwareApp, False), (SettingsApp, False)):
            try:
                a = app()

                # Special case for watches with working step counters!
                if isinstance(a, StepCounterApp):
                    self.steps = steplogger.StepLogger(self)

                self.register(a, qr)
            except:
                # Let's not bring the whole device down just because there's
                # an exception starting one of the apps...
                pass
Ejemplo n.º 6
0
    def __init__(self):
        self.app = None

        self.bar = widgets.StatusBar()

        self.quick_ring = []
        self.launcher = LauncherApp()
        self.launcher_ring = []
        self.notifier = NotificationApp()
        self.notifications = {}
        self.musicstate = {}
        self.musicinfo = {}

        self._theme = (
            b'\x7b\xef'  # ble
            b'\x7b\xef'  # scroll-indicator
            b'\x7b\xef'  # battery
            b'\xe7\x3c'  # status-clock
            b'\x7b\xef'  # notify-icon
            b'\xb5\xb6'  # accent-mid
            b'\xbd\xb6'  # accent-lo
            b'\xff\xff'  # accent-hi
            b'\x39\xff'  # slider-default
        )

        self.blank_after = 15

        self._alarms = []
        self._brightness = 2
        self._notifylevel = 2
        if 'P8' in watch.os.uname().machine:
            self._nfylevels = [0, 225, 450]
        else:
            self._nfylevels = [0, 40, 80]
        self._nfylev_ms = self._nfylevels[self._notifylevel - 1]
        self._button = PinHandler(watch.button)
        self._charging = True
        self._scheduled = False
        self._scheduling = False

        # TODO: Eventually these should move to main.py
        for app, qr in ((ClockApp, True), (StepCounterApp, True),
                        (StopwatchApp, True), (HeartApp, True),
                        (FlashlightApp, False), (SettingsApp, False), (TestApp,
                                                                       False)):
            try:
                self.register(app(), qr)
            except:
                # Let's not bring the whole device down just because there's
                # an exception starting one of the apps...
                pass
Ejemplo n.º 7
0
    def createWidgets(self):

        self.callType = widgets.CallType()
        self.roomTable = widgets.RoomTable(self.rooms)

        widgetGrid = QWidget()
        grid = QGridLayout(widgetGrid)
        grid.addWidget(self.callType, 0, 0)
        grid.addWidget(self.roomTable, 0, 1, 1, 3)
        grid.setContentsMargins(0, 0, 0, 0)
        self.setCentralWidget(widgetGrid)

        self.toolbar = widgets.ToolBar()
        self.addToolBar(self.toolbar)

        self.statusbar = widgets.StatusBar()
        self.setStatusBar(self.statusbar)
Ejemplo n.º 8
0
    def __init__(self):
        self.app = None

        self.bar = widgets.StatusBar()

        self.quick_ring = []
        self.launcher = LauncherApp()
        self.launcher_ring = []
        self.notifier = NotificationApp()
        self.notifications = {}
        self.musicstate = {}
        self.musicinfo = {}
        self.weatherinfo = {}
        self.units = "Metric"

        self._theme = (
            b'\x7b\xef'  # ble
            b'\x7b\xef'  # scroll-indicator
            b'\x7b\xef'  # battery
            b'\xe7\x3c'  # status-clock
            b'\x7b\xef'  # notify-icon
            b'\xff\xff'  # bright
            b'\xbd\xb6'  # mid
            b'\x39\xff'  # ui
            b'\xff\x00'  # spot1
            b'\xdd\xd0'  # spot2
            b'\x00\x0f'  # contrast
        )

        self.blank_after = 15

        self._alarms = []
        self._brightness = 2
        self._notifylevel = 2
        if 'P8' in watch.os.uname().machine:
            self._nfylevels = [0, 225, 450]
        else:
            self._nfylevels = [0, 40, 80]
        self._nfylev_ms = self._nfylevels[self._notifylevel - 1]
        self._button = PinHandler(watch.button)
        self._charging = True
        self._scheduled = False
        self._scheduling = False