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

Last change on this file since 5067 was 5067, checked in by mervart, 9 years ago
File size: 1.3 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 "app.h"
18#include "bncapp.h"
19
20using namespace std;
21
22// Global Variable
23////////////////////////////////////////////////////////////////////////////
24t_pgmCore* PGM_CORE = 0;
25
26// Constructor
27////////////////////////////////////////////////////////////////////////////
28t_app::t_app(int& argc, char* argv[], bool GUIenabled) :
29 QApplication(argc, argv, GUIenabled) {
30 PGM_CORE = new t_pgmCore(argc, argv, GUIenabled);
31}
32
33// Destructor
34////////////////////////////////////////////////////////////////////////////
35t_app::~t_app() {
36 delete _pgmCore;
37}
38
39// Handling Events (virtual)
40////////////////////////////////////////////////////////////////////////////
41bool t_app::event(QEvent* ev) {
42
43 if (ev->type() == QEvent::FileOpen) { // currently happens on Mac only
44 QString fileName = static_cast<QFileOpenEvent*>(ev)->file();
45 PGM_CORE->setConfFileName(fileName);
46 return true;
47 }
48
49 return QApplication::event(ev);
50}
51
Note: See TracBrowser for help on using the repository browser.