-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 | |||
@@ -139,12 +139,13 @@ VMemo::VMemo( QWidget *parent, const char *name ) | |||
139 | setFixedHeight( 18 ); | 139 | setFixedHeight( 18 ); |
140 | setFixedWidth( 14 ); | 140 | setFixedWidth( 14 ); |
141 | 141 | ||
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 | ||
148 | struct utsname name; /* check for embedix kernel running on the zaurus, if | 149 | struct utsname name; /* check for embedix kernel running on the zaurus, if |
149 | lineo change string, this break | 150 | lineo change string, this break |
150 | */ | 151 | */ |
@@ -186,19 +187,19 @@ VMemo::VMemo( QWidget *parent, const char *name ) | |||
186 | 187 | ||
187 | read(key, buffer, 10); | 188 | read(key, buffer, 10); |
188 | if(*buffer == (char)129) | 189 | if(*buffer == (char)129) |
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 | } |
202 | else if(fr) | 203 | else if(fr) |
203 | qWarning("parent: Fork = good"); | 204 | qWarning("parent: Fork = good"); |
204 | } | 205 | } |
@@ -207,12 +208,17 @@ VMemo::VMemo( QWidget *parent, const char *name ) | |||
207 | } | 208 | } |
208 | 209 | ||
209 | VMemo::~VMemo() | 210 | 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 ); |
216 | qWarning(msg); | 222 | qWarning(msg); |
217 | if ( msg == "toggleRecord()" ) { | 223 | if ( msg == "toggleRecord()" ) { |
218 | qWarning("Hello"); | 224 | qWarning("Hello"); |
@@ -224,12 +230,14 @@ void VMemo::paintEvent( QPaintEvent* ) | |||
224 | QPainter p(this); | 230 | QPainter p(this); |
225 | p.drawPixmap( 0, 1,( const char** ) vmemo_xpm ); | 231 | p.drawPixmap( 0, 1,( const char** ) vmemo_xpm ); |
226 | } | 232 | } |
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 | { |
233 | recording = FALSE; | 241 | recording = FALSE; |
234 | return; | 242 | return; |
235 | } | 243 | } |
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 | |||
@@ -33,12 +33,13 @@ public: | |||
33 | 33 | ||
34 | public slots: | 34 | public slots: |
35 | void record(); | 35 | void record(); |
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* ); |
42 | 43 | ||
43 | int openDSP(); | 44 | int openDSP(); |
44 | int openWAV(const char *filename); | 45 | int openWAV(const char *filename); |