source: ntrip/trunk/BNC/src/app.cpp@ 8646

Last change on this file since 8646 was 8252, checked in by stoecker, 7 years ago

see #105 - reenable Qt4 build options, drop generic version dependend includes, replace by direct requirements, remaining QtCore lines should also be replaced

File size: 1.2 KB
Line 
1/* -------------------------------------------------------------------------
2 * GnssCenter
3 * -------------------------------------------------------------------------
4 *
5 * Class: t_app
6 *
7 * Purpose: This class implements the main application
8 *
9 * Author: L. Mervart
10 *
11 * Created: 05-Jan-2013
12 *
13 * Changes:
14 *
15 * -----------------------------------------------------------------------*/
16
17#include <QFileOpenEvent>
18
19#include "app.h"
20#include "bnccore.h"
21
22using namespace std;
23
24// Constructor
25////////////////////////////////////////////////////////////////////////////
26t_app::t_app(int& argc, char* argv[], bool GUIenabled) : QApplication(argc, argv, GUIenabled) {
27}
28
29// Destructor
30////////////////////////////////////////////////////////////////////////////
31t_app::~t_app() {
32}
33
34// Handling Events (virtual)
35////////////////////////////////////////////////////////////////////////////
36bool t_app::event(QEvent* ev) {
37
38 if (ev->type() == QEvent::FileOpen) { // currently happens on Mac only
39 QString fileName = static_cast<QFileOpenEvent*>(ev)->file();
40 BNC_CORE->setConfFileName(fileName);
41 return true;
42 }
43
44 return QApplication::event(ev);
45}
46
Note: See TracBrowser for help on using the repository browser.