Diffstat (limited to 'core/applets/vmemo/vmemo.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/applets/vmemo/vmemo.cpp | 12 |
1 files changed, 10 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 @@ -133,24 +133,25 @@ static char * vmemo_xpm[] = { " h0,!_;2@ ", " ))))) "}; VMemo::VMemo( QWidget *parent, const char *name ) : QWidget( parent, name ) { setFixedHeight( 18 ); setFixedWidth( 14 ); recording = FALSE; myChannel = new QCopChannel( "QPE/VMemo", this ); + connect( myChannel, SIGNAL(sayHi()), this, SLOT(sayHi()) ); connect( myChannel, SIGNAL(received(const QCString&, const QByteArray&)), this, SLOT(receive(const QCString&, const QByteArray&)) ); struct utsname name; /* check for embedix kernel running on the zaurus, if lineo change string, this break */ if (uname(&name) != -1) { QString release=name.release; qWarning("System release: %s\n", name.release); if(release.find("embedix",0,TRUE) !=-1) systemZaurus=TRUE; @@ -180,62 +181,69 @@ VMemo::VMemo( QWidget *parent, const char *name ) { FD_ZERO(&fdr); FD_SET(key, &fdr); max = key; qWarning("while"); read(key, buffer, 10); if(*buffer == (char)129) { qWarning("REC = stop"); QCopEnvelope( "QPE/VMemo", "toggleRecord()"); - activate_signal("toggleRecordNow()"); + QCopEnvelope( "QPE/VMemo", "sayHi()"); } else if(*buffer == (char)1) { qWarning("REC = start"); QCopEnvelope( "QPE/VMemo", "toggleRecord()"); - activate_signal("toggleRecordNow()"); + QCopEnvelope( "QPE/VMemo", "sayHi()"); } } } else if(fr) qWarning("parent: Fork = good"); } } qWarning("VMemo done init"); } VMemo::~VMemo() { } +void VMemo::sayHi() +{ + qWarning("Hi"); +} + void VMemo::receive( const QCString &msg, const QByteArray &data ) { QDataStream stream( data, IO_ReadOnly ); qWarning(msg); if ( msg == "toggleRecord()" ) { qWarning("Hello"); } } void VMemo::paintEvent( QPaintEvent* ) { QPainter p(this); p.drawPixmap( 0, 1,( const char** ) vmemo_xpm ); } void VMemo::mousePressEvent( QMouseEvent * ) { + QCopEnvelope( "QPE/VMemo", "sayHi()"); + // just to be safe if (recording) { recording = FALSE; return; } qWarning("VMemo::mousePress()"); QSound::play(Resource::findSound("vmemob")); recording = TRUE; qWarning("VMemo::mousePress() -> Starting to record"); |