summaryrefslogtreecommitdiff
path: root/library
authorsimon <simon>2003-03-25 21:59:44 (UTC)
committer simon <simon>2003-03-25 21:59:44 (UTC)
commit8e685661d962c10c13efd3c442742c1afe1afd1b (patch) (side-by-side diff)
treea7cae37cb851b678aa345be71324beed99c35baf /library
parent3a4ee8d8a53ca17703b34f84e1a411056ee7e50f (diff)
downloadopie-8e685661d962c10c13efd3c442742c1afe1afd1b.zip
opie-8e685661d962c10c13efd3c442742c1afe1afd1b.tar.gz
opie-8e685661d962c10c13efd3c442742c1afe1afd1b.tar.bz2
- in setCurrentRotation do the qcop call if we're called from within
a client (consistent to setDefaultRotation's behaviour)
Diffstat (limited to 'library') (more/less context) (ignore whitespace changes)
-rw-r--r--library/qpeapplication.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/library/qpeapplication.h b/library/qpeapplication.h
index 7f74510..82954d0 100644
--- a/library/qpeapplication.h
+++ b/library/qpeapplication.h
@@ -18,32 +18,36 @@
**
**********************************************************************/
#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"
+#if ( defined Q_WS_QWS || defined( _WS_QWS_ ) ) && !defined( QT_NO_COP )
+#include <qpe/qcopenvelope_qws.h>
+#endif
+
class QCopChannel;
class QPEApplicationData;
class QWSEvent;
class QWSKeyEvent;
class QPEApplication : public QApplication
{
Q_OBJECT
public:
QPEApplication( int& argc, char **argv, Type=GuiClient );
~QPEApplication();
static QString qpeDir();
static QString documentDir();
void applyStyle();
@@ -148,32 +152,37 @@ inline void QPEApplication::showDialog( QDialog* d, bool nomax )
} else {
d->resize(w,h);
d->show();
}
}
inline int QPEApplication::execDialog( QDialog* d, bool nomax )
{
showDialog(d,nomax);
return d->exec();
}
enum Transformation { Rot0, Rot90, Rot180, Rot270 }; /* from qgfxtransformed_qws.cpp */
inline void QPEApplication::setCurrentRotation( int r )
{
+ if ( qApp->type() != GuiServer ) {
+ QCopEnvelope e( "QPE/System", "setCurrentRotation(int)" );
+ e << r;
+ return;
+ }
Transformation e;
switch (r) {
case 0:
e = Rot0;
break;
case 90:
e = Rot90;
break;
case 180:
e = Rot180;
break;
case 270:
e = Rot270;
break;
default: