author | llornkcor <llornkcor> | 2002-06-02 00:09:44 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2002-06-02 00:09:44 (UTC) |
commit | 0028521ebd7e96651e41dd7df325def8c8f4b63b (patch) (side-by-side diff) | |
tree | cb6ca43fac6b79158fd42de67c5d7e98760256a1 | |
parent | 34b68507898f2a01333281a7293d0bbd3c6d77ee (diff) | |
download | opie-0028521ebd7e96651e41dd7df325def8c8f4b63b.zip opie-0028521ebd7e96651e41dd7df325def8c8f4b63b.tar.gz opie-0028521ebd7e96651e41dd7df325def8c8f4b63b.tar.bz2 |
rechange my change
-rw-r--r-- | core/applets/vmemo/vmemo.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/applets/vmemo/vmemo.cpp b/core/applets/vmemo/vmemo.cpp index e327098..7021fae 100644 --- a/core/applets/vmemo/vmemo.cpp +++ b/core/applets/vmemo/vmemo.cpp @@ -167,129 +167,129 @@ static char * vmemo_xpm[] = { "Z c #B0B2BC", "` c #898A90", " . c #65656A", ".. c #999AA2", "+. c #52535A", "@. c #151B21", "#. c #515257", "$. c #B5B5BE", "%. c #616167", "&. c #1A1D22", "*. c #000713", "=. c #1F1F21", " ", " . + @ # ", " $ % & * = - ", " ; > , ' ) ! ~ ", " { ] ^ / ( _ : ", " < [ } | 1 2 3 ", " 4 5 6 7 8 9 0 a b c ", " d e f g h i j 3 k l m n ", " o p q r s t u v w n ", " o x y z A B C D E n ", " F G H I J K L M N O ", " P Q R S T U V W X ", " Y Z ` b ...+. ", " @.#.$.%.&. ", " *.B =. ", " n n n n n n n n n "}; VMemo::VMemo( QWidget *parent, const char *_name ) : QWidget( parent, _name ) { setFixedHeight( 18 ); setFixedWidth( 14 ); recording = FALSE; struct utsname name; /* check for embedix kernel running on the zaurus*/ if (uname(&name) != -1) { QString release=name.release; Config vmCfg("Vmemo"); vmCfg.setGroup("Defaults"); int toggleKey = setToggleButton(vmCfg.readNumEntry("toggleKey", -1)); qDebug("toggleKey %d", toggleKey); if(release.find("embedix",0,TRUE) !=-1) systemZaurus=TRUE; else systemZaurus=FALSE; myChannel = new QCopChannel( "QPE/VMemo", this ); connect( myChannel, SIGNAL(received(const QCString&, const QByteArray&)), this, SLOT(receive(const QCString&, const QByteArray&)) ); if( toggleKey != -1 ) { QCopEnvelope e("QPE/Desktop", "keyRegister(int key, QString channel, QString message)"); // e << 4096; // Key_Escape // e << Key_F5; //4148 e << toggleKey; e << QString("QPE/VMemo"); e << QString("toggleRecord()"); } - if( vmCfg.readNumEntry("hideIcon",0) == 1) + if( vmCfg.readNumEntry("hideIcon",0) == 1 || toggleKey > 0) hide(); } } VMemo::~VMemo() { } void VMemo::receive( const QCString &msg, const QByteArray &data ) { 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 ); } void VMemo::mousePressEvent( QMouseEvent * ) { startRecording(); } void VMemo::mouseReleaseEvent( QMouseEvent * ) { stopRecording(); } bool VMemo::startRecording() { if ( recording) return FALSE;; Config config( "Vmemo" ); config.setGroup( "System" ); useAlerts = config.readBoolEntry("Alert"); if(useAlerts) { msgLabel = new QLabel( 0, "alertLabel" ); msgLabel->setText("<B><P><font size=+2>VMemo-Recording</font></B>"); msgLabel->show(); } // if(useAlerts) // QMessageBox::message("VMemo","Really Record?");//) ==1) // return; // } else { if (!systemZaurus ) QSound::play(Resource::findSound("vmemob")); // } qDebug("Start recording"); recording = TRUE; if (openDSP() == -1) { |