CDPBaseClock Class
The Analog Clock shows the time using a circular clock face More...
Header: | #include <CDPBaseWidgets/CDPBaseClock.h> |
Inherits: | CDPBaseMeter2N |
Public Types
enum | ClockSource { OSClock, CDPClock, CDPRouting } |
Properties
- cdpClockRouting : QString
- cdpClockSource : ClockSource
- updateIntervalS : int
- 43 properties inherited from CDPBaseMeter2N
- 52 properties inherited from CDPBaseMeter
- 6 properties inherited from CDPBaseWidget
Public Functions
CDPBaseClock(QWidget *parent = 0) | |
virtual QString | cdpClockRouting() |
virtual ClockSource | cdpClockSource() const |
virtual bool | isClockSignalSelected() const |
virtual void | setCdpClockRouting(const QString &routing) |
virtual void | setCdpClockSource(ClockSource source) |
void | setUpdateInterval(int sec) |
int | updateInterval() |
Reimplemented Public Functions
virtual void | setIQtCDPPointer(IQtCDP *pIQtCDP) |
- 77 public functions inherited from CDPBaseMeter2N
- 90 public functions inherited from CDPBaseMeter
- 8 public functions inherited from CDPBaseWidget
- 17 public functions inherited from CDPBaseCom
- 4 public functions inherited from CDPBaseControlVisible
Public Slots
virtual void | setTimeOffsetSecs(double timeOffsetSec) |
- 18 public slots inherited from CDPBaseMeter2N
- 25 public slots inherited from CDPBaseMeter
- 10 public slots inherited from CDPBaseWidget
Protected Functions
virtual void | mousePressEvent(QMouseEvent *event) |
virtual void | timerEvent(QTimerEvent *event) |
virtual void | updateTime() |
virtual void | updateTimeFromCdpClock() |
virtual void | updateTimeFromCdpSignal() |
virtual void | updateTimeFromEpochMs(qint64 timeSinceEpochMs) |
virtual void | updateTimeNotAvailable() |
Reimplemented Protected Functions
virtual QString | valueText(int layer = FirstLayer, bool limited = true) override |
- 14 protected functions inherited from CDPBaseMeter
- 4 protected functions inherited from CDPBaseCom
- 1 protected function inherited from CDPBaseControlVisible
Additional Inherited Members
- 1 signal inherited from CDPBaseWidget
- 2 static public members inherited from CDPBaseCom
Detailed Description
The Analog Clock shows the time using a circular clock face
In the cdpClockSource property, the user can select to show time based on the OS clock, the CDP synch protocol or from the routed CDP object/property routed in cdpClockRouting.
The value routed in via cdpClockRouting is assumed to be a double value containing time since epoch (number of seconds that have passed since 1970-01-01 00:00:00.000, Coordinated Universal Time (UTC).
When clicked, the clock opens a global dialog for setting a local time offset. The time offset will affect other widgets that implements and uses the time offset part of the interface. The Event List and Digital Clock are examples of other widgets that implements the time offset.
Note: that CDPBaseMainWindow includes a property to enable external control of the time offset property as described in the above. The property is named timeOffsetRouting and works in both directions.
Member Type Documentation
enum CDPBaseClock::ClockSource
This enum type specifies what clock source to use for updating time:
Constant | Value | Description |
---|---|---|
CDPBaseClock::OSClock | 0 | Time from the OS. |
CDPBaseClock::CDPClock | 1 | Time from cdp synch protocol. |
CDPBaseClock::CDPRouting | 2 | Time from a CDP signal specified by routing. |
Property Documentation
cdpClockRouting : QString
This property holds the routing to the cdp signal that are to control the clock.
The routed value is assumed to be a double value containing time since epoch (number of seconds that have passed since 1970-01-01 00:00:00.000, Coordinated Universal Time (UTC).
Note that routing has to be selected as clock source to enable editing this property.
Access functions:
virtual QString | cdpClockRouting() |
virtual void | setCdpClockRouting(const QString &routing) |
See also cdpClockSource.
cdpClockSource : ClockSource
This property holds the clock source to use when showing time on the clock.
The clock can be set from the operating system, cdp time or a cdp signal (for instance to get time from a gps device).
Access functions:
virtual ClockSource | cdpClockSource() const |
virtual void | setCdpClockSource(ClockSource source) |
updateIntervalS : int
This property holds the time interval used for updating clock from selected cdpClockSource.
Access functions:
int | updateInterval() |
void | setUpdateInterval(int sec) |
Member Function Documentation
CDPBaseClock::CDPBaseClock(QWidget *parent = 0)
Default constructs an instance of CDPBaseClock.
[virtual]
bool CDPBaseClock::isClockSignalSelected() const
[virtual protected]
void CDPBaseClock::mousePressEvent(QMouseEvent *event)
[virtual]
void CDPBaseClock::setIQtCDPPointer(IQtCDP *pIQtCDP)
[virtual slot]
void CDPBaseClock::setTimeOffsetSecs(double timeOffsetSec)
[virtual protected]
void CDPBaseClock::timerEvent(QTimerEvent *event)
[virtual protected]
void CDPBaseClock::updateTime()
[virtual protected]
void CDPBaseClock::updateTimeFromCdpClock()
[virtual protected]
void CDPBaseClock::updateTimeFromCdpSignal()
[virtual protected]
void CDPBaseClock::updateTimeFromEpochMs(qint64 timeSinceEpochMs)
[virtual protected]
void CDPBaseClock::updateTimeNotAvailable()
[override virtual protected]
QString CDPBaseClock::valueText(int layer = FirstLayer, bool limited = true)
Get started with CDP Studio today
Let us help you take your great ideas and turn them into the products your customer will love.