mydialogsbase.pyΒΆ

This script provides the Python code for the graphical user interfaces created with the wxFormBuilder (wxFB) template MyDialogs.fbp.

These dialogs can be used together with the Narda Script Launcher applications for multithreaded processes.

Note

Do not edit the base dialog script mydialogsbase.py.

To add/remove widgets in the dialogs, modify the template MyDialogs.fbp in wxFormBuilder.

  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
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
# -*- coding: utf-8 -*-

###########################################################################
## Python code generated with wxFormBuilder (version Oct 26 2018)
## http://www.wxformbuilder.org/
##
## PLEASE DO *NOT* EDIT THIS FILE!
###########################################################################

from nardascripting.base.measthread import DataVisualizationDlg
import wx
import wx.xrc

###########################################################################
## Class MySettingsBaseDlg
###########################################################################

class MySettingsBaseDlg ( wx.Dialog ):

	def __init__( self, parent ):
		wx.Dialog.__init__ ( self, parent, id = wx.ID_ANY, title = u"Settings", pos = wx.DefaultPosition, size = wx.Size( 698,645 ), style = wx.DEFAULT_DIALOG_STYLE )

		self.SetSizeHints( wx.DefaultSize, wx.DefaultSize )
		self.SetBackgroundColour( wx.SystemSettings.GetColour( wx.SYS_COLOUR_INACTIVEBORDER ) )

		bSizer1 = wx.BoxSizer( wx.VERTICAL )

		self.m_panel1 = wx.Panel( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.BORDER_SUNKEN|wx.TAB_TRAVERSAL )
		self.m_panel1.SetBackgroundColour( wx.SystemSettings.GetColour( wx.SYS_COLOUR_HIGHLIGHTTEXT ) )

		bSizer4 = wx.BoxSizer( wx.VERTICAL )

		self.m_staticText3 = wx.StaticText( self.m_panel1, wx.ID_ANY, u"Example content.", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.m_staticText3.Wrap( -1 )

		bSizer4.Add( self.m_staticText3, 0, wx.ALL, 5 )


		self.m_panel1.SetSizer( bSizer4 )
		self.m_panel1.Layout()
		bSizer4.Fit( self.m_panel1 )
		bSizer1.Add( self.m_panel1, 1, wx.EXPAND |wx.ALL, 5 )

		my_ok_cancel_btns = wx.StdDialogButtonSizer()
		self.my_ok_cancel_btnsOK = wx.Button( self, wx.ID_OK )
		my_ok_cancel_btns.AddButton( self.my_ok_cancel_btnsOK )
		self.my_ok_cancel_btnsCancel = wx.Button( self, wx.ID_CANCEL )
		my_ok_cancel_btns.AddButton( self.my_ok_cancel_btnsCancel )
		my_ok_cancel_btns.Realize();

		bSizer1.Add( my_ok_cancel_btns, 0, wx.EXPAND, 5 )


		self.SetSizer( bSizer1 )
		self.Layout()

		self.Centre( wx.BOTH )

		# Connect Events
		self.my_ok_cancel_btnsCancel.Bind( wx.EVT_BUTTON, self.on_cancel )
		self.my_ok_cancel_btnsOK.Bind( wx.EVT_BUTTON, self.on_ok )

	def __del__( self ):
		pass


	# Virtual event handlers, overide them in your derived class
	def on_cancel( self, event ):
		event.Skip()

	def on_ok( self, event ):
		event.Skip()


###########################################################################
## Class MyMeasGUIBaseDlg
###########################################################################

class MyMeasGUIBaseDlg ( DataVisualizationDlg ):

	def __init__( self, parent ):
		DataVisualizationDlg.__init__ ( self, parent, id = wx.ID_ANY, title = u"My Measurement", pos = wx.DefaultPosition, size = wx.Size( 729,636 ), style = wx.DEFAULT_FRAME_STYLE|wx.TAB_TRAVERSAL )

		self.SetSizeHints( wx.DefaultSize, wx.DefaultSize )
		self.SetBackgroundColour( wx.SystemSettings.GetColour( wx.SYS_COLOUR_INACTIVEBORDER ) )

		bSizer3 = wx.BoxSizer( wx.VERTICAL )

		self.m_panel2 = wx.Panel( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.BORDER_SUNKEN|wx.TAB_TRAVERSAL )
		self.m_panel2.SetForegroundColour( wx.SystemSettings.GetColour( wx.SYS_COLOUR_WINDOWTEXT ) )
		self.m_panel2.SetBackgroundColour( wx.SystemSettings.GetColour( wx.SYS_COLOUR_WINDOW ) )

		fgSizer2 = wx.FlexGridSizer( 0, 2, 0, 0 )
		fgSizer2.SetFlexibleDirection( wx.BOTH )
		fgSizer2.SetNonFlexibleGrowMode( wx.FLEX_GROWMODE_SPECIFIED )

		self.bmp_symbol = wx.StaticBitmap( self.m_panel2, wx.ID_ANY, wx.NullBitmap, wx.DefaultPosition, wx.Size( 48,48 ), 0 )
		self.bmp_symbol.SetMaxSize( wx.Size( 48,48 ) )

		fgSizer2.Add( self.bmp_symbol, 0, wx.ALL, 5 )

		self.txt_my_meas_values = wx.StaticText( self.m_panel2, wx.ID_ANY, u"Example content.", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.txt_my_meas_values.Wrap( -1 )

		fgSizer2.Add( self.txt_my_meas_values, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 )


		self.m_panel2.SetSizer( fgSizer2 )
		self.m_panel2.Layout()
		fgSizer2.Fit( self.m_panel2 )
		bSizer3.Add( self.m_panel2, 1, wx.EXPAND|wx.ALL, 10 )

		fgSizer1 = wx.FlexGridSizer( 0, 2, 0, 0 )
		fgSizer1.AddGrowableCol( 1 )
		fgSizer1.SetFlexibleDirection( wx.BOTH )
		fgSizer1.SetNonFlexibleGrowMode( wx.FLEX_GROWMODE_SPECIFIED )

		self.bmp_icon = wx.StaticBitmap( self, wx.ID_ANY, wx.NullBitmap, wx.DefaultPosition, wx.DefaultSize, 0 )
		fgSizer1.Add( self.bmp_icon, 0, wx.ALL, 5 )

		self.lbl_status = wx.StaticText( self, wx.ID_ANY, u"Status Label", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.lbl_status.Wrap( -1 )

		fgSizer1.Add( self.lbl_status, 0, wx.ALL, 5 )


		fgSizer1.Add( ( 0, 0), 1, wx.EXPAND, 5 )

		self.pgb_progress = wx.Gauge( self, wx.ID_ANY, 100, wx.DefaultPosition, wx.DefaultSize, wx.GA_HORIZONTAL )
		self.pgb_progress.SetValue( 0 )
		self.pgb_progress.SetBackgroundColour( wx.SystemSettings.GetColour( wx.SYS_COLOUR_INACTIVEBORDER ) )

		fgSizer1.Add( self.pgb_progress, 0, wx.ALL, 5 )


		bSizer3.Add( fgSizer1, 0, wx.EXPAND, 5 )

		self.sdbs_buttons = wx.StdDialogButtonSizer()
		self.sdbs_buttons.Realize();

		bSizer3.Add( self.sdbs_buttons, 0, wx.ALL|wx.EXPAND, 10 )


		self.SetSizer( bSizer3 )
		self.Layout()

		self.Centre( wx.BOTH )

	def __del__( self ):
		pass


download example03.zip