Qt Virtual Chart Table (QVCT)
CInstrument.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_CINSTRUMENT_HPP
20 #define QVCT_CINSTRUMENT_HPP
21 
22 // QT
23 #include <QPixmap>
24 #include <QWidget>
25 
26 // QVCT
28 class CVesselPoint;
29 
30 
32 
38 class CInstrument: public QWidget
39 {
40  Q_OBJECT
41 
42  //------------------------------------------------------------------------------
43  // CONSTRUCTORS / DESTRUCTOR
44  //------------------------------------------------------------------------------
45 
46 protected:
47  CInstrument( CVesselCockpit* _poVesselCockpit );
48  virtual ~CInstrument() {};
49 
50 
51  //------------------------------------------------------------------------------
52  // METHODS: QWidget (override)
53  //------------------------------------------------------------------------------
54 
55 protected:
56  virtual void paintEvent( QPaintEvent* _pqPaintEvent );
57 
58 
59  //------------------------------------------------------------------------------
60  // METHODS
61  //------------------------------------------------------------------------------
62 
63  // GETTER
64 protected:
67 
68  // OTHER
69 protected:
71  virtual void draw() = 0;
72 
73 };
74 
75 #endif // QVCT_CINSTRUMENT_HPP
Generic instrument.
Definition: CInstrument.hpp:39
CInstrument(CVesselCockpit *_poVesselCockpit)
Definition: CInstrument.cpp:31
virtual void paintEvent(QPaintEvent *_pqPaintEvent)
Definition: CInstrument.cpp:40
CVesselPoint * useVesselPoint()
Returns parent cockpit's associated vessel (0 if the vessel is undefined)
Definition: CInstrument.cpp:54
virtual ~CInstrument()
Definition: CInstrument.hpp:48
virtual void draw()=0
Draws the instrument (resets if the vessel is undefined)
[UI] Generic vessel's cockpit view (window)
[UI] Vessel overlay point (item) / vessel