Model Railroad System
2.2.1
|
Switch plate object type. More...
Public Member Functions | |
SWPlate (name, _ctcpanel, _canvas,...) | |
Construct a SWPlate object. More... | |
~SWPlate () | |
Clean up all data objects and free up all resources. More... | |
getv () | |
Method to get our value (lever position). More... | |
setv (state) | |
Method to set out value (level position). More... | |
geti (ind) | |
Method to get the state of one of our indicators. More... | |
seti (ind, value) | |
Method to set an indicator's state. More... | |
invoke () | |
Method to invoke the switch plate. More... | |
Private Member Functions | |
_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... | |
Static Private Attributes | |
static | _PlatePolygon |
Polygon coordinates for the plate. More... | |
Switch plate object type.
These are on the control panel and represent levers for controlling track switches (aka turnouts). They have a lever that can be in two positions, normal (switch aligned for the main route) and reversed (switch aligned for the divergent route).
_ctcpanel | The CTCPanel megawidget. |
_canvas | The control panel canvas to draw the switch plate on. |
... | Options:
|
CTCPanel::SWPlate::SWPlate | ( | name | , |
_ctcpanel | , | ||
_canvas | , | ||
... | |||
) |
CTCPanel::SWPlate::~SWPlate | ( | ) |
Clean up all data objects and free up all resources.
|
private |
Method to update the label option.
CTCPanel::SWPlate::geti | ( | ind | ) |
Method to get the state of one of our indicators.
ind | The indicator to fetch state information for. |
CTCPanel::SWPlate::getv | ( | ) |
Method to get our value (lever position).
CTCPanel::SWPlate::invoke | ( | ) |
Method to invoke the switch plate.
One of the command scripts is executed depending on the lever position.
CTCPanel::SWPlate::seti | ( | ind | , |
value | |||
) |
Method to set an indicator's state.
ind | The indicator to set. |
value | The state to set it to. |
CTCPanel::SWPlate::setv | ( | state | ) |
Method to set out value (level position).
state | The new state to set. |
|
staticprivate |
Polygon coordinates for the plate.
|
private |
The canvas component (parent widget component).
|
private |
The CTC Panel component (parent widget).