summaryrefslogtreecommitdiffstats
path: root/khotkeys/kcontrol/voicerecorder.h
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commit4aed2c8219774f5d797760606b8489a92ddc5163 (patch)
tree3f8c130f7d269626bf6a9447407ef6c35954426a /khotkeys/kcontrol/voicerecorder.h
downloadtdebase-4aed2c8219774f5d797760606b8489a92ddc5163.tar.gz
tdebase-4aed2c8219774f5d797760606b8489a92ddc5163.zip
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'khotkeys/kcontrol/voicerecorder.h')
-rw-r--r--khotkeys/kcontrol/voicerecorder.h73
1 files changed, 73 insertions, 0 deletions
diff --git a/khotkeys/kcontrol/voicerecorder.h b/khotkeys/kcontrol/voicerecorder.h
new file mode 100644
index 000000000..579f53893
--- /dev/null
+++ b/khotkeys/kcontrol/voicerecorder.h
@@ -0,0 +1,73 @@
+/****************************************************************************
+
+ KHotKeys
+
+ Copyright (C) 2005 Olivier Goffgart <ogoffart @ kde.org>
+
+ Distributed under the terms of the GNU General Public License version 2.
+
+****************************************************************************/
+
+#ifndef VOICE_RECORDER_H
+#define VOICE_RECORDER_H
+
+#include <qframe.h>
+#include "ui/voice_input_widget_ui.h"
+#include <qmemarray.h>
+
+#include "sound.h"
+class QMouseEvent;
+class KAudioRecordStream ;
+class KArtsServer;
+class KTempFile;
+class KLibrary;
+
+namespace KHotKeys
+{
+
+ class SoundRecorder;
+ class Voice_trigger;
+
+class VoiceRecorder : public Voice_input_widget_ui
+ {
+ Q_OBJECT
+
+ public:
+ VoiceRecorder(const Sound& sound_P, const QString &voiceId, QWidget *parent, const char *name);
+ ~VoiceRecorder();
+
+ Sound sound() const;
+
+ enum State { sNotModified , sIncorrect, sModified };
+
+ inline State state() const
+ {
+ return _state;
+ }
+
+ static bool init( KLibrary* lib );
+ typedef void (*arts_play_fun)( const QString& file );
+
+ protected slots:
+ void slotStopPressed();
+ void slotRecordPressed();
+ void slotPlayPressed();
+
+ signals:
+ void recorded(bool);
+ private slots:
+ void slotSoundRecorded(const Sound& sound);
+ bool drawSound();
+
+ private:
+ SoundRecorder *_recorder;
+ Sound _sound;
+ State _state;
+ KTempFile *_tempFile;
+ QString _voiceId;
+ static arts_play_fun arts_play;
+ };
+
+} // namespace KHotKeys
+
+#endif