Qt Virtual Chart Table (QVCT)
CMainWindow.cpp
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 // QT
20 #include <QAction>
21 #include <QApplication>
22 #include <QDir>
23 #include <QDockWidget>
24 #include <QFileDialog>
25 #include <QFileInfo>
26 #include <QHBoxLayout>
27 #include <QKeyEvent>
28 #include <QMenu>
29 #include <QMenuBar>
30 #include <QMessageBox>
31 #include <QMessageBox>
32 #include <QPixmap>
33 #include <QStatusBar>
34 #include <QTabWidget>
35 #include <QTimer>
36 #include <QTreeWidget>
37 
38 // QVCT
39 #include "QVCTRuntime.hpp"
40 #include "CMainWindow.hpp"
42 
43 // C/C++
44 #include <time.h>
45 
46 
47 //------------------------------------------------------------------------------
48 // CONSTRUCTORS / DESTRUCTOR
49 //------------------------------------------------------------------------------
50 
52  : fdTimeLastRedraw( 0.0 )
53 {
54  setWindowTitle( tr("Qt Virtual Chart Table") );
57 
58  QTimer* __qTimerRefresh = QVCTRuntime::useTimerRefresh();
59  QObject::connect( __qTimerRefresh, SIGNAL( timeout() ), this, SLOT( slotTimerRefresh() ) );
60  __qTimerRefresh->start( QVCTRuntime::useSettings()->getRateRefresh() );
61 }
62 
64 {
65  // Prevent any update while children objects are destroyed
66  // ... destroy all devices
67  CDeviceOverlay* __poDeviceOverlay = QVCTRuntime::useDeviceOverlay();
68  __poDeviceOverlay->clear();
69  // ... stop screen refresh
70  QTimer* __qTimerRefresh = QVCTRuntime::useTimerRefresh();
71  __qTimerRefresh->stop();
72  // ... make sure everyone is done
73  struct timespec __tsDelay;
74  __tsDelay.tv_sec = 0;
75  __tsDelay.tv_nsec = (long)QVCTRuntime::useSettings()->getRateRefresh()*1000000;
76  nanosleep( &__tsDelay, NULL );
77  QMutex* __pqMutexDataChange = QVCTRuntime::useMutexDataChange();
78  __pqMutexDataChange->lock();
79  __pqMutexDataChange->unlock();
80 }
81 
83 {
84  // Create layout
85  QWidget* __pqWidget = new QWidget();
86  QHBoxLayout* __pqHBoxLayout = new QHBoxLayout();
87 
88  // Add the "virtual" chart table
89  CChartTable* __poChartTable = new CChartTable();
90  QVCTRuntime::registerChartTable( __poChartTable );
91  __pqHBoxLayout->addWidget( __poChartTable, 1 );
92 
93  // Add the chart control
94  CChartControl* __poChartControl = new CChartControl();
95  QVCTRuntime::registerChartControl( __poChartControl );
96  __poChartControl->installEventFilter( __poChartTable );
97  __pqHBoxLayout->addWidget( __poChartControl );
98 
99  // Add the overlay docks
100  // ... list
101  COverlayListView* __poOverlayListView = new COverlayListView();
102  QVCTRuntime::registerOverlayListView( __poOverlayListView );
103  QMainWindow::addDockWidget( Qt::LeftDockWidgetArea, __poOverlayListView );
104  // ... detail
105  COverlayDetailView* __poOverlayDetailView = new COverlayDetailView();
106  QVCTRuntime::registerOverlayDetailView( __poOverlayDetailView );
107  QMainWindow::addDockWidget( Qt::LeftDockWidgetArea, __poOverlayDetailView );
108  __poOverlayDetailView->resize( __poOverlayDetailView->width(), 100 );
109 
110  // Add other docks
111  // ... time
112  CTimeView* __poTimeView = new CTimeView();
113  QVCTRuntime::registerTimeView( __poTimeView );
114  QMainWindow::addDockWidget( Qt::TopDockWidgetArea, __poTimeView );
115  // ... vessel target
116  CVesselTarget* __poVesselTarget = new CVesselTarget();
117  QVCTRuntime::registerVesselTarget( __poVesselTarget );
118  QMainWindow::addDockWidget( Qt::TopDockWidgetArea, __poVesselTarget );
119  // ... vessel position
120  CVesselPosition* __poVesselPosition = new CVesselPosition();
121  QVCTRuntime::registerVesselPosition( __poVesselPosition );
122  QMainWindow::addDockWidget( Qt::BottomDockWidgetArea, __poVesselPosition );
123  // ... vessel course
124  CVesselCourse* __poVesselCourse = new CVesselCourse();
125  QVCTRuntime::registerVesselCourse( __poVesselCourse );
126  QMainWindow::addDockWidget( Qt::BottomDockWidgetArea, __poVesselCourse );
127  // ... vessel cockpit
128  CVesselCockpitGeneralAviation* __poVesselCockpitGeneralAviation = new CVesselCockpitGeneralAviation();
129  QVCTRuntime::registerVesselCockpit( __poVesselCockpitGeneralAviation );
130  // QMainWindow::addDockWidget( Qt::NoDockWidgetArea, __poVesselCockpitGeneralAviation );
131 
132  // Set the layout
133  __pqWidget->setLayout( __pqHBoxLayout );
134  QMainWindow::setCentralWidget( __pqWidget );
135 }
136 
138 {
139  // Construct menus
140  QMenu* __pqMenuFile = new QMenu( tr("&File") );
141  QAction* __pqActionLoad = new QAction( tr("L&oad Project..." ), this );
142  __pqActionLoad->setShortcuts( QKeySequence::Open );
143  QMainWindow::connect( __pqActionLoad, SIGNAL( triggered() ), QVCTRuntime::useChartTable(), SLOT( slotLoad() ) );
144  __pqMenuFile->addAction( __pqActionLoad );
145  QAction* __pqActionSave = new QAction( tr("&Save Project..." ), this );
146  __pqActionSave->setShortcuts( QKeySequence::Save );
147  QMainWindow::connect( __pqActionSave, SIGNAL( triggered() ), QVCTRuntime::useChartTable(), SLOT( slotSave() ) );
148  __pqMenuFile->addAction( __pqActionSave );
149  __pqMenuFile->addSeparator();
150  QAction* __pqActionLoadChart = new QAction( tr("L&oad Chart..." ), this );
151  QMainWindow::connect( __pqActionLoadChart, SIGNAL( triggered() ), QVCTRuntime::useChartTable(), SLOT( slotLoadChart() ) );
152  __pqMenuFile->addAction( __pqActionLoadChart );
153  QAction* __pqActionAddElevation = new QAction( tr("Add &Elevation..." ), this );
154  QMainWindow::connect( __pqActionAddElevation, SIGNAL( triggered() ), QVCTRuntime::useChartControl(), SLOT( slotElevationAdd() ) );
155  __pqMenuFile->addAction( __pqActionAddElevation );
156  QAction* __pqActionLoadLandmarks = new QAction( tr("Load &Landmarks..." ), this );
157  QMainWindow::connect( __pqActionLoadLandmarks, SIGNAL( triggered() ), QVCTRuntime::useLandmarkOverlayListView(), SLOT( slotLoad() ) );
158  __pqMenuFile->addAction( __pqActionLoadLandmarks );
159  QAction* __pqActionLoadRoute = new QAction( tr("Load &Route..." ), this );
160  QMainWindow::connect( __pqActionLoadRoute, SIGNAL( triggered() ), QVCTRuntime::useRouteOverlayListView(), SLOT( slotLoad() ) );
161  __pqMenuFile->addAction( __pqActionLoadRoute );
162  QAction* __pqActionLoadTrack = new QAction( tr("Load &Track..." ), this );
163  QMainWindow::connect( __pqActionLoadTrack, SIGNAL( triggered() ), QVCTRuntime::useTrackOverlayListView(), SLOT( slotLoad() ) );
164  __pqMenuFile->addAction( __pqActionLoadTrack );
165  QAction* __pqActionLoadVessel = new QAction( tr("Load &Vessel..." ), this );
166  QMainWindow::connect( __pqActionLoadVessel, SIGNAL( triggered() ), QVCTRuntime::useVesselOverlayListView(), SLOT( slotLoad() ) );
167  __pqMenuFile->addAction( __pqActionLoadVessel );
168  __pqMenuFile->addSeparator();
169  QAction* __pqActionSettings = new QAction( tr("S&ettings..."), this );
170  __pqActionSettings->setShortcuts( QKeySequence::Preferences );
171  QMainWindow::connect( __pqActionSettings, SIGNAL( triggered() ), this, SLOT( slotShowSettings() ) );
172  __pqMenuFile->addAction( __pqActionSettings );
173  __pqMenuFile->addSeparator();
174  QAction* __pqActionPrint = new QAction( tr("&Print..."), this );
175  __pqActionPrint->setShortcuts( QKeySequence::Print );
176  QMainWindow::connect( __pqActionPrint, SIGNAL( triggered() ), QVCTRuntime::useChartTable(), SLOT( slotPrintChart() ) );
177  __pqMenuFile->addAction( __pqActionPrint );
178  __pqMenuFile->addSeparator();
179  QAction* __pqActionExit = new QAction( tr("E&xit"), this );
180  __pqActionExit->setShortcuts( QKeySequence::Quit );
181  QMainWindow::connect( __pqActionExit, SIGNAL( triggered() ), this, SLOT( slotExit() ) );
182  __pqMenuFile->addAction( __pqActionExit );
183  menuBar()->addMenu( __pqMenuFile );
184 
185  QMenu* __pqMenuWindow = new QMenu( tr("&Window") );
186  QAction* __pqActionShowOverlayListView = new QAction( tr("Show Overlay &List" ), this );
187  QMainWindow::connect( __pqActionShowOverlayListView, SIGNAL( triggered() ), this, SLOT( slotShowOverlayListView() ) );
188  __pqMenuWindow->addAction( __pqActionShowOverlayListView );
189  QAction* __pqActionShowOverlayDetailView = new QAction( tr("Show Overlay &Detail" ), this );
190  QMainWindow::connect( __pqActionShowOverlayDetailView, SIGNAL( triggered() ), this, SLOT( slotShowOverlayDetailView() ) );
191  __pqMenuWindow->addAction( __pqActionShowOverlayDetailView );
192  QAction* __pqActionShowTimeView = new QAction( tr("Show System &Time" ), this );
193  QMainWindow::connect( __pqActionShowTimeView, SIGNAL( triggered() ), this, SLOT( slotShowTimeView() ) );
194  __pqMenuWindow->addAction( __pqActionShowTimeView );
195  QAction* __pqActionShowVesselTarget = new QAction( tr("Show Vessel T&arget" ), this );
196  QMainWindow::connect( __pqActionShowVesselTarget, SIGNAL( triggered() ), this, SLOT( slotShowVesselTarget() ) );
197  __pqMenuWindow->addAction( __pqActionShowVesselTarget );
198  QAction* __pqActionShowVesselPosition = new QAction( tr("Show Vessel &Position" ), this );
199  QMainWindow::connect( __pqActionShowVesselPosition, SIGNAL( triggered() ), this, SLOT( slotShowVesselPosition() ) );
200  __pqMenuWindow->addAction( __pqActionShowVesselPosition );
201  QAction* __pqActionShowVesselCourse = new QAction( tr("Show Vessel &Course" ), this );
202  QMainWindow::connect( __pqActionShowVesselCourse, SIGNAL( triggered() ), this, SLOT( slotShowVesselCourse() ) );
203  __pqMenuWindow->addAction( __pqActionShowVesselCourse );
204  QAction* __pqActionShowVesselCockpit = new QAction( tr("Show Vessel Coc&kpit" ), this );
205  QMainWindow::connect( __pqActionShowVesselCockpit, SIGNAL( triggered() ), this, SLOT( slotShowVesselCockpit() ) );
206  __pqMenuWindow->addAction( __pqActionShowVesselCockpit );
207  __pqMenuWindow->addSeparator();
208  QAction* __pqActionToggleFullscreen = new QAction( tr("Toggle &Fullscreen" ), this );
209  QMainWindow::connect( __pqActionToggleFullscreen, SIGNAL( triggered() ), this, SLOT( slotToggleFullscreen() ) );
210  __pqMenuWindow->addAction( __pqActionToggleFullscreen );
211  menuBar()->addMenu( __pqMenuWindow );
212 
213  QMenu* __pqMenuHelp = new QMenu( tr("&Help") );
214  QAction* __pqActionAbout = new QAction( tr("&About"), this );
215  QMainWindow::connect( __pqActionAbout, SIGNAL( triggered() ), this, SLOT( slotAbout() ) );
216  __pqMenuHelp->addAction( __pqActionAbout );
217  QAction* __pqActionAboutQt = new QAction( tr("About &Qt"), this );
218  QMainWindow::connect( __pqActionAboutQt, SIGNAL( triggered() ), qApp, SLOT( aboutQt() ) );
219  __pqMenuHelp->addAction( __pqActionAboutQt );
220  QMainWindow::menuBar()->addMenu( __pqMenuHelp );
221 }
222 
223 
224 //------------------------------------------------------------------------------
225 // METHODS
226 //------------------------------------------------------------------------------
227 
228 //
229 // SLOTS
230 //
231 
233 {
234  if( QVCTRuntime::useChartTable()->isProjectModified() && !deleteConfirm( tr("Unsaved project data") ) ) return;
235  close();
236 }
237 
239 {
240  QMessageBox::about( this, tr("Qt Virtual Chart Table (QVCT)"),
241  QString( "<H3 ALIGN=\"center\">Qt&nbsp;Virtual&nbsp;Chart&nbsp;Table&nbsp;(QVCT)<BR/>" ) +
242  QString( VER_STRING ) +
243  QString( "</H3>\n" ) +
244  tr( "<P><B>Authors &amp; Contributors:</B></P>\n"
245  "<P>C&eacute;dric Dufour &lt;<A HREF=\"http://cedric.dufour.name\">http://cedric.dufour.name</A>&gt;,\n"
246  "<BR/>Samuel Gaist &lt;<A HREF=\"http://http://www.edeltech.ch\">http://www.edeltech.ch</A>&gt;</P>\n"
247  "<P><B>Website:</B></P>\n"
248  "<P><A HREF=\"http://cedric.dufour.name/software/qvct\">http://cedric.dufour.name/software/qvct</A></P>\n"
249  "<P><B>Copyright:</B></P>\n"
250  "<P>The Qt Virtual Chart Table (QVCT) is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, Version 3.</P>\n"
251  "<P>The Qt Virtual Chart Table (QVCT) is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.</P>\n"
252  "<P>See the <A HREF=\"http://www.gnu.org/copyleft/gpl.html\">GNU General Public License</A> for more details.</P>\n" ) );
253 }
254 
256 {
257  CSettingsEditView* __poSettingsEditView = new CSettingsEditView();
258  __poSettingsEditView->exec();
259  delete __poSettingsEditView;
260 
261  // Update refresh timer rate
262  QTimer* __qTimerRefresh = QVCTRuntime::useTimerRefresh();
263  __qTimerRefresh->stop();
264  __qTimerRefresh->start( QVCTRuntime::useSettings()->getRateRefresh() );
265 }
266 
268 {
270 }
271 
273 {
275 }
276 
278 {
279  QVCTRuntime::useTimeView()->show();
280 }
281 
283 {
285 }
286 
288 {
290 }
291 
293 {
295 }
296 
298 {
300 }
301 
303 {
304  QWidget::setWindowState( QWidget::windowState() ^ Qt::WindowFullScreen );
305 }
306 
308 {
309  //qDebug( "DEBUG[%s]: Begin", Q_FUNC_INFO );
310  QMutex* __pqMutexDataChange = QVCTRuntime::useMutexDataChange();
311  __pqMutexDataChange->lock();
320  double __fdSystemTime = microtime();
321  if( __fdSystemTime - fdTimeLastRedraw >= (double)QVCTRuntime::useSettings()->getRateRedraw() )
322  {
323  fdTimeLastRedraw = __fdSystemTime;
325  }
327  __pqMutexDataChange->unlock();
328  //qDebug( "DEBUG[%s]: End", Q_FUNC_INFO );
329 }
330 
331 void CMainWindow::slotWarning( const QString& _rqsMessage )
332 {
333  warningMessage( _rqsMessage );
334 }
335 
336 void CMainWindow::slotError( const QString& _rqsMessage )
337 {
338  errorMessage( _rqsMessage );
339 }
340 
341 //
342 // OTHER
343 //
344 
345 void CMainWindow::warningMessage( const QString& _rqsMessage )
346 {
347  QMessageBox::warning( 0, "[QVCT] "+tr("WARNING"), _rqsMessage );
348 }
349 
350 void CMainWindow::errorMessage( const QString& _rqsMessage )
351 {
352  QMessageBox::critical( 0, "[QVCT] "+tr("ERROR"), _rqsMessage );
353 }
354 
355 bool CMainWindow::deleteConfirm( const QString& _rqsName )
356 {
357  return( QMessageBox::question( 0, "[QVCT] "+tr("Please Confirm")+"...", tr("The following data are about to be deleted")+QString(":\n %1\n").arg( _rqsName )+tr("Do you want to proceed?"), QMessageBox::Cancel|QMessageBox::Ok, QMessageBox::Cancel ) == QMessageBox::Ok );
358 }
359 
360 QString CMainWindow::fileDialog( QVCT::EFileOperation _eFileOperation, const QString& _rqsTitle, const QString& _rqsFilter )
361 {
362  QString __qsFilename;
363  switch( _eFileOperation )
364  {
365  case QVCT::OPEN:
366  __qsFilename = QFileDialog::getOpenFileName( 0, "[QVCT] "+_rqsTitle, QVCTRuntime::useSettings()->getPathWorkingDirectory(), _rqsFilter );
367  break;
368  case QVCT::SAVE:
369  __qsFilename = QFileDialog::getSaveFileName( 0, "[QVCT] "+_rqsTitle, QVCTRuntime::useSettings()->getPathWorkingDirectory(), _rqsFilter );
370  break;
371  }
372  if( !__qsFilename.isEmpty() )
373  {
374  QFileInfo __qFileInfo( __qsFilename );
375  QVCTRuntime::useSettings()->setPathWorkingDirectory( __qFileInfo.absolutePath() );
376  }
377  return __qsFilename;
378 }
379 
380 bool CMainWindow::fileCheck( QVCT::EFileOperation _eFileOperation, const QString& _rqsFilename, const QStringList* _pqsListExtensions )
381 {
382  QFileInfo __qFileInfo( _rqsFilename );
383 
384  // Check file
385  switch( _eFileOperation )
386  {
387 
388  case QVCT::OPEN:
389  if( !__qFileInfo.exists() )
390  {
391  errorMessage( tr("The requested file cannot be found")+QString(":\n .../%1").arg( __qFileInfo.fileName() ) );
392  return false;
393  }
394  if( !__qFileInfo.isFile() || !__qFileInfo.isReadable() )
395  {
396  errorMessage( tr("The requested file cannot be read from")+QString(":\n .../%1").arg( __qFileInfo.fileName() ) );
397  return false;
398  }
399  break;
400 
401  case QVCT::SAVE:
402  if( __qFileInfo.exists() )
403  {
404  if( !__qFileInfo.isFile() || !__qFileInfo.isWritable() )
405  {
406  errorMessage( tr("The requested file cannot be written to")+QString(":\n .../%1").arg( __qFileInfo.fileName() ) );
407  return false;
408  }
409  }
410  break;
411 
412  }
413 
414  // Check extension
415  if( _pqsListExtensions )
416  {
417  QString __qsExtension = __qFileInfo.suffix();
418  if( !_pqsListExtensions->contains( __qsExtension ) )
419  {
420  {
421  errorMessage( tr("The file format/extension is not supported")+QString(":\n .../%1").arg( __qFileInfo.fileName() ) );
422  return false;
423  }
424  }
425  }
426 
427  return true;
428 }
429 
430 void CMainWindow::fileError( QVCT::EFileOperation _eFileOperation, const QString& _rqsFilename )
431 {
432  QFileInfo __qFileInfo( _rqsFilename );
433  switch( _eFileOperation )
434  {
435  case QVCT::OPEN:
436  errorMessage( tr("The requested file could not be loaded")+QString(":\n .../%1").arg( __qFileInfo.fileName() ) );
437  break;
438  case QVCT::SAVE:
439  errorMessage( tr("The requested file could not be saved")+QString(":\n .../%1").arg( __qFileInfo.fileName() ) );
440  break;
441  }
442 }
443 
444 void CMainWindow::parseError( const QString& _rqsString )
445 {
446  errorMessage( tr("The following data could not be parsed")+QString(":\n %1").arg( _rqsString ) );
447 }
448 
449 bool CMainWindow::symbolExists( const QString& _rqsSymbol )
450 {
451  if( _rqsSymbol.isEmpty() ) return false;
452  QFileInfo __qFileInfo( _rqsSymbol.toLower().remove( ' ' ) );
453  __qFileInfo = QFileInfo( QVCTRuntime::useSettings()->getPathSymbolsDirectory()+"/"+__qFileInfo.baseName()+".png" );
454  return( __qFileInfo.exists() && __qFileInfo.isReadable() );
455 }
456 
457 QPixmap CMainWindow::symbolPixmap( const QString& _rqsSymbol )
458 {
459  QFileInfo __qFileInfo( _rqsSymbol.toLower().remove( ' ' ) );
460  __qFileInfo = QFileInfo( QVCTRuntime::useSettings()->getPathSymbolsDirectory()+"/"+__qFileInfo.baseName()+".png" );
461  return QPixmap( __qFileInfo.absoluteFilePath() );
462 }
[UI] Chart control user-interface
[UI] Virtual "chart table" (view)
Definition: CChartTable.hpp:55
void updateChart()
Update the (current) chart content (on screen)
[UI] Device overlay container
void clear()
Clear the entire content of this overlay.
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.
[UI] Overlays detail view (dock widget)
[UI] Overlays list view (dock widget)
void forceRedraw()
Forces this overlay's rendering (not matter its cache content)
Definition: COverlay.hpp:115
[UI] Application settings - main dialog
void setPathWorkingDirectory(const QString &_rqsPathWorkingDirectory)
[Path] Sets the current working directory
Definition: CSettings.hpp:322
int getRateRefresh()
[Misc] Returns the content refresh rate, in milliseconds
Definition: CSettings.hpp:433
[UI] Time view (dock widget)
Definition: CTimeView.hpp:36
void refreshContent()
Refreshes the content of the underlying widget.
Definition: CTimeView.cpp:134
virtual void refreshContent()
Refreshes the content of the underlying widget.
virtual void refreshContent()
Refreshes the content of the underlying widget.
[UI] General aviation cockpit view (dock widget)
virtual void refreshContent()=0
Refreshes the content of the underlying widget.
[UI] Vessel course view (dock widget)
virtual void refreshContent()
Refreshes the content of the underlying widget.
virtual void refreshContent()
Refreshes the content of the underlying widget.
[UI] Vessel position view (dock widget)
virtual void refreshContent()
Refreshes the content of the underlying widget.
[UI] Vessel target view (dock widget)
virtual void refreshContent()
Refreshes the content of the underlying widget.
static CVesselPosition * useVesselPosition()
static void registerVesselTarget(CVesselTarget *_poVesselTarget)
static CVesselOverlayListView * useVesselOverlayListView()
static COverlayDetailView * useOverlayDetailView()
static CVesselPointDetailView * useVesselPointDetailView()
static CVesselCockpit * useVesselCockpit()
static CVesselCourse * useVesselCourse()
static void registerOverlayDetailView(COverlayDetailView *_poOverlayDetailView)
static void registerVesselCourse(CVesselCourse *_poVesselCourse)
static CVesselOverlay * useVesselOverlay()
static QTimer * useTimerRefresh()
static CTrackOverlayListView * useTrackOverlayListView()
static CVesselTarget * useVesselTarget()
static CDeviceOverlay * useDeviceOverlay()
static void registerTimeView(CTimeView *_poTimeView)
static CTrackContainerDetailView * useTrackContainerDetailView()
static void registerVesselPosition(CVesselPosition *_poVesselPosition)
static QMutex * useMutexDataChange()
static CChartControl * useChartControl()
static void registerChartControl(CChartControl *_poChartControl)
static COverlayListView * useOverlayListView()
static void registerChartTable(CChartTable *_poChartTable)
static void registerOverlayListView(COverlayListView *_poOverlayListView)
static void registerVesselCockpit(CVesselCockpit *_poVesselCockpit)
static CChartTable * useChartTable()
static CRouteOverlayListView * useRouteOverlayListView()
static CTrackSubContainerDetailView * useTrackSubContainerDetailView()
static CSettings * useSettings()
static CLandmarkOverlayListView * useLandmarkOverlayListView()
static CTimeView * useTimeView()
EFileOperation
Definition: QVCT.hpp:42
@ SAVE
Definition: QVCT.hpp:42
@ OPEN
Definition: QVCT.hpp:42
double microtime()
Returns the system time with microseconds resolution, in seconds.
Definition: main.cpp:30
#define VER_STRING
Definition: main.hpp:171