[81] | 1 | // %pacpus:license{
|
---|
| 2 | // This file is part of the PACPUS framework distributed under the
|
---|
| 3 | // CECILL-C License, Version 1.0.
|
---|
| 4 | // %pacpus:license}
|
---|
| 5 | /// @file
|
---|
[115] | 6 | /// @author Marek Kurdej <firstname.surname@utc.fr>
|
---|
[81] | 7 | /// @date March, 2013
|
---|
| 8 | /// @version $Id$
|
---|
| 9 | /// @copyright Copyright (c) UTC/CNRS Heudiasyc 2006 - 2013. All rights reserved.
|
---|
| 10 |
|
---|
| 11 | #include <Pacpus/kernel/Log.h>
|
---|
| 12 | #include <Pacpus/kernel/PacpusApplication.h>
|
---|
[117] | 13 | #include <Pacpus/kernel/PacpusException.h>
|
---|
[81] | 14 |
|
---|
| 15 | using namespace pacpus;
|
---|
| 16 |
|
---|
| 17 | DECLARE_STATIC_LOGGER("pacpus.core.PacpusApplication");
|
---|
| 18 |
|
---|
[82] | 19 | PacpusApplication::PacpusApplication(int & argc, char ** argv
|
---|
| 20 | #ifndef Q_QDOC
|
---|
| 21 | , int _internal
|
---|
| 22 | #endif
|
---|
| 23 | )
|
---|
| 24 | : QApplication(argc, argv, _internal)
|
---|
[81] | 25 | {
|
---|
| 26 | }
|
---|
| 27 |
|
---|
[82] | 28 | PacpusApplication::PacpusApplication(int & argc, char ** argv, bool GUIenabled
|
---|
| 29 | #ifndef Q_QDOC
|
---|
| 30 | , int _internal
|
---|
| 31 | #endif
|
---|
| 32 | )
|
---|
| 33 | : QApplication(argc, argv, GUIenabled, _internal)
|
---|
[81] | 34 | {
|
---|
| 35 | }
|
---|
| 36 |
|
---|
[82] | 37 | PacpusApplication::PacpusApplication(int & argc, char ** argv, Type type
|
---|
| 38 | #ifndef Q_QDOC
|
---|
| 39 | , int _internal
|
---|
| 40 | #endif
|
---|
| 41 | )
|
---|
| 42 | : QApplication(argc, argv, type, _internal)
|
---|
[81] | 43 | {
|
---|
| 44 | }
|
---|
| 45 |
|
---|
| 46 | #if defined(Q_WS_X11)
|
---|
[82] | 47 | PacpusApplication::PacpusApplication(Display * display, Qt::HANDLE visual, Qt::HANDLE colormap
|
---|
| 48 | #ifndef Q_QDOC
|
---|
| 49 | , int _internal
|
---|
| 50 | #endif
|
---|
| 51 | )
|
---|
| 52 | : QApplication(display, visual, colormap, _internal)
|
---|
[81] | 53 | {
|
---|
| 54 | }
|
---|
| 55 |
|
---|
[82] | 56 | PacpusApplication::PacpusApplication(Display * display, int & argc, char ** argv, Qt::HANDLE visual , Qt::HANDLE colormap
|
---|
| 57 | #ifndef Q_QDOC
|
---|
| 58 | , int _internal
|
---|
| 59 | #endif
|
---|
| 60 | )
|
---|
| 61 | : QApplication(display, argc, argv, visual, colormap, _internal)
|
---|
[81] | 62 | {
|
---|
| 63 | }
|
---|
| 64 | #endif
|
---|
| 65 |
|
---|
| 66 | #if defined(Q_OS_SYMBIAN)
|
---|
[82] | 67 | PacpusApplication::PacpusApplication(QApplication::QS60MainApplicationFactory factory, int & argc, char ** argv
|
---|
| 68 | #ifndef Q_QDOC
|
---|
| 69 | , int _internal
|
---|
| 70 | #endif
|
---|
| 71 | )
|
---|
| 72 | : QApplication(factory, argc, argv, _internal)
|
---|
[81] | 73 | {
|
---|
| 74 | }
|
---|
| 75 | #endif
|
---|
| 76 |
|
---|
| 77 | PacpusApplication::~PacpusApplication()
|
---|
| 78 | {
|
---|
| 79 | }
|
---|
| 80 |
|
---|
| 81 | bool PacpusApplication::notify(QObject * receiver, QEvent * ev)
|
---|
| 82 | {
|
---|
| 83 | try {
|
---|
| 84 | return QApplication::notify(receiver, ev);
|
---|
[117] | 85 | } catch(PacpusException & e) {
|
---|
| 86 | LOG_ERROR("PacpusException thrown:" << e.what());
|
---|
[81] | 87 | } catch(std::exception & e) {
|
---|
| 88 | LOG_ERROR("std::exception thrown:" << e.what());
|
---|
| 89 | }
|
---|
| 90 | return false;
|
---|
| 91 | }
|
---|