author | jeremy <jeremy> | 2002-02-15 17:01:32 (UTC) |
---|---|---|
committer | jeremy <jeremy> | 2002-02-15 17:01:32 (UTC) |
commit | 3a3b4465992439e6a52190fdfc757166aa3de880 (patch) (unidiff) | |
tree | e795a6dfe4cf9e517121dd2c1b35111d6e3f89bc /core/applets/vmemo | |
parent | 379e66393a2986e218baad0e585c1b4a0dd7d045 (diff) | |
download | opie-3a3b4465992439e6a52190fdfc757166aa3de880.zip opie-3a3b4465992439e6a52190fdfc757166aa3de880.tar.gz opie-3a3b4465992439e6a52190fdfc757166aa3de880.tar.bz2 |
Trying to make QCop to work
-rw-r--r-- | core/applets/vmemo/vmemo.cpp | 12 | ||||
-rw-r--r-- | core/applets/vmemo/vmemo.h | 1 |
2 files changed, 11 insertions, 2 deletions
diff --git a/core/applets/vmemo/vmemo.cpp b/core/applets/vmemo/vmemo.cpp index 8875cdf..5ce6fa9 100644 --- a/core/applets/vmemo/vmemo.cpp +++ b/core/applets/vmemo/vmemo.cpp | |||
@@ -142,6 +142,7 @@ VMemo::VMemo( QWidget *parent, const char *name ) | |||
142 | recording = FALSE; | 142 | recording = FALSE; |
143 | 143 | ||
144 | myChannel = new QCopChannel( "QPE/VMemo", this ); | 144 | myChannel = new QCopChannel( "QPE/VMemo", this ); |
145 | connect( myChannel, SIGNAL(sayHi()), this, SLOT(sayHi()) ); | ||
145 | connect( myChannel, SIGNAL(received(const QCString&, const QByteArray&)), | 146 | connect( myChannel, SIGNAL(received(const QCString&, const QByteArray&)), |
146 | this, SLOT(receive(const QCString&, const QByteArray&)) ); | 147 | this, SLOT(receive(const QCString&, const QByteArray&)) ); |
147 | 148 | ||
@@ -189,13 +190,13 @@ VMemo::VMemo( QWidget *parent, const char *name ) | |||
189 | { | 190 | { |
190 | qWarning("REC = stop"); | 191 | qWarning("REC = stop"); |
191 | QCopEnvelope( "QPE/VMemo", "toggleRecord()"); | 192 | QCopEnvelope( "QPE/VMemo", "toggleRecord()"); |
192 | activate_signal("toggleRecordNow()"); | 193 | QCopEnvelope( "QPE/VMemo", "sayHi()"); |
193 | } | 194 | } |
194 | else if(*buffer == (char)1) | 195 | else if(*buffer == (char)1) |
195 | { | 196 | { |
196 | qWarning("REC = start"); | 197 | qWarning("REC = start"); |
197 | QCopEnvelope( "QPE/VMemo", "toggleRecord()"); | 198 | QCopEnvelope( "QPE/VMemo", "toggleRecord()"); |
198 | activate_signal("toggleRecordNow()"); | 199 | QCopEnvelope( "QPE/VMemo", "sayHi()"); |
199 | } | 200 | } |
200 | } | 201 | } |
201 | } | 202 | } |
@@ -210,6 +211,11 @@ VMemo::~VMemo() | |||
210 | { | 211 | { |
211 | } | 212 | } |
212 | 213 | ||
214 | void VMemo::sayHi() | ||
215 | { | ||
216 | qWarning("Hi"); | ||
217 | } | ||
218 | |||
213 | void VMemo::receive( const QCString &msg, const QByteArray &data ) | 219 | void VMemo::receive( const QCString &msg, const QByteArray &data ) |
214 | { | 220 | { |
215 | QDataStream stream( data, IO_ReadOnly ); | 221 | QDataStream stream( data, IO_ReadOnly ); |
@@ -227,6 +233,8 @@ void VMemo::paintEvent( QPaintEvent* ) | |||
227 | 233 | ||
228 | void VMemo::mousePressEvent( QMouseEvent * ) | 234 | void VMemo::mousePressEvent( QMouseEvent * ) |
229 | { | 235 | { |
236 | QCopEnvelope( "QPE/VMemo", "sayHi()"); | ||
237 | |||
230 | // just to be safe | 238 | // just to be safe |
231 | if (recording) | 239 | if (recording) |
232 | { | 240 | { |
diff --git a/core/applets/vmemo/vmemo.h b/core/applets/vmemo/vmemo.h index d96cd94..824309e 100644 --- a/core/applets/vmemo/vmemo.h +++ b/core/applets/vmemo/vmemo.h | |||
@@ -36,6 +36,7 @@ public slots: | |||
36 | void mousePressEvent( QMouseEvent * ); | 36 | void mousePressEvent( QMouseEvent * ); |
37 | void mouseReleaseEvent( QMouseEvent * ); | 37 | void mouseReleaseEvent( QMouseEvent * ); |
38 | void receive( const QCString &msg, const QByteArray &data ); | 38 | void receive( const QCString &msg, const QByteArray &data ); |
39 | void sayHi(); | ||
39 | 40 | ||
40 | private: | 41 | private: |
41 | void paintEvent( QPaintEvent* ); | 42 | void paintEvent( QPaintEvent* ); |