-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathStatus_Display.py
More file actions
52 lines (42 loc) · 1.59 KB
/
Status_Display.py
File metadata and controls
52 lines (42 loc) · 1.59 KB
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
import time, threading
from Tkinter import *
from PIL import ImageTk, Image
from Status_Power import POWER
from Status_Weather import WEATHER
from Status_Ocupancy import OCCUPANCY
from Status_TOF import TOF
from Status_COS import COS
from Status_HVAC import HVAC
from Status_TempChart import TempChart
class Display():
def __init__(self):
# Creation of window
self.root = Tk()
self.root.attributes('-fullscreen', True)
self.root.configure(background = "White")
# Sections
self.sections = {}
self.frames = {}
# LESA banner
self.sections["banner"] = Frame(self.root, bg = 'white')
self.sections["banner"].pack(side = TOP)
self.LESA_b = ImageTk.PhotoImage(Image.open("Pic/LESA.png"))
self.Banner = Label(self.sections["banner"], image = self.LESA_b, borderwidth=0)
self.Banner.pack()
# Top Section
self.sections["top"] = Frame(self.root, bg = 'white')
self.sections["top"].pack(side = TOP)
# Middle Section
self.sections["middle"] = Frame(self.root, bg = 'white')
self.sections["middle"].pack(side = TOP)
# Bottom Section
self.sections["bottom"] = Frame(self.root, bg = 'white')
self.sections["bottom"].pack(side = TOP)
# Individual Frames
self.frames["power"] = POWER( self.sections['top'])
self.frames["weather"] = WEATHER( self.sections['top'])
self.frames["occupancy"] = OCCUPANCY(self.sections['top'])
self.frames["tof"] = TOF( self.sections['middle'])
self.frames["cos"] = COS( self.sections['middle'])
self.frames["hvac"] = HVAC( self.sections['bottom'])
self.frames["tempchart"] = TempChart(self.sections['bottom'])