ARGoS  3
A parallel, multi-engine simulator for swarm robotics
plugins/simulator/visualizations/qt-opengl/qtopengl_application.cpp
Go to the documentation of this file.
00001 
00007 #include "qtopengl_application.h"
00008 
00009 #include <argos3/core/utility/logging/argos_log.h>
00010 
00011 #include <typeinfo>
00012 
00013 namespace argos {
00014 
00015    /****************************************/
00016    /****************************************/
00017 
00018    bool CQTOpenGLApplication::notify(QObject* pc_receiver,
00019                                      QEvent* pc_event) {
00020       try {
00021          return QApplication::notify(pc_receiver, pc_event);
00022       } catch (std::exception& ex) {
00023          fprintf(stderr, "%s\n", ex.what());
00024          QApplication::exit(1);
00025       } catch (...) {
00026          qFatal("Error <unknown> sending event %s to object %s (%s)", 
00027                 typeid(*pc_event).name(),
00028                 qPrintable(pc_receiver->objectName()),
00029                 typeid(*pc_receiver).name());
00030       }
00031       /* Should never get here */
00032       return false;
00033    }
00034 
00035    /****************************************/
00036    /****************************************/
00037 
00038 }