-rw-r--r-- | core/applets/vmemo/vmemo.cpp | 14 | ||||
-rw-r--r-- | core/applets/vmemo/vmemo.h | 4 |
2 files changed, 17 insertions, 1 deletions
diff --git a/core/applets/vmemo/vmemo.cpp b/core/applets/vmemo/vmemo.cpp index cfa07b4..63ee0b8 100644 --- a/core/applets/vmemo/vmemo.cpp +++ b/core/applets/vmemo/vmemo.cpp @@ -28,4 +28,5 @@ #include <stdlib.h> #include <errno.h> +#include <qtimer.h> typedef struct _waveheader { @@ -203,4 +204,7 @@ VMemo::VMemo( QWidget *parent, const char *_name ) recording = FALSE; + t_timer = new QTimer( this ); + connect( t_timer, SIGNAL( timeout() ), SLOT( timerBreak() ) ); + struct utsname name; /* check for embedix kernel running on the zaurus*/ if (uname(&name) != -1) { @@ -454,4 +458,6 @@ void VMemo::record(void) qDebug(msg); + t_timer->start( 30 * 1000+1000, TRUE); + if(systemZaurus) { @@ -469,5 +475,4 @@ void VMemo::record(void) int j=0; - // if(systemZaurus) { for (int i = 0; i < result; i++) { //since Z is mono do normally monoBuffer[i] = sound[i]; @@ -612,2 +617,9 @@ int VMemo::setToggleButton(int tog) { return -1; } + +void VMemo::timerBreak() { + //stop + recording=false; + + QMessageBox::message("Vmemo","Vmemo recording has \ntimed out"); +} diff --git a/core/applets/vmemo/vmemo.h b/core/applets/vmemo/vmemo.h index b33ab55..51ace35 100644 --- a/core/applets/vmemo/vmemo.h +++ b/core/applets/vmemo/vmemo.h @@ -25,4 +25,5 @@ #include <qpe/qcopenvelope_qws.h> #include <qlabel.h> +#include <qtimer.h> class VMemo : public QWidget @@ -35,4 +36,6 @@ public: QString fileName, errorMsg; QLabel* msgLabel; + QTimer *t_timer; + public slots: void record(); @@ -42,4 +45,5 @@ public slots: bool startRecording(); void stopRecording(); + void timerBreak(); private: bool useAlerts; |