Qt Virtual Chart Table (QVCT)
CInstrumentGAAltimeter.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_CINSTRUMENTGAALTIMETER_HPP
20 #define QVCT_CINSTRUMENTGAALTIMETER_HPP
21 
22 // QT
23 #include <QTransform>
24 #include <QWidget>
25 
26 // QVCT
28 #include "units/CUnitElevation.hpp"
29 class CVesselCockpit;
30 
31 
33 
40 {
41 
42  //------------------------------------------------------------------------------
43  // FIELDS
44  //------------------------------------------------------------------------------
45 private:
49  QPixmap qPixmapBuffer;
50 
56  double fdElevation;
57 
58 
59  //------------------------------------------------------------------------------
60  // CONSTRUCTORS / DESTRUCTOR
61  //------------------------------------------------------------------------------
62 
63 public:
64  CInstrumentGAAltimeter( CVesselCockpit* _poVesselCockpit );
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( CUnitElevation::EUnit _eUnit );
84  void drawDynamic( CUnitElevation::EUnit _eUnit, const CVesselPoint* _poVesselPoint );
85 
86 };
87 
88 #endif // QVCT_CINSTRUMENTGAALTIMETER_HPP
General aviation altimeter (instrument)
bool bForceRedraw
Forces the redraw of the instrument (not matter its cache content)
virtual void draw()
Draws the instrument (resets if the vessel is undefined)
double fdElevation
Elevation at which the last rendering was achieved.
CUnitElevation::EUnit eUnit
Unit for which the last rendering was achieved.
void drawStatic(CUnitElevation::EUnit _eUnit)
QPixmap qPixmapBufferBackground
Pixmap buffer used to render and cache the instrument's (static) background.
QPixmap qPixmapBuffer
Pixmap buffer used to render and cache the instrument.
CInstrumentGAAltimeter(CVesselCockpit *_poVesselCockpit)
void drawDynamic(CUnitElevation::EUnit _eUnit, const CVesselPoint *_poVesselPoint)
Generic instrument.
Definition: CInstrument.hpp:39
EUnit
Format/unit ID.
[UI] Generic vessel's cockpit view (window)
[UI] Vessel overlay point (item) / vessel