happyscript 0.0.59__tar.gz → 0.0.62__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- happyscript-0.0.62/PKG-INFO +72 -0
- happyscript-0.0.62/README.md +54 -0
- {happyscript-0.0.59 → happyscript-0.0.62}/happyscript/__init__.py +1 -1
- {happyscript-0.0.59 → happyscript-0.0.62}/happyscript/forms/form_main.py +15 -3
- happyscript-0.0.62/happyscript/forms/form_main_base.py +185 -0
- {happyscript-0.0.59 → happyscript-0.0.62}/happyscript/forms/formsbase.py +3 -0
- {happyscript-0.0.59 → happyscript-0.0.62}/happyscript/imglib.py +1209 -1043
- {happyscript-0.0.59 → happyscript-0.0.62}/happyscript/panels/panel_tests.py +6 -6
- {happyscript-0.0.59 → happyscript-0.0.62}/happyscript/scriptartwork.py +1 -1
- {happyscript-0.0.59 → happyscript-0.0.62}/happyscript/scriptgui.py +1 -1
- {happyscript-0.0.59 → happyscript-0.0.62}/happyscript/scriptmanager.py +16 -11
- happyscript-0.0.62/happyscript/splashmenu/__init__.py +0 -0
- {happyscript-0.0.59 → happyscript-0.0.62}/happyscript/splashmenu/splashmenuform.py +61 -44
- {happyscript-0.0.59 → happyscript-0.0.62}/happyscript/splashmenu/splashmenumain.py +31 -16
- {happyscript-0.0.59 → happyscript-0.0.62}/happyscript/staticscriptmanager.py +93 -30
- happyscript-0.0.62/happyscript.egg-info/PKG-INFO +72 -0
- {happyscript-0.0.59 → happyscript-0.0.62}/happyscript.egg-info/SOURCES.txt +2 -0
- happyscript-0.0.62/happyscript.egg-info/requires.txt +1 -0
- {happyscript-0.0.59 → happyscript-0.0.62}/pyproject.toml +5 -2
- happyscript-0.0.59/PKG-INFO +0 -32
- happyscript-0.0.59/README.md +0 -15
- happyscript-0.0.59/happyscript.egg-info/PKG-INFO +0 -32
- happyscript-0.0.59/happyscript.egg-info/requires.txt +0 -1
- {happyscript-0.0.59 → happyscript-0.0.62}/LICENSE +0 -0
- {happyscript-0.0.59 → happyscript-0.0.62}/happyscript/charts/__init__.py +0 -0
- {happyscript-0.0.59 → happyscript-0.0.62}/happyscript/charts/chart.py +0 -0
- {happyscript-0.0.59 → happyscript-0.0.62}/happyscript/charts/histogram_chart.py +0 -0
- {happyscript-0.0.59 → happyscript-0.0.62}/happyscript/charts/histogram_series.py +0 -0
- {happyscript-0.0.59 → happyscript-0.0.62}/happyscript/charts/matplotlib_chart.py +0 -0
- {happyscript-0.0.59 → happyscript-0.0.62}/happyscript/charts/panel_charts.py +0 -0
- {happyscript-0.0.59 → happyscript-0.0.62}/happyscript/charts/scatter_chart.py +0 -0
- {happyscript-0.0.59 → happyscript-0.0.62}/happyscript/charts/scatter_series.py +0 -0
- {happyscript-0.0.59 → happyscript-0.0.62}/happyscript/charts/time_chart.py +0 -0
- {happyscript-0.0.59 → happyscript-0.0.62}/happyscript/charts/time_series.py +0 -0
- {happyscript-0.0.59 → happyscript-0.0.62}/happyscript/forms/form_askchoice.py +0 -0
- {happyscript-0.0.59 → happyscript-0.0.62}/happyscript/forms/form_askimage.py +0 -0
- {happyscript-0.0.59 → happyscript-0.0.62}/happyscript/forms/form_ontestfailure.py +0 -0
- {happyscript-0.0.59 → happyscript-0.0.62}/happyscript/forms/form_serials.py +0 -0
- {happyscript-0.0.59 → happyscript-0.0.62}/happyscript/forms/form_settings.py +0 -0
- {happyscript-0.0.59 → happyscript-0.0.62}/happyscript/forms/form_stop.py +0 -0
- {happyscript-0.0.59 → happyscript-0.0.62}/happyscript/inifile.py +0 -0
- {happyscript-0.0.59 → happyscript-0.0.62}/happyscript/modulereader.py +0 -0
- {happyscript-0.0.59 → happyscript-0.0.62}/happyscript/panels/panel_log.py +0 -0
- {happyscript-0.0.59 → happyscript-0.0.62}/happyscript/panels/panel_messages.py +0 -0
- {happyscript-0.0.59 → happyscript-0.0.62}/happyscript/panels/panel_scripts2.py +0 -0
- {happyscript-0.0.59 → happyscript-0.0.62}/happyscript/panels/panelsbase.py +0 -0
- {happyscript-0.0.59 → happyscript-0.0.62}/happyscript/scriptcontrol.py +0 -0
- {happyscript-0.0.59 → happyscript-0.0.62}/happyscript/scriptexceptions.py +0 -0
- {happyscript-0.0.59 → happyscript-0.0.62}/happyscript/scriptinfo.py +0 -0
- {happyscript-0.0.59 → happyscript-0.0.62}/happyscript/scriptparams.py +0 -0
- {happyscript-0.0.59 → happyscript-0.0.62}/happyscript/scriptreader.py +0 -0
- {happyscript-0.0.59 → happyscript-0.0.62}/happyscript/scriptrunner.py +0 -0
- {happyscript-0.0.59 → happyscript-0.0.62}/happyscript/splashmenu/exit.png +0 -0
- {happyscript-0.0.59 → happyscript-0.0.62}/happyscript/splashmenu/forms.py +0 -0
- {happyscript-0.0.59 → happyscript-0.0.62}/happyscript/testlog/global_log_handler.py +0 -0
- {happyscript-0.0.59 → happyscript-0.0.62}/happyscript/testlog/log_to_text.py +0 -0
- {happyscript-0.0.59 → happyscript-0.0.62}/happyscript/testlog/logtoxml.py +0 -0
- {happyscript-0.0.59 → happyscript-0.0.62}/happyscript/testlog/printredirect.py +0 -0
- {happyscript-0.0.59 → happyscript-0.0.62}/happyscript/testloghandler.py +0 -0
- {happyscript-0.0.59 → happyscript-0.0.62}/happyscript/userpanel/userpanel.py +0 -0
- {happyscript-0.0.59 → happyscript-0.0.62}/happyscript/userpanel/userpanelvalue.py +0 -0
- {happyscript-0.0.59 → happyscript-0.0.62}/happyscript.egg-info/dependency_links.txt +0 -0
- {happyscript-0.0.59 → happyscript-0.0.62}/happyscript.egg-info/top_level.txt +0 -0
- {happyscript-0.0.59 → happyscript-0.0.62}/setup.cfg +0 -0
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: happyscript
|
|
3
|
+
Version: 0.0.62
|
|
4
|
+
Summary: GUI framework for running python scripts in a test or production environment
|
|
5
|
+
Author: Marc Van Riet
|
|
6
|
+
License-Expression: GPL-3.0-or-later
|
|
7
|
+
Project-URL: Documentation, https://happyscript.readthedocs.io
|
|
8
|
+
Classifier: Development Status :: 4 - Beta
|
|
9
|
+
Classifier: Programming Language :: Python :: 3
|
|
10
|
+
Classifier: Operating System :: OS Independent
|
|
11
|
+
Classifier: Natural Language :: English
|
|
12
|
+
Classifier: Topic :: Scientific/Engineering
|
|
13
|
+
Requires-Python: >=3.5
|
|
14
|
+
Description-Content-Type: text/markdown
|
|
15
|
+
License-File: LICENSE
|
|
16
|
+
Requires-Dist: wxpython
|
|
17
|
+
Dynamic: license-file
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
**Happyscript** is a framework intended for running Python scripts against electronic hardware
|
|
23
|
+
and test equipment in an engineering or production environment.
|
|
24
|
+
|
|
25
|
+
It offers :
|
|
26
|
+
|
|
27
|
+
* tabbed GUI
|
|
28
|
+
* logging window with command line with history
|
|
29
|
+
* script selection from a treeview
|
|
30
|
+
* predefined test lists
|
|
31
|
+
* Python console with code completion
|
|
32
|
+
* basic charts
|
|
33
|
+
* easy GUI functions for user interaction
|
|
34
|
+
* easy panels with user controls
|
|
35
|
+
* .ini-file settings window
|
|
36
|
+
|
|
37
|
+
## Installation
|
|
38
|
+
|
|
39
|
+
Just use `pip install happyscript`. This will also install wxpython, which is the only dependency.
|
|
40
|
+
|
|
41
|
+
Matplotlib can be used for charts, but you have to install this manually. It is not added as dependency to keep the number of dependencies low.
|
|
42
|
+
|
|
43
|
+
## ScriptManager
|
|
44
|
+
|
|
45
|
+
The [ScriptManager](https://happyscript.readthedocs.io/en/latest/script_manager/) object takes care of the GUI. The minimal program is this :
|
|
46
|
+
``` py
|
|
47
|
+
import happyscript
|
|
48
|
+
mngr = happyscript.ScriptManager()
|
|
49
|
+
mngr.run()
|
|
50
|
+
```
|
|
51
|
+
This will give you a main window with a lot of options, depending on the type of user. Click the leftmost icon in the menu bar to enable more options.
|
|
52
|
+
|
|
53
|
+
You can get an idea of the possibilities by looking at the tutorial on [github](https://github.com/mvanriet/happyscript/tree/main/examples/tutorial/). Further information will be gradually added on [ReadTheDocs](https://happyscript.readthedocs.io/en/latest/).
|
|
54
|
+
|
|
55
|
+
Since `ScriptManager` loads its Python scripts dynamically, the resulting application cannot be converted to a static executable. To allow this anyway, there is a variant [StaticScriptManager](https://happyscript.readthedocs.io/en/latest/static_script_manager/) which is similar, but requires you to import the scripts explicitly, and therefore does not offer script reloads.
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
## Splashmenu
|
|
59
|
+
|
|
60
|
+
Sometimes the user needs a nice menu to select different things to test.
|
|
61
|
+
|
|
62
|
+
This is easy to implement using the [SplashMenu](https://happyscript.readthedocs.io/en/latest/splashmenu/) object. This code will show buttons for two tests, and an 'exit' sign :
|
|
63
|
+
``` python
|
|
64
|
+
import happyscript
|
|
65
|
+
menu = happyscript.SplashMenu(__file__, 2, 2)
|
|
66
|
+
menu.set_button(1,1, "image1.png", "test1.py")
|
|
67
|
+
menu.set_button(2,1, "subdir/another_image.png", "subdir/another_test.exe", "COM1:" )
|
|
68
|
+
menu.run()
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
See the [examples](https://github.com/mvanriet/happyscript/tree/main/examples/splashmenu) for a demo.
|
|
72
|
+
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
**Happyscript** is a framework intended for running Python scripts against electronic hardware
|
|
5
|
+
and test equipment in an engineering or production environment.
|
|
6
|
+
|
|
7
|
+
It offers :
|
|
8
|
+
|
|
9
|
+
* tabbed GUI
|
|
10
|
+
* logging window with command line with history
|
|
11
|
+
* script selection from a treeview
|
|
12
|
+
* predefined test lists
|
|
13
|
+
* Python console with code completion
|
|
14
|
+
* basic charts
|
|
15
|
+
* easy GUI functions for user interaction
|
|
16
|
+
* easy panels with user controls
|
|
17
|
+
* .ini-file settings window
|
|
18
|
+
|
|
19
|
+
## Installation
|
|
20
|
+
|
|
21
|
+
Just use `pip install happyscript`. This will also install wxpython, which is the only dependency.
|
|
22
|
+
|
|
23
|
+
Matplotlib can be used for charts, but you have to install this manually. It is not added as dependency to keep the number of dependencies low.
|
|
24
|
+
|
|
25
|
+
## ScriptManager
|
|
26
|
+
|
|
27
|
+
The [ScriptManager](https://happyscript.readthedocs.io/en/latest/script_manager/) object takes care of the GUI. The minimal program is this :
|
|
28
|
+
``` py
|
|
29
|
+
import happyscript
|
|
30
|
+
mngr = happyscript.ScriptManager()
|
|
31
|
+
mngr.run()
|
|
32
|
+
```
|
|
33
|
+
This will give you a main window with a lot of options, depending on the type of user. Click the leftmost icon in the menu bar to enable more options.
|
|
34
|
+
|
|
35
|
+
You can get an idea of the possibilities by looking at the tutorial on [github](https://github.com/mvanriet/happyscript/tree/main/examples/tutorial/). Further information will be gradually added on [ReadTheDocs](https://happyscript.readthedocs.io/en/latest/).
|
|
36
|
+
|
|
37
|
+
Since `ScriptManager` loads its Python scripts dynamically, the resulting application cannot be converted to a static executable. To allow this anyway, there is a variant [StaticScriptManager](https://happyscript.readthedocs.io/en/latest/static_script_manager/) which is similar, but requires you to import the scripts explicitly, and therefore does not offer script reloads.
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
## Splashmenu
|
|
41
|
+
|
|
42
|
+
Sometimes the user needs a nice menu to select different things to test.
|
|
43
|
+
|
|
44
|
+
This is easy to implement using the [SplashMenu](https://happyscript.readthedocs.io/en/latest/splashmenu/) object. This code will show buttons for two tests, and an 'exit' sign :
|
|
45
|
+
``` python
|
|
46
|
+
import happyscript
|
|
47
|
+
menu = happyscript.SplashMenu(__file__, 2, 2)
|
|
48
|
+
menu.set_button(1,1, "image1.png", "test1.py")
|
|
49
|
+
menu.set_button(2,1, "subdir/another_image.png", "subdir/another_test.exe", "COM1:" )
|
|
50
|
+
menu.run()
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
See the [examples](https://github.com/mvanriet/happyscript/tree/main/examples/splashmenu) for a demo.
|
|
54
|
+
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
|
|
14
14
|
import wx
|
|
15
15
|
import wx.py as py
|
|
16
|
-
import configparser
|
|
16
|
+
import sys, os, configparser, subprocess
|
|
17
17
|
|
|
18
18
|
try:
|
|
19
19
|
from agw import aui
|
|
@@ -33,7 +33,7 @@ from ..charts.panel_charts import PanelCharts
|
|
|
33
33
|
# Class FormProduction
|
|
34
34
|
#=====================================================================================================================
|
|
35
35
|
|
|
36
|
-
from .
|
|
36
|
+
from .form_main_base import FormMain_Base
|
|
37
37
|
|
|
38
38
|
class FormMain(FormMain_Base):
|
|
39
39
|
|
|
@@ -69,7 +69,7 @@ class FormMain(FormMain_Base):
|
|
|
69
69
|
|
|
70
70
|
#------------------------------------------------------------- add the messages
|
|
71
71
|
info = wx.aui.AuiPaneInfo().Caption("Messages").Name("Messages")
|
|
72
|
-
info.Center().Layer(
|
|
72
|
+
info.Center().Layer(0).Dock().CloseButton(False).MinSize( (100,200) )
|
|
73
73
|
|
|
74
74
|
self.msgArea = PanelMessages(self)
|
|
75
75
|
self.m_mgr.AddPane(self.msgArea, info)
|
|
@@ -380,3 +380,15 @@ class FormMain(FormMain_Base):
|
|
|
380
380
|
'''
|
|
381
381
|
self.m_mnuToolbar.EnableTool(self.m_btnSettings.GetId(), False)
|
|
382
382
|
# self.m_btnSettings.Hide()
|
|
383
|
+
|
|
384
|
+
def OnBtnHelp( self, event ):
|
|
385
|
+
url = "https://happyscript.readthedocs.io"
|
|
386
|
+
try:
|
|
387
|
+
if sys.platform=='win32':
|
|
388
|
+
os.startfile(url)
|
|
389
|
+
elif sys.platform=='darwin':
|
|
390
|
+
subprocess.Popen(['open', url])
|
|
391
|
+
else:
|
|
392
|
+
subprocess.Popen(['xdg-open', url])
|
|
393
|
+
except Exception as e:
|
|
394
|
+
print(f"Failed to open help URL: {e}")
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
|
|
2
|
+
###########################################################################
|
|
3
|
+
## Python code initially generated with wxFormBuilder (version 4.2.1-0-g80c4cb6)
|
|
4
|
+
## http://www.wxformbuilder.org/
|
|
5
|
+
###########################################################################
|
|
6
|
+
|
|
7
|
+
import wx
|
|
8
|
+
import wx.xrc
|
|
9
|
+
import wx.aui
|
|
10
|
+
|
|
11
|
+
ID_BTN_TESTLIST = 6000
|
|
12
|
+
ID_BTN_MESSAGES = 6001
|
|
13
|
+
ID_BTN_LOGGING = 6002
|
|
14
|
+
ID_BTN_SCRIPTS = 6003
|
|
15
|
+
ID_BTN_PYTHON = 6004
|
|
16
|
+
ID_BTN_CONTROLS = 6005
|
|
17
|
+
ID_BTN_CHARTS = 6006
|
|
18
|
+
ID_BTN_HELP = 6007
|
|
19
|
+
|
|
20
|
+
###########################################################################
|
|
21
|
+
## Class FormMain_Base
|
|
22
|
+
###########################################################################
|
|
23
|
+
|
|
24
|
+
class FormMain_Base ( wx.Frame ):
|
|
25
|
+
|
|
26
|
+
def __init__( self, parent ):
|
|
27
|
+
wx.Frame.__init__ ( self, parent, id = wx.ID_ANY, title = u"HappyScript -", pos = wx.DefaultPosition, size = wx.Size( 800,600 ), style = wx.DEFAULT_FRAME_STYLE|wx.TAB_TRAVERSAL )
|
|
28
|
+
|
|
29
|
+
self.SetSizeHints( wx.DefaultSize, wx.DefaultSize )
|
|
30
|
+
self.m_mgr = wx.aui.AuiManager()
|
|
31
|
+
self.m_mgr.SetManagedWindow( self )
|
|
32
|
+
self.m_mgr.SetFlags(wx.aui.AUI_MGR_ALLOW_FLOATING|wx.aui.AUI_MGR_RECTANGLE_HINT|wx.aui.AUI_MGR_TRANSPARENT_HINT)
|
|
33
|
+
|
|
34
|
+
self.m_guiTimer = wx.Timer()
|
|
35
|
+
self.m_guiTimer.SetOwner( self, self.m_guiTimer.GetId() )
|
|
36
|
+
|
|
37
|
+
# Toolbar
|
|
38
|
+
|
|
39
|
+
self.m_mnuToolbar = wx.aui.AuiToolBar( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.aui.AUI_TB_TEXT )
|
|
40
|
+
self.m_mnuToolbar.SetForegroundColour( wx.SystemSettings.GetColour( wx.SYS_COLOUR_WINDOW ) )
|
|
41
|
+
self.m_mnuToolbar.SetBackgroundColour( wx.SystemSettings.GetColour( wx.SYS_COLOUR_WINDOW ) )
|
|
42
|
+
|
|
43
|
+
self.m_btnLayout = self.m_mnuToolbar.AddTool( wx.ID_ANY, u"User", wx.ArtProvider.GetBitmap( "layout_DD", ), wx.NullBitmap, wx.ITEM_NORMAL, wx.EmptyString, wx.EmptyString, None )
|
|
44
|
+
|
|
45
|
+
self.m_btnSettings = self.m_mnuToolbar.AddTool( wx.ID_ANY, u"Settings", wx.ArtProvider.GetBitmap( "settings", ), wx.NullBitmap, wx.ITEM_NORMAL, wx.EmptyString, wx.EmptyString, None )
|
|
46
|
+
|
|
47
|
+
self.m_mnuToolbar.AddSeparator()
|
|
48
|
+
|
|
49
|
+
self.m_btnTestList = self.m_mnuToolbar.AddTool( ID_BTN_TESTLIST, u"Tests", wx.ArtProvider.GetBitmap( "tests", ), wx.NullBitmap, wx.ITEM_NORMAL, wx.EmptyString, wx.EmptyString, None )
|
|
50
|
+
|
|
51
|
+
self.m_btnMessages = self.m_mnuToolbar.AddTool( ID_BTN_MESSAGES, u"Messages", wx.ArtProvider.GetBitmap( "messages", ), wx.NullBitmap, wx.ITEM_NORMAL, wx.EmptyString, wx.EmptyString, None )
|
|
52
|
+
|
|
53
|
+
self.m_btnLogging = self.m_mnuToolbar.AddTool( ID_BTN_LOGGING, u"Logging", wx.ArtProvider.GetBitmap( "logging", ), wx.NullBitmap, wx.ITEM_NORMAL, wx.EmptyString, wx.EmptyString, None )
|
|
54
|
+
|
|
55
|
+
self.m_btnScripts = self.m_mnuToolbar.AddTool( ID_BTN_SCRIPTS, u"Scripts", wx.ArtProvider.GetBitmap( "script_list", ), wx.NullBitmap, wx.ITEM_NORMAL, wx.EmptyString, wx.EmptyString, None )
|
|
56
|
+
|
|
57
|
+
self.m_btnPython = self.m_mnuToolbar.AddTool( ID_BTN_PYTHON, u"Python", wx.ArtProvider.GetBitmap( "python", ), wx.NullBitmap, wx.ITEM_NORMAL, wx.EmptyString, wx.EmptyString, None )
|
|
58
|
+
|
|
59
|
+
self.m_btnControls = self.m_mnuToolbar.AddTool( ID_BTN_CONTROLS, u"Controls", wx.ArtProvider.GetBitmap( "control_panel", ), wx.NullBitmap, wx.ITEM_NORMAL, wx.EmptyString, wx.EmptyString, None )
|
|
60
|
+
|
|
61
|
+
self.m_btnCharts = self.m_mnuToolbar.AddTool( ID_BTN_CHARTS, u"Charts", wx.ArtProvider.GetBitmap( "charts", ), wx.NullBitmap, wx.ITEM_NORMAL, wx.EmptyString, wx.EmptyString, None )
|
|
62
|
+
|
|
63
|
+
self.m_btnHelp = self.m_mnuToolbar.AddTool( ID_BTN_HELP, u"Help", wx.ArtProvider.GetBitmap( "help", ), wx.NullBitmap, wx.ITEM_NORMAL, wx.EmptyString, wx.EmptyString, None )
|
|
64
|
+
|
|
65
|
+
self.m_mnuToolbar.AddSeparator()
|
|
66
|
+
|
|
67
|
+
self.m_btnExit = self.m_mnuToolbar.AddTool( wx.ID_ANY, u"Exit", wx.ArtProvider.GetBitmap( wx.ART_QUIT, ), wx.NullBitmap, wx.ITEM_NORMAL, wx.EmptyString, wx.EmptyString, None )
|
|
68
|
+
|
|
69
|
+
self.m_mnuToolbar.Realize()
|
|
70
|
+
self.m_mgr.AddPane( self.m_mnuToolbar, wx.aui.AuiPaneInfo() .Name( u"dfasdf" ).Top() .Caption( u"ZXcZXcZXcZXC" ).CaptionVisible( False ).CloseButton( False ).PaneBorder( False ).Movable( False ).Dock().Resizable().FloatingSize( wx.DefaultSize ).BottomDockable( False ).TopDockable( False ).LeftDockable( False ).RightDockable( False ).Floatable( False ).Layer( 3 ) )
|
|
71
|
+
|
|
72
|
+
# Status bar in the bottom
|
|
73
|
+
|
|
74
|
+
self.m_statusBar1 = self.CreateStatusBar( 1, wx.STB_SIZEGRIP, wx.ID_ANY )
|
|
75
|
+
|
|
76
|
+
# Menu for operator level
|
|
77
|
+
|
|
78
|
+
self.m_mnuLayout = wx.Menu()
|
|
79
|
+
self.m_mniLayoutOperator = wx.MenuItem( self.m_mnuLayout, wx.ID_ANY, u"Operator", wx.EmptyString, wx.ITEM_NORMAL )
|
|
80
|
+
self.m_mniLayoutOperator.SetBitmap( wx.ArtProvider.GetBitmap( "user_operator", ) )
|
|
81
|
+
self.m_mnuLayout.Append( self.m_mniLayoutOperator )
|
|
82
|
+
|
|
83
|
+
self.m_mniLayoutTechnician = wx.MenuItem( self.m_mnuLayout, wx.ID_ANY, u"Technician", wx.EmptyString, wx.ITEM_NORMAL )
|
|
84
|
+
self.m_mniLayoutTechnician.SetBitmap( wx.ArtProvider.GetBitmap( "user_technician", ) )
|
|
85
|
+
self.m_mnuLayout.Append( self.m_mniLayoutTechnician )
|
|
86
|
+
|
|
87
|
+
self.m_mniLayoutEngineer = wx.MenuItem( self.m_mnuLayout, wx.ID_ANY, u"Engineer", wx.EmptyString, wx.ITEM_NORMAL )
|
|
88
|
+
self.m_mniLayoutEngineer.SetBitmap( wx.ArtProvider.GetBitmap( "user_engineer", ) )
|
|
89
|
+
self.m_mnuLayout.Append( self.m_mniLayoutEngineer )
|
|
90
|
+
|
|
91
|
+
self.m_mniLayoutExpert = wx.MenuItem( self.m_mnuLayout, wx.ID_ANY, u"Expert", wx.EmptyString, wx.ITEM_NORMAL )
|
|
92
|
+
self.m_mniLayoutExpert.SetBitmap( wx.ArtProvider.GetBitmap( "user_expert", ) )
|
|
93
|
+
self.m_mnuLayout.Append( self.m_mniLayoutExpert )
|
|
94
|
+
|
|
95
|
+
self.m_mnuLayout.AppendSeparator()
|
|
96
|
+
|
|
97
|
+
self.m_mniLayoutReset = wx.MenuItem( self.m_mnuLayout, wx.ID_ANY, u"Reset to default", wx.EmptyString, wx.ITEM_NORMAL )
|
|
98
|
+
self.m_mniLayoutReset.SetBitmap( wx.ArtProvider.GetBitmap( "reset", ) )
|
|
99
|
+
self.m_mnuLayout.Append( self.m_mniLayoutReset )
|
|
100
|
+
self.m_mniLayoutReset.Enable( False )
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
self.m_mgr.Update()
|
|
105
|
+
self.Centre( wx.BOTH )
|
|
106
|
+
|
|
107
|
+
# Connect Events
|
|
108
|
+
self.Bind( wx.EVT_CLOSE, self.OnFormClose )
|
|
109
|
+
self.Bind( wx.EVT_TIMER, self.OnGuiTimer, id=self.m_guiTimer.GetId() )
|
|
110
|
+
self.Bind( wx.EVT_TOOL, self.OnMnuLayoutClicked, id = self.m_btnLayout.GetId() )
|
|
111
|
+
self.Bind( wx.EVT_TOOL, self.OnMnuSettingsClicked, id = self.m_btnSettings.GetId() )
|
|
112
|
+
self.Bind( wx.EVT_TOOL, self.OnBtnTestList, id = self.m_btnTestList.GetId() )
|
|
113
|
+
self.Bind( wx.EVT_TOOL, self.OnBtnMessages, id = self.m_btnMessages.GetId() )
|
|
114
|
+
self.Bind( wx.EVT_TOOL, self.OnBtnLogging, id = self.m_btnLogging.GetId() )
|
|
115
|
+
self.Bind( wx.EVT_TOOL, self.OnBtnScripts, id = self.m_btnScripts.GetId() )
|
|
116
|
+
self.Bind( wx.EVT_TOOL, self.OnBtnPython, id = self.m_btnPython.GetId() )
|
|
117
|
+
self.Bind( wx.EVT_TOOL, self.OnBtnControls, id = self.m_btnControls.GetId() )
|
|
118
|
+
self.Bind( wx.EVT_TOOL, self.OnBtnCharts, id = self.m_btnCharts.GetId() )
|
|
119
|
+
self.Bind( wx.EVT_TOOL, self.OnBtnHelp, id = self.m_btnHelp.GetId() )
|
|
120
|
+
self.Bind( wx.EVT_TOOL, self.OnBtnExit, id = self.m_btnExit.GetId() )
|
|
121
|
+
self.Bind( wx.EVT_MENU, self.OnLayoutOperator, id = self.m_mniLayoutOperator.GetId() )
|
|
122
|
+
self.Bind( wx.EVT_MENU, self.OnLayoutTechnician, id = self.m_mniLayoutTechnician.GetId() )
|
|
123
|
+
self.Bind( wx.EVT_MENU, self.OnLayoutEngineer, id = self.m_mniLayoutEngineer.GetId() )
|
|
124
|
+
self.Bind( wx.EVT_MENU, self.OnLayoutExpert, id = self.m_mniLayoutExpert.GetId() )
|
|
125
|
+
self.Bind( wx.EVT_MENU, self.OnResetLayout, id = self.m_mniLayoutReset.GetId() )
|
|
126
|
+
|
|
127
|
+
def __del__( self ):
|
|
128
|
+
self.m_mgr.UnInit()
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
# Virtual event handlers, override them in your derived class
|
|
133
|
+
def OnFormClose( self, event ):
|
|
134
|
+
event.Skip()
|
|
135
|
+
|
|
136
|
+
def OnGuiTimer( self, event ):
|
|
137
|
+
event.Skip()
|
|
138
|
+
|
|
139
|
+
def OnMnuLayoutClicked( self, event ):
|
|
140
|
+
event.Skip()
|
|
141
|
+
|
|
142
|
+
def OnMnuSettingsClicked( self, event ):
|
|
143
|
+
event.Skip()
|
|
144
|
+
|
|
145
|
+
def OnBtnTestList( self, event ):
|
|
146
|
+
event.Skip()
|
|
147
|
+
|
|
148
|
+
def OnBtnMessages( self, event ):
|
|
149
|
+
event.Skip()
|
|
150
|
+
|
|
151
|
+
def OnBtnLogging( self, event ):
|
|
152
|
+
event.Skip()
|
|
153
|
+
|
|
154
|
+
def OnBtnScripts( self, event ):
|
|
155
|
+
event.Skip()
|
|
156
|
+
|
|
157
|
+
def OnBtnPython( self, event ):
|
|
158
|
+
event.Skip()
|
|
159
|
+
|
|
160
|
+
def OnBtnControls( self, event ):
|
|
161
|
+
event.Skip()
|
|
162
|
+
|
|
163
|
+
def OnBtnCharts( self, event ):
|
|
164
|
+
event.Skip()
|
|
165
|
+
|
|
166
|
+
def OnBtnHelp( self, event ):
|
|
167
|
+
event.Skip()
|
|
168
|
+
|
|
169
|
+
def OnBtnExit( self, event ):
|
|
170
|
+
event.Skip()
|
|
171
|
+
|
|
172
|
+
def OnLayoutOperator( self, event ):
|
|
173
|
+
event.Skip()
|
|
174
|
+
|
|
175
|
+
def OnLayoutTechnician( self, event ):
|
|
176
|
+
event.Skip()
|
|
177
|
+
|
|
178
|
+
def OnLayoutEngineer( self, event ):
|
|
179
|
+
event.Skip()
|
|
180
|
+
|
|
181
|
+
def OnLayoutExpert( self, event ):
|
|
182
|
+
event.Skip()
|
|
183
|
+
|
|
184
|
+
def OnResetLayout( self, event ):
|
|
185
|
+
event.Skip()
|
|
@@ -66,7 +66,10 @@ class FormMain_Base ( wx.Frame ):
|
|
|
66
66
|
self.m_mnuToolbar.Realize()
|
|
67
67
|
self.m_mgr.AddPane( self.m_mnuToolbar, wx.aui.AuiPaneInfo() .Name( u"dfasdf" ).Top() .Caption( u"ZXcZXcZXcZXC" ).CaptionVisible( False ).CloseButton( False ).PaneBorder( False ).Movable( False ).Dock().Resizable().FloatingSize( wx.DefaultSize ).BottomDockable( False ).TopDockable( False ).LeftDockable( False ).RightDockable( False ).Floatable( False ).Layer( 3 ) )
|
|
68
68
|
|
|
69
|
+
|
|
69
70
|
self.m_statusBar1 = self.CreateStatusBar( 1, wx.STB_SIZEGRIP, wx.ID_ANY )
|
|
71
|
+
|
|
72
|
+
|
|
70
73
|
self.m_mnuLayout = wx.Menu()
|
|
71
74
|
self.m_mniLayoutOperator = wx.MenuItem( self.m_mnuLayout, wx.ID_ANY, u"Operator", wx.EmptyString, wx.ITEM_NORMAL )
|
|
72
75
|
self.m_mniLayoutOperator.SetBitmap( wx.ArtProvider.GetBitmap( "user_operator", ) )
|