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

jovie

  • sources
  • kde-4.12
  • kdeaccessibility
  • jovie
  • kcmkttsmgr
addtalker.cpp
Go to the documentation of this file.
1 /***************************************************** vim:set ts=4 sw=4 sts=4:
2  Dialog to allow user to add a new Talker by selecting a language, synthesizer,
3  and voice/pitch/speed options also.
4  Uses addtalkerwidget.ui.
5  -------------------
6  Copyright 2004 by Gary Cramblitt <garycramblitt@comcast.net>
7  Copyright 2009 by Jeremy Whiting <jpwhiting@kde.org>
8  -------------------
9  Original author: Gary Cramblitt <garycramblitt@comcast.net>
10 
11  This program is free software; you can redistribute it and/or modify
12  it under the terms of the GNU General Public License as published by
13  the Free Software Foundation; either version 2 of the License, or
14  (at your option) any later version.
15 
16  This program is distributed in the hope that it will be useful,
17  but WITHOUT ANY WARRANTY; without even the implied warranty of
18  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19  GNU General Public License for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with this program; if not, write to the Free Software
23  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
24  ******************************************************************************/
25 
26 // KTTS includes.
27 #include "addtalker.h"
28 #include "talkerwidget.h"
29 
30 // Qt includes.
31 #include <QtGui/QDialog>
32 
33 // KDE includes.
34 #include <klocale.h>
35 
36 AddTalker::AddTalker(QWidget* parent)
37  : KDialog(parent)
38 {
39  this->setCaption(i18n("Add Talker"));
40  this->setButtons(KDialog::Help|KDialog::Ok|KDialog::Cancel);
41  this->setDefaultButton(KDialog::Ok);
42  this->enableButtonOk(false);
43  this->setHelp(QLatin1String( "select-plugin" ), QLatin1String( "jovie" ));
44 
45  mWidget = new TalkerWidget(this);
46  connect(mWidget, SIGNAL(talkerChanged()), this, SLOT(slotTalkerChanged()));
47  this->setMainWidget(mWidget);
48 }
49 
50 AddTalker::~AddTalker()
51 {
52  delete mWidget;
53 }
54 
55 void AddTalker::setTalkerCode(const TalkerCode &talker)
56 {
57  mWidget->setTalkerCode(talker);
58 }
59 
60 TalkerCode AddTalker::getTalkerCode() const
61 {
62  return mWidget->getTalkerCode();
63 }
64 
65 void AddTalker::slotTalkerChanged()
66 {
67  this->enableButtonOk(!mWidget->getName().isEmpty());
68 }
69 
70 #include "addtalker.moc"
71 
talkerwidget.h
TalkerWidget::getTalkerCode
TalkerCode getTalkerCode() const
Returns user's chosen talker configuration.
Definition: talkerwidget.cpp:160
QWidget
KDialog
AddTalker::setTalkerCode
void setTalkerCode(const TalkerCode &talker)
Set the talker configuration to start with.
Definition: addtalker.cpp:55
AddTalker::AddTalker
AddTalker(QWidget *parent=0)
Constructor.
Definition: addtalker.cpp:36
TalkerWidget::setTalkerCode
void setTalkerCode(const TalkerCode &talker)
Set the talker configuration to start with.
Definition: talkerwidget.cpp:130
TalkerCode
Definition: talkercode.h:38
TalkerWidget::getName
QString getName() const
Get the talker's name.
Definition: talkerwidget.cpp:155
AddTalker::~AddTalker
~AddTalker()
Destructor.
Definition: addtalker.cpp:50
AddTalker::getTalkerCode
TalkerCode getTalkerCode() const
Returns user's chosen talker configuration.
Definition: addtalker.cpp:60
addtalker.h
TalkerWidget
Definition: talkerwidget.h:40
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:32:25 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