Diffstat (limited to 'x11/libqpe-x11/qpe/qpeapplication.h') (more/less context) (show whitespace changes)
-rw-r--r-- | x11/libqpe-x11/qpe/qpeapplication.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/x11/libqpe-x11/qpe/qpeapplication.h b/x11/libqpe-x11/qpe/qpeapplication.h index cd385db..2af1c66 100644 --- a/x11/libqpe-x11/qpe/qpeapplication.h +++ b/x11/libqpe-x11/qpe/qpeapplication.h | |||
@@ -1,70 +1,93 @@ | |||
1 | #ifndef OPIE_QPE_APPLICATION_H | 1 | #ifndef OPIE_QPE_APPLICATION_H |
2 | #define OPIE_QPE_APPLICATION_H | 2 | #define OPIE_QPE_APPLICATION_H |
3 | 3 | ||
4 | /** | 4 | /** |
5 | * LGPLed | 5 | * LGPLed |
6 | */ | 6 | */ |
7 | 7 | ||
8 | #include <qapplication.h> | 8 | #include <qapplication.h> |
9 | #include <qevent.h> | ||
9 | 10 | ||
10 | #include <qpe/timestring.h> | 11 | #include <qpe/timestring.h> |
11 | 12 | ||
12 | class QCopChannel; | 13 | class QCopChannel; |
13 | class QPEApplication : public QApplication { | 14 | class QPEApplication : public QApplication { |
14 | Q_OBJECT | 15 | Q_OBJECT |
15 | public: | 16 | public: |
16 | QPEApplication(int& argc, char** argv, Type=GuiClient ); | 17 | QPEApplication(int& argc, char** argv, Type=GuiClient ); |
17 | ~QPEApplication(); | 18 | ~QPEApplication(); |
18 | 19 | ||
20 | |||
19 | static QString qpeDir(); | 21 | static QString qpeDir(); |
20 | static QString documentDir(); | 22 | static QString documentDir(); |
21 | void applyStyle(); | 23 | void applyStyle(); |
22 | 24 | ||
23 | static int defaultRotation(); | 25 | static int defaultRotation(); |
24 | static void setDefaultRotation( int r ); | 26 | static void setDefaultRotation( int r ); |
25 | static void grabKeyboard(); | 27 | static void grabKeyboard(); |
26 | static void ungrabKeyboard(); | 28 | static void ungrabKeyboard(); |
27 | 29 | ||
28 | enum StylusMode { | 30 | enum StylusMode { |
29 | LeftOnly, | 31 | LeftOnly, |
30 | RightOnHold | 32 | RightOnHold |
31 | }; | 33 | }; |
32 | static void setStylusOperation( QWidget*, StylusMode ); | 34 | static void setStylusOperation( QWidget*, StylusMode ); |
33 | static StylusMode stylusOperation( QWidget* ); | 35 | static StylusMode stylusOperation( QWidget* ); |
34 | 36 | ||
37 | enum InputMethodHint { | ||
38 | Normal, | ||
39 | AlwaysOff, | ||
40 | AlwaysOn | ||
41 | }; | ||
42 | static void setInputMethodHint( QWidget*, InputMethodHint ); | ||
43 | static InputMethodHint inputMethodHint( QWidget* ); | ||
44 | |||
35 | void showMainWidget( QWidget*, bool nomax = FALSE ); | 45 | void showMainWidget( QWidget*, bool nomax = FALSE ); |
36 | void showMainDocumentWidget( QWidget*, bool nomax = FALSE ); | 46 | void showMainDocumentWidget( QWidget*, bool nomax = FALSE ); |
37 | 47 | ||
38 | static void showDialog( QDialog*, bool nomax = FALSE ); | 48 | static void showDialog( QDialog*, bool nomax = FALSE ); |
39 | static int execDialog( QDialog*, bool nomax = FALSE ); | 49 | static int execDialog( QDialog*, bool nomax = FALSE ); |
40 | 50 | ||
41 | static void setKeepRunning(); | 51 | static void setKeepRunning(); |
42 | bool keepRunning()const; | 52 | bool keepRunning()const; |
43 | 53 | ||
44 | bool keyboardGrabbed()const; | 54 | bool keyboardGrabbed()const; |
45 | int exec(); | 55 | int exec(); |
46 | 56 | ||
47 | signals: | 57 | signals: |
48 | void clientMoused(); | 58 | void clientMoused(); |
49 | void timeChanged(); | 59 | void timeChanged(); |
50 | void clockChanged( bool pm ); | 60 | void clockChanged( bool pm ); |
51 | void micChanged( bool muted ); | 61 | void micChanged( bool muted ); |
52 | void volumeChanged( bool muted ); | 62 | void volumeChanged( bool muted ); |
53 | void appMessage( const QCString& msg, const QByteArray& data); | 63 | void appMessage( const QCString& msg, const QByteArray& data); |
54 | void weekChanged( bool startOnMonday ); | 64 | void weekChanged( bool startOnMonday ); |
55 | void dateFormatChanged( DateFormat ); | 65 | void dateFormatChanged( DateFormat ); |
56 | void flush(); | 66 | void flush(); |
57 | void reload(); | 67 | void reload(); |
58 | 68 | ||
59 | private: | 69 | private: |
60 | void initTranslations(); | 70 | void initTranslations(); |
61 | void internalSetStyle(const QString&); | 71 | void internalSetStyle(const QString&); |
62 | 72 | ||
73 | private slots: | ||
74 | void hideOrQuit(); | ||
75 | void systemMessage( const QCString&, const QByteArray& ); | ||
76 | void pidMessage( const QCString&, const QByteArray& ); | ||
77 | void removeSenderFromStylusDict(); | ||
78 | protected: | ||
79 | virtual void restart(); | ||
80 | virtual void shutdown(); | ||
81 | bool eventFilter( QObject*, QEvent* ); | ||
82 | void timerEvent( QTimerEvent* ); | ||
83 | void raiseAppropriateWindow(); | ||
84 | virtual void tryQuit(); | ||
85 | |||
63 | private: | 86 | private: |
64 | class Private; | 87 | class Private; |
65 | Private* d; | 88 | Private* d; |
66 | QCopChannel *m_sys; | 89 | QCopChannel *m_sys; |
67 | QCopChannel *m_pid; | 90 | QCopChannel *m_pid; |
68 | }; | 91 | }; |
69 | 92 | ||
70 | #endif | 93 | #endif |