author | simon <simon> | 2002-03-25 19:33:54 (UTC) |
---|---|---|
committer | simon <simon> | 2002-03-25 19:33:54 (UTC) |
commit | 56f2a47633046a7b08fe59acfe646a648c006230 (patch) (side-by-side diff) | |
tree | dc7087aa3f346e3ff97fd3c52ffc6f5225813bfe | |
parent | 25fd130f6e411585e222c1bc0fe068344745ab77 (diff) | |
download | opie-56f2a47633046a7b08fe59acfe646a648c006230.zip opie-56f2a47633046a7b08fe59acfe646a648c006230.tar.gz opie-56f2a47633046a7b08fe59acfe646a648c006230.tar.bz2 |
- fixed warning about shadowing of name variable
-rw-r--r-- | core/applets/vmemo/vmemo.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/applets/vmemo/vmemo.cpp b/core/applets/vmemo/vmemo.cpp index fea673c..b3edbc1 100644 --- a/core/applets/vmemo/vmemo.cpp +++ b/core/applets/vmemo/vmemo.cpp @@ -40,194 +40,194 @@ typedef struct _waveheader { u_long byte_p_sec; /* avg bytes per second (avgBytePerSecond) */ u_short byte_p_spl; /* samplesize; 1 or 2 bytes (blockAlign) */ u_short bit_p_spl; /* 8, 12 or 16 bit (bitsPerSample) */ u_long data_chunk; /* 'data' */ u_long data_length;/* samplecount */ } WaveHeader; #define RIFF 0x46464952 #define WAVE 0x45564157 #define FMT 0x20746D66 #define DATA 0x61746164 #define PCM_CODE 1 #define WAVE_MONO 1 #define WAVE_STEREO 2 #include "vmemo.h" #include <qpe/qpeapplication.h> #include <qpe/resource.h> #include <qpe/config.h> #include <qpainter.h> #include <qdatetime.h> #include <qsound.h> #include <qfile.h> #include <qmessagebox.h> int seq = 0; /* XPM */ static char * vmemo_xpm[] = { "14 14 47 1", " c None", ". c #101010", "+ c #0D0D0D", "@ c #0B0B0B", "# c #393939", "$ c #6C6C6C", "% c #5D5D5D", "& c #4E4E4E", "* c #1C1C1C", "= c #131313", "- c #7B7B7B", "; c #303030", "> c #383838", ", c #3F3F3F", "' c #343434", ") c #060606", "! c #444444", "~ c #646464", "{ c #505050", "] c #717171", "^ c #1B1B1B", "/ c #585858", "( c #4C4C4C", "_ c #353535", ": c #0E0E0E", "< c #080808", "[ c #262626", "} c #121212", "| c #7F7F7F", "1 c #464646", "2 c #0C0C0C", "3 c #727272", "4 c #292929", "5 c #656565", "6 c #565656", "7 c #434343", "8 c #272727", "9 c #0F0F0F", "0 c #3A3A3A", "a c #090909", "b c #535353", "c c #545454", "d c #494949", "e c #7A7A7A", "f c #202020", "g c #3D3D3D", "h c #1F1F1F", " .+@ ", " #$%&* ", " =-;>,')", " .$;!~,)", " ;#{]!)", " ^~/(_)", " ./:@<[)", " }. .|]1;;2 ", " #-$;^/3&;;4@ ", ".$;;#5:67;89 ", ":%;0%&ab;8. ", "@cd%e!fg49 ", " h0,!_;2@ ", " ))))) "}; -VMemo::VMemo( QWidget *parent, const char *name ) - : QWidget( parent, name ) +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; 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&)) ); // // Register the REC key press, for ipaq only QCopEnvelope e("QPE/Desktop", "keyRegister(int key, QString channel, QString message)"); e << 4096; e << QString("QPE/VMemo"); e << QString("toggleRecord()"); } } } VMemo::~VMemo() { } void VMemo::receive( const QCString &msg, const QByteArray &data ) { QDataStream stream( data, IO_ReadOnly ); if (msg == "toggleRecord()") { if (recording) mouseReleaseEvent(NULL); else mousePressEvent(NULL); } } void VMemo::paintEvent( QPaintEvent* ) { QPainter p(this); p.drawPixmap( 0, 1,( const char** ) vmemo_xpm ); } void VMemo::mousePressEvent( QMouseEvent *me ) { // just to be safe if (recording) { recording = FALSE; return; } /* No mousePress/mouseRelease recording on the iPAQ. The REC button on the iPAQ calls these functions mousePressEvent and mouseReleaseEvent with a NULL parameter. */ // if (!systemZaurus && me != NULL) // return; QSound::play(Resource::findSound("vmemob")); qDebug("Start recording"); recording = TRUE; if (openDSP() == -1) { QMessageBox::critical(0, "VMemo", "Could not open dsp device.", "Abort"); recording = FALSE; return; } Config vmCfg("VMemo"); vmCfg.setGroup("Defaults"); QDateTime dt = QDateTime::currentDateTime(); QString fileName; if(systemZaurus) fileName=vmCfg.readEntry("Dir", "/mnt/cf/"); // zaurus does not have /mnt/ramfs else fileName=vmCfg.readEntry("Dir", "/mnt/ramfs/"); fileName += "vm_"; fileName += dt.toString(); fileName += ".wav"; // No spaces in the filename fileName.replace(QRegExp("'"),""); fileName.replace(QRegExp(" "),"_"); fileName.replace(QRegExp(":"),"."); fileName.replace(QRegExp(","),""); if(openWAV(fileName.latin1()) == -1) |