-rw-r--r-- | library/qpeapplication.h | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/library/qpeapplication.h b/library/qpeapplication.h index 849d5b3..167fe69 100644 --- a/library/qpeapplication.h +++ b/library/qpeapplication.h | |||
@@ -121,101 +121,96 @@ public: | |||
121 | 121 | ||
122 | void showMainWidget( QWidget*, bool nomax=FALSE ); | 122 | void showMainWidget( QWidget*, bool nomax=FALSE ); |
123 | void showMainDocumentWidget( QWidget*, bool nomax=FALSE ); | 123 | void showMainDocumentWidget( QWidget*, bool nomax=FALSE ); |
124 | 124 | ||
125 | static void showDialog( QDialog*, bool nomax=FALSE ) QPE_WEAK_SYMBOL; | 125 | static void showDialog( QDialog*, bool nomax=FALSE ) QPE_WEAK_SYMBOL; |
126 | static int execDialog ( QDialog*, bool nomax=FALSE ) QPE_WEAK_SYMBOL; | 126 | static int execDialog ( QDialog*, bool nomax=FALSE ) QPE_WEAK_SYMBOL; |
127 | static void showWidget( QWidget*, bool nomax=FALSE ) QPE_WEAK_SYMBOL; | 127 | static void showWidget( QWidget*, bool nomax=FALSE ) QPE_WEAK_SYMBOL; |
128 | /* Merge setTempScreenSaverMode */ | 128 | /* Merge setTempScreenSaverMode */ |
129 | #ifdef QTOPIA_INTERNAL_INITAPP | 129 | #ifdef QTOPIA_INTERNAL_INITAPP |
130 | void initApp( int argv, char **argv ); | 130 | void initApp( int argv, char **argv ); |
131 | #endif | 131 | #endif |
132 | 132 | ||
133 | static void setKeepRunning(); | 133 | static void setKeepRunning(); |
134 | bool keepRunning() const; | 134 | bool keepRunning() const; |
135 | 135 | ||
136 | bool keyboardGrabbed() const; | 136 | bool keyboardGrabbed() const; |
137 | 137 | ||
138 | int exec(); | 138 | int exec(); |
139 | 139 | ||
140 | signals: | 140 | signals: |
141 | void clientMoused(); | 141 | void clientMoused(); |
142 | void timeChanged(); | 142 | void timeChanged(); |
143 | void clockChanged( bool pm ); | 143 | void clockChanged( bool pm ); |
144 | void micChanged( bool muted ); | 144 | void micChanged( bool muted ); |
145 | void volumeChanged( bool muted ); | 145 | void volumeChanged( bool muted ); |
146 | void appMessage( const QCString& msg, const QByteArray& data); | 146 | void appMessage( const QCString& msg, const QByteArray& data); |
147 | void weekChanged( bool startOnMonday ); | 147 | void weekChanged( bool startOnMonday ); |
148 | void dateFormatChanged( DateFormat ); | 148 | void dateFormatChanged( DateFormat ); |
149 | void flush(); | 149 | void flush(); |
150 | void reload(); | 150 | void reload(); |
151 | /* linkChanged signal */ | 151 | /* linkChanged signal */ |
152 | 152 | ||
153 | private slots: | 153 | private slots: |
154 | void systemMessage( const QCString &msg, const QByteArray &data ); | 154 | void systemMessage( const QCString &msg, const QByteArray &data ); |
155 | void pidMessage( const QCString &msg, const QByteArray &data ); | 155 | void pidMessage( const QCString &msg, const QByteArray &data ); |
156 | void removeSenderFromStylusDict(); | 156 | void removeSenderFromStylusDict(); |
157 | void hideOrQuit(); | 157 | void hideOrQuit(); |
158 | 158 | ||
159 | protected: | 159 | protected: |
160 | bool qwsEventFilter( QWSEvent * ); | 160 | bool qwsEventFilter( QWSEvent * ); |
161 | void internalSetStyle( const QString &style ); | 161 | void internalSetStyle( const QString &style ); |
162 | void prepareForTermination(bool willrestart); | 162 | void prepareForTermination(bool willrestart); |
163 | virtual void restart(); | 163 | virtual void restart(); |
164 | virtual void shutdown(); | 164 | virtual void shutdown(); |
165 | bool eventFilter( QObject *, QEvent * ); | 165 | bool eventFilter( QObject *, QEvent * ); |
166 | void timerEvent( QTimerEvent * ); | 166 | void timerEvent( QTimerEvent * ); |
167 | bool raiseAppropriateWindow(); | 167 | bool raiseAppropriateWindow(); |
168 | virtual void tryQuit(); | 168 | virtual void tryQuit(); |
169 | #ifndef OPIE_NO_ERASE_RECT_HACKFIX | ||
170 | #if QT_VERSION > 233 | ||
171 | virtual void polish ( QWidget * ); // this is actually implemented in qt_override.cpp (!) | ||
172 | #endif | ||
173 | #endif | ||
174 | private: | 169 | private: |
175 | void mapToDefaultAction( QWSKeyEvent *ke, int defKey ); | 170 | void mapToDefaultAction( QWSKeyEvent *ke, int defKey ); |
176 | void processQCopFile(); | 171 | void processQCopFile(); |
177 | 172 | ||
178 | #if defined(Q_WS_QWS) && !defined(QT_NO_COP) | 173 | #if defined(Q_WS_QWS) && !defined(QT_NO_COP) |
179 | QCopChannel *sysChannel; | 174 | QCopChannel *sysChannel; |
180 | QCopChannel *pidChannel; | 175 | QCopChannel *pidChannel; |
181 | #endif | 176 | #endif |
182 | QPEApplicationData *d; | 177 | QPEApplicationData *d; |
183 | 178 | ||
184 | bool reserved_sh; | 179 | bool reserved_sh; |
185 | 180 | ||
186 | }; | 181 | }; |
187 | 182 | ||
188 | 183 | ||
189 | 184 | ||
190 | enum Transformation { Rot0, Rot90, Rot180, Rot270 }; /* from qgfxtransformed_qws.cpp */ | 185 | enum Transformation { Rot0, Rot90, Rot180, Rot270 }; /* from qgfxtransformed_qws.cpp */ |
191 | 186 | ||
192 | inline int TransToDeg ( Transformation t ) | 187 | inline int TransToDeg ( Transformation t ) |
193 | { | 188 | { |
194 | int d = static_cast<int>( t ); | 189 | int d = static_cast<int>( t ); |
195 | return d * 90; | 190 | return d * 90; |
196 | } | 191 | } |
197 | 192 | ||
198 | inline Transformation DegToTrans ( int d ) | 193 | inline Transformation DegToTrans ( int d ) |
199 | { | 194 | { |
200 | Transformation t = static_cast<Transformation>( d / 90 ); | 195 | Transformation t = static_cast<Transformation>( d / 90 ); |
201 | return t; | 196 | return t; |
202 | } | 197 | } |
203 | 198 | ||
204 | /* | 199 | /* |
205 | * Set current rotation of Opie, and rotation for newly started apps. | 200 | * Set current rotation of Opie, and rotation for newly started apps. |
206 | * Differs from setDefaultRotation in that 1) it rotates currently running apps, | 201 | * Differs from setDefaultRotation in that 1) it rotates currently running apps, |
207 | * and 2) does not set deforient or save orientation to qpe.conf. | 202 | * and 2) does not set deforient or save orientation to qpe.conf. |
208 | */ | 203 | */ |
209 | 204 | ||
210 | inline void QPEApplication::setCurrentRotation( int r ) | 205 | inline void QPEApplication::setCurrentRotation( int r ) |
211 | { | 206 | { |
212 | // setTransformation has been introduced in Qt/Embedded 2.3.4 snapshots | 207 | // setTransformation has been introduced in Qt/Embedded 2.3.4 snapshots |
213 | // for compatibility with the SharpROM use fallback to setDefaultTransformation() | 208 | // for compatibility with the SharpROM use fallback to setDefaultTransformation() |
214 | #if QT_VERSION > 233 | 209 | #if QT_VERSION > 233 |
215 | Transformation e = DegToTrans( r ); | 210 | Transformation e = DegToTrans( r ); |
216 | ::setenv( "QWS_DISPLAY", QString( "Transformed:Rot%1:0" ).arg( r ).latin1(), 1 ); | 211 | ::setenv( "QWS_DISPLAY", QString( "Transformed:Rot%1:0" ).arg( r ).latin1(), 1 ); |
217 | qApp->desktop()->qwsDisplay()->setTransformation( e ); | 212 | qApp->desktop()->qwsDisplay()->setTransformation( e ); |
218 | #else | 213 | #else |
219 | setDefaultRotation( r ); | 214 | setDefaultRotation( r ); |
220 | #endif | 215 | #endif |
221 | } | 216 | } |