Index: /trunk/BNC/src/app.cpp
===================================================================
--- /trunk/BNC/src/app.cpp	(revision 5067)
+++ /trunk/BNC/src/app.cpp	(revision 5067)
@@ -0,0 +1,51 @@
+/* -------------------------------------------------------------------------
+ * GnssCenter
+ * -------------------------------------------------------------------------
+ *
+ * Class:      t_app
+ *
+ * Purpose:    This class implements the main application
+ *
+ * Author:     L. Mervart
+ *
+ * Created:    05-Jan-2013
+ *
+ * Changes:    
+ *
+ * -----------------------------------------------------------------------*/
+
+#include "app.h" 
+#include "bncapp.h"
+
+using namespace std;
+
+// Global Variable
+////////////////////////////////////////////////////////////////////////////
+t_pgmCore* PGM_CORE = 0;
+
+// Constructor
+////////////////////////////////////////////////////////////////////////////
+t_app::t_app(int& argc, char* argv[], bool GUIenabled) : 
+  QApplication(argc, argv, GUIenabled) {
+  PGM_CORE = new t_pgmCore(argc, argv, GUIenabled);
+}
+
+// Destructor
+////////////////////////////////////////////////////////////////////////////
+t_app::~t_app() {
+  delete _pgmCore;
+}
+
+// Handling Events (virtual)
+////////////////////////////////////////////////////////////////////////////
+bool t_app::event(QEvent* ev) {
+
+  if (ev->type() == QEvent::FileOpen) {  // currently happens on Mac only
+    QString fileName = static_cast<QFileOpenEvent*>(ev)->file();
+    PGM_CORE->setConfFileName(fileName);
+    return true;
+  }
+    
+  return QApplication::event(ev);
+}
+
Index: /trunk/BNC/src/app.h
===================================================================
--- /trunk/BNC/src/app.h	(revision 5067)
+++ /trunk/BNC/src/app.h	(revision 5067)
@@ -0,0 +1,22 @@
+#ifndef GnssCenter_APP_H
+#define GnssCenter_APP_H
+
+#include <QtGui>
+
+class t_pgmCore;
+
+class t_app : public QApplication {
+ Q_OBJECT
+ public:
+  t_app(int& argc, char* argv[], bool GUIenabled);
+  virtual ~t_app();
+ protected:
+  virtual bool event(QEvent* ev);
+ private:
+  t_pgmCore* _pgmCore;
+};
+
+extern t_pgmCore* PGM_CORE;
+
+#endif
+
