summaryrefslogtreecommitdiffstats
path: root/src/option.h
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2013-09-23 00:57:37 +0200
committerSlávek Banko <slavek.banko@axis.cz>2013-09-23 00:57:37 +0200
commit27a1284b96f1542cf60d3501380fd115018e3983 (patch)
treedf3fb83b75fe3173505f85dbeeadf6961588f740 /src/option.h
parente03da7a558d79e399e3704a5b2f35646e92dacb7 (diff)
downloadtdeio-sword-27a1284b96f1542cf60d3501380fd115018e3983.tar.gz
tdeio-sword-27a1284b96f1542cf60d3501380fd115018e3983.zip
Initial TDE conversion
Diffstat (limited to 'src/option.h')
-rw-r--r--src/option.h20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/option.h b/src/option.h
index 9728270..c71d95c 100644
--- a/src/option.h
+++ b/src/option.h
@@ -24,7 +24,7 @@
#ifndef option_h
#define option_h
-#include <kconfig.h>
+#include <tdeconfig.h>
#include <ntqstring.h>
#include <ntqmap.h>
@@ -36,8 +36,8 @@ namespace KioSword
public:
virtual void readFromQueryString(TQMap<TQString, TQString> params, bool allowPropagating) = 0;
virtual void getQueryStringPair(TQString& name, TQString& val) = 0;
- virtual void readFromConfig(const KConfig* config) = 0;
- virtual void saveToConfig(KConfig* config) = 0;
+ virtual void readFromConfig(const TDEConfig* config) = 0;
+ virtual void saveToConfig(TDEConfig* config) = 0;
virtual void copy(const OptionBase* other) = 0;
virtual ~OptionBase() {};
@@ -75,7 +75,7 @@ namespace KioSword
}
/** return the config setting */
- T readConfigSetting(const KConfig* config)
+ T readConfigSetting(const TDEConfig* config)
{
// We will specialise this later
T result;
@@ -186,7 +186,7 @@ namespace KioSword
}
/** read and set the value from the config file, or set to default if no config setting */
- virtual void readFromConfig(const KConfig* config)
+ virtual void readFromConfig(const TDEConfig* config)
{
if (!m_configName.isEmpty())
{
@@ -200,11 +200,11 @@ namespace KioSword
}
/** save the value to the config file */
- virtual void saveToConfig(KConfig* config)
+ virtual void saveToConfig(TDEConfig* config)
{
if (!m_configName.isEmpty())
{
- // overloads for KConfig::writeEntry cater
+ // overloads for TDEConfig::writeEntry cater
// for everything we need so far
if (m_value != m_default_value) // keep settings file tidy
{
@@ -279,19 +279,19 @@ namespace KioSword
// readConfigSetting specialisations
template<>
- inline bool Option<bool>::readConfigSetting(const KConfig* config)
+ inline bool Option<bool>::readConfigSetting(const TDEConfig* config)
{
return config->readBoolEntry(m_configName, m_default_value);
}
template<>
- inline TQString Option<TQString>::readConfigSetting(const KConfig* config)
+ inline TQString Option<TQString>::readConfigSetting(const TDEConfig* config)
{
return config->readEntry(m_configName, m_default_value);
}
template<>
- inline int Option<int>::readConfigSetting(const KConfig* config)
+ inline int Option<int>::readConfigSetting(const TDEConfig* config)
{
return config->readNumEntry(m_configName, m_default_value);
}