summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/applets/vmemo/vmemo.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/core/applets/vmemo/vmemo.cpp b/core/applets/vmemo/vmemo.cpp
index d6128a6..6867e82 100644
--- a/core/applets/vmemo/vmemo.cpp
+++ b/core/applets/vmemo/vmemo.cpp
@@ -190,97 +190,98 @@ static char * vmemo_xpm[] = {
190 "=. c #1F1F21", 190 "=. c #1F1F21",
191 " ", 191 " ",
192 " . + @ # ", 192 " . + @ # ",
193 " $ % & * = - ", 193 " $ % & * = - ",
194 " ; > , ' ) ! ~ ", 194 " ; > , ' ) ! ~ ",
195 " { ] ^ / ( _ : ", 195 " { ] ^ / ( _ : ",
196 " < [ } | 1 2 3 ", 196 " < [ } | 1 2 3 ",
197 " 4 5 6 7 8 9 0 a b c ", 197 " 4 5 6 7 8 9 0 a b c ",
198 " d e f g h i j 3 k l m n ", 198 " d e f g h i j 3 k l m n ",
199 " o p q r s t u v w n ", 199 " o p q r s t u v w n ",
200 " o x y z A B C D E n ", 200 " o x y z A B C D E n ",
201 " F G H I J K L M N O ", 201 " F G H I J K L M N O ",
202 " P Q R S T U V W X ", 202 " P Q R S T U V W X ",
203 " Y Z ` b ...+. ", 203 " Y Z ` b ...+. ",
204 " @.#.$.%.&. ", 204 " @.#.$.%.&. ",
205 " *.B =. ", 205 " *.B =. ",
206 " n n n n n n n n n "}; 206 " n n n n n n n n n "};
207 207
208 208
209VMemo::VMemo( QWidget *parent, const char *_name ) 209VMemo::VMemo( QWidget *parent, const char *_name )
210 : QWidget( parent, _name ) { 210 : QWidget( parent, _name ) {
211 setFixedHeight( 18 ); 211 setFixedHeight( 18 );
212 setFixedWidth( 14 ); 212 setFixedWidth( 14 );
213 213
214 t_timer = new QTimer( this ); 214 t_timer = new QTimer( this );
215 connect( t_timer, SIGNAL( timeout() ), SLOT( timerBreak() ) ); 215 connect( t_timer, SIGNAL( timeout() ), SLOT( timerBreak() ) );
216 216
217 struct utsname name; /* check for embedix kernel running on the zaurus*/ 217 struct utsname name; /* check for embedix kernel running on the zaurus*/
218 if (uname(&name) != -1) { 218 if (uname(&name) != -1) {
219 QString release=name.release; 219 QString release=name.release;
220 220
221 Config vmCfg("Vmemo"); 221 Config vmCfg("Vmemo");
222 vmCfg.setGroup("Defaults"); 222 vmCfg.setGroup("Defaults");
223 int toggleKey = setToggleButton(vmCfg.readNumEntry("toggleKey", -1)); 223 int toggleKey = setToggleButton(vmCfg.readNumEntry("toggleKey", -1));
224 useADPCM = vmCfg.readBoolEntry("use_ADPCM", 0); 224 useADPCM = vmCfg.readBoolEntry("use_ADPCM", 0);
225 225
226 qDebug("toggleKey %d", toggleKey); 226 qDebug("toggleKey %d", toggleKey);
227 227
228 if(release.find("embedix",0,TRUE) !=-1) 228 if(release.find("embedix",0,TRUE) !=-1)
229 systemZaurus=TRUE; 229 systemZaurus=TRUE;
230 else 230 else
231 systemZaurus=FALSE; 231 systemZaurus=FALSE;
232 232
233 myChannel = new QCopChannel( "QPE/VMemo", this ); 233 myChannel = new QCopChannel( "QPE/VMemo", this );
234 connect( myChannel, SIGNAL(received(const QCString&, const QByteArray&)), 234 connect( myChannel, SIGNAL(received(const QCString&, const QByteArray&)),
235 this, SLOT(receive(const QCString&, const QByteArray&)) ); 235 this, SLOT(receive(const QCString&, const QByteArray&)) );
236 236
237 if( toggleKey != -1 ) { 237 if( toggleKey != -1 ) {
238 QCopEnvelope e("QPE/Desktop", "keyRegister(int key, QString channel, QString message)"); 238 // keyRegister(key, channel, message)
239 QCopEnvelope e("QPE/Launcher", "keyRegister(int,QCString,QCString)");
239 // e << 4096; // Key_Escape 240 // e << 4096; // Key_Escape
240 // e << Key_F5; //4148 241 // e << Key_F5; //4148
241 e << toggleKey; 242 e << toggleKey;
242 e << QString("QPE/VMemo"); 243 e << QString("QPE/VMemo");
243 e << QString("toggleRecord()"); 244 e << QString("toggleRecord()");
244 } 245 }
245 if(toggleKey == 1) 246 if(toggleKey == 1)
246 usingIcon=TRUE; 247 usingIcon=TRUE;
247 else 248 else
248 usingIcon=FALSE; 249 usingIcon=FALSE;
249 if( vmCfg.readNumEntry("hideIcon",0) == 1) 250 if( vmCfg.readNumEntry("hideIcon",0) == 1)
250 hide(); 251 hide();
251 recording = FALSE; 252 recording = FALSE;
252 } 253 }
253} 254}
254 255
255VMemo::~VMemo() { 256VMemo::~VMemo() {
256} 257}
257 258
258void VMemo::receive( const QCString &msg, const QByteArray &data ) { 259void VMemo::receive( const QCString &msg, const QByteArray &data ) {
259 qDebug("receive"); 260 qDebug("receive");
260 QDataStream stream( data, IO_ReadOnly ); 261 QDataStream stream( data, IO_ReadOnly );
261 262
262 if (msg == "toggleRecord()") { 263 if (msg == "toggleRecord()") {
263 if (recording) { 264 if (recording) {
264 fromToggle = TRUE; 265 fromToggle = TRUE;
265 stopRecording(); 266 stopRecording();
266 } else { 267 } else {
267 fromToggle = TRUE; 268 fromToggle = TRUE;
268 startRecording(); 269 startRecording();
269 } 270 }
270 } 271 }
271} 272}
272 273
273void VMemo::paintEvent( QPaintEvent* ) { 274void VMemo::paintEvent( QPaintEvent* ) {
274 QPainter p(this); 275 QPainter p(this);
275 p.drawPixmap( 0, 1,( const char** ) vmemo_xpm ); 276 p.drawPixmap( 0, 1,( const char** ) vmemo_xpm );
276} 277}
277 278
278void VMemo::mousePressEvent( QMouseEvent * me) { 279void VMemo::mousePressEvent( QMouseEvent * me) {
279 /* No mousePress/mouseRelease recording on the iPAQ. The REC button on the iPAQ calls these functions 280 /* No mousePress/mouseRelease recording on the iPAQ. The REC button on the iPAQ calls these functions
280 mousePressEvent and mouseReleaseEvent with a NULL parameter. */ 281 mousePressEvent and mouseReleaseEvent with a NULL parameter. */
281 282
282// if (!systemZaurus && me != NULL) 283// if (!systemZaurus && me != NULL)
283// return; 284// return;
284// } 285// }
285 286
286 if(!recording) 287 if(!recording)