summaryrefslogtreecommitdiff
path: root/library/qpeapplication.h
Side-by-side diff
Diffstat (limited to 'library/qpeapplication.h') (more/less context) (show whitespace changes)
-rw-r--r--library/qpeapplication.h31
1 files changed, 30 insertions, 1 deletions
diff --git a/library/qpeapplication.h b/library/qpeapplication.h
index 7d956a3..7505115 100644
--- a/library/qpeapplication.h
+++ b/library/qpeapplication.h
@@ -21,8 +21,10 @@
#define __QPE_APPLICATION_H__
+#include <qglobal.h>
#include <qapplication.h>
#include <qdialog.h>
+#include <qwsdisplay_qws.h>
#if defined(_WS_QWS_) && !defined(Q_WS_QWS)
#define Q_WS_QWS
#endif
@@ -47,6 +49,7 @@ public:
void applyStyle();
static int defaultRotation();
static void setDefaultRotation(int r);
+ static void setCurrentRotation(int r);
static void grabKeyboard();
static void ungrabKeyboard();
@@ -154,6 +157,32 @@ inline int QPEApplication::execDialog( QDialog* d, bool nomax )
return d->exec();
}
+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