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

Scissor Crossover (turnout) object type. More...

Public Member Functions

 ScissorCrossover (name, _ctcpanel, _canvas,...)
 Construct a ScissorCrossover object. More...
 
 ~ScissorCrossover ()
 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
 State of the points. More...
 

Detailed Description

Scissor Crossover (turnout) object type.

These are on the schematic and represent a Scissor Crossover 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:
  • Main1L Upper left mainline.
  • Main2L Lower left mainline.
  • Main1R Upper right mainline.
  • Main2R Lower right mainline.
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 points are in motion).
Defined indicators: none.
Author
Robert Heller <heller@deepsoft.com>

Constructor & Destructor Documentation

◆ ScissorCrossover()

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

Construct a ScissorCrossover object.

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

◆ ~ScissorCrossover()

CTCPanel::ScissorCrossover::~ScissorCrossover ( )

Clean up all data objects and free up all resources.

Member Function Documentation

◆ _configureLabel()

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

Method to update the label option.

◆ geti()

CTCPanel::ScissorCrossover::geti ( ind  )

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

◆ getv()

CTCPanel::ScissorCrossover::getv ( )

Method to get our value (state).

◆ invoke()

CTCPanel::ScissorCrossover::invoke ( )

Method to invoke the switch.

◆ seti()

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

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

◆ setv()

CTCPanel::ScissorCrossover::setv ( value  )

Method to set out value (state).

Parameters
valueThe new state to set.

Member Data Documentation

◆ canvas

CTCPanel::ScissorCrossover::canvas
private

The canvas component (parent widget component).

◆ ctcpanel

CTCPanel::ScissorCrossover::ctcpanel
private

The CTC Panel component (parent widget).

◆ state

CTCPanel::ScissorCrossover::state
private

State of the points.