summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--library/libqpe1.control2
-rw-r--r--library/qpeapplication.cpp5
-rw-r--r--library/qpeapplication.h31
3 files changed, 36 insertions, 2 deletions
diff --git a/library/libqpe1.control b/library/libqpe1.control
index 6743e28..94992b1 100644
--- a/library/libqpe1.control
+++ b/library/libqpe1.control
@@ -1,8 +1,8 @@
Files: $OPIEDIR/lib/libqpe.so.1 $OPIEDIR/lib/libqpe.so.1.5 $OPIEDIR/lib/libqpe.so.1.5.0
Priority: required
Section: opie/system
Maintainer: Project Opie <opie@handhelds.org>
Architecture: arm
Version: $QPE_VERSION-$SUB_VERSION.1
-Depends: libqt2-emb (>=$QTE_VERSION), libqt2-emb-fonts (>=$QTE_VERSION)
+Depends: libqt2-emb (>=2.3.4-beta4), libqt2-emb-fonts (>=$QTE_VERSION)
Description: libqpe, base qtopia/opie library.
diff --git a/library/qpeapplication.cpp b/library/qpeapplication.cpp
index b21428a..95c4a1b 100644
--- a/library/qpeapplication.cpp
+++ b/library/qpeapplication.cpp
@@ -1063,12 +1063,17 @@ void QPEApplication::systemMessage( const QCString& msg, const QByteArray& data
if ( type() == GuiServer ) {
int r;
stream >> r;
setDefaultRotation( r );
}
}
+ else if ( msg == "setCurrentRotation(int)" ) {
+ int r;
+ stream >> r;
+ setCurrentRotation( r );
+ }
else if ( msg == "shutdown()" ) {
if ( type() == GuiServer )
shutdown();
}
else if ( msg == "quit()" ) {
if ( type() != GuiServer )
diff --git a/library/qpeapplication.h b/library/qpeapplication.h
index 7d956a3..7505115 100644
--- a/library/qpeapplication.h
+++ b/library/qpeapplication.h
@@ -18,14 +18,16 @@
**
**********************************************************************/
#ifndef __QPE_APPLICATION_H__
#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
#include "qpedecoration_qws.h"
#include "timestring.h"
@@ -44,12 +46,13 @@ public:
static QString qpeDir();
static QString documentDir();
void applyStyle();
static int defaultRotation();
static void setDefaultRotation(int r);
+ static void setCurrentRotation(int r);
static void grabKeyboard();
static void ungrabKeyboard();
enum StylusMode {
LeftOnly,
RightOnHold
@@ -151,9 +154,35 @@ inline void QPEApplication::showDialog( QDialog* d, bool nomax )
inline int QPEApplication::execDialog( QDialog* d, bool nomax )
{
showDialog(d,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