![]() |
Laelaps
2.3.5
RoadNarrows Robotics Small Outdoor Mobile Robot Project
|
Window class supporting application. More...
Public Member Functions | |
def | __init__ (self, master=None, cnf={}, kw) |
Constructor. More... | |
def | initData (self, kw) |
Initialize class state data. More... | |
def | createWidgets (self) |
Create gui widgets with supporting data and show. | |
def | createHeading (self) |
Create top gui heading. | |
def | createLeftButtons (self) |
Create gui left hand side buttons. | |
def | createCenterPanel (self) |
Create gui center panel. | |
def | createRightButtons (self) |
Create gui right hand side buttons. | |
def | createStatusBar (self) |
Create gui multi-line status bar at bottom of gui window. | |
def | createButton (self, parent, text, imagefile, command, fg='black') |
Create button. More... | |
def | clearSelect (self) |
Clear all select checkboxes. | |
def | cbSelect (self) |
Checkbox change state callback. | |
def | cbStartServices (self) |
Start selected services callback. | |
def | cbStopServices (self) |
Stop selected services callback. | |
def | cbRestartServices (self) |
Restart selected services callback. | |
def | cbRefreshStatus (self) |
Refresh services status callback. | |
def | cbSave (self) |
Save new settings callback. | |
def | destroy (self) |
Destroy window callback. | |
def | showSbInfo (self, text) |
Show information text on status bar. More... | |
def | showSbError (self, text) |
Show error text on status bar. More... | |
def | showSbOk (self, text) |
Show ok text on status bar. More... | |
def | showSbResult (self, text, success) |
Show operation result on status bar. More... | |
def | showSbStatus (self, text, status) |
Show service status result on status bar. More... | |
def | setStatus (self, service, status) |
Set service status field. More... | |
def | autoRefresh (self) |
def | refresh (self) |
Refresh status of all services. | |
def | execStart (self, service) |
Execute 'service <service> start' subprocess. More... | |
def | execStop (self, service) |
Execute 'service <service> stop' subprocess. More... | |
def | execRestart (self, service) |
Execute 'service <service> restart' subprocess. More... | |
def | execStatus (self, service) |
Execute 'service <service> status' subprocess. More... | |
Public Attributes | |
m_imageLoader | |
m_osdist | |
m_debug | |
m_icons | |
m_wBttn | |
m_svcKeys | |
m_svcDesc | |
m_lock | |
m_service | |
m_wScrollBar | |
m_wStatusBar | |
Window class supporting application.
Definition at line 135 of file laelaps_init.d.py.
def laelaps_init.window.__init__ | ( | self, | |
master = None , |
|||
cnf = {} , |
|||
kw | |||
) |
Constructor.
master | Window parent master widget. |
cnf | Configuration dictionary. |
kw | Keyword options. |
Definition at line 143 of file laelaps_init.d.py.
References laelaps_init.window.autoRefresh(), laelaps_init.window.createWidgets(), laelaps_init.window.initData(), laelaps_init.window.m_icons, and laelaps_init.window.m_imageLoader.
def laelaps_init.window.createButton | ( | self, | |
parent, | |||
text, | |||
imagefile, | |||
command, | |||
fg = 'black' |
|||
) |
Create button.
parent | Parent widget. |
text | Button text. |
imagefile | Image file name. None for no image. |
command | Callback for button push. |
fg | Foreground text color. |
Definition at line 420 of file laelaps_init.d.py.
References laelaps_init.window.m_icons, and laelaps_init.window.m_wBttn.
Referenced by laelaps_init.window.createLeftButtons(), laelaps_tune_motors.window.createLeftButtons(), and laelaps_init.window.createRightButtons().
def laelaps_init.window.execRestart | ( | self, | |
service | |||
) |
Execute 'service <service> restart' subprocess.
service | Service (key). |
Definition at line 691 of file laelaps_init.d.py.
References laelaps_init.window.m_osdist.
Referenced by laelaps_init.window.cbRestartServices().
def laelaps_init.window.execStart | ( | self, | |
service | |||
) |
Execute 'service <service> start' subprocess.
service | Service (key). |
Definition at line 641 of file laelaps_init.d.py.
References laelaps_init.window.m_osdist.
Referenced by laelaps_init.window.cbStartServices().
def laelaps_init.window.execStatus | ( | self, | |
service | |||
) |
Execute 'service <service> status' subprocess.
On Ubuntu 16.04+ the output to 'service <service> status' changed. It does call the init.d script, but rather uses the systemd calls. These output muliple lines of info. So this script now supports the new interace but is also backwards capatible with Ubuntu 14.04- releases (hopefully).
service | Service (key). |
Definition at line 723 of file laelaps_init.d.py.
References laelaps_init.window.m_osdist.
Referenced by laelaps_init.window.cbRefreshStatus(), and laelaps_init.window.refresh().
def laelaps_init.window.execStop | ( | self, | |
service | |||
) |
Execute 'service <service> stop' subprocess.
service | Service (key). |
Definition at line 666 of file laelaps_init.d.py.
References laelaps_init.window.m_osdist.
Referenced by laelaps_init.window.cbStopServices().
def laelaps_init.window.initData | ( | self, | |
kw | |||
) |
Initialize class state data.
Any keywords for this application specific window that are not supported by the Frame Tkinter class must be removed.
kw | Keyword options. |
Definition at line 176 of file laelaps_init.d.py.
References laelaps_init.window.m_debug, laelaps_init.window.m_icons, laelaps_init.window.m_lock, laelaps_init.window.m_osdist, laelaps_init.window.m_svcDesc, laelaps_init.window.m_svcKeys, and laelaps_init.window.m_wBttn.
Referenced by laelaps_init.window.__init__(), and laelaps_tune_motors.window.__init__().
def laelaps_init.window.setStatus | ( | self, | |
service, | |||
status | |||
) |
Set service status field.
service | Service (key). |
status | Service status. One of: 'running' 'stopped' 'unknown' |
Definition at line 618 of file laelaps_init.d.py.
References laelaps_init.window.autoRefresh(), laelaps_init.window.m_service, and laelaps_init.window.refresh().
Referenced by laelaps_init.window.cbRefreshStatus(), and laelaps_init.window.refresh().
def laelaps_init.window.showSbError | ( | self, | |
text | |||
) |
Show error text on status bar.
text | Error text string. |
Definition at line 554 of file laelaps_init.d.py.
References laelaps_init.window.m_wStatusBar.
Referenced by laelaps_init.window.showSbResult(), and laelaps_init.window.showSbStatus().
def laelaps_init.window.showSbInfo | ( | self, | |
text | |||
) |
Show information text on status bar.
text | Info text string. |
Definition at line 539 of file laelaps_init.d.py.
References laelaps_init.window.m_wStatusBar.
Referenced by laelaps_init.window.cbRefreshStatus(), laelaps_init.window.cbRestartServices(), laelaps_init.window.cbSave(), laelaps_init.window.cbStartServices(), laelaps_init.window.cbStopServices(), and laelaps_init.window.showSbStatus().
def laelaps_init.window.showSbOk | ( | self, | |
text | |||
) |
Show ok text on status bar.
text | Ok text string. |
Definition at line 569 of file laelaps_init.d.py.
References laelaps_init.window.m_wStatusBar.
Referenced by laelaps_init.window.showSbResult(), and laelaps_init.window.showSbStatus().
def laelaps_init.window.showSbResult | ( | self, | |
text, | |||
success | |||
) |
Show operation result on status bar.
text | Prefix text already displayed on current status bar line. |
success | Operation was [not] a success. |
Definition at line 585 of file laelaps_init.d.py.
References laelaps_init.window.m_wStatusBar, laelaps_init.window.showSbError(), and laelaps_init.window.showSbOk().
Referenced by laelaps_init.window.cbRestartServices(), laelaps_init.window.cbStartServices(), and laelaps_init.window.cbStopServices().
def laelaps_init.window.showSbStatus | ( | self, | |
text, | |||
status | |||
) |
Show service status result on status bar.
text | Prefix text already displayed on current status bar line. |
status | Service status. One of: 'running' 'stopped' 'unknown' |
Definition at line 600 of file laelaps_init.d.py.
References laelaps_init.window.m_wStatusBar, laelaps_init.window.showSbError(), laelaps_init.window.showSbInfo(), and laelaps_init.window.showSbOk().
Referenced by laelaps_init.window.cbRefreshStatus().