DoubleEdit (hwx.gui)¶
A widget that can display/edit a double.
- Inherits:
Public Methods¶
destroy (self) enableGlobalActions (self, enable) get (self) getMousePosition (self) getRelativeMousePosition (self) hide (self) saveAsPng (self, fname) set (self, text) setF1HelpTopic (self, helptopic) setProperties (self, kwds) show (self) validate (self, widget)
Method Details¶
-
destroy(self)
Deletes this and all its children.
-
enableGlobalActions(self, enable)¶
Sets the state of Global Actions.
Disable the global actions to get key events.
| param enable: | Determines whether to enable or disable global actions. |
|---|---|
| type enable: | bool |
-
get(self)
Gets the value converted to base units.
-
getMousePosition(self)¶
Returns the mouse position.
-
getRelativeMousePosition(self)¶
Returns the mouse position relative to this widget.
-
hide(self)
Hides the widget.
-
saveAsPng(self, fname)¶
Saves the widget as a .png file.
| param fname: | The file name for the .png |
|---|---|
| type fname: | str |
| returns: | True if it was saved succesfully, False otherwise. |
| rtype: | bool |
-
set(self, text)
Sets the value converted to user units with the units label.
| param text: | The text can be a string with the value and units or else only the double value. |
|---|---|
| type text: | str, double |
-
setF1HelpTopic(self, helptopic)¶
Popup web-browser helps when the user hits F1 when over this.
| param helptopic: | |
|---|---|
| Topic name user needs help in. | |
| type helptopic: | str |
-
setProperties(self, kwds)¶
Internal method called from constructors.
-
show(self)
Shows the widget.
-
validate(self, widget)
Validates whether the value entered is a double and convert to base units.
| param widget: | Widget where the value is entered. |
|---|---|
| type widget: | Widget |
| returns: | True if the widget value entered is an int, otherwise False. |
| rtype: | bool |