Qt Virtual Chart Table (QVCT)
COverlayListView.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_COVERLAYLISTVIEW_HPP
20 #define QVCT_COVERLAYLISTVIEW_HPP
21 
22 // QT
23 #include <QDockWidget>
24 #include <QTabWidget>
25 #include <QWidget>
26 
27 // QVCT
28 class CPointerOverlay;
29 
30 
32 
37 class COverlayListView: public QDockWidget
38 {
39  Q_OBJECT
40 
41  //------------------------------------------------------------------------------
42  // CONSTANTS / STATIC
43  //------------------------------------------------------------------------------
44 
45 public:
46  // View ID
47  enum EView {
48  LANDMARK = 0,
49  ROUTE = 1,
50  TRACK = 2,
51  VESSEL = 3,
52  DEVICE = 4
53  };
54 
55 
56  //------------------------------------------------------------------------------
57  // FIELDS
58  //------------------------------------------------------------------------------
59 
60 private:
64 
65  QTabWidget* pqTabWidget;
66 
67 
68  //------------------------------------------------------------------------------
69  // CONSTRUCTORS / DESTRUCTOR
70  //------------------------------------------------------------------------------
71 
72 public:
73  COverlayListView( QWidget* _pqParent = 0 );
74  virtual ~COverlayListView();
75 
76 private:
78  void constructLayout();
79 
80 
81  //------------------------------------------------------------------------------
82  // METHODS
83  //------------------------------------------------------------------------------
84 
85  // SLOTS
86 private slots:
88  void slotChangeTab( int _iTabIndex );
89 
90  // OTHER
91 public:
93  void switchView( EView eView );
94 
95 };
96 
97 #endif // QVCT_COVERLAYLISTVIEW_HPP
[UI] Overlays list view (dock widget)
QTabWidget * pqTabWidget
Tab widget to present all viewable overlays.
virtual ~COverlayListView()
void slotChangeTab(int _iTabIndex)
Slot to handle tab change.
void constructLayout()
Constructs the layout of the user-interface.
CPointerOverlay * poPointerOverlay
Pointer overlay (which must not be viewed)
@ ROUTE
Route overlay.
@ LANDMARK
Landmark overlay.
@ DEVICE
Device overlay.
@ TRACK
Track overlay.
@ VESSEL
Vessel overlay.
void switchView(EView eView)
Displays the requested overlay (switching to the appropriate tab)
COverlayListView(QWidget *_pqParent=0)
[UI] Pointer overlay