Qt Virtual Chart Table (QVCT)
CInstrumentGASpeed.hpp
Go to the documentation of this file.
1 // INDENTING (emacs/vi): -*- mode:c++; tab-width:2; c-basic-offset:2; intent-tabs-mode:nil; -*- ex: set tabstop=2 expandtab:
2 
3 /*
4  * Qt Virtual Chart Table (QVCT)
5  * Copyright (C) 2012 Cedric Dufour <http://cedric.dufour.name>
6  * Author: Cedric Dufour <http://cedric.dufour.name>
7  *
8  * The Qt Virtual Chart Table (QVCT) is free software:
9  * you can redistribute it and/or modify it under the terms of the GNU General
10  * Public License as published by the Free Software Foundation, Version 3.
11  *
12  * The Qt Virtual Chart Table (QVCT) is distributed in the hope
13  * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
14  * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
15  *
16  * See the GNU General Public License for more details.
17  */
18 
19 #ifndef QVCT_CINSTRUMENTGASPEED_HPP
20 #define QVCT_CINSTRUMENTGASPEED_HPP
21 
22 // QT
23 #include <QTransform>
24 #include <QWidget>
25 
26 // QVCT
28 #include "units/CUnitSpeed.hpp"
29 class CVesselCockpit;
30 
31 
33 
40 {
41 
42  //------------------------------------------------------------------------------
43  // FIELDS
44  //------------------------------------------------------------------------------
45 private:
49  QPixmap qPixmapBuffer;
50 
56  double fdSpeed;
57 
58 
59  //------------------------------------------------------------------------------
60  // CONSTRUCTORS / DESTRUCTOR
61  //------------------------------------------------------------------------------
62 
63 public:
64  CInstrumentGASpeed( CVesselCockpit* _poVesselCockpit );
65  virtual ~CInstrumentGASpeed() {};
66 
67 
68  //------------------------------------------------------------------------------
69  // METHODS: CInstrument (implement/override)
70  //------------------------------------------------------------------------------
71 
72  // OTHER
73 private:
74  virtual void draw();
75 
76 
77  //------------------------------------------------------------------------------
78  // METHODS
79  //------------------------------------------------------------------------------
80 
81  // OTHER
82 private:
83  void drawStatic( CUnitSpeed::EUnit _eUnit );
84  void drawDynamic( CUnitSpeed::EUnit _eUnit, const CVesselPoint* _poVesselPoint );
85 
86 };
87 
88 #endif // QVCT_CINSTRUMENTGASPEED_HPP
General aviation speed (instrument)
QPixmap qPixmapBufferBackground
Pixmap buffer used to render and cache the instrument's (static) background.
double fdSpeed
Speed at which the last rendering was achieved.
virtual void draw()
Draws the instrument (resets if the vessel is undefined)
void drawStatic(CUnitSpeed::EUnit _eUnit)
QPixmap qPixmapBuffer
Pixmap buffer used to render and cache the instrument.
CUnitSpeed::EUnit eUnit
Unit for which the last rendering was achieved.
bool bForceRedraw
Forces the redraw of the instrument (not matter its cache content)
void drawDynamic(CUnitSpeed::EUnit _eUnit, const CVesselPoint *_poVesselPoint)
CInstrumentGASpeed(CVesselCockpit *_poVesselCockpit)
Generic instrument.
Definition: CInstrument.hpp:39
EUnit
Format/unit ID.
Definition: CUnitSpeed.hpp:53
[UI] Generic vessel's cockpit view (window)
[UI] Vessel overlay point (item) / vessel