-
Notifications
You must be signed in to change notification settings - Fork 0
/
piBlockScreenManager.py
69 lines (46 loc) · 2.11 KB
/
piBlockScreenManager.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#!/usr/local/bin/python3
# coding=utf-8
import time
from time import strftime
from kivy.app import App
from kivy.clock import Clock
from kivy.config import Config
from kivy.graphics import Color
from kivy.core.text import LabelBase
from kivy.core.window import Window
from kivy.utils import get_color_from_hex
from kivy.properties import ObjectProperty
from kivy.properties import ObservableDict
from kivy.logger import Logger
from kivy.uix.screenmanager import ScreenManager, Screen, FadeTransition
from kivy.graphics.context_instructions import Color
class PiBlockScreenManager(ScreenManager):
def __init__(self, **kwargs):
Logger.debug("Initialising PiBlockScreenManager...")
super(PiBlockScreenManager, self).__init__(**kwargs)
Logger.debug("Recieved KWARGS = {}".format(kwargs.keys()))
self.app = kwargs['piBlockApp']
self.transition = FadeTransition()
Clock.schedule_once(self._finish_init)
Logger.debug("Initialising PiBlockScreenManager..Done!")
def _finish_init(self, dt):
Logger.debug("Screen Manager {}...".format(self))
# Logger.debug("Screen IDs = {}".format(self.ids.keys()))
# Logger.debug("Screen Manager = {}".format(self.manager))
# Logger.debug("Screen piBlockEngine = {}".format(self.piBlockEngine))
# Logger.debug("Screen Manager Root = {}".format(self.root.ids.keys()))
# Logger.debug("App = {}".format(PiBlockApp()))
#-------------------------------------------------------------
# Common UI Element Updates
#-------------------------------------------------------------
# def loadCommonUI(self):
# self.loadQuoteInfo()
# self.loadStaticInfo()
# def scheduleCommonUpdates(self):
# Clock.schedule_interval(self.updateStatusInfo, 1)
# Clock.schedule_interval(self.updateClockInfo, 1)
# Clock.schedule_interval(self.updateQuoteInfo, 60)
# def unscheduleCommonUpdates(self):
# Clock.unschedule(self.updateStatusInfo)
# Clock.unschedule(self.updateClockInfo)
# Clock.unschedule(self.updateQuoteInfo)