00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef __VMEMO_H__
00018 #define __VMEMO_H__
00019
00020
00021 #include <qwidget.h>
00022 #include <qpixmap.h>
00023 #include <qpe/applnk.h>
00024 #include <qfile.h>
00025 #include <qpe/qcopenvelope_qws.h>
00026 #include <qlabel.h>
00027 #include <qtimer.h>
00028
00029 class VMemo : public QWidget
00030 {
00031 Q_OBJECT
00032
00033 public:
00034
00035 VMemo( QWidget *parent, const char *name = NULL);
00036 ~VMemo();
00037 static int position();
00038 QFile track;
00039 int length;
00040 QString fileName, errorMsg, date;
00041 QLabel* msgLabel;
00042 QTimer *t_timer;
00043 bool usingIcon, useADPCM;
00044
00045 public slots:
00046
00047 bool record();
00048 void mousePressEvent( QMouseEvent * );
00049 void mouseReleaseEvent( QMouseEvent * );
00050 void receive( const QCString &msg, const QByteArray &data );
00051 bool startRecording();
00052 void stopRecording();
00053 void timerBreak();
00054
00055 private:
00056
00057 bool useAlerts;
00058 void paintEvent( QPaintEvent* );
00059 int setToggleButton(int);
00060 int openDSP();
00061 int openWAV(const char *filename);
00062 bool fromToggle;
00063 QPixmap vmemoPixmap;
00064 QCopChannel *myChannel;
00065 bool systemZaurus;
00066 int dsp, wav, rate, speed, channels, format, resolution;
00067 bool recording;
00068 };
00069
00070 #endif // __VMEMO_H__
00071