-rw-r--r-- | library/qpeapplication.h | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/library/qpeapplication.h b/library/qpeapplication.h index 69e0058..729cf2b 100644 --- a/library/qpeapplication.h +++ b/library/qpeapplication.h | |||
@@ -54,131 +54,128 @@ public: | |||
54 | static void setCurrentRotation(int r); | 54 | static void setCurrentRotation(int r); |
55 | static void setCurrentMode(int x, int y, int depth ); | 55 | static void setCurrentMode(int x, int y, int depth ); |
56 | static void grabKeyboard(); | 56 | static void grabKeyboard(); |
57 | static void ungrabKeyboard(); | 57 | static void ungrabKeyboard(); |
58 | 58 | ||
59 | enum StylusMode { | 59 | enum StylusMode { |
60 | LeftOnly, | 60 | LeftOnly, |
61 | RightOnHold | 61 | RightOnHold |
62 | // RightOnHoldLeftDelayed, etc. | 62 | // RightOnHoldLeftDelayed, etc. |
63 | }; | 63 | }; |
64 | static void setStylusOperation( QWidget*, StylusMode ); | 64 | static void setStylusOperation( QWidget*, StylusMode ); |
65 | static StylusMode stylusOperation( QWidget* ); | 65 | static StylusMode stylusOperation( QWidget* ); |
66 | 66 | ||
67 | enum InputMethodHint { | 67 | enum InputMethodHint { |
68 | Normal, | 68 | Normal, |
69 | AlwaysOff, | 69 | AlwaysOff, |
70 | AlwaysOn | 70 | AlwaysOn |
71 | }; | 71 | }; |
72 | 72 | ||
73 | enum screenSaverHint { | 73 | enum screenSaverHint { |
74 | Disable = 0, | 74 | Disable = 0, |
75 | DisableLightOff = 1, | 75 | DisableLightOff = 1, |
76 | DisableSuspend = 2, | 76 | DisableSuspend = 2, |
77 | Enable = 100 | 77 | Enable = 100 |
78 | }; | 78 | }; |
79 | 79 | ||
80 | static void setInputMethodHint( QWidget *, InputMethodHint ); | 80 | static void setInputMethodHint( QWidget *, InputMethodHint ); |
81 | static InputMethodHint inputMethodHint( QWidget * ); | 81 | static InputMethodHint inputMethodHint( QWidget * ); |
82 | 82 | ||
83 | void showMainWidget( QWidget*, bool nomax=FALSE ); | 83 | void showMainWidget( QWidget*, bool nomax=FALSE ); |
84 | void showMainDocumentWidget( QWidget*, bool nomax=FALSE ); | 84 | void showMainDocumentWidget( QWidget*, bool nomax=FALSE ); |
85 | static void showDialog( QDialog*, bool nomax=FALSE ); | 85 | static void showDialog( QDialog*, bool nomax=FALSE ); |
86 | static int execDialog( QDialog*, bool nomax=FALSE ); | 86 | static int execDialog( QDialog*, bool nomax=FALSE ); |
87 | /* Merge setTempScreenSaverMode */ | 87 | /* Merge setTempScreenSaverMode */ |
88 | #ifdef QTOPIA_INTERNAL_INITAPP | 88 | #ifdef QTOPIA_INTERNAL_INITAPP |
89 | void initApp( int argv, char **argv ); | 89 | void initApp( int argv, char **argv ); |
90 | #endif | 90 | #endif |
91 | 91 | ||
92 | static void setKeepRunning(); | 92 | static void setKeepRunning(); |
93 | bool keepRunning() const; | 93 | bool keepRunning() const; |
94 | 94 | ||
95 | bool keyboardGrabbed() const; | 95 | bool keyboardGrabbed() const; |
96 | 96 | ||
97 | int exec(); | 97 | int exec(); |
98 | 98 | ||
99 | signals: | 99 | signals: |
100 | void clientMoused(); | 100 | void clientMoused(); |
101 | void timeChanged(); | 101 | void timeChanged(); |
102 | void clockChanged( bool pm ); | 102 | void clockChanged( bool pm ); |
103 | void micChanged( bool muted ); | 103 | void micChanged( bool muted ); |
104 | void volumeChanged( bool muted ); | 104 | void volumeChanged( bool muted ); |
105 | void appMessage( const QCString& msg, const QByteArray& data); | 105 | void appMessage( const QCString& msg, const QByteArray& data); |
106 | void weekChanged( bool startOnMonday ); | 106 | void weekChanged( bool startOnMonday ); |
107 | void dateFormatChanged( DateFormat ); | 107 | void dateFormatChanged( DateFormat ); |
108 | void flush(); | 108 | void flush(); |
109 | void reload(); | 109 | void reload(); |
110 | /* linkChanged signal */ | 110 | /* linkChanged signal */ |
111 | 111 | ||
112 | private slots: | 112 | private slots: |
113 | void systemMessage( const QCString &msg, const QByteArray &data ); | 113 | void systemMessage( const QCString &msg, const QByteArray &data ); |
114 | void pidMessage( const QCString &msg, const QByteArray &data ); | 114 | void pidMessage( const QCString &msg, const QByteArray &data ); |
115 | void removeSenderFromStylusDict(); | 115 | void removeSenderFromStylusDict(); |
116 | void hideOrQuit(); | 116 | void hideOrQuit(); |
117 | 117 | ||
118 | private: | ||
119 | QWidget *nextWidget( QWidgetList*, QWidget* ); | ||
120 | |||
121 | protected: | 118 | protected: |
122 | bool qwsEventFilter( QWSEvent * ); | 119 | bool qwsEventFilter( QWSEvent * ); |
123 | void internalSetStyle( const QString &style ); | 120 | void internalSetStyle( const QString &style ); |
124 | void prepareForTermination(bool willrestart); | 121 | void prepareForTermination(bool willrestart); |
125 | virtual void restart(); | 122 | virtual void restart(); |
126 | virtual void shutdown(); | 123 | virtual void shutdown(); |
127 | bool eventFilter( QObject *, QEvent * ); | 124 | bool eventFilter( QObject *, QEvent * ); |
128 | void timerEvent( QTimerEvent * ); | 125 | void timerEvent( QTimerEvent * ); |
129 | bool raiseAppropriateWindow(); | 126 | bool raiseAppropriateWindow(); |
130 | virtual void tryQuit(); | 127 | virtual void tryQuit(); |
131 | #if QT_VERSION > 233 | 128 | #if QT_VERSION > 233 |
132 | virtual void polish ( QWidget * ); // this is actually implemented in qt_override.cpp (!) | 129 | virtual void polish ( QWidget * ); // this is actually implemented in qt_override.cpp (!) |
133 | #endif | 130 | #endif |
134 | private: | 131 | private: |
135 | #ifndef QT_NO_TRANSLATION | 132 | #ifndef QT_NO_TRANSLATION |
136 | void installTranslation( const QString& baseName ); | 133 | void installTranslation( const QString& baseName ); |
137 | #endif | 134 | #endif |
138 | void mapToDefaultAction( QWSKeyEvent *ke, int defKey ); | 135 | void mapToDefaultAction( QWSKeyEvent *ke, int defKey ); |
139 | void processQCopFile(); | 136 | void processQCopFile(); |
140 | 137 | ||
141 | #if defined(Q_WS_QWS) && !defined(QT_NO_COP) | 138 | #if defined(Q_WS_QWS) && !defined(QT_NO_COP) |
142 | QCopChannel *sysChannel; | 139 | QCopChannel *sysChannel; |
143 | QCopChannel *pidChannel; | 140 | QCopChannel *pidChannel; |
144 | #endif | 141 | #endif |
145 | QPEApplicationData *d; | 142 | QPEApplicationData *d; |
146 | 143 | ||
147 | bool reserved_sh; | 144 | bool reserved_sh; |
148 | 145 | ||
149 | 146 | ||
150 | 147 | ||
151 | }; | 148 | }; |
152 | 149 | ||
153 | inline void QPEApplication::showDialog( QDialog* d, bool nomax ) | 150 | inline void QPEApplication::showDialog( QDialog* d, bool nomax ) |
154 | { | 151 | { |
155 | QSize sh = d->sizeHint(); | 152 | QSize sh = d->sizeHint(); |
156 | int w = QMAX(sh.width(),d->width()); | 153 | int w = QMAX(sh.width(),d->width()); |
157 | int h = QMAX(sh.height(),d->height()); | 154 | int h = QMAX(sh.height(),d->height()); |
158 | if ( !nomax | 155 | if ( !nomax |
159 | && ( w > qApp->desktop()->width()*3/4 | 156 | && ( w > qApp->desktop()->width()*3/4 |
160 | || h > qApp->desktop()->height()*3/4 ) ) | 157 | || h > qApp->desktop()->height()*3/4 ) ) |
161 | { | 158 | { |
162 | d->showMaximized(); | 159 | d->showMaximized(); |
163 | } else { | 160 | } else { |
164 | d->resize(w,h); | 161 | d->resize(w,h); |
165 | d->show(); | 162 | d->show(); |
166 | } | 163 | } |
167 | } | 164 | } |
168 | 165 | ||
169 | inline int QPEApplication::execDialog( QDialog* d, bool nomax ) | 166 | inline int QPEApplication::execDialog( QDialog* d, bool nomax ) |
170 | { | 167 | { |
171 | showDialog(d,nomax); | 168 | showDialog(d,nomax); |
172 | return d->exec(); | 169 | return d->exec(); |
173 | } | 170 | } |
174 | 171 | ||
175 | enum Transformation { Rot0, Rot90, Rot180, Rot270 }; /* from qgfxtransformed_qws.cpp */ | 172 | enum Transformation { Rot0, Rot90, Rot180, Rot270 }; /* from qgfxtransformed_qws.cpp */ |
176 | 173 | ||
177 | inline int TransToDeg ( Transformation t ) | 174 | inline int TransToDeg ( Transformation t ) |
178 | { | 175 | { |
179 | int d = static_cast<int>( t ); | 176 | int d = static_cast<int>( t ); |
180 | return d * 90; | 177 | return d * 90; |
181 | } | 178 | } |
182 | 179 | ||
183 | inline Transformation DegToTrans ( int d ) | 180 | inline Transformation DegToTrans ( int d ) |
184 | { | 181 | { |