diff options
Diffstat (limited to 'rbutil/rbutilqt/base/talkgenerator.h')
-rw-r--r-- | rbutil/rbutilqt/base/talkgenerator.h | 31 |
1 files changed, 5 insertions, 26 deletions
diff --git a/rbutil/rbutilqt/base/talkgenerator.h b/rbutil/rbutilqt/base/talkgenerator.h index 5fe036e2f1..3e2f9394fb 100644 --- a/rbutil/rbutilqt/base/talkgenerator.h +++ b/rbutil/rbutilqt/base/talkgenerator.h | |||
@@ -48,30 +48,15 @@ public: | |||
48 | QString target; | 48 | QString target; |
49 | bool voiced; | 49 | bool voiced; |
50 | bool encoded; | 50 | bool encoded; |
51 | |||
52 | /* We need the following members because | ||
53 | * 1) the QtConcurrent entry points are all static methods (and we | ||
54 | * need to communicate with the TalkGenerator) | ||
55 | * 2) we are not guaranteed to go through the list in any | ||
56 | * particular order, so we can't use the progress slot | ||
57 | * for error checking */ | ||
58 | struct | ||
59 | { | ||
60 | EncoderBase* encoder; | ||
61 | TTSBase* tts; | ||
62 | TalkGenerator* generator; | ||
63 | int wavtrim; | ||
64 | } refs; | ||
65 | }; | 51 | }; |
66 | 52 | ||
67 | TalkGenerator(QObject* parent); | 53 | TalkGenerator(QObject* parent); |
54 | |||
68 | Status process(QList<TalkEntry>* list,int wavtrimth = -1); | 55 | Status process(QList<TalkEntry>* list,int wavtrimth = -1); |
69 | QString correctString(QString s); | 56 | QString correctString(QString s); |
70 | 57 | ||
71 | public slots: | 58 | public slots: |
72 | void abort(); | 59 | void abort(); |
73 | void encProgress(int value); | ||
74 | void ttsProgress(int value); | ||
75 | void setLang(QString name); | 60 | void setLang(QString name); |
76 | 61 | ||
77 | signals: | 62 | signals: |
@@ -80,22 +65,12 @@ signals: | |||
80 | void logProgress(int, int); //! set progress bar. | 65 | void logProgress(int, int); //! set progress bar. |
81 | 66 | ||
82 | private: | 67 | private: |
83 | QFutureWatcher<void> encFutureWatcher; | ||
84 | QFutureWatcher<void> ttsFutureWatcher; | ||
85 | void encFailEntry(const TalkEntry& entry); | ||
86 | void ttsFailEntry(const TalkEntry& entry, TTSStatus status, QString error); | ||
87 | |||
88 | Status voiceList(QList<TalkEntry>* list,int wavetrimth); | 68 | Status voiceList(QList<TalkEntry>* list,int wavetrimth); |
89 | Status encodeList(QList<TalkEntry>* list); | 69 | Status encodeList(QList<TalkEntry>* list); |
90 | 70 | ||
91 | static void encEntryPoint(TalkEntry& entry); | ||
92 | static void ttsEntryPoint(TalkEntry& entry); | ||
93 | |||
94 | TTSBase* m_tts; | 71 | TTSBase* m_tts; |
95 | EncoderBase* m_enc; | 72 | EncoderBase* m_enc; |
96 | 73 | ||
97 | bool m_ttsWarnings; | ||
98 | bool m_userAborted; | ||
99 | QString m_lang; | 74 | QString m_lang; |
100 | 75 | ||
101 | struct CorrectionItems | 76 | struct CorrectionItems |
@@ -105,6 +80,10 @@ private: | |||
105 | QString modifier; | 80 | QString modifier; |
106 | }; | 81 | }; |
107 | QList<struct CorrectionItems> m_corrections; | 82 | QList<struct CorrectionItems> m_corrections; |
83 | |||
84 | bool m_abort; | ||
85 | |||
86 | |||
108 | }; | 87 | }; |
109 | 88 | ||
110 | 89 | ||