Diffstat (limited to 'core/applets/rotateapplet/rotate.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/applets/rotateapplet/rotate.cpp | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/core/applets/rotateapplet/rotate.cpp b/core/applets/rotateapplet/rotate.cpp index b490626..04270f1 100644 --- a/core/applets/rotateapplet/rotate.cpp +++ b/core/applets/rotateapplet/rotate.cpp | |||
@@ -42,4 +42,13 @@ RotateApplet::RotateApplet ( ) | |||
42 | : QObject ( 0, "RotateApplet" ), ref ( 0 ), m_flipped( false ) | 42 | : QObject ( 0, "RotateApplet" ), ref ( 0 ), m_flipped( false ) |
43 | { | 43 | { |
44 | |||
45 | #if defined(Q_WS_QWS) | ||
46 | #if !defined(QT_NO_COP) | ||
47 | QCopChannel *rotateChannel = new QCopChannel( "QPE/Rotation" , this ); | ||
48 | connect ( rotateChannel, SIGNAL( received( const QCString &, const QByteArray &) ), | ||
49 | this, SLOT ( channelReceived( const QCString &, const QByteArray &) ) ); | ||
50 | #endif | ||
51 | #endif | ||
52 | |||
44 | } | 53 | } |
45 | 54 | ||
@@ -48,4 +57,16 @@ RotateApplet::~RotateApplet ( ) | |||
48 | } | 57 | } |
49 | 58 | ||
59 | |||
60 | /** | ||
61 | * Qcop receive method. | ||
62 | */ | ||
63 | void RotateApplet::channelReceived( const QCString &msg, const QByteArray & data ) { | ||
64 | QDataStream stream( data, IO_ReadOnly ); | ||
65 | if ( msg == "flip()" ) { | ||
66 | activated ( ); | ||
67 | } | ||
68 | } | ||
69 | |||
70 | |||
50 | int RotateApplet::position ( ) const | 71 | int RotateApplet::position ( ) const |
51 | { | 72 | { |
@@ -63,5 +84,5 @@ QString RotateApplet::text ( ) const | |||
63 | } | 84 | } |
64 | 85 | ||
65 | QString RotateApplet::tr( const char* s ) const | 86 | /*QString RotateApplet::tr( const char* s ) const |
66 | { | 87 | { |
67 | return qApp->translate( "RotateApplet", s, 0 ); | 88 | return qApp->translate( "RotateApplet", s, 0 ); |
@@ -72,4 +93,5 @@ QString RotateApplet::tr( const char* s, const char* p ) const | |||
72 | return qApp->translate( "RotateApplet", s, p ); | 93 | return qApp->translate( "RotateApplet", s, p ); |
73 | } | 94 | } |
95 | */ | ||
74 | 96 | ||
75 | QIconSet RotateApplet::icon ( ) const | 97 | QIconSet RotateApplet::icon ( ) const |
@@ -90,4 +112,5 @@ QPopupMenu *RotateApplet::popup ( QWidget * ) const | |||
90 | void RotateApplet::activated ( ) | 112 | void RotateApplet::activated ( ) |
91 | { | 113 | { |
114 | |||
92 | int defaultRotation = QPEApplication::defaultRotation(); | 115 | int defaultRotation = QPEApplication::defaultRotation(); |
93 | 116 | ||