summaryrefslogtreecommitdiff
path: root/rbutil/rbutilqt
diff options
context:
space:
mode:
Diffstat (limited to 'rbutil/rbutilqt')
-rw-r--r--rbutil/rbutilqt/installtalkfrm.ui48
-rw-r--r--rbutil/rbutilqt/installtalkwindow.cpp2
-rw-r--r--rbutil/rbutilqt/talkfile.cpp16
-rw-r--r--rbutil/rbutilqt/talkfile.h4
4 files changed, 63 insertions, 7 deletions
diff --git a/rbutil/rbutilqt/installtalkfrm.ui b/rbutil/rbutilqt/installtalkfrm.ui
index ddb5e877cc..d38784c130 100644
--- a/rbutil/rbutilqt/installtalkfrm.ui
+++ b/rbutil/rbutilqt/installtalkfrm.ui
@@ -78,39 +78,77 @@
78 <string>Generation options</string> 78 <string>Generation options</string>
79 </property> 79 </property>
80 <layout class="QGridLayout" > 80 <layout class="QGridLayout" >
81 <item row="0" column="0" > 81 <item row="2" column="0" >
82 <widget class="QCheckBox" name="OverwriteWav" > 82 <widget class="QCheckBox" name="OverwriteWav" >
83 <property name="text" > 83 <property name="text" >
84 <string>Overwrite Wavefiles</string> 84 <string>Overwrite Wavefiles</string>
85 </property> 85 </property>
86 <property name="checked" >
87 <bool>true</bool>
88 </property>
86 </widget> 89 </widget>
87 </item> 90 </item>
88 <item row="1" column="0" > 91 <item row="3" column="0" >
89 <widget class="QCheckBox" name="RemoveWav" > 92 <widget class="QCheckBox" name="RemoveWav" >
90 <property name="text" > 93 <property name="text" >
91 <string>Remove Wavefiles</string> 94 <string>Remove Wavefiles</string>
92 </property> 95 </property>
96 <property name="checked" >
97 <bool>true</bool>
98 </property>
93 </widget> 99 </widget>
94 </item> 100 </item>
95 <item row="2" column="0" > 101 <item row="4" column="0" >
96 <widget class="QCheckBox" name="recursive" > 102 <widget class="QCheckBox" name="recursive" >
97 <property name="text" > 103 <property name="text" >
98 <string>Run recursive</string> 104 <string>Run recursive</string>
99 </property> 105 </property>
106 <property name="checked" >
107 <bool>true</bool>
108 </property>
100 </widget> 109 </widget>
101 </item> 110 </item>
102 <item row="3" column="0" > 111 <item row="5" column="0" >
103 <widget class="QCheckBox" name="StripExtensions" > 112 <widget class="QCheckBox" name="StripExtensions" >
104 <property name="text" > 113 <property name="text" >
105 <string>Strip Extensions</string> 114 <string>Strip Extensions</string>
106 </property> 115 </property>
116 <property name="checked" >
117 <bool>false</bool>
118 </property>
107 </widget> 119 </widget>
108 </item> 120 </item>
109 <item row="4" column="0" > 121 <item row="6" column="0" >
110 <widget class="QCheckBox" name="OverwriteTalk" > 122 <widget class="QCheckBox" name="OverwriteTalk" >
111 <property name="text" > 123 <property name="text" >
112 <string>Overwrite Talkfiles</string> 124 <string>Overwrite Talkfiles</string>
113 </property> 125 </property>
126 <property name="checked" >
127 <bool>true</bool>
128 </property>
129 </widget>
130 </item>
131 <item row="1" column="0" >
132 <widget class="QCheckBox" name="talkFolders" >
133 <property name="text" >
134 <string>Generate .talk files for Folders</string>
135 </property>
136 <property name="checked" >
137 <bool>true</bool>
138 </property>
139 </widget>
140 </item>
141 <item row="0" column="0" >
142 <widget class="QCheckBox" name="talkFiles" >
143 <property name="text" >
144 <string>Generate .talk files for Files</string>
145 </property>
146 <property name="checked" >
147 <bool>true</bool>
148 </property>
149 <property name="tristate" >
150 <bool>false</bool>
151 </property>
114 </widget> 152 </widget>
115 </item> 153 </item>
116 </layout> 154 </layout>
diff --git a/rbutil/rbutilqt/installtalkwindow.cpp b/rbutil/rbutilqt/installtalkwindow.cpp
index 4c341fa793..fbe2a2749b 100644
--- a/rbutil/rbutilqt/installtalkwindow.cpp
+++ b/rbutil/rbutilqt/installtalkwindow.cpp
@@ -131,6 +131,8 @@ void InstallTalkWindow::accept()
131 talkcreator->setRemoveWav(ui.RemoveWav->isChecked()); 131 talkcreator->setRemoveWav(ui.RemoveWav->isChecked());
132 talkcreator->setRecursive(ui.recursive->isChecked()); 132 talkcreator->setRecursive(ui.recursive->isChecked());
133 talkcreator->setStripExtensions(ui.StripExtensions->isChecked()); 133 talkcreator->setStripExtensions(ui.StripExtensions->isChecked());
134 talkcreator->setTalkFolders(ui.talkFolders->isChecked());
135 talkcreator->setTalkFiles(ui.talkFiles->isChecked());
134 136
135 talkcreator->createTalkFiles(logger); 137 talkcreator->createTalkFiles(logger);
136} 138}
diff --git a/rbutil/rbutilqt/talkfile.cpp b/rbutil/rbutilqt/talkfile.cpp
index 5b484079f9..3b99b2c52c 100644
--- a/rbutil/rbutilqt/talkfile.cpp
+++ b/rbutil/rbutilqt/talkfile.cpp
@@ -96,11 +96,23 @@ bool TalkFileCreator::createTalkFiles(ProgressloggerInterface* logger)
96 } 96 }
97 if(fileInf.isDir()) // if it is a dir 97 if(fileInf.isDir()) // if it is a dir
98 { 98 {
99 // skip entry if folder talking isnt enabled
100 if(m_talkFolders == false)
101 {
102 it.next();
103 continue;
104 }
99 toSpeak = fileInf.fileName(); 105 toSpeak = fileInf.fileName();
100 filename = fileInf.absolutePath() + "/_dirname.talk"; 106 filename = fileInf.absolutePath() + "/_dirname.talk";
101 } 107 }
102 else // if it is a file 108 else // if it is a file
103 { 109 {
110 // skip entry if file talking isnt enabled
111 if(m_talkFiles == false)
112 {
113 it.next();
114 continue;
115 }
104 if(m_stripExtensions) 116 if(m_stripExtensions)
105 toSpeak = fileInf.baseName(); 117 toSpeak = fileInf.baseName();
106 else 118 else
@@ -181,7 +193,7 @@ bool TalkFileCreator::encode(QString input,QString output)
181} 193}
182 194
183bool TTSSapi::start() 195bool TTSSapi::start()
184{ 196{
185 QFileInfo tts(m_TTSexec); 197 QFileInfo tts(m_TTSexec);
186 if(!tts.exists()) 198 if(!tts.exists())
187 return false; 199 return false;
@@ -244,4 +256,4 @@ bool TTSExes::voice(QString text,QString wavfile)
244 QProcess::execute(execstring); 256 QProcess::execute(execstring);
245 return true; 257 return true;
246 258
247} \ No newline at end of file 259}
diff --git a/rbutil/rbutilqt/talkfile.h b/rbutil/rbutilqt/talkfile.h
index b02060a708..1b8d9ca2e2 100644
--- a/rbutil/rbutilqt/talkfile.h
+++ b/rbutil/rbutilqt/talkfile.h
@@ -75,6 +75,8 @@ public:
75 void setRemoveWav(bool ov) {m_removeWav = ov;} 75 void setRemoveWav(bool ov) {m_removeWav = ov;}
76 void setRecursive(bool ov) {m_recursive = ov;} 76 void setRecursive(bool ov) {m_recursive = ov;}
77 void setStripExtensions(bool ov) {m_stripExtensions = ov;} 77 void setStripExtensions(bool ov) {m_stripExtensions = ov;}
78 void setTalkFolders(bool ov) {m_talkFolders = ov;}
79 void setTalkFiles(bool ov) {m_talkFiles = ov;}
78 80
79private slots: 81private slots:
80 void abort(); 82 void abort();
@@ -106,6 +108,8 @@ private:
106 bool m_removeWav; 108 bool m_removeWav;
107 bool m_recursive; 109 bool m_recursive;
108 bool m_stripExtensions; 110 bool m_stripExtensions;
111 bool m_talkFolders;
112 bool m_talkFiles;
109 113
110 ProgressloggerInterface* m_logger; 114 ProgressloggerInterface* m_logger;
111 115