/** * @RDE_HEADER@ * small extension to QtSingleApplication with NGL specific stuff * $Id$ * $HeadURL$ * $Author$ */ #pragma once #include #include "nglloggerhandler.h" #ifndef NGLSINGLEAPPLICATION_EXPORT # ifdef BUILD_STATIC_LIBRARIES # define NGLSINGLEAPPLICATION_EXPORT # else # ifdef MAKE_NGLSINGLEAPPLICATION_LIB # define NGLSINGLEAPPLICATION_EXPORT Q_DECL_EXPORT # else # define NGLSINGLEAPPLICATION_EXPORT Q_DECL_IMPORT # endif # endif #endif namespace NGL { class INGLLogger; } class NGLSINGLEAPPLICATION_EXPORT NGLSingleApplication : public QtSingleApplication, public NGL::LoggerHandler { Q_OBJECT public: NGLSingleApplication(int &argc, char **argv); protected: bool notify(QObject *o, QEvent *e) override; }; #define nglApp static_cast(NGLSingleApplication::instance())