author | zecke <zecke> | 2004-12-20 22:11:44 (UTC) |
---|---|---|
committer | zecke <zecke> | 2004-12-20 22:11:44 (UTC) |
commit | a50334dddaa542fd63726a639e852c30036f53a0 (patch) (unidiff) | |
tree | 30d0a41308f752c72d2c685fab60e2bd7c650bec /library/qpeapplication.cpp | |
parent | 29e93ce47f7a52ded8956811d50b93e754caa3a6 (diff) | |
download | opie-a50334dddaa542fd63726a639e852c30036f53a0.zip opie-a50334dddaa542fd63726a639e852c30036f53a0.tar.gz opie-a50334dddaa542fd63726a639e852c30036f53a0.tar.bz2 |
Restore Files:
-QWSDecoration scaling fixes by mickeyl
-Readd macros for DEPRECATED and VISIBILITY
-Move out showWidget and execDialog to widget_sowing.cpp
-QPE_EXPORT_SYMBOL for Q_EXPORT_INTERFACE
-Deprecated for FileSelector, QPEMenubar and Toolbar
-rw-r--r-- | library/qpeapplication.cpp | 80 |
1 files changed, 40 insertions, 40 deletions
diff --git a/library/qpeapplication.cpp b/library/qpeapplication.cpp index 4adfc8f..43a9be5 100644 --- a/library/qpeapplication.cpp +++ b/library/qpeapplication.cpp | |||
@@ -199,53 +199,53 @@ public: | |||
199 | } | 199 | } |
200 | 200 | ||
201 | static void show_mx(QWidget* mw, bool nomaximize, QString &strName) | 201 | static void show_mx(QWidget* mw, bool nomaximize, QString &strName) { |
202 | { | 202 | if ( mw->inherits("QMainWindow") || mw->isA("QMainWindow") ) |
203 | if ( mw->inherits("QMainWindow") || mw->isA("QMainWindow") ) | 203 | { |
204 | { | 204 | ( ( QMainWindow* ) mw )->setUsesBigPixmaps( useBigPixmaps ); |
205 | ( ( QMainWindow* ) mw )->setUsesBigPixmaps( useBigPixmaps ); | 205 | } |
206 | } | ||
207 | QPoint p; | 206 | QPoint p; |
208 | QSize s; | 207 | QSize s; |
209 | bool max; | 208 | bool max; |
210 | if ( mw->isVisible() ) { | ||
211 | if ( read_widget_rect(strName, max, p, s) && validate_widget_size(mw, p, s) ) { | ||
212 | mw->resize(s); | ||
213 | mw->move(p); | ||
214 | } | ||
215 | mw->raise(); | ||
216 | } else { | ||
217 | 209 | ||
218 | if ( mw->layout() && mw->inherits("QDialog") ) { | 210 | if ( mw->isVisible() ) { |
219 | if ( read_widget_rect(strName, max, p, s) && validate_widget_size(mw, p, s) ) { | 211 | if ( read_widget_rect(strName, max, p, s) && validate_widget_size(mw, p, s) ) { |
220 | mw->resize(s); | 212 | mw->resize(s); |
221 | mw->move(p); | 213 | mw->move(p); |
214 | } | ||
215 | mw->raise(); | ||
216 | } else { | ||
222 | 217 | ||
223 | if ( max && !nomaximize ) { | 218 | if ( mw->layout() && mw->inherits("QDialog") ) { |
224 | mw->showMaximized(); | 219 | if ( read_widget_rect(strName, max, p, s) && validate_widget_size(mw, p, s) ) { |
225 | } else { | 220 | mw->resize(s); |
226 | mw->show(); | 221 | mw->move(p); |
222 | |||
223 | if ( max && !nomaximize ) { | ||
224 | mw->showMaximized(); | ||
225 | } else { | ||
226 | mw->show(); | ||
227 | } | ||
228 | } else { | ||
229 | QPEApplication::showDialog((QDialog*)mw,nomaximize); | ||
227 | } | 230 | } |
228 | } else { | 231 | } else { |
229 | QPEApplication::showDialog((QDialog*)mw,nomaximize); | 232 | if ( read_widget_rect(strName, max, p, s) && validate_widget_size(mw, p, s) ) { |
230 | } | 233 | mw->resize(s); |
231 | } else { | 234 | mw->move(p); |
232 | if ( read_widget_rect(strName, max, p, s) && validate_widget_size(mw, p, s) ) { | 235 | } else { //no stored rectangle, make an estimation |
233 | mw->resize(s); | 236 | int x = (qApp->desktop()->width()-mw->frameGeometry().width())/2; |
234 | mw->move(p); | 237 | int y = (qApp->desktop()->height()-mw->frameGeometry().height())/2; |
235 | } else { //no stored rectangle, make an estimation | 238 | mw->move( QMAX(x,0), QMAX(y,0) ); |
236 | int x = (qApp->desktop()->width()-mw->frameGeometry().width())/2; | ||
237 | int y = (qApp->desktop()->height()-mw->frameGeometry().height())/2; | ||
238 | mw->move( QMAX(x,0), QMAX(y,0) ); | ||
239 | #ifdef Q_WS_QWS | 239 | #ifdef Q_WS_QWS |
240 | if ( !nomaximize ) | 240 | if ( !nomaximize ) |
241 | mw->showMaximized(); | 241 | mw->showMaximized(); |
242 | #endif | 242 | #endif |
243 | } | ||
244 | if ( max && !nomaximize ) | ||
245 | mw->showMaximized(); | ||
246 | else | ||
247 | mw->show(); | ||
248 | } | ||
243 | } | 249 | } |
244 | if ( max && !nomaximize ) | ||
245 | mw->showMaximized(); | ||
246 | else | ||
247 | mw->show(); | ||
248 | } | ||
249 | } | ||
250 | } | 250 | } |
251 | 251 | ||