summaryrefslogtreecommitdiff
path: root/library/qpeapplication.h
Side-by-side diff
Diffstat (limited to 'library/qpeapplication.h') (more/less context) (ignore whitespace changes)
-rw-r--r--library/qpeapplication.h58
1 files changed, 12 insertions, 46 deletions
diff --git a/library/qpeapplication.h b/library/qpeapplication.h
index 579fc44..00d3d31 100644
--- a/library/qpeapplication.h
+++ b/library/qpeapplication.h
@@ -30,8 +30,9 @@
#define Q_WS_QWS
#endif
#include "qpedecoration_qws.h"
#include "timestring.h"
+#include "qpeglobal.h"
class QCopChannel;
class QPEApplicationData;
class QWSEvent;
@@ -119,11 +120,12 @@ public:
static InputMethodHint inputMethodHint( QWidget * );
void showMainWidget( QWidget*, bool nomax=FALSE );
void showMainDocumentWidget( QWidget*, bool nomax=FALSE );
- static void showDialog( QDialog*, bool nomax=FALSE );
- static int execDialog( QDialog*, bool nomax=FALSE );
- static void showWidget( QWidget*, bool nomax=FALSE );
+
+ static void showDialog( QDialog*, bool nomax=FALSE ) QPE_WEAK_SYMBOL;
+ static int execDialog ( QDialog*, bool nomax=FALSE ) QPE_WEAK_SYMBOL;
+ static void showWidget( QWidget*, bool nomax=FALSE ) QPE_WEAK_SYMBOL;
/* Merge setTempScreenSaverMode */
#ifdef QTOPIA_INTERNAL_INITAPP
void initApp( int argv, char **argv );
#endif
@@ -182,52 +184,9 @@ private:
bool reserved_sh;
};
-inline void QPEApplication::showDialog( QDialog* d, bool nomax )
-{
- showWidget( d, nomax );
-}
-inline int QPEApplication::execDialog( QDialog* d, bool nomax )
-{
- showDialog( d, nomax );
- return d->exec();
-}
-
-#ifdef Q_WS_QWS
-extern Q_EXPORT QRect qt_maxWindowRect;
-#endif
-
-inline void QPEApplication::showWidget( QWidget* wg, bool nomax )
-{
- if ( wg->isVisible() )
- wg->show();
- else
- {
- if ( !nomax
- && ( qApp->desktop()->width() <= 320 ) )
- {
- wg->showMaximized();
- } else {
- #ifdef Q_WS_QWS
- QSize desk = QSize( qApp->desktop()->width(), qApp->desktop()->height() );
- #else
- QSize desk = QSize( qt_maxWindowRect.width(), qt_maxWindowRect.height() );
- #endif
-
- QSize sh = wg->sizeHint();
- int w = QMAX( sh.width(), wg->width() );
- int h = QMAX( sh.height(), wg->height() );
- // desktop widget-frame taskbar
- w = QMIN( w, ( desk.width() - ( wg->frameGeometry().width() - wg->geometry().width() ) - 25 ) );
- h = QMIN( h, ( desk.height() - ( wg->frameGeometry().height() - wg->geometry().height() ) - 25 ) );
-
- wg->resize( w, h );
- wg->show();
- }
- }
-}
enum Transformation { Rot0, Rot90, Rot180, Rot270 }; /* from qgfxtransformed_qws.cpp */
inline int TransToDeg ( Transformation t )
@@ -261,5 +220,12 @@ inline void QPEApplication::setCurrentRotation( int r )
#endif
}
+/*
+ * -remove me
+ */
+#ifdef Q_WS_QWS
+extern Q_EXPORT QRect qt_maxWindowRect;
+#endif
+
#endif