Read-Sensor-Resistances/ui.py

147 lines
6.8 KiB
Python
Raw Normal View History

2022-05-15 19:48:22 +00:00
# -*- coding: utf-8 -*-
###########################################################################
## Python code generated with wxFormBuilder (version Jun 17 2015)
## http://www.wxformbuilder.org/
##
## PLEASE DO "NOT" EDIT THIS FILE!
###########################################################################
import wx
2023-02-07 06:57:05 +00:00
import wx.xrc
2022-05-15 19:48:22 +00:00
###########################################################################
## Class Frame
###########################################################################
class Frame ( wx.Frame ):
def __init__( self, parent ):
2023-02-07 06:57:05 +00:00
wx.Frame.__init__ ( self, parent, id = wx.ID_ANY, title = wx.EmptyString, pos = wx.DefaultPosition, size = wx.Size( 470,330 ), style = wx.DEFAULT_FRAME_STYLE )
2022-05-15 19:48:22 +00:00
self.SetSizeHintsSz( wx.Size( 470,330 ), wx.DefaultSize )
self.SetForegroundColour( wx.SystemSettings.GetColour( wx.SYS_COLOUR_BTNTEXT ) )
self.SetBackgroundColour( wx.SystemSettings.GetColour( wx.SYS_COLOUR_WINDOW ) )
bSizer1 = wx.BoxSizer( wx.VERTICAL )
bSizer1.SetMinSize( wx.Size( 451,324 ) )
ref_entre = wx.StaticBoxSizer( wx.StaticBox( self, wx.ID_ANY, u"Reference Resistors, in Ohms (zero if none)" ), wx.VERTICAL )
res_grid = wx.GridSizer( 2, 4, 0, 0 )
self.r1_prompt = wx.StaticText( ref_entre.GetStaticBox(), wx.ID_ANY, u"Resistor 1", wx.DefaultPosition, wx.DefaultSize, 0 )
self.r1_prompt.Wrap( -1 )
res_grid.Add( self.r1_prompt, 0, wx.ALIGN_BOTTOM|wx.ALIGN_CENTER_HORIZONTAL, 5 )
2023-02-07 06:57:05 +00:00
2022-05-15 19:48:22 +00:00
self.r2_prompt = wx.StaticText( ref_entre.GetStaticBox(), wx.ID_ANY, u"Resistor 2", wx.DefaultPosition, wx.DefaultSize, 0 )
self.r2_prompt.Wrap( -1 )
res_grid.Add( self.r2_prompt, 0, wx.ALIGN_BOTTOM|wx.ALIGN_CENTER_HORIZONTAL, 5 )
2023-02-07 06:57:05 +00:00
self.r3_prompt = wx.StaticText( ref_entre.GetStaticBox(), wx.ID_ANY, u"Resistor 3", wx.DefaultPosition, wx.DefaultSize, 0 )
self.r3_prompt.Wrap( -1 )
res_grid.Add( self.r3_prompt, 0, wx.ALIGN_BOTTOM|wx.ALIGN_CENTER_HORIZONTAL, 5 )
2022-05-15 19:48:22 +00:00
self.r4_prompt = wx.StaticText( ref_entre.GetStaticBox(), wx.ID_ANY, u"Resistor 4", wx.DefaultPosition, wx.DefaultSize, 0 )
self.r4_prompt.Wrap( -1 )
res_grid.Add( self.r4_prompt, 0, wx.ALIGN_BOTTOM|wx.ALIGN_CENTER_HORIZONTAL, 5 )
self.r_ref_1 = wx.TextCtrl( ref_entre.GetStaticBox(), wx.ID_ANY, u"0", wx.DefaultPosition, wx.DefaultSize, 0 )
2022-05-15 19:48:22 +00:00
res_grid.Add( self.r_ref_1, 0, wx.ALIGN_CENTER_HORIZONTAL, 5 )
self.r_ref_2 = wx.TextCtrl( ref_entre.GetStaticBox(), wx.ID_ANY, u"0", wx.DefaultPosition, wx.DefaultSize, 0 )
2022-05-15 19:48:22 +00:00
res_grid.Add( self.r_ref_2, 0, wx.ALIGN_CENTER_HORIZONTAL, 5 )
self.r_ref_3 = wx.TextCtrl( ref_entre.GetStaticBox(), wx.ID_ANY, u"0", wx.DefaultPosition, wx.DefaultSize, 0 )
2022-05-15 19:48:22 +00:00
res_grid.Add( self.r_ref_3, 0, wx.ALIGN_CENTER_HORIZONTAL, 5 )
self.r_ref_4 = wx.TextCtrl( ref_entre.GetStaticBox(), wx.ID_ANY, u"0", wx.DefaultPosition, wx.DefaultSize, 0 )
2022-05-15 19:48:22 +00:00
res_grid.Add( self.r_ref_4, 0, wx.ALIGN_CENTER_HORIZONTAL, 5 )
ref_entre.Add( res_grid, 1, wx.ALIGN_CENTER|wx.ALIGN_CENTER_HORIZONTAL, 5 )
bSizer1.Add( ref_entre, 0, wx.EXPAND, 5 )
v_entre = wx.StaticBoxSizer( wx.StaticBox( self, wx.ID_ANY, u"Additional Parameters (Do not change unless you know what you are doing!)" ), wx.VERTICAL )
2022-05-15 19:48:22 +00:00
gbSizer8 = wx.GridBagSizer( 0, 0 )
gbSizer8.SetFlexibleDirection( wx.BOTH )
gbSizer8.SetNonFlexibleGrowMode( wx.FLEX_GROWMODE_SPECIFIED )
self.vin_prompt = wx.StaticText( v_entre.GetStaticBox(), wx.ID_ANY, u"Source Voltage", wx.DefaultPosition, wx.DefaultSize, wx.ALIGN_RIGHT|wx.ST_ELLIPSIZE_END )
self.vin_prompt.Wrap( -1 )
gbSizer8.Add( self.vin_prompt, wx.GBPosition( 0, 0 ), wx.GBSpan( 1, 1 ), wx.ALIGN_RIGHT|wx.ALIGN_CENTER_VERTICAL, 5 )
self.input_voltage = wx.TextCtrl( v_entre.GetStaticBox(), wx.ID_ANY, u"3.3", wx.DefaultPosition, wx.DefaultSize, 0 )
self.input_voltage.SetToolTipString( u"Input voltage of the resistors, default 3.3 volts" )
2022-05-15 19:48:22 +00:00
gbSizer8.Add( self.input_voltage, wx.GBPosition( 0, 1 ), wx.GBSpan( 1, 1 ), wx.ALIGN_CENTER_VERTICAL|wx.ALIGN_CENTER_HORIZONTAL|wx.ALL, 5 )
self.sizer_prompt = wx.StaticText( v_entre.GetStaticBox(), wx.ID_ANY, u"Window Size", wx.DefaultPosition, wx.DefaultSize, wx.ALIGN_RIGHT|wx.ST_ELLIPSIZE_END )
self.sizer_prompt.Wrap( -1 )
gbSizer8.Add( self.sizer_prompt, wx.GBPosition( 2, 0 ), wx.GBSpan( 1, 1 ), wx.ALIGN_CENTER_VERTICAL|wx.ALIGN_RIGHT, 5 )
self.m_textCtrl26 = wx.TextCtrl( v_entre.GetStaticBox(), wx.ID_ANY, u"50", wx.DefaultPosition, wx.DefaultSize, 0 )
2022-05-15 19:48:22 +00:00
self.m_textCtrl26.SetToolTipString( u"Window size for the plot window. If want infinite/maximum size, type 0" )
gbSizer8.Add( self.m_textCtrl26, wx.GBPosition( 2, 1 ), wx.GBSpan( 1, 1 ), wx.ALIGN_CENTER_VERTICAL|wx.ALIGN_CENTER_HORIZONTAL|wx.TOP|wx.RIGHT|wx.LEFT, 5 )
self.unit2 = wx.StaticText( v_entre.GetStaticBox(), wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, 0 )
2022-05-15 19:48:22 +00:00
self.unit2.Wrap( -1 )
gbSizer8.Add( self.unit2, wx.GBPosition( 1, 2 ), wx.GBSpan( 1, 1 ), wx.ALIGN_CENTER_VERTICAL, 5 )
self.unit3 = wx.StaticText( v_entre.GetStaticBox(), wx.ID_ANY, u"Volts", wx.DefaultPosition, wx.DefaultSize, 0 )
self.unit3.Wrap( -1 )
gbSizer8.Add( self.unit3, wx.GBPosition( 0, 2 ), wx.GBSpan( 1, 1 ), wx.ALIGN_CENTER_VERTICAL, 5 )
v_entre.Add( gbSizer8, 1, wx.ALIGN_CENTER|wx.TOP, 5 )
bSizer1.Add( v_entre, 1, wx.EXPAND, 5 )
gb_com_port = wx.GridBagSizer( 0, 0 )
gb_com_port.SetFlexibleDirection( wx.BOTH )
gb_com_port.SetNonFlexibleGrowMode( wx.FLEX_GROWMODE_SPECIFIED )
self.dev_sel = wx.StaticText( self, wx.ID_ANY, u"Device Port", wx.DefaultPosition, wx.DefaultSize, 0 )
self.dev_sel.Wrap( -1 )
gb_com_port.Add( self.dev_sel, wx.GBPosition( 0, 1 ), wx.GBSpan( 1, 1 ), wx.ALIGN_CENTER|wx.ALL, 5 )
dev_listChoices = [ u"- No Device -" ]
self.dev_list = wx.ComboBox( self, wx.ID_ANY, u"- No Device -", wx.DefaultPosition, wx.DefaultSize, dev_listChoices, 0 )
self.dev_list.SetSelection( 0 )
self.dev_list.SetToolTipString( u"Port which Arduino is using. If none just choose \"- No Device -\"" )
gb_com_port.Add( self.dev_list, wx.GBPosition( 0, 2 ), wx.GBSpan( 1, 1 ), wx.ALL, 5 )
bSizer1.Add( gb_com_port, 0, wx.ALIGN_CENTER|wx.ALL, 5 )
launch_opt = wx.GridBagSizer( 0, 0 )
launch_opt.SetFlexibleDirection( wx.BOTH )
launch_opt.SetNonFlexibleGrowMode( wx.FLEX_GROWMODE_SPECIFIED )
self.btLaunch = wx.Button( self, wx.ID_ANY, u"Launch", wx.DefaultPosition, wx.DefaultSize, 0 )
self.btLaunch.SetDefault()
launch_opt.Add( self.btLaunch, wx.GBPosition( 0, 0 ), wx.GBSpan( 1, 1 ), wx.ALL|wx.ALIGN_CENTER_VERTICAL|wx.ALIGN_CENTER_HORIZONTAL, 5 )
bSizer1.Add( launch_opt, 0, wx.ALIGN_CENTER_HORIZONTAL, 5 )
self.show_msg = wx.CheckBox( self, wx.ID_ANY, u"Make launcher stays open after started", wx.DefaultPosition, wx.DefaultSize, 0 )
bSizer1.Add( self.show_msg, 0, wx.ALL|wx.ALIGN_CENTER_HORIZONTAL, 5 )
self.SetSizer( bSizer1 )
self.Layout()
self.Centre( wx.BOTH )
def __del__( self ):
pass