summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--core/applets/vmemo/vmemo.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/core/applets/vmemo/vmemo.cpp b/core/applets/vmemo/vmemo.cpp
index 07ef15c..d5808b7 100644
--- a/core/applets/vmemo/vmemo.cpp
+++ b/core/applets/vmemo/vmemo.cpp
@@ -205,66 +205,68 @@ VMemo::VMemo( QWidget *parent, const char *_name )
t_timer = new QTimer( this );
connect( t_timer, SIGNAL( timeout() ), SLOT( timerBreak() ) );
Config vmCfg("Vmemo");
vmCfg.setGroup("Defaults");
int toggleKey = setToggleButton(vmCfg.readNumEntry("toggleKey", -1));
useADPCM = vmCfg.readBoolEntry("use_ADPCM", 0);
odebug << "toggleKey " << toggleKey << "" << oendl;
// if ( QFile::exists ( "/dev/sharp_buz" ) || QFile::exists ( "/dev/sharp_led" ))
// systemZaurus=TRUE;
// else
systemZaurus = FALSE;
+// myChannel = new QCopChannel( "QPE/VMemo", this );
myChannel = new QCopChannel( "QPE/VMemo", this );
+
connect( myChannel, SIGNAL(received(const QCString&,const QByteArray&)),
this, SLOT(receive(const QCString&,const QByteArray&)) );
+
if( toggleKey != -1 ) {
odebug << "Register key " << toggleKey << "" << oendl;
QCopEnvelope e("QPE/Launcher", "keyRegister(int,QCString,QCString)");
// e << 4096; // Key_Escape
// e << Key_F5; //4148
e << toggleKey;
- e << QString("QPE/VMemo");
- e << QString("toggleRecord()");
+ e << QCString("QPE/VMemo");
+ e << QCString("toggleRecord()");
}
if(toggleKey == 1)
usingIcon = TRUE;
else
usingIcon = FALSE;
// if( vmCfg.readNumEntry("hideIcon",0) == 1)
if (!usingIcon)
hide();
recording = FALSE;
// }
}
VMemo::~VMemo() {
}
int VMemo::position()
{
return 6;
}
void VMemo::receive( const QCString &msg, const QByteArray &data ) {
- odebug << "Vmemo receive" << oendl;
QDataStream stream( data, IO_ReadOnly );
if (msg == "toggleRecord()") {
if (recording) {
fromToggle = TRUE;
stopRecording();
} else {
fromToggle = TRUE;
startRecording();
}
}
}
void VMemo::paintEvent( QPaintEvent* ) {
QPainter p(this);
p.drawPixmap( 0, 1,( const char** ) vmemo_xpm );
@@ -652,18 +654,18 @@ int VMemo::setToggleButton(int tog) {
break;
case 8:
return Key_F13;
break;
};
}
return -1;
}
void VMemo::timerBreak() {
//stop
stopRecording();
QMessageBox::message("Vmemo","Vmemo recording has ended");
}
-EXPORT_OPIE_APPLET_v1( VMemo )
+//EXPORT_OPIE_APPLET_v1( VMemo )