1 /****************************************************************************
5 Copyright (C) 2005 Olivier Goffart <ogoffart @ kde.org>
7 Distributed under the terms of the GNU General Public License version 2.
9 ****************************************************************************/
14 #include <QtGui/QWidget>
15 #include <kshortcut.h>
31 class KDE_EXPORT Voice
: public QObject
35 Voice( bool enabled_P
, QObject
* parent_P
);
37 void enable( bool enable_P
);
39 void register_handler( Voice_trigger
* );
40 void unregister_handler( Voice_trigger
* );
41 // bool x11Event( XEvent* e );
43 void set_shortcut( const KShortcut
&k
);
46 * return QString() is a new signature is far enough from others signature
47 * otherwise, return the stringn which match.
49 QString
isNewSoundFarEnough(const VoiceSignature
& s
, const QString
& currentTrigger
);
51 bool doesVoiceCodeExists(const QString
&s
);
58 void slot_sound_recorded( const Sound
& );
59 void slot_key_pressed();
63 void handle_voice( const QString
&voice
);
69 QList
<Voice_trigger
*> _references
;
70 SoundRecorder
*_recorder
;
79 KDE_EXPORT
extern Voice
* voice_handler
;
81 } // namespace KHotKeys