123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154 |
- #!/usr/bin/env python
- # -*- coding: UTF-8 -*-
- #
- # generated by wxGlade 0.9.3 on Wed Sep 9 07:31:16 2020
- #
-
- import wx
-
- # begin wxGlade: dependencies
- # end wxGlade
-
- # begin wxGlade: extracode
- # end wxGlade
-
-
- class Wetation(wx.Frame):
- def __init__(self, *args, **kwds):
- # begin wxGlade: Wetation.__init__
- kwds["style"] = kwds.get("style", 0) | wx.DEFAULT_FRAME_STYLE
- wx.Frame.__init__(self, *args, **kwds)
- self.SetSize((800, 655))
- self.date = wx.StaticText(self, wx.ID_ANY, "xx.xx.xxxx", style=wx.ALIGN_LEFT)
- self.time = wx.StaticText(self, wx.ID_ANY, "xx:xx", style=wx.ALIGN_RIGHT)
- self.heading_out_envdata = wx.StaticText(self, wx.ID_ANY, u"Außen")
- self.out_humidity = wx.StaticText(self, wx.ID_ANY, "- %", style=wx.ALIGN_RIGHT)
- self.out_pressure = wx.StaticText(self, wx.ID_ANY, "- hPa", style=wx.ALIGN_RIGHT)
- self.out_temperature_min = wx.StaticText(self, wx.ID_ANY, u"-.- °C", style=wx.ALIGN_RIGHT)
- self.out_temperature_max = wx.StaticText(self, wx.ID_ANY, u"-.- °C", style=wx.ALIGN_RIGHT)
- self.out_temperature = wx.StaticText(self, wx.ID_ANY, u"-.- °C", style=wx.ALIGN_RIGHT)
- self.heading_in_envdata = wx.StaticText(self, wx.ID_ANY, "Innen")
- self.in_humidity = wx.StaticText(self, wx.ID_ANY, "- %", style=wx.ALIGN_RIGHT)
- self.in_pressure = wx.StaticText(self, wx.ID_ANY, "- hPa", style=wx.ALIGN_RIGHT)
- self.in_temperature_min = wx.StaticText(self, wx.ID_ANY, u"-.- °C", style=wx.ALIGN_RIGHT)
- self.in_temperature_max = wx.StaticText(self, wx.ID_ANY, u"-.- °C", style=wx.ALIGN_RIGHT)
- self.in_temperature = wx.StaticText(self, wx.ID_ANY, u"-.- °C", style=wx.ALIGN_RIGHT)
- self.heading_garage = wx.StaticText(self, wx.ID_ANY, "Garage")
- self.gate_oc = wx.Button(self, wx.ID_ANY, "Garage")
- self.gate_close = wx.StaticText(self, wx.ID_ANY, "Close")
- self.gate_position = wx.Slider(self, wx.ID_ANY, 50, 0, 100)
- self.gate_open = wx.StaticText(self, wx.ID_ANY, "Open")
-
- self.__set_properties()
- self.__do_layout()
-
- self.Bind(wx.EVT_BUTTON, self.gate_oc_evt, self.gate_oc)
- # end wxGlade
-
- def __set_properties(self):
- # begin wxGlade: Wetation.__set_properties
- self.SetTitle("frame")
- self.SetBackgroundColour(wx.Colour(250, 249, 255))
- self.SetForegroundColour(wx.Colour(35, 35, 142))
- self.date.SetBackgroundColour(wx.Colour(35, 35, 142))
- self.date.SetForegroundColour(wx.Colour(255, 255, 255))
- self.date.SetFont(wx.Font(24, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, 0, ""))
- self.time.SetBackgroundColour(wx.Colour(35, 35, 142))
- self.time.SetForegroundColour(wx.Colour(255, 255, 255))
- self.time.SetFont(wx.Font(24, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, 0, ""))
- self.heading_out_envdata.SetBackgroundColour(wx.Colour(35, 35, 142))
- self.heading_out_envdata.SetForegroundColour(wx.Colour(250, 249, 255))
- self.heading_out_envdata.SetFont(wx.Font(16, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, 0, ""))
- self.out_humidity.SetFont(wx.Font(24, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, 0, ""))
- self.out_pressure.SetFont(wx.Font(24, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, 0, ""))
- self.out_temperature_min.SetFont(wx.Font(24, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, 0, ""))
- self.out_temperature_max.SetFont(wx.Font(24, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, 0, ""))
- self.out_temperature.SetFont(wx.Font(48, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, 0, ""))
- self.heading_in_envdata.SetBackgroundColour(wx.Colour(35, 35, 142))
- self.heading_in_envdata.SetForegroundColour(wx.Colour(250, 249, 255))
- self.heading_in_envdata.SetFont(wx.Font(16, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, 0, ""))
- self.in_humidity.SetFont(wx.Font(24, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, 0, ""))
- self.in_pressure.SetFont(wx.Font(24, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, 0, ""))
- self.in_temperature_min.SetFont(wx.Font(24, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, 0, ""))
- self.in_temperature_max.SetFont(wx.Font(24, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, 0, ""))
- self.in_temperature.SetFont(wx.Font(48, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, 0, ""))
- self.heading_garage.SetBackgroundColour(wx.Colour(35, 35, 142))
- self.heading_garage.SetForegroundColour(wx.Colour(250, 249, 255))
- self.heading_garage.SetFont(wx.Font(16, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, 0, ""))
- self.gate_oc.SetMinSize((100, 50))
- self.gate_position.Enable(False)
- # end wxGlade
-
- def __do_layout(self):
- # begin wxGlade: Wetation.__do_layout
- sizer_main = wx.BoxSizer(wx.VERTICAL)
- sizer_8 = wx.BoxSizer(wx.HORIZONTAL)
- sizer_env_data_in = wx.BoxSizer(wx.HORIZONTAL)
- sizer_9 = wx.BoxSizer(wx.VERTICAL)
- sizer_5 = wx.BoxSizer(wx.VERTICAL)
- sizer_env_data_out = wx.BoxSizer(wx.HORIZONTAL)
- sizer_7 = wx.BoxSizer(wx.VERTICAL)
- sizer_4 = wx.BoxSizer(wx.VERTICAL)
- sizer_date_time = wx.BoxSizer(wx.HORIZONTAL)
- spacer_1 = wx.StaticText(self, wx.ID_ANY, "")
- spacer_1.SetBackgroundColour(wx.Colour(35, 35, 142))
- spacer_1.SetFont(wx.Font(5, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, 0, ""))
- sizer_main.Add(spacer_1, 0, wx.EXPAND, 0)
- sizer_date_time.Add(self.date, 1, wx.EXPAND | wx.LEFT, 0)
- sizer_date_time.Add(self.time, 1, wx.EXPAND | wx.RIGHT, 0)
- sizer_main.Add(sizer_date_time, 0, wx.EXPAND, 0)
- spacer_2 = wx.StaticText(self, wx.ID_ANY, "")
- spacer_2.SetBackgroundColour(wx.Colour(35, 35, 142))
- spacer_2.SetFont(wx.Font(5, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, 0, ""))
- sizer_main.Add(spacer_2, 0, wx.EXPAND, 0)
- sizer_main.Add((20, 20), 0, 0, 0)
- sizer_main.Add(self.heading_out_envdata, 0, wx.EXPAND, 0)
- sizer_4.Add(self.out_humidity, 1, wx.ALIGN_RIGHT | wx.EXPAND | wx.RIGHT, 0)
- sizer_4.Add(self.out_pressure, 1, wx.ALIGN_RIGHT | wx.EXPAND | wx.RIGHT, 0)
- sizer_env_data_out.Add(sizer_4, 1, wx.EXPAND, 0)
- sizer_7.Add(self.out_temperature_min, 1, wx.ALIGN_RIGHT | wx.EXPAND | wx.RIGHT, 0)
- sizer_7.Add(self.out_temperature_max, 1, wx.ALIGN_RIGHT | wx.EXPAND | wx.RIGHT, 0)
- sizer_env_data_out.Add(sizer_7, 1, wx.EXPAND, 0)
- sizer_env_data_out.Add((50, 20), 0, 0, 0)
- sizer_env_data_out.Add(self.out_temperature, 2, wx.ALIGN_RIGHT | wx.RIGHT, 0)
- sizer_main.Add(sizer_env_data_out, 0, wx.EXPAND, 0)
- sizer_main.Add((20, 20), 0, 0, 0)
- sizer_main.Add(self.heading_in_envdata, 0, wx.EXPAND, 0)
- sizer_5.Add(self.in_humidity, 1, wx.ALIGN_RIGHT | wx.EXPAND | wx.RIGHT, 0)
- sizer_5.Add(self.in_pressure, 1, wx.ALIGN_RIGHT | wx.EXPAND | wx.RIGHT, 0)
- sizer_env_data_in.Add(sizer_5, 1, wx.EXPAND, 0)
- sizer_9.Add(self.in_temperature_min, 1, wx.ALIGN_RIGHT | wx.EXPAND | wx.RIGHT, 0)
- sizer_9.Add(self.in_temperature_max, 1, wx.ALIGN_RIGHT | wx.EXPAND | wx.RIGHT, 0)
- sizer_env_data_in.Add(sizer_9, 1, wx.EXPAND, 0)
- sizer_env_data_in.Add((50, 20), 0, 0, 0)
- sizer_env_data_in.Add(self.in_temperature, 2, wx.ALIGN_RIGHT | wx.RIGHT, 0)
- sizer_main.Add(sizer_env_data_in, 0, wx.EXPAND, 0)
- sizer_main.Add((10, 10), 1, 0, 0)
- sizer_main.Add(self.heading_garage, 0, wx.EXPAND, 0)
- sizer_8.Add(self.gate_oc, 0, 0, 0)
- sizer_8.Add(self.gate_close, 0, wx.ALIGN_CENTER, 0)
- sizer_8.Add(self.gate_position, 1, wx.EXPAND, 0)
- sizer_8.Add(self.gate_open, 0, wx.ALIGN_CENTER, 0)
- sizer_main.Add(sizer_8, 0, wx.EXPAND, 0)
- self.SetSizer(sizer_main)
- self.Layout()
- # end wxGlade
-
- def gate_oc_evt(self, event): # wxGlade: Wetation.<event_handler>
- print("Event handler 'gate_oc_evt' not implemented!")
- event.Skip()
-
- # end of class Wetation
-
- class MyApp(wx.App):
- def OnInit(self):
- self.wetation = Wetation(None, wx.ID_ANY, "")
- self.SetTopWindow(self.wetation)
- self.wetation.Show()
- return True
-
- # end of class MyApp
-
- if __name__ == "__main__":
- app = MyApp(0)
- app.MainLoop()
|