author | jeremy <jeremy> | 2002-02-10 13:22:54 (UTC) |
---|---|---|
committer | jeremy <jeremy> | 2002-02-10 13:22:54 (UTC) |
commit | 261b98eff083215db69843da28a05cfd1f7b3795 (patch) (unidiff) | |
tree | 3e9ed039218f0a132c9413987e03a5b6dc5cb24e /library/qpeapplication.h | |
parent | d0d626304ffb0de247e22760bc342e72406e301a (diff) | |
download | opie-261b98eff083215db69843da28a05cfd1f7b3795.zip opie-261b98eff083215db69843da28a05cfd1f7b3795.tar.gz opie-261b98eff083215db69843da28a05cfd1f7b3795.tar.bz2 |
Added support for setMic and micChange QCop messages. These additions
are exactly like setVolume and volumeChange excopt of course, they
change the mic input level instead of the volume out level.
-rw-r--r-- | library/qpeapplication.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/library/qpeapplication.h b/library/qpeapplication.h index fd5e57d..23606db 100644 --- a/library/qpeapplication.h +++ b/library/qpeapplication.h | |||
@@ -1,124 +1,130 @@ | |||
1 | /********************************************************************** | 1 | /********************************************************************** |
2 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. | 2 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. |
3 | ** | 3 | ** |
4 | ** This file is part of Qtopia Environment. | 4 | ** This file is part of Qtopia Environment. |
5 | ** | 5 | ** |
6 | ** This file may be distributed and/or modified under the terms of the | 6 | ** This file may be distributed and/or modified under the terms of the |
7 | ** GNU General Public License version 2 as published by the Free Software | 7 | ** GNU General Public License version 2 as published by the Free Software |
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | 8 | ** Foundation and appearing in the file LICENSE.GPL included in the |
9 | ** packaging of this file. | 9 | ** packaging of this file. |
10 | ** | 10 | ** |
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
13 | ** | 13 | ** |
14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
15 | ** | 15 | ** |
16 | ** Contact info@trolltech.com if any conditions of this licensing are | 16 | ** Contact info@trolltech.com if any conditions of this licensing are |
17 | ** not clear to you. | 17 | ** not clear to you. |
18 | ** | 18 | ** |
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | #ifndef __QPE_APPLICATION_H__ | 20 | #ifndef __QPE_APPLICATION_H__ |
21 | #define __QPE_APPLICATION_H__ | 21 | #define __QPE_APPLICATION_H__ |
22 | 22 | ||
23 | 23 | ||
24 | #include <qapplication.h> | 24 | #include <qapplication.h> |
25 | #if defined(_WS_QWS_) && !defined(Q_WS_QWS) | 25 | #if defined(_WS_QWS_) && !defined(Q_WS_QWS) |
26 | #define Q_WS_QWS | 26 | #define Q_WS_QWS |
27 | #endif | 27 | #endif |
28 | #include "qpedecoration_qws.h" | 28 | #include "qpedecoration_qws.h" |
29 | #include "timestring.h" | 29 | #include "timestring.h" |
30 | 30 | ||
31 | class QCopChannel; | 31 | class QCopChannel; |
32 | class QPEApplicationData; | 32 | class QPEApplicationData; |
33 | class QWSEvent; | 33 | class QWSEvent; |
34 | class QWSKeyEvent; | 34 | class QWSKeyEvent; |
35 | 35 | ||
36 | class QPEApplication : public QApplication | 36 | class QPEApplication : public QApplication |
37 | { | 37 | { |
38 | Q_OBJECT | 38 | Q_OBJECT |
39 | public: | 39 | public: |
40 | QPEApplication( int& argc, char **argv, Type=GuiClient ); | 40 | QPEApplication( int& argc, char **argv, Type=GuiClient ); |
41 | ~QPEApplication(); | 41 | ~QPEApplication(); |
42 | 42 | ||
43 | static QString qpeDir(); | 43 | static QString qpeDir(); |
44 | static QString documentDir(); | 44 | static QString documentDir(); |
45 | void applyStyle(); | 45 | void applyStyle(); |
46 | static int defaultRotation(); | 46 | static int defaultRotation(); |
47 | static void setDefaultRotation(int r); | 47 | static void setDefaultRotation(int r); |
48 | static void grabKeyboard(); | 48 | static void grabKeyboard(); |
49 | static void ungrabKeyboard(); | 49 | static void ungrabKeyboard(); |
50 | 50 | ||
51 | enum StylusMode { | 51 | enum StylusMode { |
52 | LeftOnly, | 52 | LeftOnly, |
53 | RightOnHold | 53 | RightOnHold |
54 | // RightOnHoldLeftDelayed, etc. | 54 | // RightOnHoldLeftDelayed, etc. |
55 | }; | 55 | }; |
56 | static void setStylusOperation( QWidget*, StylusMode ); | 56 | static void setStylusOperation( QWidget*, StylusMode ); |
57 | static StylusMode stylusOperation( QWidget* ); | 57 | static StylusMode stylusOperation( QWidget* ); |
58 | 58 | ||
59 | enum InputMethodHint { | 59 | enum InputMethodHint { |
60 | Normal, | 60 | Normal, |
61 | AlwaysOff, | 61 | AlwaysOff, |
62 | AlwaysOn | 62 | AlwaysOn |
63 | }; | 63 | }; |
64 | 64 | ||
65 | enum screenSaverHint { | 65 | enum screenSaverHint { |
66 | Disable = 0, | 66 | Disable = 0, |
67 | DisableLightOff = 1, | 67 | DisableLightOff = 1, |
68 | DisableSuspend = 2, | 68 | DisableSuspend = 2, |
69 | Enable = 100 | 69 | Enable = 100 |
70 | }; | 70 | }; |
71 | 71 | ||
72 | static void setInputMethodHint( QWidget *, InputMethodHint ); | 72 | static void setInputMethodHint( QWidget *, InputMethodHint ); |
73 | static InputMethodHint inputMethodHint( QWidget * ); | 73 | static InputMethodHint inputMethodHint( QWidget * ); |
74 | 74 | ||
75 | void showMainWidget( QWidget*, bool nomax=FALSE ); | 75 | void showMainWidget( QWidget*, bool nomax=FALSE ); |
76 | void showMainDocumentWidget( QWidget*, bool nomax=FALSE ); | 76 | void showMainDocumentWidget( QWidget*, bool nomax=FALSE ); |
77 | 77 | ||
78 | static void setKeepRunning(); | 78 | static void setKeepRunning(); |
79 | bool keepRunning() const; | 79 | bool keepRunning() const; |
80 | 80 | ||
81 | int exec(); | 81 | int exec(); |
82 | 82 | ||
83 | signals: | 83 | signals: |
84 | void clientMoused(); | 84 | void clientMoused(); |
85 | void timeChanged(); | 85 | void timeChanged(); |
86 | void clockChanged( bool pm ); | 86 | void clockChanged( bool pm ); |
87 | void volumeChanged( bool muted ); | 87 | void volumeChanged( bool muted ); |
88 | void micChanged( bool muted ); | ||
88 | void appMessage( const QCString& msg, const QByteArray& data); | 89 | void appMessage( const QCString& msg, const QByteArray& data); |
89 | void weekChanged( bool startOnMonday ); | 90 | void weekChanged( bool startOnMonday ); |
90 | void dateFormatChanged( DateFormat ); | 91 | void dateFormatChanged( DateFormat ); |
91 | void flush(); | 92 | void flush(); |
92 | void reload(); | 93 | void reload(); |
93 | 94 | ||
94 | private slots: | 95 | private slots: |
95 | void systemMessage( const QCString &msg, const QByteArray &data ); | 96 | void systemMessage( const QCString &msg, const QByteArray &data ); |
96 | void pidMessage( const QCString &msg, const QByteArray &data ); | 97 | void pidMessage( const QCString &msg, const QByteArray &data ); |
97 | void removeSenderFromStylusDict(); | 98 | void removeSenderFromStylusDict(); |
98 | void hideOrQuit(); | 99 | void hideOrQuit(); |
99 | 100 | ||
100 | protected: | 101 | protected: |
101 | bool qwsEventFilter( QWSEvent * ); | 102 | bool qwsEventFilter( QWSEvent * ); |
102 | void internalSetStyle( const QString &style ); | 103 | void internalSetStyle( const QString &style ); |
103 | void prepareForTermination(bool willrestart); | 104 | void prepareForTermination(bool willrestart); |
104 | virtual void restart(); | 105 | virtual void restart(); |
105 | virtual void shutdown(); | 106 | virtual void shutdown(); |
106 | bool eventFilter( QObject *, QEvent * ); | 107 | bool eventFilter( QObject *, QEvent * ); |
107 | void timerEvent( QTimerEvent * ); | 108 | void timerEvent( QTimerEvent * ); |
108 | bool keyboardGrabbed() const; | 109 | bool keyboardGrabbed() const; |
109 | bool raiseAppropriateWindow(); | 110 | bool raiseAppropriateWindow(); |
110 | virtual void tryQuit(); | 111 | virtual void tryQuit(); |
111 | 112 | ||
112 | private: | 113 | private: |
113 | void mapToDefaultAction( QWSKeyEvent *ke, int defKey ); | 114 | void mapToDefaultAction( QWSKeyEvent *ke, int defKey ); |
114 | 115 | ||
115 | #if defined(Q_WS_QWS) && !defined(QT_NO_COP) | 116 | #if defined(Q_WS_QWS) && !defined(QT_NO_COP) |
116 | QCopChannel *sysChannel; | 117 | QCopChannel *sysChannel; |
117 | QCopChannel *pidChannel; | 118 | QCopChannel *pidChannel; |
118 | #endif | 119 | #endif |
119 | QPEApplicationData *d; | 120 | QPEApplicationData *d; |
121 | |||
122 | bool reserved_sh; | ||
123 | |||
124 | |||
125 | |||
120 | }; | 126 | }; |
121 | 127 | ||
122 | 128 | ||
123 | #endif | 129 | #endif |
124 | 130 | ||