Rev | Line | |
---|
[5067] | 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 | *
|
---|
[8897] | 13 | * Changes:
|
---|
[5067] | 14 | *
|
---|
| 15 | * -----------------------------------------------------------------------*/
|
---|
| 16 |
|
---|
[8897] | 17 | #include "app.h"
|
---|
[5070] | 18 | #include "bnccore.h"
|
---|
[5067] | 19 |
|
---|
| 20 | using namespace std;
|
---|
| 21 |
|
---|
[8897] | 22 | QCoreApplication* createApplication(int& argc, char* argv[], bool GUIenabled) {
|
---|
| 23 |
|
---|
| 24 | if (GUIenabled) {
|
---|
| 25 | return new t_app(argc, argv);
|
---|
| 26 | }
|
---|
| 27 |
|
---|
| 28 | qDebug() << "bin hier";
|
---|
| 29 | return new QCoreApplication(argc, argv);
|
---|
| 30 | }
|
---|
| 31 |
|
---|
| 32 |
|
---|
[5067] | 33 | // Constructor
|
---|
| 34 | ////////////////////////////////////////////////////////////////////////////
|
---|
[8897] | 35 | t_app::t_app(int& argc, char* argv[]) : QApplication(argc, argv) {
|
---|
| 36 | setWindowIcon(QPixmap(":ntrip-logo.png"));
|
---|
[5067] | 37 | }
|
---|
| 38 |
|
---|
| 39 | // Destructor
|
---|
| 40 | ////////////////////////////////////////////////////////////////////////////
|
---|
| 41 | t_app::~t_app() {
|
---|
| 42 | }
|
---|
| 43 |
|
---|
| 44 | // Handling Events (virtual)
|
---|
| 45 | ////////////////////////////////////////////////////////////////////////////
|
---|
| 46 | bool t_app::event(QEvent* ev) {
|
---|
| 47 |
|
---|
| 48 | if (ev->type() == QEvent::FileOpen) { // currently happens on Mac only
|
---|
| 49 | QString fileName = static_cast<QFileOpenEvent*>(ev)->file();
|
---|
[5068] | 50 | BNC_CORE->setConfFileName(fileName);
|
---|
[5067] | 51 | return true;
|
---|
| 52 | }
|
---|
[8897] | 53 |
|
---|
[5067] | 54 | return QApplication::event(ev);
|
---|
| 55 | }
|
---|
| 56 |
|
---|
[8897] | 57 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.