Qt Virtual Chart Table (QVCT)
CInstrumentGAArtificialHorizon.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_CINSTRUMENTGAARTIFICIALHORIZON_HPP
20 #define QVCT_CINSTRUMENTGAARTIFICIALHORIZON_HPP
21 
22 // QT
23 #include <QTransform>
24 #include <QWidget>
25 
26 // QVCT
28 #include "units/CUnitElevation.hpp"
29 class CVesselCockpit;
30 
31 
33 
44 {
45 
46  //------------------------------------------------------------------------------
47  // FIELDS
48  //------------------------------------------------------------------------------
49 private:
55  QPixmap qPixmapBuffer;
56 
60  double fdPitch;
62  double fdRoll;
64  double fdBearing;
66  double fdTime;
67 
68 
69  //------------------------------------------------------------------------------
70  // CONSTRUCTORS / DESTRUCTOR
71  //------------------------------------------------------------------------------
72 
73 public:
76 
77 
78  //------------------------------------------------------------------------------
79  // METHODS: CInstrument (implement/override)
80  //------------------------------------------------------------------------------
81 
82  // OTHER
83 private:
84  virtual void draw();
85 
86 
87  //------------------------------------------------------------------------------
88  // METHODS
89  //------------------------------------------------------------------------------
90 
91  // OTHER
92 private:
93  void drawStatic();
94  void drawDynamic( const CVesselPoint* _poVesselPoint, double _fdPitch, double _fdRoll );
95 
96 };
97 
98 #endif // QVCT_CINSTRUMENTGAARTIFICIALHORIZON_HPP
General aviation artificial horizon / AH (instrument)
QPixmap qPixmapBufferBackground
Pixmap buffer used to render and cache the instrument's (static) background.
double fdRoll
Roll (angle) at which the last rendering was achieved.
double fdBearing
Bearing at which the last rendering was achieved.
double fdTime
Time at which the last rendering was achieved.
double fdPitch
Pitch (angle) at which the last rendering was achieved.
bool bForceRedraw
Forces the redraw of the instrument (not matter its cache content)
CInstrumentGAArtificialHorizon(CVesselCockpit *_poVesselCockpit)
QPixmap qPixmapBuffer
Pixmap buffer used to render and cache the instrument.
virtual void draw()
Draws the instrument (resets if the vessel is undefined)
QPixmap qPixmapBufferForeground
Pixmap buffer used to render and cache the instrument's (static) foreground.
void drawDynamic(const CVesselPoint *_poVesselPoint, double _fdPitch, double _fdRoll)
Generic instrument.
Definition: CInstrument.hpp:39
[UI] Generic vessel's cockpit view (window)
[UI] Vessel overlay point (item) / vessel