• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdeaccessibility API Reference
  • KDE Home
  • Contact Us
 

jovie

Public Types | Public Member Functions | Static Public Member Functions | List of all members
TalkerCode Class Reference

#include <talkercode.h>

Public Types

typedef QList< TalkerCode > TalkerCodeList
 

Public Member Functions

 TalkerCode (const QString &code=QString(), bool normal=false)
 
 TalkerCode (const TalkerCode &other)
 
 ~TalkerCode ()
 
QString fullLanguageCode () const
 
QString getTalkerCode () const
 
QString getTranslatedDescription () const
 
QString language () const
 
QString name () const
 
bool operator!= (TalkerCode &other) const
 
TalkerCode & operator= (const TalkerCode &other)
 
bool operator== (TalkerCode &other) const
 
QString outputModule () const
 
int pitch () const
 
int rate () const
 
void setFullLanguageCode (const QString &fullLanguageCode)
 
void setLanguage (const QString &language)
 
void setName (const QString &name)
 
void setOutputModule (const QString &moduleName)
 
void setPitch (int pitch)
 
void setRate (int rate)
 
void setTalkerCode (const QString &code)
 
void setVoiceName (const QString &voiceName)
 
void setVoiceType (int voiceType)
 
void setVolume (int volume)
 
QString voiceName () const
 
int voiceType () const
 
int volume () const
 

Static Public Member Functions

static QString defaultTalkerCode (const QString &fullLanguageCode, const QString &moduleName)
 
static int findClosestMatchingTalker (const TalkerCodeList &talkers, const QString &talker, bool assumeDefaultLang=true)
 
static QString languageCodeToLanguage (const QString &languageCode)
 
static void splitFullLanguageCode (const QString &lang, QString &languageCode, QString &countryCode)
 
static QString stripPrefer (const QString &code, bool &preferred)
 
static QString translatedVoiceType (int voiceType)
 

Detailed Description

Definition at line 38 of file talkercode.h.

Member Typedef Documentation

typedef QList<TalkerCode> TalkerCode::TalkerCodeList

Definition at line 61 of file talkercode.h.

Constructor & Destructor Documentation

TalkerCode::TalkerCode ( const QString &  code = QString(),
bool  normal = false 
)
explicit

Constructor.

Definition at line 65 of file talkercode.cpp.

TalkerCode::TalkerCode ( const TalkerCode &  other)

Copy Constructor.

Definition at line 77 of file talkercode.cpp.

TalkerCode::~TalkerCode ( )

Destructor.

Definition at line 93 of file talkercode.cpp.

Member Function Documentation

QString TalkerCode::defaultTalkerCode ( const QString &  fullLanguageCode,
const QString &  moduleName 
)
static

Given a language code and plugin name, returns a normalized default talker code.

Parameters
fullLanguageCodeLanguage code.
moduleNameName of the Synthesizer plugin.
Returns
Full normalized talker code.

Example returned from defaultTalkerCode("en", "Festival") <voice lang="en" name="fixed" gender="neutral"> <prosody volume="medium" rate="medium"> <kttsd synthesizer="Festival">

Definition at line 273 of file talkercode.cpp.

int TalkerCode::findClosestMatchingTalker ( const TalkerCodeList &  talkers,
const QString &  talker,
bool  assumeDefaultLang = true 
)
static

Given a list of parsed talker codes and a desired talker code, finds the closest matching talker in the list.

Parameters
talkersThe list of parsed talker codes.
talkerThe desired talker code.
assumeDefaultLangIf true, and desired talker code lacks a language code, the default language is assumed.
Returns
Index into talkers of the closest matching talker.

Definition at line 362 of file talkercode.cpp.

QString TalkerCode::fullLanguageCode ( ) const

Returns the language code plus country code (if any).

QString TalkerCode::getTalkerCode ( ) const

Definition at line 202 of file talkercode.cpp.

QString TalkerCode::getTranslatedDescription ( ) const

The Talker Code translated for display.

Definition at line 221 of file talkercode.cpp.

QString TalkerCode::language ( ) const

Definition at line 119 of file talkercode.cpp.

QString TalkerCode::languageCodeToLanguage ( const QString &  languageCode)
static

Converts a language code plus optional country code to language description.

Definition at line 282 of file talkercode.cpp.

QString TalkerCode::name ( ) const

Properties.

Definition at line 114 of file talkercode.cpp.

bool TalkerCode::operator!= ( TalkerCode &  other) const

Definition at line 473 of file talkercode.cpp.

TalkerCode & TalkerCode::operator= ( const TalkerCode &  other)

Definition at line 98 of file talkercode.cpp.

bool TalkerCode::operator== ( TalkerCode &  other) const

Definition at line 462 of file talkercode.cpp.

QString TalkerCode::outputModule ( ) const

Definition at line 149 of file talkercode.cpp.

int TalkerCode::pitch ( ) const

Definition at line 139 of file talkercode.cpp.

int TalkerCode::rate ( ) const

Definition at line 134 of file talkercode.cpp.

void TalkerCode::setFullLanguageCode ( const QString &  fullLanguageCode)

Sets the language code and country code (if given).

void TalkerCode::setLanguage ( const QString &  language)

Definition at line 159 of file talkercode.cpp.

void TalkerCode::setName ( const QString &  name)

Definition at line 154 of file talkercode.cpp.

void TalkerCode::setOutputModule ( const QString &  moduleName)

Definition at line 189 of file talkercode.cpp.

void TalkerCode::setPitch ( int  pitch)

Definition at line 179 of file talkercode.cpp.

void TalkerCode::setRate ( int  rate)

Definition at line 174 of file talkercode.cpp.

void TalkerCode::setTalkerCode ( const QString &  code)

The Talker Code returned in XML format.

Definition at line 197 of file talkercode.cpp.

void TalkerCode::setVoiceName ( const QString &  voiceName)

Definition at line 184 of file talkercode.cpp.

void TalkerCode::setVoiceType ( int  voiceType)

Definition at line 164 of file talkercode.cpp.

void TalkerCode::setVolume ( int  volume)

Definition at line 169 of file talkercode.cpp.

void TalkerCode::splitFullLanguageCode ( const QString &  lang,
QString &  languageCode,
QString &  countryCode 
)
static

Given a language code that might contain a country code, splits the code into the two letter language code and country code.

Parameters
langLanguage code to be split.
Returns
languageCode Just the language part of the code.
countryCode The country code part (if any).

If the input code begins with an asterisk, it is ignored and removed from the returned languageCode.

Definition at line 263 of file talkercode.cpp.

QString TalkerCode::stripPrefer ( const QString &  code,
bool &  preferred 
)
static

Strips leading * from a code.

Definition at line 450 of file talkercode.cpp.

QString TalkerCode::translatedVoiceType ( int  voiceType)
static

These functions return translated Talker Code attributes.

Definition at line 247 of file talkercode.cpp.

QString TalkerCode::voiceName ( ) const

Definition at line 144 of file talkercode.cpp.

int TalkerCode::voiceType ( ) const

Definition at line 124 of file talkercode.cpp.

int TalkerCode::volume ( ) const

Definition at line 129 of file talkercode.cpp.


The documentation for this class was generated from the following files:
  • talkercode.h
  • talkercode.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:32:26 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

jovie

Skip menu "jovie"
  • Main Page
  • Namespace List
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members

kdeaccessibility API Reference

Skip menu "kdeaccessibility API Reference"
  • jovie

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal