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

Crossing object type. More...

Public Member Functions

 Crossing (name, _ctcpanel, _canvas,...)
 Construct a Crossing object. More...
 
 ~Crossing ()
 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...
 
 _VerifyCrossingType (option, value)
 

Private Attributes

 ctcpanel
 The CTC Panel component (parent widget). More...
 
 canvas
 The canvas component (parent widget component). More...
 

Detailed Description

Crossing object type.

These are on the schematic and represent a piece of track 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).
  • -type The type of crossing (x90 or x45) (readonly, default x90).
  • -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): none. Defined indicators: none.
Author
Robert Heller <heller@deepsoft.com>

Constructor & Destructor Documentation

◆ Crossing()

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

Construct a Crossing object.

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

◆ ~Crossing()

CTCPanel::Crossing::~Crossing ( )

Clean up all data objects and free up all resources.

Member Function Documentation

◆ _configureLabel()

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

Method to update the label option.

◆ _VerifyCrossingType()

CTCPanel::Crossing::_VerifyCrossingType ( option  ,
value   
)
private

References FileEntry::create().

◆ geti()

CTCPanel::Crossing::geti ( ind  )

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

◆ getv()

CTCPanel::Crossing::getv ( )

Method to get our value (state).

◆ invoke()

CTCPanel::Crossing::invoke ( )

Method to invoke the switch.

◆ seti()

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

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

◆ setv()

CTCPanel::Crossing::setv ( value  )

Method to set out value (state).

Parameters
valueThe new state to set.

Member Data Documentation

◆ canvas

CTCPanel::Crossing::canvas
private

The canvas component (parent widget component).

◆ ctcpanel

CTCPanel::Crossing::ctcpanel
private

The CTC Panel component (parent widget).