![]() |
Hekateros
3.4.3
RoadNarrows Robotics Robot Arm 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 hek_init.d.py.
| def hek_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 hek_init.d.py.
References hek_init.window.autoRefresh(), hek_init.window.createWidgets(), hek_init.window.initData(), hek_init.window.m_icons, and hek_init.window.m_imageLoader.
| def hek_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 hek_init.d.py.
References hek_init.window.m_icons, and hek_init.window.m_wBttn.
Referenced by hek_init.window.createLeftButtons(), and hek_init.window.createRightButtons().
| def hek_init.window.execRestart | ( | self, | |
| service | |||
| ) |
Execute 'service <service> restart' subprocess.
| servcie | Service (key). |
Definition at line 691 of file hek_init.d.py.
References hek_init.window.m_osdist.
Referenced by hek_init.window.cbRestartServices().
| def hek_init.window.execStart | ( | self, | |
| service | |||
| ) |
Execute 'service <service> start' subprocess.
| servcie | Service (key). |
Definition at line 641 of file hek_init.d.py.
References hek_init.window.m_osdist.
Referenced by hek_init.window.cbStartServices().
| def hek_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).
| servcie | Service (key). |
Definition at line 723 of file hek_init.d.py.
References hek_init.window.m_osdist.
Referenced by hek_init.window.cbRefreshStatus(), and hek_init.window.refresh().
| def hek_init.window.execStop | ( | self, | |
| service | |||
| ) |
Execute 'service <service> stop' subprocess.
| servcie | Service (key). |
Definition at line 666 of file hek_init.d.py.
References hek_init.window.m_osdist.
Referenced by hek_init.window.cbStopServices().
| def hek_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 hek_init.d.py.
References hek_init.window.m_debug, hek_init.window.m_icons, hek_init.window.m_lock, hek_init.window.m_osdist, hek_init.window.m_svcDesc, hek_init.window.m_svcKeys, and hek_init.window.m_wBttn.
Referenced by hek_init.window.__init__(), and dynacfg.window.__init__().
| def hek_init.window.setStatus | ( | self, | |
| service, | |||
| status | |||
| ) |
Set service status field.
| servcie | Service (key). |
| status | Service status. One of: 'running' 'stopped' 'unknown' |
Definition at line 618 of file hek_init.d.py.
References hek_init.window.autoRefresh(), hek_init.window.m_service, and hek_init.window.refresh().
Referenced by hek_init.window.cbRefreshStatus(), and hek_init.window.refresh().
| def hek_init.window.showSbError | ( | self, | |
| text | |||
| ) |
Show error text on status bar.
| text | Error text string. |
Definition at line 554 of file hek_init.d.py.
References hek_init.window.m_wStatusBar.
Referenced by hek_init.window.showSbResult(), and hek_init.window.showSbStatus().
| def hek_init.window.showSbInfo | ( | self, | |
| text | |||
| ) |
Show information text on status bar.
| text | Info text string. |
Definition at line 539 of file hek_init.d.py.
References hek_init.window.m_wStatusBar.
Referenced by hek_init.window.cbRefreshStatus(), hek_init.window.cbRestartServices(), hek_init.window.cbSave(), hek_init.window.cbStartServices(), hek_init.window.cbStopServices(), and hek_init.window.showSbStatus().
| def hek_init.window.showSbOk | ( | self, | |
| text | |||
| ) |
Show ok text on status bar.
| text | Ok text string. |
Definition at line 569 of file hek_init.d.py.
References hek_init.window.m_wStatusBar.
Referenced by hek_init.window.showSbResult(), and hek_init.window.showSbStatus().
| def hek_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 hek_init.d.py.
References hek_init.window.m_wStatusBar, hek_init.window.showSbError(), and hek_init.window.showSbOk().
Referenced by hek_init.window.cbRestartServices(), hek_init.window.cbStartServices(), and hek_init.window.cbStopServices().
| def hek_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 hek_init.d.py.
References hek_init.window.m_wStatusBar, hek_init.window.showSbError(), hek_init.window.showSbInfo(), and hek_init.window.showSbOk().
Referenced by hek_init.window.cbRefreshStatus().