OpenCPN Partial API docs
Loading...
Searching...
No Matches
DashboardInstrument_Clock Class Reference

A dashboard instrument that displays the GNSS clock time, if available. More...

#include <clock.h>

Inheritance diagram for DashboardInstrument_Clock:
DashboardInstrument_Single DashboardInstrument DashboardInstrument_CPUClock DashboardInstrument_Moon DashboardInstrument_Sun

Public Member Functions

 DashboardInstrument_Clock (wxWindow *parent, wxWindowID id, wxString title, InstrumentProperties *Properties, DASH_CAP cap_flag=OCPN_DBP_STC_CLK, wxString format=_T("%02i:%02i:%02i UTC"))
 
void SetData (DASH_CAP, double, wxString)
 
virtual void SetUtcTime (wxDateTime value)
 
wxString GetDisplayTime (wxDateTime UTCtime)
 
bool getUTC ()
 
void setUTC (bool flag)
 
- Public Member Functions inherited from DashboardInstrument_Single
 DashboardInstrument_Single (wxWindow *pparent, wxWindowID id, wxString title, InstrumentProperties *Properties, DASH_CAP cap, wxString format)
 
wxSize GetSize (int orient, wxSize hint)
 
void SetData (DASH_CAP st, double data, wxString unit)
 
- Public Member Functions inherited from DashboardInstrument
 DashboardInstrument (wxWindow *pparent, wxWindowID id, wxString title, DASH_CAP cap_flag, InstrumentProperties *Properties=NULL)
 
CapType GetCapacity ()
 
void OnEraseBackground (wxEraseEvent &WXUNUSED(evt))
 
void OnPaint (wxPaintEvent &WXUNUSED(event))
 
void SetDrawSoloInPane (bool value)
 
void MouseEvent (wxMouseEvent &event)
 
void OnLeftUp (wxMouseEvent &event)
 
void SetCapFlag (DASH_CAP val)
 
bool HasCapFlag (DASH_CAP val)
 

Public Attributes

InstrumentPropertiesm_Properties
 
- Public Attributes inherited from DashboardInstrument
int instrumentTypeId
 
InstrumentPropertiesm_Properties
 

Additional Inherited Members

- Protected Member Functions inherited from DashboardInstrument_Single
void Draw (wxGCDC *dc)
 
- Protected Member Functions inherited from DashboardInstrument
virtual void InitDataTextHeight (const wxString &sampleText, int &sampleWidth)
 
virtual void InitTitleSize ()
 
virtual void InitTitleAndDataPosition (int drawHeight)
 
virtual int GetFullHeight (int drawHeight)
 
virtual int GetDataBottom (int clientHeight)
 
virtual void SetDataFont (wxGCDC *dc)
 
- Protected Attributes inherited from DashboardInstrument_Single
wxString m_data
 
wxString m_format
 
- Protected Attributes inherited from DashboardInstrument
CapType m_cap_flag
 
int m_InstrumentSpacing
 
int m_DataTextHeight
 
int m_DataMargin
 
int m_TitleWidth
 
int m_TitleHeight
 
int m_DataTop
 
int m_TitleTop
 
bool m_DataRightAlign
 
bool m_TitleRightAlign
 
wxString m_title
 

Detailed Description

A dashboard instrument that displays the GNSS clock time, if available.

A dashboard instrument that shows the current time from GNSS source. Can display in either UTC or local time based on user preference. Time format is configurable through the format string parameter.

Definition at line 54 of file clock.h.

Constructor & Destructor Documentation

◆ DashboardInstrument_Clock()

DashboardInstrument_Clock::DashboardInstrument_Clock ( wxWindow *  parent,
wxWindowID  id,
wxString  title,
InstrumentProperties Properties,
DASH_CAP  cap_flag = OCPN_DBP_STC_CLK,
wxString  format = _T("%02i:%02i:%02i UTC") 
)

Definition at line 43 of file clock.cpp.

◆ ~DashboardInstrument_Clock()

DashboardInstrument_Clock::~DashboardInstrument_Clock ( void  )
inline

Definition at line 61 of file clock.h.

Member Function Documentation

◆ GetDisplayTime()

wxString DashboardInstrument_Clock::GetDisplayTime ( wxDateTime  UTCtime)

Definition at line 65 of file clock.cpp.

◆ getUTC()

bool DashboardInstrument_Clock::getUTC ( )
inline

Definition at line 66 of file clock.h.

◆ SetData()

void DashboardInstrument_Clock::SetData ( DASH_CAP  ,
double  ,
wxString   
)
virtual

Implements DashboardInstrument.

Definition at line 56 of file clock.cpp.

◆ setUTC()

void DashboardInstrument_Clock::setUTC ( bool  flag)
inline

Definition at line 67 of file clock.h.

◆ SetUtcTime()

void DashboardInstrument_Clock::SetUtcTime ( wxDateTime  value)
virtual

Definition at line 60 of file clock.cpp.

Member Data Documentation

◆ m_Properties

InstrumentProperties* DashboardInstrument_Clock::m_Properties

Definition at line 68 of file clock.h.


The documentation for this class was generated from the following files: