[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    kdeaccessibility/kttsd/plugins/festivalint
From:       Gary Cramblitt <garycramblitt () comcast ! net>
Date:       2005-04-21 22:09:20
Message-ID: 20050421220920.E45CC651 () office ! kde ! org
[Download RAW message or body]

CVS commit by cramblitt: 

Display gender icons in voice combobox.


  M +10 -2     festivalintconf.cpp   1.34
  M +1 -1      festivalintconf.h   1.18


--- kdeaccessibility/kttsd/plugins/festivalint/festivalintconf.cpp  #1.33:1.34
@@ -47,7 +47,7 @@
 #include <kprocio.h>
 #include <kprogress.h>
+#include <kiconloader.h>
 
 // KTTS includes.
-#include "pluginconf.h"
 #include "testplayer.h"
 
@@ -470,4 +470,6 @@ void FestivalIntConf::scanVoices()
         // Iterate thru list of voice codes returned by Festival,
         // find matching entry in voices.xml file, and add to list of supported \
voices. +        QPixmap maleIcon = KGlobal::iconLoader()->loadIcon("male", \
KIcon::Small); +        QPixmap femaleIcon = \
                KGlobal::iconLoader()->loadIcon("female", KIcon::Small);
         QStringList::ConstIterator itEnd = m_supportedVoiceCodes.constEnd();
         for(QStringList::ConstIterator it = m_supportedVoiceCodes.begin(); it != \
itEnd; ++it ) @@ -495,5 +497,11 @@ void FestivalIntConf::scanVoices()
                     voiceTemp.pitchAdjustable = readXmlBool(voiceNode, \
"pitch-adjustable", true);  m_voiceList.append(voiceTemp);
-                    m_widget->selectVoiceCombo->insertItem(voiceTemp.name + " (" + \
voiceTemp.code + ")"); +                    QString voiceDisplayName = voiceTemp.name \
+ " (" + voiceTemp.code + ")"; +                    if (voiceTemp.gender == "male")
+                        m_widget->selectVoiceCombo->insertItem(maleIcon, \
voiceDisplayName); +                    else if (voiceTemp.gender == "female")
+                        m_widget->selectVoiceCombo->insertItem(femaleIcon, \
voiceDisplayName); +                    else
+                        m_widget->selectVoiceCombo->insertItem(voiceDisplayName);
                     break;
                 }

--- kdeaccessibility/kttsd/plugins/festivalint/festivalintconf.h  #1.17:1.18
@@ -34,5 +34,5 @@
 
 // KTTS includes.
-#include <pluginconf.h>
+#include "pluginconf.h"
 
 // FestivalInt includes.


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic