summaryrefslogtreecommitdiffstats
path: root/ksim
diff options
context:
space:
mode:
Diffstat (limited to 'ksim')
-rw-r--r--ksim/ksimview.cpp4
-rw-r--r--ksim/ksimview.h4
-rw-r--r--ksim/library/ksimconfig.cpp6
-rw-r--r--ksim/library/ksimconfig.h8
-rw-r--r--ksim/library/pluginmodule.cpp12
-rw-r--r--ksim/library/pluginmodule.h6
-rw-r--r--ksim/library/themeloader.cpp20
-rw-r--r--ksim/library/themeloader.h6
-rw-r--r--ksim/monitors/i8k/ksimi8k.cpp10
-rw-r--r--ksim/monitors/i8k/ksimi8k.h6
-rw-r--r--ksim/monitors/lm_sensors/ksimsensors.h2
-rw-r--r--ksim/monitors/snmp/chartmonitor.cpp2
-rw-r--r--ksim/monitors/snmp/configpage.cpp6
-rw-r--r--ksim/monitors/snmp/hostconfig.cpp10
-rw-r--r--ksim/monitors/snmp/hostconfig.h12
-rw-r--r--ksim/monitors/snmp/monitorconfig.cpp8
-rw-r--r--ksim/monitors/snmp/monitorconfig.h10
-rw-r--r--ksim/monitors/snmp/view.cpp2
18 files changed, 67 insertions, 67 deletions
diff --git a/ksim/ksimview.cpp b/ksim/ksimview.cpp
index 8b991f2..572579c 100644
--- a/ksim/ksimview.cpp
+++ b/ksim/ksimview.cpp
@@ -63,7 +63,7 @@
#define MAXHOSTNAMELEN 64
#endif
-KSim::MainView::MainView(KConfig *config,
+KSim::MainView::MainView(TDEConfig *config,
bool loadPlugins, KSim::PanelExtension *topLevel,
const char *name) : DCOPObject("KSim"),
TQWidget(topLevel, name)
@@ -272,7 +272,7 @@ void KSim::MainView::reparseConfig(bool emitReload,
for (plugin = pluginList.begin(); plugin != pluginList.end(); ++plugin) {
if ((*plugin).configPage()) {
(*plugin).configPage()->saveConfig();
- KConfig *conf = (*plugin).configPage()->config();
+ TDEConfig *conf = (*plugin).configPage()->config();
if (conf) conf->sync();
}
diff --git a/ksim/ksimview.h b/ksim/ksimview.h
index c0404b8..7495076 100644
--- a/ksim/ksimview.h
+++ b/ksim/ksimview.h
@@ -33,7 +33,7 @@ class TQHBoxLayout;
class TQVBoxLayout;
class TQPopupMenu;
class KDesktopFile;
-class KConfig;
+class TDEConfig;
namespace KSim
{
@@ -52,7 +52,7 @@ namespace KSim
//
K_DCOP
public:
- MainView(KConfig *config, bool loadPlugins,
+ MainView(TDEConfig *config, bool loadPlugins,
KSim::PanelExtension *topLevel,
const char *name);
diff --git a/ksim/library/ksimconfig.cpp b/ksim/library/ksimconfig.cpp
index 2fd136e..3619f90 100644
--- a/ksim/library/ksimconfig.cpp
+++ b/ksim/library/ksimconfig.cpp
@@ -24,9 +24,9 @@
#include "ksimconfig.h"
#include "themeloader.h"
-KConfig *KSim::Config::mainConfig = 0;
+TDEConfig *KSim::Config::mainConfig = 0;
-KSim::Config::Config(KConfig *config)
+KSim::Config::Config(TDEConfig *config)
{
mainConfig = config;
}
@@ -35,7 +35,7 @@ KSim::Config::~Config()
{
}
-KConfig *KSim::Config::config()
+TDEConfig *KSim::Config::config()
{
return mainConfig;
}
diff --git a/ksim/library/ksimconfig.h b/ksim/library/ksimconfig.h
index c831f35..8f7376d 100644
--- a/ksim/library/ksimconfig.h
+++ b/ksim/library/ksimconfig.h
@@ -26,7 +26,7 @@
#include <kdemacros.h>
-class KConfig;
+class TDEConfig;
namespace KSim
{
@@ -36,10 +36,10 @@ namespace KSim
class KDE_EXPORT Config
{
public:
- Config(KConfig *config);
+ Config(TDEConfig *config);
~Config();
- static KConfig *config();
+ static TDEConfig *config();
int width(int defaultWidth) const;
void setWidth(int width);
@@ -103,7 +103,7 @@ namespace KSim
void setReColourThemes(bool);
private:
- static KConfig *mainConfig;
+ static TDEConfig *mainConfig;
};
}
#endif
diff --git a/ksim/library/pluginmodule.cpp b/ksim/library/pluginmodule.cpp
index abe6609..74128d9 100644
--- a/ksim/library/pluginmodule.cpp
+++ b/ksim/library/pluginmodule.cpp
@@ -76,7 +76,7 @@ const TQString &KSim::PluginObject::configFileName() const
class KSim::PluginPage::Private
{
public:
- KConfig *config;
+ TDEConfig *config;
KSim::PluginObject *parent;
};
@@ -86,7 +86,7 @@ KSim::PluginPage::PluginPage(KSim::PluginObject *parent, const char *name)
d = new PluginPage::Private;
d->parent = parent;
if (parent && !parent->configFileName().isEmpty())
- d->config = new KConfig(parent->configFileName() + "rc");
+ d->config = new TDEConfig(parent->configFileName() + "rc");
else {
kdWarning() << className() << ": Can not create the config() "
"pointer due to the parent being null" << endl;
@@ -100,7 +100,7 @@ KSim::PluginPage::~PluginPage()
delete d;
}
-KConfig *KSim::PluginPage::config() const
+TDEConfig *KSim::PluginPage::config() const
{
if (d)
return d->config;
@@ -113,7 +113,7 @@ class KSim::PluginView::Private
public:
PluginObject *parent;
TQPopupMenu *popupMenu;
- KConfig *config;
+ TDEConfig *config;
};
KSim::PluginView::PluginView(KSim::PluginObject *parent, const char *name)
@@ -126,7 +126,7 @@ KSim::PluginView::PluginView(KSim::PluginObject *parent, const char *name)
TQT_SLOT(showAbout()), 0, -1, 0);
if (parent && !parent->configFileName().isEmpty())
- d->config = new KConfig(parent->configFileName() + "rc");
+ d->config = new TDEConfig(parent->configFileName() + "rc");
else {
kdWarning() << className() << ": Can not create the config() "
"pointer due to the parent being null" << endl;
@@ -142,7 +142,7 @@ KSim::PluginView::~PluginView()
d = 0;
}
-KConfig *KSim::PluginView::config() const
+TDEConfig *KSim::PluginView::config() const
{
return d->config;
}
diff --git a/ksim/library/pluginmodule.h b/ksim/library/pluginmodule.h
index 78cc21b..b93a98e 100644
--- a/ksim/library/pluginmodule.h
+++ b/ksim/library/pluginmodule.h
@@ -25,7 +25,7 @@
#include <kdemacros.h>
class TQPopupMenu;
-class KConfig;
+class TDEConfig;
#define KSIM_INIT_PLUGIN(className) \
extern "C" { \
@@ -139,7 +139,7 @@ namespace KSim
* use this to get a config object unique to the plugin name,
* eg: the plugin foo would have the config file foorc
*/
- KConfig *config() const;
+ TDEConfig *config() const;
signals:
void pageChanged();
@@ -178,7 +178,7 @@ namespace KSim
* use this to get a config object unique to the plugin name,
* eg: the plugin foo would have the config file foorc
*/
- KConfig *config() const;
+ TDEConfig *config() const;
/**
* the plugins popup menu
*/
diff --git a/ksim/library/themeloader.cpp b/ksim/library/themeloader.cpp
index 60e2031..947ba73 100644
--- a/ksim/library/themeloader.cpp
+++ b/ksim/library/themeloader.cpp
@@ -47,7 +47,7 @@ class KSim::Theme::Private
TQStringList file;
TQStringList dFile;
- KConfig *globalReader;
+ TDEConfig *globalReader;
TQString altTheme;
TQString location;
const TQValueVector<TQString> &fileNames;
@@ -94,7 +94,7 @@ class KSim::ThemeLoader::Private
public:
TQValueVector<TQString> fileNames;
TQStringList imageTypes;
- KConfig *globalReader;
+ TDEConfig *globalReader;
bool recolour;
TQColor pixelColour;
};
@@ -764,7 +764,7 @@ KSim::Theme::Theme()
KSim::Theme::Theme(const TQString &url, const TQString &fileName, int alt,
const TQValueVector<TQString> &vector, const TQStringList &list,
- KConfig *globalReader)
+ TDEConfig *globalReader)
{
create(vector, list, globalReader);
init(url, fileName, alt);
@@ -774,7 +774,7 @@ KSim::Theme::Theme(const TQString &url, const TQString &fileName, int alt,
}
void KSim::Theme::create(const TQValueVector<TQString> &vector,
- const TQStringList &list, KConfig *globalReader)
+ const TQStringList &list, TDEConfig *globalReader)
{
d = new Private(vector, list);
d->globalReader = globalReader;
@@ -917,7 +917,7 @@ void KSim::ThemeLoader::reload()
if (currentUrl() != defaultUrl()) {
if (!d->globalReader)
- d->globalReader = new KConfig(defaultUrl() + "gkrellmrc_ksim");
+ d->globalReader = new TDEConfig(defaultUrl() + "gkrellmrc_ksim");
}
else {
delete d->globalReader;
@@ -998,24 +998,24 @@ TQString KSim::ThemeLoader::parseConfig(const TQString &url,
TQString line(origStream.readLine().simplifyWhiteSpace());
if (line.find(reg) == 0) // find the location of the * comments
- // replace all * comments with # comments so KConfig doesn't complain
+ // replace all * comments with # comments so TDEConfig doesn't complain
line.replace(reg, "#");
if (line.find("#") == -1) { // find the location of the string 'gkrellmms'
if (line.findRev("=") == -1) { // if found we check for the string '='
int numLoc = line.findRev(numbers);
if (numLoc != -1)
- // if '=' doesn't exist we add one so KConfig doesn't complain
+ // if '=' doesn't exist we add one so TDEConfig doesn't complain
line.insert(numLoc, " = ");
numLoc = line.findRev(number);
if (numLoc != -1)
- // if '=' doesn't exist we add one so KConfig doesn't complain
+ // if '=' doesn't exist we add one so TDEConfig doesn't complain
line.insert(numLoc, " = ");
numLoc = line.findRev(minus);
if (numLoc != -1)
- // replace the '-' with an '=' so KConfig doesn't get confused
+ // replace the '-' with an '=' so TDEConfig doesn't get confused
line.replace(TQRegExp("-"), "=");
}
}
@@ -1186,7 +1186,7 @@ KSim::ThemeLoader::ThemeLoader()
d->imageTypes << "png" << "jpg" << "jpeg" << "xpm" << "gif";
if (currentUrl() != defaultUrl())
- d->globalReader = new KConfig(defaultUrl() + "gkrellmrc_ksim");
+ d->globalReader = new TDEConfig(defaultUrl() + "gkrellmrc_ksim");
else
d->globalReader = 0;
diff --git a/ksim/library/themeloader.h b/ksim/library/themeloader.h
index 9206583..89ac67b 100644
--- a/ksim/library/themeloader.h
+++ b/ksim/library/themeloader.h
@@ -30,7 +30,7 @@
class TQStringList;
template<class> class TQValueVector;
-class KConfig;
+class TDEConfig;
class TQWidget;
namespace KSim
@@ -372,8 +372,8 @@ namespace KSim
Theme();
Theme(const TQString &url, const TQString &fileName, int alt,
const TQValueVector<TQString> &vector, const TQStringList &list,
- KConfig *globalReader);
- void create(const TQValueVector<TQString> &, const TQStringList &, KConfig *);
+ TDEConfig *globalReader);
+ void create(const TQValueVector<TQString> &, const TQStringList &, TDEConfig *);
void init(const TQString &url, const TQString &fileName, int alt);
void reparse(const TQString &url, const TQString &fileName, int alt);
TQString parseConfig(const TQString &, const TQString &);
diff --git a/ksim/monitors/i8k/ksimi8k.cpp b/ksim/monitors/i8k/ksimi8k.cpp
index 211fd4d..eb7f7ee 100644
--- a/ksim/monitors/i8k/ksimi8k.cpp
+++ b/ksim/monitors/i8k/ksimi8k.cpp
@@ -54,7 +54,7 @@ KSim::PluginView *I8KPlugin::createView(const char *className)
KSim::PluginPage *I8KPlugin::createConfigPage(const char *className)
{
- return new I8KConfig(this, className);
+ return new I8TDEConfig(this, className);
}
void I8KPlugin::showAbout()
@@ -208,7 +208,7 @@ void I8KView::updateView()
.arg( m_unit ) );
}
-I8KConfig::I8KConfig(KSim::PluginObject *parent, const char *name)
+I8TDEConfig::I8TDEConfig(KSim::PluginObject *parent, const char *name)
: KSim::PluginPage(parent, name)
{
m_unit = new TQCheckBox( i18n( "Show temperature in Fahrenheit" ),
@@ -228,11 +228,11 @@ I8KConfig::I8KConfig(KSim::PluginObject *parent, const char *name)
layout->setRowStretch( 2, 1 );
}
-I8KConfig::~I8KConfig()
+I8TDEConfig::~I8TDEConfig()
{
}
-void I8KConfig::readConfig()
+void I8TDEConfig::readConfig()
{
config()->setGroup("I8KPlugin");
@@ -243,7 +243,7 @@ void I8KConfig::readConfig()
m_interval->setValue( interval );
}
-void I8KConfig::saveConfig()
+void I8TDEConfig::saveConfig()
{
config()->setGroup("I8KPlugin");
diff --git a/ksim/monitors/i8k/ksimi8k.h b/ksim/monitors/i8k/ksimi8k.h
index 09296ec..9c1ce1a 100644
--- a/ksim/monitors/i8k/ksimi8k.h
+++ b/ksim/monitors/i8k/ksimi8k.h
@@ -79,13 +79,13 @@ class I8KView : public KSim::PluginView
TQRegExp *m_reData;
};
-class I8KConfig : public KSim::PluginPage
+class I8TDEConfig : public KSim::PluginPage
{
Q_OBJECT
public:
- I8KConfig(KSim::PluginObject *parent, const char *name);
- ~I8KConfig();
+ I8TDEConfig(KSim::PluginObject *parent, const char *name);
+ ~I8TDEConfig();
virtual void saveConfig();
virtual void readConfig();
diff --git a/ksim/monitors/lm_sensors/ksimsensors.h b/ksim/monitors/lm_sensors/ksimsensors.h
index 4f66a8b..9c1e801 100644
--- a/ksim/monitors/lm_sensors/ksimsensors.h
+++ b/ksim/monitors/lm_sensors/ksimsensors.h
@@ -24,7 +24,7 @@
#include <label.h>
#include "ksimsensorsiface.h"
-class KConfig;
+class TDEConfig;
class SensorList;
class TDEInstance;
diff --git a/ksim/monitors/snmp/chartmonitor.cpp b/ksim/monitors/snmp/chartmonitor.cpp
index 1679eb6..47f5864 100644
--- a/ksim/monitors/snmp/chartmonitor.cpp
+++ b/ksim/monitors/snmp/chartmonitor.cpp
@@ -51,7 +51,7 @@ void ChartMonitor::setData( const Value &data )
setValue( currentValue );
if ( m_config.displayCurrentValueInline ) {
TQ_UINT64 bytesPerSec = currentValue / ( m_config.refreshInterval.seconds + m_config.refreshInterval.minutes * 60 );
- setText( KIO::convertSize( bytesPerSec ), 0 );
+ setText( TDEIO::convertSize( bytesPerSec ), 0 );
}
}
diff --git a/ksim/monitors/snmp/configpage.cpp b/ksim/monitors/snmp/configpage.cpp
index ee50054..8e4102f 100644
--- a/ksim/monitors/snmp/configpage.cpp
+++ b/ksim/monitors/snmp/configpage.cpp
@@ -76,7 +76,7 @@ ConfigPage::~ConfigPage()
void ConfigPage::saveConfig()
{
- KConfig &cfg = *config();
+ TDEConfig &cfg = *config();
// collect garbage
removeAllHostGroups();
@@ -92,7 +92,7 @@ void ConfigPage::saveConfig()
void ConfigPage::readConfig()
{
- KConfig &cfg = *config();
+ TDEConfig &cfg = *config();
cfg.setGroup( "General" );
TQStringList hosts = cfg.readListEntry( "Hosts" );
@@ -274,7 +274,7 @@ void ConfigPage::removeAllMonitorGroups()
void ConfigPage::removeConfigGroups( const TQString &prefix )
{
- KConfig &cfg = *config();
+ TDEConfig &cfg = *config();
TQStringList groups = cfg.groupList();
for ( TQStringList::ConstIterator it = groups.begin(); it != groups.end(); ++it )
diff --git a/ksim/monitors/snmp/hostconfig.cpp b/ksim/monitors/snmp/hostconfig.cpp
index 1188c12..844bee5 100644
--- a/ksim/monitors/snmp/hostconfig.cpp
+++ b/ksim/monitors/snmp/hostconfig.cpp
@@ -33,7 +33,7 @@ static int defaultSnmpPort()
return ent->s_port;
}
-bool HostConfig::load( KConfigBase &config )
+bool HostConfig::load( TDEConfigBase &config )
{
name = config.readEntry( "Host" );
if ( name.isEmpty() )
@@ -76,7 +76,7 @@ bool HostConfig::load( KConfigBase &config )
return true;
}
-void HostConfig::save( KConfigBase &config ) const
+void HostConfig::save( TDEConfigBase &config ) const
{
if ( isNull() )
return;
@@ -109,7 +109,7 @@ void HostConfig::save( KConfigBase &config ) const
writeIfNotEmpty( config, "PrivPassphrase", KStringHandler::obscure( privacy.key ) );
}
-void HostConfig::writeIfNotEmpty( KConfigBase &config, const TQString &name, const TQString &value )
+void HostConfig::writeIfNotEmpty( TDEConfigBase &config, const TQString &name, const TQString &value )
{
if ( value.isEmpty() )
return;
@@ -117,7 +117,7 @@ void HostConfig::writeIfNotEmpty( KConfigBase &config, const TQString &name, con
config.writeEntry( name, value );
}
-void HostConfigMap::load( KConfigBase &config, const TQStringList &hosts )
+void HostConfigMap::load( TDEConfigBase &config, const TQStringList &hosts )
{
clear();
@@ -132,7 +132,7 @@ void HostConfigMap::load( KConfigBase &config, const TQStringList &hosts )
}
}
-TQStringList HostConfigMap::save( KConfigBase &config ) const
+TQStringList HostConfigMap::save( TDEConfigBase &config ) const
{
TQStringList hostList;
diff --git a/ksim/monitors/snmp/hostconfig.h b/ksim/monitors/snmp/hostconfig.h
index af8a0fd..3726eb5 100644
--- a/ksim/monitors/snmp/hostconfig.h
+++ b/ksim/monitors/snmp/hostconfig.h
@@ -31,7 +31,7 @@ namespace Snmp
struct HostConfig
{
HostConfig() {}
- HostConfig( KConfigBase &config )
+ HostConfig( TDEConfigBase &config )
{ load( config ); }
TQString name; // hostname
@@ -56,8 +56,8 @@ struct HostConfig
TQString key;
} privacy;
- bool load( KConfigBase &config );
- void save( KConfigBase &config ) const;
+ bool load( TDEConfigBase &config );
+ void save( TDEConfigBase &config ) const;
bool isNull() const { return name.isEmpty(); }
@@ -65,7 +65,7 @@ struct HostConfig
{ return name == rhs.name; }
private:
- static void writeIfNotEmpty( KConfigBase &config, const TQString &name, const TQString &value );
+ static void writeIfNotEmpty( TDEConfigBase &config, const TQString &name, const TQString &value );
};
struct HostConfigMap : public TQMap< TQString, HostConfig >
@@ -74,8 +74,8 @@ struct HostConfigMap : public TQMap< TQString, HostConfig >
HostConfigMap( const TQMap< TQString, HostConfig > &rhs )
: TQMap< TQString, HostConfig >( rhs ) {}
- void load( KConfigBase &config, const TQStringList &hosts );
- TQStringList save( KConfigBase &config ) const;
+ void load( TDEConfigBase &config, const TQStringList &hosts );
+ TQStringList save( TDEConfigBase &config ) const;
};
}
diff --git a/ksim/monitors/snmp/monitorconfig.cpp b/ksim/monitors/snmp/monitorconfig.cpp
index 6ab85b6..d2dee45 100644
--- a/ksim/monitors/snmp/monitorconfig.cpp
+++ b/ksim/monitors/snmp/monitorconfig.cpp
@@ -33,7 +33,7 @@ MonitorConfig::MonitorConfig()
displayCurrentValueInline = false;
}
-bool MonitorConfig::load( KConfigBase &config, const HostConfigMap &hosts )
+bool MonitorConfig::load( TDEConfigBase &config, const HostConfigMap &hosts )
{
TQString hostName = config.readEntry( "Host" );
if ( hostName.isEmpty() )
@@ -74,7 +74,7 @@ bool MonitorConfig::load( KConfigBase &config, const HostConfigMap &hosts )
return true;
}
-void MonitorConfig::save( KConfigBase &config ) const
+void MonitorConfig::save( TDEConfigBase &config ) const
{
if ( isNull() )
return;
@@ -148,7 +148,7 @@ TQStringList KSim::Snmp::allDisplayTypes()
return TQStringList() << "Label" << "Chart";
}
-void MonitorConfigMap::load( KConfigBase &config, const TQStringList &names, const HostConfigMap &hosts )
+void MonitorConfigMap::load( TDEConfigBase &config, const TQStringList &names, const HostConfigMap &hosts )
{
clear();
@@ -163,7 +163,7 @@ void MonitorConfigMap::load( KConfigBase &config, const TQStringList &names, con
}
}
-TQStringList MonitorConfigMap::save( KConfigBase &config ) const
+TQStringList MonitorConfigMap::save( TDEConfigBase &config ) const
{
TQStringList names;
diff --git a/ksim/monitors/snmp/monitorconfig.h b/ksim/monitors/snmp/monitorconfig.h
index cf2d525..5ad6a32 100644
--- a/ksim/monitors/snmp/monitorconfig.h
+++ b/ksim/monitors/snmp/monitorconfig.h
@@ -33,11 +33,11 @@ struct MonitorConfig
enum DisplayType { Label = 0, Chart };
MonitorConfig();
- MonitorConfig( KConfigBase &config, const HostConfigMap &hosts )
+ MonitorConfig( TDEConfigBase &config, const HostConfigMap &hosts )
{ load( config, hosts ); }
- bool load( KConfigBase &config, const HostConfigMap &hosts );
- void save( KConfigBase &config ) const;
+ bool load( TDEConfigBase &config, const HostConfigMap &hosts );
+ void save( TDEConfigBase &config ) const;
bool isNull() const { return name.isEmpty() || host.isNull(); }
@@ -65,8 +65,8 @@ struct MonitorConfigMap : public TQMap< TQString, MonitorConfig >
MonitorConfigMap( const TQMap< TQString, MonitorConfig > &rhs )
: TQMap< TQString, MonitorConfig >( rhs ) {}
- void load( KConfigBase &config, const TQStringList &names, const HostConfigMap &hosts );
- TQStringList save( KConfigBase &config ) const;
+ void load( TDEConfigBase &config, const TQStringList &names, const HostConfigMap &hosts );
+ TQStringList save( TDEConfigBase &config ) const;
};
typedef TQValueList<MonitorConfig> MonitorConfigList;
diff --git a/ksim/monitors/snmp/view.cpp b/ksim/monitors/snmp/view.cpp
index 9515645..ec26949 100644
--- a/ksim/monitors/snmp/view.cpp
+++ b/ksim/monitors/snmp/view.cpp
@@ -47,7 +47,7 @@ void View::reparseConfig()
m_widgets.clear();
m_widgets.setAutoDelete( false );
- KConfig &cfg = *config();
+ TDEConfig &cfg = *config();
cfg.setGroup( "General" );
TQStringList allHosts = cfg.readListEntry( "Hosts" );
TQStringList monitors = cfg.readListEntry( "Monitors" );