• 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
  • jovie
filtermgr.h
Go to the documentation of this file.
1 /***************************************************** vim:set ts=4 sw=4 sts=4:
2  Description:
3  Filters text, applying each configured Filter in turn.
4  Runs asynchronously, emitting Finished() signal when all Filters have run.
5 
6  Copyright:
7  (C) 2005 by Gary Cramblitt <garycramblitt@comcast.net>
8  (C) 2009 by Jeremy Whiting <jpwhiting@kde.org>
9  -------------------
10  Original author: Gary Cramblitt <garycramblitt@comcast.net>
11 
12  This program is free software; you can redistribute it and/or modify
13  it under the terms of the GNU General Public License as published by
14  the Free Software Foundation; either version 2 of the License, or
15  (at your option) any later version.
16 
17  This program is distributed in the hope that it will be useful,
18  but WITHOUT ANY WARRANTY; without even the implied warranty of
19  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20  GNU General Public License for more details.
21 
22  You should have received a copy of the GNU General Public License
23  along with this program; if not, write to the Free Software
24  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
25  ******************************************************************************/
26 
27 #ifndef FILTERMGR_H
28 #define FILTERMGR_H
29 
30 // Qt includes.
31 #include <QtCore/QList>
32 
33 // KTTS includes.
34 #include "filterproc.h"
35 
36 class TalkerCode;
37 
38 typedef QList<KttsFilterProc*> FilterList;
39 
40 class FilterMgr : public KttsFilterProc
41 {
42  Q_OBJECT
43 
44  public:
48  explicit FilterMgr(QObject *parent = 0);
49 
53  ~FilterMgr();
54 
62  virtual bool init();
63 
74  virtual QString convert(const QString& inputText, TalkerCode* talkerCode, const QString& appId);
75 
76  private:
77  // Loads the processing plug in for a named filter plug in.
78  KttsFilterProc* loadFilterPlugin(const QString& plugInName);
79  // Finishes up with current filter (if any) and goes on to the next filter.
80  void nextFilter();
81  // Uses KTrader to convert a translated Filter Plugin Name to DesktopEntryName.
82  // @param name The translated plugin name. From Name= line in .desktop file.
83  // @return DesktopEntryName. The name of the .desktop file (less .desktop).
84  // QString() if not found.
85  QString FilterNameToDesktopEntryName(const QString& name);
86 
87  // List of filters.
88  FilterList m_filterList;
89  // Text being filtered.
90  QString m_text;
91  // Index to list of filters.
92  int m_filterIndex;
93  // Current filter.
94  KttsFilterProc* m_filterProc;
95  // Talker Code.
96  TalkerCode* m_talkerCode;
97  // AppId.
98  QString m_appId;
99  // FilterMgr state.
100  int m_state;
101 };
102 
103 #endif // FILTERMGR_H
FilterList
QList< KttsFilterProc * > FilterList
Definition: filtermgr.h:36
QObject
FilterMgr::convert
virtual QString convert(const QString &inputText, TalkerCode *talkerCode, const QString &appId)
Synchronously convert text.
Definition: filtermgr.cpp:126
filterproc.h
KttsFilterProc
Definition: filterproc.h:38
FilterMgr::~FilterMgr
~FilterMgr()
Destructor.
Definition: filtermgr.cpp:54
FilterMgr::init
virtual bool init()
Initialize the filters.
Definition: filtermgr.cpp:65
FilterMgr::FilterMgr
FilterMgr(QObject *parent=0)
Constructor.
Definition: filtermgr.cpp:43
TalkerCode
Definition: talkercode.h:38
FilterMgr
Definition: filtermgr.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