Model Railroad System 2.2.2
|
Lamp object type. More...
Public Member Functions | |
Lamp (name, _ctcpanel, _canvas,...) | |
Construct a Lamp object. More... | |
~Lamp () | |
Clean up all data objects and free up all resources. More... | |
getv () | |
Method to get our value (lamp state). More... | |
setv (newstate) | |
Method to set out value (lamp state). More... | |
geti (ind) | |
Method to get the state of one of our indicators (none). More... | |
seti (ind, value) | |
Method to set an indicator's state (none). More... | |
invoke () | |
Method to invoke the lamp. More... | |
Private Member Functions | |
_configureColor (option, value) | |
Method to update the lamp color. More... | |
_configureLabel (option, value) | |
Method to update the label option. More... | |
Private Attributes | |
ctcpanel | |
The CTC Panel component (parent widget). More... | |
canvas | |
The canvas component (parent widget component). More... | |
state | |
The state of the lamp. More... | |
Lamp object type.
These are on the control panel and represent simple single-color lamps.
_ctcpanel | The CTCPanel megawidget. |
_canvas | The control panel canvas to draw the lamp on. |
... | Options:
|
CTCPanel::Lamp::Lamp | ( | name | , |
_ctcpanel | , | ||
_canvas | , | ||
... | |||
) |
CTCPanel::Lamp::~Lamp | ( | ) |
Clean up all data objects and free up all resources.
|
private |
Method to update the lamp color.
|
private |
Method to update the label option.
CTCPanel::Lamp::geti | ( | ind | ) |
Method to get the state of one of our indicators (none).
CTCPanel::Lamp::getv | ( | ) |
Method to get our value (lamp state).
CTCPanel::Lamp::invoke | ( | ) |
Method to invoke the lamp.
CTCPanel::Lamp::seti | ( | ind | , |
value | |||
) |
Method to set an indicator's state (none).
CTCPanel::Lamp::setv | ( | newstate | ) |
Method to set out value (lamp state).
newstate | The new lamp state. |
|
private |
The canvas component (parent widget component).
|
private |
The CTC Panel component (parent widget).
|
private |
The state of the lamp.