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

Digital clock instrument. More...

Public Member Functions

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

Detailed Description

Digital clock instrument.

Parameters
_canvasThe canvas to draw the digital clock instrument 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).
  • -digitcolor The color of the digits (default black).
Author
Robert Heller <heller@deepsoft.com>

Constructor & Destructor Documentation

◆ DigitalClock()

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

Constructor – initialize a digital clock.

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

◆ ~DigitalClock()

Instruments::DigitalClock::~DigitalClock ( )

Destructor – free up all resources.

Member Function Documentation

◆ settime()

Instruments::DigitalClock::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.