/*
 * 声音管理类
*/
#ifndef VOICEFORM_H
#define VOICEFORM_H
#include <QWidget>
#include <QTextToSpeech>
namespace Ui {
class VoiceForm;
}
class VoiceForm : public QWidget
{
    Q_OBJECT
public:
    explicit VoiceForm(QWidget *parent = 0);
    ~VoiceForm();
public:
    QTextToSpeech *m_speech;
    void sayVoice(QString str);
public slots:
    void speak();
    void stop();

    void setRate(int);
    void setPitch(int);
    void setVolume(int volume);

    void stateChanged(QTextToSpeech::State state);
    void engineSelected(int index);
    void languageSelected(int language);
    void voiceSelected(int index);
    void localeChanged(const QLocale &locale);
private:
    Ui::VoiceForm *ui;
    QVector<QVoice> m_voices;
};

#endif // VOICEFORM_H
