Files

37 lines
796 B
C++
Executable File

/**
* @RDE_HEADER@
* small extension to QApplication for window handling
* $Id$
* $HeadURL$
* $Author$
*/
#include "nglapplication.h"
#include "ngl_signal_handler.inc"
//----------------------------------------------------------------------------
NGLApplication::NGLApplication(int &argc, char **argv)
: QApplication(argc, argv)
{
// auf SIGTERM reagieren
signal(SIGTERM, &signalHandler);
#ifdef Q_OS_WIN
installNativeEventFilter(new MyEventFilter);
#endif
}
//----------------------------------------------------------------------------
bool NGLApplication::notify(QObject *o, QEvent *e)
{
bool bRet = false;
try
{
bRet = QApplication::notify(o, e);
}
catch (const std::exception &e)
{
fprintf(stderr, "exception %s\n", e.what());
}
return bRet;
}