summaryrefslogtreecommitdiff
path: root/library/qpeapplication.h
authorkergoth <kergoth>2003-01-26 19:58:41 (UTC)
committer kergoth <kergoth>2003-01-26 19:58:41 (UTC)
commit808181587c1cea5a089c75df7d2833f100bddbf1 (patch) (side-by-side diff)
tree94b59d3b5d649cf9c7a15f76f5b049030684913e /library/qpeapplication.h
parentf389dd4e3d5ceacb15b5c0b751a618d7586d6c31 (diff)
downloadopie-808181587c1cea5a089c75df7d2833f100bddbf1.zip
opie-808181587c1cea5a089c75df7d2833f100bddbf1.tar.gz
opie-808181587c1cea5a089c75df7d2833f100bddbf1.tar.bz2
Add setCurrentRotation QCop call for later use of on the fly rotation. Also adapt depends to the actual required qt version.
Diffstat (limited to 'library/qpeapplication.h') (more/less context) (ignore whitespace changes)
-rw-r--r--library/qpeapplication.h63
1 files changed, 46 insertions, 17 deletions
diff --git a/library/qpeapplication.h b/library/qpeapplication.h
index 7d956a3..7505115 100644
--- a/library/qpeapplication.h
+++ b/library/qpeapplication.h
@@ -23,4 +23,6 @@
+#include <qglobal.h>
#include <qapplication.h>
#include <qdialog.h>
+#include <qwsdisplay_qws.h>
#if defined(_WS_QWS_) && !defined(Q_WS_QWS)
@@ -49,2 +51,3 @@ public:
static void setDefaultRotation(int r);
+ static void setCurrentRotation(int r);
static void grabKeyboard();
@@ -53,5 +56,5 @@ public:
enum StylusMode {
- LeftOnly,
- RightOnHold
- // RightOnHoldLeftDelayed, etc.
+ LeftOnly,
+ RightOnHold
+ // RightOnHoldLeftDelayed, etc.
};
@@ -61,5 +64,5 @@ public:
enum InputMethodHint {
- Normal,
- AlwaysOff,
- AlwaysOn
+ Normal,
+ AlwaysOff,
+ AlwaysOn
};
@@ -67,6 +70,6 @@ public:
enum screenSaverHint {
- Disable = 0,
- DisableLightOff = 1,
- DisableSuspend = 2,
- Enable = 100
+ Disable = 0,
+ DisableLightOff = 1,
+ DisableSuspend = 2,
+ Enable = 100
};
@@ -117,3 +120,3 @@ protected:
- virtual void polish ( QWidget * ); // this is actually implemented in qt_override.cpp (!)
+ virtual void polish ( QWidget * ); // this is actually implemented in qt_override.cpp (!)
@@ -140,9 +143,9 @@ inline void QPEApplication::showDialog( QDialog* d, bool nomax )
if ( !nomax
- && ( w > qApp->desktop()->width()*3/4
- || h > qApp->desktop()->height()*3/4 ) )
+ && ( w > qApp->desktop()->width()*3/4
+ || h > qApp->desktop()->height()*3/4 ) )
{
- d->showMaximized();
+ d->showMaximized();
} else {
- d->resize(w,h);
- d->show();
+ d->resize(w,h);
+ d->show();
}
@@ -156,4 +159,30 @@ inline int QPEApplication::execDialog( QDialog* d, bool nomax )
+enum Transformation { None, Rot90, Rot180, Rot270 }; /* from qgfxtransformed_qws.cpp */
-#endif
+inline void QPEApplication::setCurrentRotation( int r )
+{
+ Transformation e;
+
+ switch (r) {
+ case 0:
+ e = None;
+ break;
+ case 90:
+ e = Rot90;
+ break;
+ case 180:
+ e = Rot180;
+ break;
+ case 270:
+ e = Rot270;
+ break;
+ default:
+ return;
+ }
+ qDebug("calling qApp->desktop()->qwsDisplay()->setTransformation( %d )\n", e);
+ qApp->desktop()->qwsDisplay()->setTransformation( e );
+}
+
+
+#endif