Model Railroad System  2.2.1
Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
CTCPanel::Signal Class Reference

Signal object type. More...

Public Member Functions

 Signal (name, _ctcpanel, _canvas,...)
 Construct a Signal object. More...
 
 ~Signal ()
 Clean up all data objects and free up all resources. More...
 
 getv ()
 Method to get our value (aspect). 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 Signal. More...
 

Private Member Functions

 _configureLabel (option, value)
 Method to update the label option. More...
 
 _VerifyHeads (option, value)
 

Static Private Member Functions

static _SchematicDrawThinLine (canvas, x1, y1, x2, y2, orientation, tags)
 Typemethod to draw a thin line. More...
 
static _SchematicDrawOval (canvas, x1, y1, dia, orientation, tags)
 Typemethod to draw an invisible dot on the trackwork. More...
 

Private Attributes

 ctcpanel
 The CTC Panel component (parent widget). More...
 
 canvas
 The canvas component (parent widget component). More...
 
 aspect
 Contains the signal's aspect. More...
 

Detailed Description

Signal object type.

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

Parameters
_ctcpanelThe CTCPanel megawidget.
_canvasThe schematic canvas to draw the Signal 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 Signal (default "1").
  • -orientation The orientation (8-way) of the Signal (readonly, default 0).
  • -heads The number of heads (1, 2, or 3) of the Signal (readonly, default 1)
Defined coords terminals: none. Defined values: The signal's aspect. Defined indicators: none.
Author
Robert Heller <heller@deepsoft.com>

Constructor & Destructor Documentation

◆ Signal()

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

Construct a Signal object.

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

◆ ~Signal()

CTCPanel::Signal::~Signal ( )

Clean up all data objects and free up all resources.

Member Function Documentation

◆ _configureLabel()

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

Method to update the label option.

◆ _SchematicDrawOval()

static CTCPanel::Signal::_SchematicDrawOval ( canvas  ,
x1  ,
y1  ,
dia  ,
orientation  ,
tags   
)
staticprivate

Typemethod to draw an invisible dot on the trackwork.

Used as anchor points to connect trackwork sections together.

Parameters
x1The first X coordinate.
y1The first Y coordinate.
diaThe diameter of the oval.
orientationThe orientation (8-way).
tagsThe canvas tags to include.

◆ _SchematicDrawThinLine()

static CTCPanel::Signal::_SchematicDrawThinLine ( canvas  ,
x1  ,
y1  ,
x2  ,
y2  ,
orientation  ,
tags   
)
staticprivate

Typemethod to draw a thin line.

Parameters
canvasThe canvas to draw on.
x1The first X coordinate.
y1The first Y coordinate.
x2The second X coordinate.
y2The second Y coordinate.
orientationThe orientation (8-way).
tagsThe canvas tags to include.

◆ _VerifyHeads()

CTCPanel::Signal::_VerifyHeads ( option  ,
value   
)
private

◆ geti()

CTCPanel::Signal::geti ( ind  )

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

◆ getv()

CTCPanel::Signal::getv ( )

Method to get our value (aspect).

◆ invoke()

CTCPanel::Signal::invoke ( )

Method to invoke the Signal.

◆ seti()

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

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

◆ setv()

CTCPanel::Signal::setv ( value  )

Method to set out value (state).

Parameters
valueThe new state to set.

Member Data Documentation

◆ aspect

CTCPanel::Signal::aspect
private

Contains the signal's aspect.

◆ canvas

CTCPanel::Signal::canvas
private

The canvas component (parent widget component).

◆ ctcpanel

CTCPanel::Signal::ctcpanel
private

The CTC Panel component (parent widget).