author | ar <ar> | 2004-04-19 19:38:01 (UTC) |
---|---|---|
committer | ar <ar> | 2004-04-19 19:38:01 (UTC) |
commit | a57416ce6dc62bfd2b57d87434c04417ad23cbc5 (patch) (side-by-side diff) | |
tree | 183a53a52327a2fe826203bae06ec1a95eb4f5c1 | |
parent | 23edaa3c2240ae3792b507acf55996660c048336 (diff) | |
download | opie-a57416ce6dc62bfd2b57d87434c04417ad23cbc5.zip opie-a57416ce6dc62bfd2b57d87434c04417ad23cbc5.tar.gz opie-a57416ce6dc62bfd2b57d87434c04417ad23cbc5.tar.bz2 |
- BigScreen: show MainWidget not maximized on big screens
-rw-r--r-- | library/qpeapplication.cpp | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/library/qpeapplication.cpp b/library/qpeapplication.cpp index 755fb19..cf76000 100644 --- a/library/qpeapplication.cpp +++ b/library/qpeapplication.cpp @@ -131,108 +131,97 @@ public: { } QCString channel; QCString message; QByteArray data; }; QWidget* qpe_main_widget; QGuardedPtr<QWidget> lastraised; QQueue<QCopRec> qcopq; QString styleName; QString decorationName; void enqueueQCop( const QCString &ch, const QCString &msg, const QByteArray &data ) { qcopq.enqueue( new QCopRec( ch, msg, data ) ); } void sendQCopQ() { if (!qcopQok ) return; QCopRec * r; while((r=qcopq.dequeue())) { // remove from queue before sending... // event loop can come around again before getting // back from sendLocally #ifndef QT_NO_COP QCopChannel::sendLocally( r->channel, r->message, r->data ); #endif delete r; } } static void show_mx(QWidget* mw, bool nomaximize, const QString & = QString::null ) { // ugly hack, remove that later after finding a sane solution // Addendum: Only Sharp currently has models with high resolution but (physically) small displays, // so this is only useful if QT_QWS_SIMPAD is NOT defined. E.g. SIMpad has 800x600 but has // a (physically) large enough display to use the small icons #if defined(OPIE_HIGH_RES_SMALL_PHY) if ( QPEApplication::desktop() ->width() >= 600 && ( mw->inherits("QMainWindow") || mw->isA("QMainWindow") ) ) { ( ( QMainWindow* ) mw )->setUsesBigPixmaps( true ); } #endif - if ( mw->layout() && mw->inherits("QDialog") ) { - QPEApplication::showDialog((QDialog*)mw, nomaximize); - } - else { -#ifdef Q_WS_QWS - if ( !nomaximize ) - mw->showMaximized(); - else -#endif - - mw->show(); - } + QPEApplication::showWidget( mw, nomaximize ); } static bool setWidgetCaptionFromAppName( QWidget* /*mw*/, const QString& /*appName*/, const QString& /*appsPath*/ ) { /* // This works but disable it for now until it is safe to apply // What is does is scan the .desktop files of all the apps for // the applnk that has the corresponding argv[0] as this program // then it uses the name stored in the .desktop file as the caption // for the main widget. This saves duplicating translations for // the app name in the program and in the .desktop files. AppLnkSet apps( appsPath ); QList<AppLnk> appsList = apps.children(); for ( QListIterator<AppLnk> it(appsList); it.current(); ++it ) { if ( (*it)->exec() == appName ) { mw->setCaption( (*it)->name() ); return TRUE; } } */ return FALSE; } void show(QWidget* mw, bool nomax) { setWidgetCaptionFromAppName( mw, appName, QPEApplication::qpeDir() + "apps" ); nomaximize = nomax; qpe_main_widget = mw; qcopQok = TRUE; #ifndef QT_NO_COP sendQCopQ(); #endif if ( preloaded ) { if (forceshow) show_mx(mw, nomax); } else if ( keep_running ) { show_mx(mw, nomax); } } void loadTextCodecs() { QString path = QPEApplication::qpeDir() + "/plugins/textcodecs"; |