Model Railroad System  2.2.2
Public Member Functions | List of all members
Instruments::AnalogClock Class Reference

Analog clock instrument. More...

Public Member Functions

 AnalogClock (name, _canvas,...)
 Constructor – initialize an analog clock. More...
 
 ~AnalogClock ()
 Destructor – free up all resources. More...
 
 settime (hour, minute)
 Method to set the time. More...
 

Detailed Description

Analog clock instrument.

Parameters
_canvasThe canvas to draw the analog clock on.
...Options:
  • -x The X coordinate of the instrument (default 0).
  • -y The Y coordinate of the instrument (default 0).
  • -size The size of the instrument (default 100).
  • -label The label of the instrument (default Clock).
  • -labelcolor The color of the label (default black).
  • -labelfont The font of the label (default {Times 14 bold}).
  • -background The background color of the instrument (default blue).
  • -outline The outline color of the instrument (default black).
  • -scaleback The background color of the scale (default white).
  • -scaleticks The color of the scale ticks (default black).
  • -fontfamily The font family used on the instrument (default Courier).
  • -hubcolor The color of the hub (default black).
  • -minutehandcolor The color of the minute hand (default black).
  • -hourhandcolor The color of the hour hand (default black).
Author
Robert Heller <heller@deepsoft.com>

Constructor & Destructor Documentation

◆ AnalogClock()

Instruments::AnalogClock::AnalogClock ( name  ,
_canvas  ,
  ... 
)

Constructor – initialize an analog clock.

Parameters
_canvasThe canvas to draw the DialInstrument on.
...Option list.

◆ ~AnalogClock()

Instruments::AnalogClock::~AnalogClock ( )

Destructor – free up all resources.

Member Function Documentation

◆ settime()

Instruments::AnalogClock::settime ( hour  ,
minute   
)

Method to set the time.

Parameters
hourThe hour, an integer between 1 and 12.
minuteThe minute, an integer between 0 and 59.