Qt Virtual Chart Table (QVCT)
CVesselWidget.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_CVESSELWIDGET_HPP
20 #define QVCT_CVESSELWIDGET_HPP
21 
22 // QT
23 #include <QBoxLayout>
24 #include <QDockWidget>
25 #include <QFont>
26 #include <QString>
27 #include <QWidget>
28 
29 // QVCT
30 class CVesselPoint;
31 
32 
34 
42 class CVesselWidget: public QDockWidget
43 {
44  Q_OBJECT
45 
46 
47  //------------------------------------------------------------------------------
48  // FIELDS
49  //------------------------------------------------------------------------------
50 
51 protected:
53  QWidget* pqWidget;
55  QBoxLayout* pqBoxLayout;
56 
58 
60 
61 
62  //------------------------------------------------------------------------------
63  // CONSTRUCTORS / DESTRUCTOR
64  //------------------------------------------------------------------------------
65 
66 protected:
67  CVesselWidget( const QString& _qsTitle, QWidget* _pqParent = 0 );
68  virtual ~CVesselWidget() {};
69 
70 
71  //------------------------------------------------------------------------------
72  // METHODS: QWidget (override)
73  //------------------------------------------------------------------------------
74 
75 protected slots:
76  virtual void resizeEvent( QResizeEvent* _pqResizeEvent );
77 
78 
79  //------------------------------------------------------------------------------
80  // METHODS
81  //------------------------------------------------------------------------------
82 
83  // SLOTS
84 private slots:
86  void slotDestroyed( QObject* _pqObject );
87 
88 private slots:
90  void slotLocationChanged( Qt::DockWidgetArea _qDockWidgetArea );
92  void slotTopLevelChanged( bool _bTopLevel );
93 
94  // SETTERS
95 public:
97  void setVesselPoint( CVesselPoint* _poVesselPoint );
99  void resetVesselPoint();
100 
101  // OTHER
102 public:
104  virtual void setFont( QFont _qFont ) = 0;
106  virtual void refreshContent() = 0;
108  virtual void resetContent() = 0;
109 
110 };
111 
112 #endif // QVCT_CVESSELWIDGET_HPP
[UI] Vessel overlay point (item) / vessel
[UI] Generic vessel (dock) widget
CVesselPoint * poVesselPoint
Overlay course being displayed.
void slotTopLevelChanged(bool _bTopLevel)
Slot to handle floating change.
void resetVesselPoint()
Resets (clears) the vessel used to synchronize the instruments display.
void setVesselPoint(CVesselPoint *_poVesselPoint)
Sets the vessel used to synchronize the instruments display.
virtual void refreshContent()=0
Refreshes the content of the underlying widget.
virtual void setFont(QFont _qFont)=0
Sets the font for the content of the underlying widget.
virtual void resetContent()=0
Resets (clears) the content of the underlying widget.
void slotDestroyed(QObject *_pqObject)
Slot to handle object destruction.
virtual void resizeEvent(QResizeEvent *_pqResizeEvent)
CVesselWidget(const QString &_qsTitle, QWidget *_pqParent=0)
void slotLocationChanged(Qt::DockWidgetArea _qDockWidgetArea)
Slot to handle dock area change.
virtual ~CVesselWidget()
QBoxLayout * pqBoxLayout
[UI:Layout] Layout
QWidget * pqWidget
[UI:Widget] Container widget