Qt Virtual Chart Table (QVCT)
CMainWindow.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_CMAINWINDOW_HPP
20 #define QVCT_CMAINWINDOW_HPP
21 
22 // QT
23 #include <QMainWindow>
24 #include <QPixmap>
25 
26 // QVCT
27 #include "QVCT.hpp"
28 
29 
31 
35 class CMainWindow: public QMainWindow
36 {
37  Q_OBJECT
38 
39  //------------------------------------------------------------------------------
40  // CONSTRUCTORS / DESTRUCTOR
41  //------------------------------------------------------------------------------
42 
43 public:
44  CMainWindow();
45  virtual ~CMainWindow();
46 
47 private:
49  void constructLayout();
51  void constructMenus();
52 
53 
54  //------------------------------------------------------------------------------
55  // FIELDS
56  //------------------------------------------------------------------------------
57 
58 private:
61 
62 
63  //------------------------------------------------------------------------------
64  // METHODS
65  //------------------------------------------------------------------------------
66 
67  // SLOTS
68 private slots:
70  void slotExit();
72  void slotAbout();
74  void slotShowSettings();
80  void slotShowTimeView();
82  void slotShowVesselTarget();
86  void slotShowVesselCourse();
88  void slotShowVesselCockpit();
90  void slotToggleFullscreen();
92  void slotTimerRefresh();
94  void slotWarning( const QString& _rqsMessage );
96  void slotError( const QString& _rqsMessage );
97 
98  // OTHER
99 public:
101  void warningMessage( const QString& _rqsMessage );
103  void errorMessage( const QString& _rqsMessage );
105 
107  bool deleteConfirm( const QString& _rqsName );
108 
110 
118  QString fileDialog( QVCT::EFileOperation _eFileOperation, const QString& _rqsTitle, const QString& _rqsFilter );
120 
124  bool fileCheck( QVCT::EFileOperation _eFileOperation, const QString& _rqsFilename, const QStringList* _pqsListExtensions = 0 );
126 
128  void fileError( QVCT::EFileOperation _eFileOperation, const QString& _rqsFilename );
129 
131 
132  void parseError( const QString& _rqsString );
133 
135  bool symbolExists( const QString& _rqsSymbol );
137  QPixmap symbolPixmap( const QString& _rqsSymbol );
138 
139 };
140 
141 #endif // QVCT_CMAINWINDOW_HPP
[UI] Application main window
Definition: CMainWindow.hpp:36
void slotWarning(const QString &_rqsMessage)
Slot to display a warning message.
bool fileCheck(QVCT::EFileOperation _eFileOperation, const QString &_rqsFilename, const QStringList *_pqsListExtensions=0)
Checks the validity of the given file name for the given file operation (open/save)
void slotExit()
Slot to exit this application.
void slotShowTimeView()
Slot to display the application's system time (dock widget)
bool deleteConfirm(const QString &_rqsName)
Displays a generic confirmation request before deleting content.
void slotTimerRefresh()
Slot to periodically refresh the user interface.
QPixmap symbolPixmap(const QString &_rqsSymbol)
Returns pixmap matching the given symbol (loaded from the application's symbol directory)
void slotAbout()
Slot to display this application's "About" details.
void slotToggleFullscreen()
Slot to toggle full-screen.
void errorMessage(const QString &_rqsMessage)
Display an error message.
void slotShowVesselCourse()
Slot to display the application's vessel course widget (dock widget)
void constructLayout()
Constructs the layout of the application.
Definition: CMainWindow.cpp:82
void fileError(QVCT::EFileOperation _eFileOperation, const QString &_rqsFilename)
Displays a generic error message for an invalid file name and operation (open/save)
void slotShowVesselPosition()
Slot to display the application's vessel position widget (dock widget)
void slotShowVesselTarget()
Slot to display the application's vessel target widget (dock widget)
void warningMessage(const QString &_rqsMessage)
Display a warning message.
void slotShowVesselCockpit()
Slot to display the application's vessel cockpit view (window)
virtual ~CMainWindow()
Definition: CMainWindow.cpp:63
void slotShowOverlayListView()
Slot to display the application's overlay list (dock widget)
double fdTimeLastRedraw
Content last redraw time.
Definition: CMainWindow.hpp:60
bool symbolExists(const QString &_rqsSymbol)
Returns whether the given symbol exists (in the application's symbol directory)
QString fileDialog(QVCT::EFileOperation _eFileOperation, const QString &_rqsTitle, const QString &_rqsFilter)
Displays a generic dialog to pick a file for the given operation (open/save)
void constructMenus()
Constructs the menus of the application.
void parseError(const QString &_rqsString)
Displays a generic error message for an invalid parsing operation.
void slotError(const QString &_rqsMessage)
Slot to display an error message.
void slotShowOverlayDetailView()
Slot to display the application's overlay detail (dock widget)
void slotShowSettings()
Slot to display the application's settings edit dialog.
EFileOperation
Definition: QVCT.hpp:42