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

jovie

Signals | Public Member Functions | Static Public Member Functions | Properties | List of all members
SpeechJob Class Reference

#include <speechjob.h>

Inheritance diagram for SpeechJob:
Inheritance graph
[legend]

Signals

void jobStateChanged (const QString &appId, int jobNum, KSpeech::JobState state)
 

Public Member Functions

 SpeechJob (KSpeech::JobPriority priority=KSpeech::jpText)
 
 ~SpeechJob ()
 
QString appId () const
 
void decRefCount ()
 
QString getNextSentence ()
 
void incRefCount ()
 
int jobNum () const
 
KSpeech::JobPriority jobPriority () const
 
int refCount () const
 
int sentenceCount () const
 
int sentenceNum () const
 
QStringList sentences () const
 
int seq () const
 
QByteArray serialize () const
 
void setAppId (const QString &appId)
 
void setJobNum (int jobNum)
 
void setJobPriority (KSpeech::JobPriority jobPriority)
 
void setSentenceNum (int sentenceNum)
 
void setSentences (const QStringList &sentences)
 
void setSeq (int seq)
 
void setState (KSpeech::JobState state)
 
void setTalker (const QString &talker)
 
KSpeech::JobState state () const
 
QString talker () const
 

Static Public Member Functions

static QString jobStateToStr (KSpeech::JobState state)
 

Properties

QString appId
 
QString getNextSentence
 
int jobNum
 
KSpeech::JobPriority jobPriority
 
int sentenceCount
 
int sentenceNum
 
QStringList sentences
 
int seq
 
QByteArray serialize
 
KSpeech::JobState state
 
QString talker
 

Detailed Description

Object containing a speech job.

Definition at line 41 of file speechjob.h.

Constructor & Destructor Documentation

SpeechJob::SpeechJob ( KSpeech::JobPriority  priority = KSpeech::jpText)
explicit
SpeechJob::~SpeechJob ( )

Member Function Documentation

QString SpeechJob::appId ( ) const

DBUS senderId of the application that requested the speech job.

void SpeechJob::decRefCount ( )
QString SpeechJob::getNextSentence ( )

Returns the next sentence in the Job.

Increments sentenceNum. If we run out of sentences, returns QString().

void SpeechJob::incRefCount ( )
int SpeechJob::jobNum ( ) const

Job number.

KSpeech::JobPriority SpeechJob::jobPriority ( ) const

Type of job.

Text, Message, Warning, or Screen Reader Output

void SpeechJob::jobStateChanged ( const QString &  appId,
int  jobNum,
KSpeech::JobState  state 
)
signal
static QString SpeechJob::jobStateToStr ( KSpeech::JobState  state)
static

Converts a job state enumerator to a displayable string.

Parameters
stateJob state.
Returns
Displayable string for job state.
int SpeechJob::refCount ( ) const
int SpeechJob::sentenceCount ( ) const

Count of sentences in the job.

int SpeechJob::sentenceNum ( ) const

Current sentence begin spoken.

The first sentence is at 1, so if 0, not speaking.

QStringList SpeechJob::sentences ( ) const

List of sentences in the job.

int SpeechJob::seq ( ) const

Current sentence being synthesized.

First sentence is 1.

QByteArray SpeechJob::serialize ( ) const

Converts the job into a byte stream.

Returns
A QDataStream containing information about the job. Blank if no such job.

The stream contains the following elements:

  • int priority Job Priority
  • int state Job state.
  • QString appId DBUS senderId of the application that requested the speech job.
  • QString talker Language code in which to speak the text.
  • int sentenceNum Current sentence being spoken. Sentences are numbered starting at 1.
  • int sentenceCount Total number of sentences in the job.

Note that sequence numbers apply to the entire job. They do not start from 1 at the beginning of each part.

The following sample code will decode the stream:

      QByteArray jobInfo = serialize();
      QDataStream stream(jobInfo, QIODevice::ReadOnly);
      qint32 priority;
      qint32 state;
      QString appId;
      QString talker;
      qint32 sentenceNum;
      qint32 sentenceCount;
      stream >> priority;
      stream >> state;
      stream >> appId;
      stream >> talker;
      stream >> sentenceNum;
      stream >> sentenceCount;
void SpeechJob::setAppId ( const QString &  appId)
void SpeechJob::setJobNum ( int  jobNum)
void SpeechJob::setJobPriority ( KSpeech::JobPriority  jobPriority)
void SpeechJob::setSentenceNum ( int  sentenceNum)
void SpeechJob::setSentences ( const QStringList &  sentences)
void SpeechJob::setSeq ( int  seq)
void SpeechJob::setState ( KSpeech::JobState  state)
void SpeechJob::setTalker ( const QString &  talker)
KSpeech::JobState SpeechJob::state ( ) const

Job state.

QString SpeechJob::talker ( ) const

Requested Talker code in which to speak the text.

Property Documentation

QString SpeechJob::appId
readwrite

Definition at line 46 of file speechjob.h.

QString SpeechJob::getNextSentence
read

Definition at line 54 of file speechjob.h.

int SpeechJob::jobNum
readwrite

Definition at line 45 of file speechjob.h.

KSpeech::JobPriority SpeechJob::jobPriority
readwrite

Definition at line 47 of file speechjob.h.

int SpeechJob::sentenceCount
read

Definition at line 51 of file speechjob.h.

int SpeechJob::sentenceNum
readwrite

Definition at line 52 of file speechjob.h.

QStringList SpeechJob::sentences
readwrite

Definition at line 50 of file speechjob.h.

int SpeechJob::seq
readwrite

Definition at line 53 of file speechjob.h.

QByteArray SpeechJob::serialize
read

Definition at line 55 of file speechjob.h.

KSpeech::JobState SpeechJob::state
readwrite

Definition at line 49 of file speechjob.h.

QString SpeechJob::talker
readwrite

Definition at line 48 of file speechjob.h.


The documentation for this class was generated from the following file:
  • speechjob.h
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