1 | /*
|
---|
2 | * psiapplication.h - subclass of QApplication to do some workarounds
|
---|
3 | * Copyright (C) 2003 Michail Pishchagin
|
---|
4 | *
|
---|
5 | * This program is free software; you can redistribute it and/or
|
---|
6 | * modify it under the terms of the GNU General Public License
|
---|
7 | * as published by the Free Software Foundation; either version 2
|
---|
8 | * of the License, or (at your option) any later version.
|
---|
9 | *
|
---|
10 | * This program is distributed in the hope that it will be useful,
|
---|
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
13 | * GNU General Public License for more details.
|
---|
14 | *
|
---|
15 | * You should have received a copy of the GNU General Public License
|
---|
16 | * along with this library; if not, write to the Free Software
|
---|
17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
---|
18 | *
|
---|
19 | */
|
---|
20 |
|
---|
21 | #ifndef PSIAPPLICATION_H
|
---|
22 | #define PSIAPPLICATION_H
|
---|
23 |
|
---|
24 | #include <qapplication.h>
|
---|
25 |
|
---|
26 | #ifdef Q_WS_MAC
|
---|
27 | #include <Carbon/Carbon.h>
|
---|
28 | #endif
|
---|
29 |
|
---|
30 | class PsiApplication : public QApplication
|
---|
31 | {
|
---|
32 | Q_OBJECT
|
---|
33 | public:
|
---|
34 | PsiApplication(int &argc, char **argv, bool GUIenabled = true);
|
---|
35 | ~PsiApplication();
|
---|
36 |
|
---|
37 | bool notify(QObject *receiver, QEvent *event);
|
---|
38 | #ifdef Q_WS_X11
|
---|
39 | bool x11EventFilter(XEvent *event);
|
---|
40 | #endif
|
---|
41 | #ifdef Q_WS_MAC
|
---|
42 | bool macEventFilter(EventHandlerCallRef, EventRef);
|
---|
43 | #endif
|
---|
44 |
|
---|
45 | signals:
|
---|
46 | void dockActivated();
|
---|
47 | void newTrayOwner();
|
---|
48 | void trayOwnerDied();
|
---|
49 |
|
---|
50 | private:
|
---|
51 | void init(bool GUIenabled);
|
---|
52 | };
|
---|
53 |
|
---|
54 | #endif
|
---|