mirror of
https://bitbucket.org/smil3y/kdelibs.git
synced 2025-02-24 10:52:49 +00:00

Katana (or any interface designed around key and mouse events) is not for blind people, trying to slap text-to-speech on top of it was the wrong thing to do to begin with side note: speech-dispatcher tends to hang if the output device is not configured properly (i.e. editing /etc/speech-dispatcher/speechd.conf manually) Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
61 lines
1.7 KiB
C++
61 lines
1.7 KiB
C++
/* This file is part of the KDE project
|
|
Copyright (C) 2005-2006 by Olivier Goffart <ogoffart at kde.org>
|
|
|
|
|
|
This library is free software; you can redistribute it and/or
|
|
modify it under the terms of the GNU Library General Public
|
|
License version 2 as published by the Free Software Foundation.
|
|
|
|
This library is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
Library General Public License for more details.
|
|
|
|
You should have received a copy of the GNU Library General Public License
|
|
along with this library; see the file COPYING.LIB. If not, write to
|
|
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
|
Boston, MA 02110-1301, USA.
|
|
|
|
*/
|
|
|
|
#include "knotifyconfigelement.h"
|
|
|
|
#include <kconfiggroup.h>
|
|
#include <kconfig.h>
|
|
#include <kdebug.h>
|
|
#include <kstandarddirs.h>
|
|
#include <kservice.h>
|
|
|
|
KNotifyConfigElement::KNotifyConfigElement(const QString &eventid, KConfig *config)
|
|
: m_config( new KConfigGroup(config , "Event/" + eventid) )
|
|
{
|
|
}
|
|
|
|
KNotifyConfigElement::~KNotifyConfigElement()
|
|
{
|
|
delete m_config;
|
|
}
|
|
|
|
QString KNotifyConfigElement::readEntry( const QString & entry, bool path )
|
|
{
|
|
if(m_cache.contains(entry))
|
|
return m_cache[entry];
|
|
return path ? m_config->readPathEntry(entry, QString()) :
|
|
m_config->readEntry(entry, QString());
|
|
}
|
|
|
|
void KNotifyConfigElement::writeEntry( const QString & entry, const QString &data )
|
|
{
|
|
m_cache[entry]=data;
|
|
}
|
|
|
|
void KNotifyConfigElement::save( )
|
|
{
|
|
QMapIterator<QString, QString> it(m_cache);
|
|
while(it.hasNext())
|
|
{
|
|
it.next();
|
|
m_config->writeEntry(it.key() , it.value() );
|
|
}
|
|
m_config->sync();
|
|
}
|