Qt Virtual Chart Table (QVCT)
CInstrumentGAChronograph Class Reference

General aviation chronograph (instrument) More...

#include <overlays/vessel/widgets/instruments/CInstrumentGAChronograph.hpp>

Inheritance diagram for CInstrumentGAChronograph:
CInstrument

Public Member Functions

 CInstrumentGAChronograph (CVesselCockpit *_poVesselCockpit)
 
virtual ~CInstrumentGAChronograph ()
 

Protected Member Functions

virtual void mouseReleaseEvent (QMouseEvent *_pqMouseEvent)
 
virtual void mouseDoubleClickEvent (QMouseEvent *_pqMouseEvent)
 
- Protected Member Functions inherited from CInstrument
 CInstrument (CVesselCockpit *_poVesselCockpit)
 
virtual ~CInstrument ()
 
virtual void paintEvent (QPaintEvent *_pqPaintEvent)
 
CVesselPoint * useVesselPoint ()
 Returns parent cockpit's associated vessel (0 if the vessel is undefined) More...
 

Private Member Functions

virtual void draw ()
 Draws the instrument (resets if the vessel is undefined) More...
 
void drawStatic (CUnitTimeZone::EUnit _eUnit)
 
void drawDynamic (CUnitTimeZone::EUnit _eUnit, double _fdTime)
 

Private Attributes

QPixmap qPixmapBufferBackground
 Pixmap buffer used to render and cache the instrument's (static) background. More...
 
QPixmap qPixmapBuffer
 Pixmap buffer used to render and cache the instrument. More...
 
bool bForceRedraw
 Forces the redraw of the instrument (not matter its cache content) More...
 
CUnitTimeZone::EUnit eUnit
 Unit for which the last rendering was achieved. More...
 
double fdTime
 Time at which the last rendering was achieved. More...
 
double fdSW1TimeStarted
 Stop-watch 1 last started time (stopped if 0) More...
 
double fdSW1TimeAccumulated
 Stop-watch 1 accumulated time. More...
 
double fdSW2TimeStarted
 Stop-watch 2 last started time (stopped if 0) More...
 
double fdSW2TimeAccumulated
 Stop-watch 2 accumulated time. More...
 

Detailed Description

General aviation chronograph (instrument)

This class allows to draw a general aviation (analogic) chronograph. It also include two stop-watches that can be controlled by (double-)clicking on their respective hand-side (of the instrument). It includes the logic that allows to cache the necessary QPixmap(s) required to draw the instrument and avoid to "re-render" it each time it is "refreshed".

Author
Cedric Dufour http://cedric.dufour.name

Definition at line 41 of file CInstrumentGAChronograph.hpp.

Constructor & Destructor Documentation

◆ CInstrumentGAChronograph()

CInstrumentGAChronograph::CInstrumentGAChronograph ( CVesselCockpit *  _poVesselCockpit)

Definition at line 41 of file CInstrumentGAChronograph.cpp.

◆ ~CInstrumentGAChronograph()

virtual CInstrumentGAChronograph::~CInstrumentGAChronograph ( )
inlinevirtual

Definition at line 76 of file CInstrumentGAChronograph.hpp.

Member Function Documentation

◆ mouseReleaseEvent()

void CInstrumentGAChronograph::mouseReleaseEvent ( QMouseEvent *  _pqMouseEvent)
protectedvirtual

Definition at line 58 of file CInstrumentGAChronograph.cpp.

◆ mouseDoubleClickEvent()

void CInstrumentGAChronograph::mouseDoubleClickEvent ( QMouseEvent *  _pqMouseEvent)
protectedvirtual

Definition at line 89 of file CInstrumentGAChronograph.cpp.

◆ draw()

void CInstrumentGAChronograph::draw ( )
privatevirtual

Draws the instrument (resets if the vessel is undefined)

Implements CInstrument.

Definition at line 114 of file CInstrumentGAChronograph.cpp.

◆ drawStatic()

void CInstrumentGAChronograph::drawStatic ( CUnitTimeZone::EUnit  _eUnit)
private

Definition at line 158 of file CInstrumentGAChronograph.cpp.

◆ drawDynamic()

void CInstrumentGAChronograph::drawDynamic ( CUnitTimeZone::EUnit  _eUnit,
double  _fdTime 
)
private

Definition at line 258 of file CInstrumentGAChronograph.cpp.

Member Data Documentation

◆ qPixmapBufferBackground

QPixmap CInstrumentGAChronograph::qPixmapBufferBackground
private

Pixmap buffer used to render and cache the instrument's (static) background.

Definition at line 49 of file CInstrumentGAChronograph.hpp.

◆ qPixmapBuffer

QPixmap CInstrumentGAChronograph::qPixmapBuffer
private

Pixmap buffer used to render and cache the instrument.

Definition at line 51 of file CInstrumentGAChronograph.hpp.

◆ bForceRedraw

bool CInstrumentGAChronograph::bForceRedraw
private

Forces the redraw of the instrument (not matter its cache content)

Definition at line 54 of file CInstrumentGAChronograph.hpp.

◆ eUnit

CUnitTimeZone::EUnit CInstrumentGAChronograph::eUnit
private

Unit for which the last rendering was achieved.

Definition at line 56 of file CInstrumentGAChronograph.hpp.

◆ fdTime

double CInstrumentGAChronograph::fdTime
private

Time at which the last rendering was achieved.

Definition at line 58 of file CInstrumentGAChronograph.hpp.

◆ fdSW1TimeStarted

double CInstrumentGAChronograph::fdSW1TimeStarted
private

Stop-watch 1 last started time (stopped if 0)

Definition at line 61 of file CInstrumentGAChronograph.hpp.

◆ fdSW1TimeAccumulated

double CInstrumentGAChronograph::fdSW1TimeAccumulated
private

Stop-watch 1 accumulated time.

Definition at line 63 of file CInstrumentGAChronograph.hpp.

◆ fdSW2TimeStarted

double CInstrumentGAChronograph::fdSW2TimeStarted
private

Stop-watch 2 last started time (stopped if 0)

Definition at line 65 of file CInstrumentGAChronograph.hpp.

◆ fdSW2TimeAccumulated

double CInstrumentGAChronograph::fdSW2TimeAccumulated
private

Stop-watch 2 accumulated time.

Definition at line 67 of file CInstrumentGAChronograph.hpp.


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