source: pacpusframework/trunk/src/PacpusLib/PacpusApplication.cpp@ 156

Last change on this file since 156 was 117, checked in by Marek Kurdej, 11 years ago

Removed FileLib dependency in PacpusLib (using PacpusException instead of DbiteException).

File size: 2.6 KB
Line 
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
6/// @author Marek Kurdej <firstname.surname@utc.fr>
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>
13#include <Pacpus/kernel/PacpusException.h>
14
15using namespace pacpus;
16
17DECLARE_STATIC_LOGGER("pacpus.core.PacpusApplication");
18
19PacpusApplication::PacpusApplication(int & argc, char ** argv
20#ifndef Q_QDOC
21 , int _internal
22#endif
23 )
24 : QApplication(argc, argv, _internal)
25{
26}
27
28PacpusApplication::PacpusApplication(int & argc, char ** argv, bool GUIenabled
29#ifndef Q_QDOC
30 , int _internal
31#endif
32 )
33 : QApplication(argc, argv, GUIenabled, _internal)
34{
35}
36
37PacpusApplication::PacpusApplication(int & argc, char ** argv, Type type
38#ifndef Q_QDOC
39 , int _internal
40#endif
41 )
42 : QApplication(argc, argv, type, _internal)
43{
44}
45
46#if defined(Q_WS_X11)
47PacpusApplication::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)
53{
54}
55
56PacpusApplication::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)
62{
63}
64#endif
65
66#if defined(Q_OS_SYMBIAN)
67PacpusApplication::PacpusApplication(QApplication::QS60MainApplicationFactory factory, int & argc, char ** argv
68#ifndef Q_QDOC
69 , int _internal
70#endif
71 )
72 : QApplication(factory, argc, argv, _internal)
73{
74}
75#endif
76
77PacpusApplication::~PacpusApplication()
78{
79}
80
81bool PacpusApplication::notify(QObject * receiver, QEvent * ev)
82{
83 try {
84 return QApplication::notify(receiver, ev);
85 } catch(PacpusException & e) {
86 LOG_ERROR("PacpusException thrown:" << e.what());
87 } catch(std::exception & e) {
88 LOG_ERROR("std::exception thrown:" << e.what());
89 }
90 return false;
91}
Note: See TracBrowser for help on using the repository browser.