Model Railroad System 2.2.2
Public Member Functions | Private Member Functions | Private Attributes | List of all members
CTCPanel::SingleSlip Class Reference

Single Slip (turnout) object type. More...

Public Member Functions

 SingleSlip (name, _ctcpanel, _canvas,...)
 Construct a SingleSlip object. More...
 
 ~SingleSlip ()
 Clean up all data objects and free up all resources. More...
 
 getv ()
 Method to get our value (state). More...
 
 setv (value)
 Method to set out value (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 switch. 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...
 
 state
 The state of the points. More...
 

Detailed Description

Single Slip (turnout) object type.

These are on the schematic and represent a switch on the Schematic.

Parameters
_ctcpanelThe CTCPanel megawidget.
_canvasThe schematic canvas to draw the switch on.
...Options:
  • -x The x coordinate of the object (readonly, default 0).
  • -y The y coordinate of the object (readonly, default 0).
  • -controlpoint The name of the control point this label is part of (readonly, default CP1).
  • -label The label of the switch (default "1").
  • -orientation The orientation (8-way) of the switch (readonly, default 0).
  • -flipped Whether or not the switch is flipped (readonly, default no).
  • -statecommand A command to run to get the switch's state (default {}).
  • -occupiedcommand A command to run to find out if the switch is occupied (default {}).
Defined coords terminals:
  • MainL Mainline left.
  • MainR Mainline right.
  • AltL Alternitive line left.
  • AltR Alternitive line right.
Defined values (states):
  • Normal Points are aligned for the mainline.
  • Reverse Points are aligned for the branchline.
  • Unknown Point are not aligned for any route (eg the points are in motion).
Defined indicators: none.
Author
Robert Heller <heller@deepsoft.com>

Constructor & Destructor Documentation

◆ SingleSlip()

CTCPanel::SingleSlip::SingleSlip ( name  ,
_ctcpanel  ,
_canvas  ,
  ... 
)

Construct a SingleSlip object.

Parameters
_ctcpanelThe CTCPanel megawidget.
_canvasThe schematic canvas to draw the SingleSlip on.
...Option list.

◆ ~SingleSlip()

CTCPanel::SingleSlip::~SingleSlip ( )

Clean up all data objects and free up all resources.

Member Function Documentation

◆ _configureLabel()

CTCPanel::SingleSlip::_configureLabel ( option  ,
value   
)
private

Method to update the label option.

◆ geti()

CTCPanel::SingleSlip::geti ( ind  )

Method to get the state of one of our indicators (none).

◆ getv()

CTCPanel::SingleSlip::getv ( )

Method to get our value (state).

◆ invoke()

CTCPanel::SingleSlip::invoke ( )

Method to invoke the switch.

◆ seti()

CTCPanel::SingleSlip::seti ( ind  ,
value   
)

Method to set an indicator's state (none).

◆ setv()

CTCPanel::SingleSlip::setv ( value  )

Method to set out value (state).

Parameters
valueThe new state to set.

Member Data Documentation

◆ canvas

CTCPanel::SingleSlip::canvas
private

The canvas component (parent widget component).

◆ ctcpanel

CTCPanel::SingleSlip::ctcpanel
private

The CTC Panel component (parent widget).

◆ state

CTCPanel::SingleSlip::state
private

The state of the points.