Qt Virtual Chart Table (QVCT)
CVesselCockpit.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_CVESSELCOCKPIT_HPP
20 #define QVCT_CVESSELCOCKPIT_HPP
21 
22 // QT
23 #include <QGridLayout>
24 #include <QString>
25 #include <QWidget>
26 
27 // QVCT
28 class CVesselPoint;
29 
30 
32 
37 class CVesselCockpit: public QWidget
38 {
39  Q_OBJECT
40  friend class CInstrument;
41 
42  //------------------------------------------------------------------------------
43  // FIELDS
44  //------------------------------------------------------------------------------
45 
46 protected:
48  QGridLayout* pqGridLayout;
49 
51 
53 
54 
55  //------------------------------------------------------------------------------
56  // CONSTRUCTORS / DESTRUCTOR
57  //------------------------------------------------------------------------------
58 
59 protected:
60  CVesselCockpit( const QString& _rqsTitle, QWidget* _pqParent = 0 );
61  virtual ~CVesselCockpit() {};
62 
63 
64  //------------------------------------------------------------------------------
65  // METHODS
66  //------------------------------------------------------------------------------
67 
68  // SLOTS
69 private slots:
71  void slotDestroyed( QObject* _pqObject );
72 
73  // SETTERS
74 public:
76  void setVesselPoint( CVesselPoint* _poVesselPoint );
78  void resetVesselPoint();
79 
80  // OTHER
81 public:
83  virtual void refreshContent() = 0;
85  virtual void resetContent() = 0;
86 
87 };
88 
89 #endif // QVCT_CVESSELCOCKPIT_HPP
Generic instrument.
Definition: CInstrument.hpp:39
[UI] Generic vessel's cockpit view (window)
void setVesselPoint(CVesselPoint *_poVesselPoint)
Sets the vessel used to synchronize the instruments display.
virtual void resetContent()=0
Resets (clears) the content of the underlying widget.
CVesselCockpit(const QString &_rqsTitle, QWidget *_pqParent=0)
CVesselPoint * poVesselPoint
Overlay course being displayed.
QGridLayout * pqGridLayout
[UI:Layout] Layout
virtual ~CVesselCockpit()
void resetVesselPoint()
Resets (clears) the vessel used to synchronize the instruments display.
virtual void refreshContent()=0
Refreshes the content of the underlying widget.
void slotDestroyed(QObject *_pqObject)
Slot to handle object destruction.
[UI] Vessel overlay point (item) / vessel