Rename KCModule, KConfig, KIO, KServer, and KSocket to avoid conflicts with KDE4

pull/1/head
Timothy Pearson 12 years ago
parent 2178da111f
commit 9ea931fb1b

@ -111,7 +111,7 @@ protected:
enum State { Focus, Blur, Normal, Sleeping, Waking, Destroy };
bool readConfig();
void readGroupConfig(KConfigBase &config, TQPtrList<AmorAnim> &animList,
void readGroupConfig(TDEConfigBase &config, TQPtrList<AmorAnim> &animList,
const char *seq);
void showBubble();
AmorAnim *randomAnimation(TQPtrList<AmorAnim> &animList);

@ -34,7 +34,7 @@
//
// Constructor
//
AmorAnim::AmorAnim(KConfigBase &config)
AmorAnim::AmorAnim(TDEConfigBase &config)
: mMaximumSize(0, 0)
{
mCurrent = 0;
@ -69,7 +69,7 @@ const TQPixmap *AmorAnim::frame()
// Read a single animation's parameters. The config class should already
// have its group set to the animation that is to be read.
//
void AmorAnim::readConfig(KConfigBase &config)
void AmorAnim::readConfig(TDEConfigBase &config)
{
// Read the list of frames to display and load them into the pixmap
// manager.

@ -46,7 +46,7 @@
class AmorAnim
{
public:
AmorAnim(KConfigBase &config);
AmorAnim(TDEConfigBase &config);
virtual ~AmorAnim();
void reset()
@ -71,7 +71,7 @@ public:
const TQPixmap *frame();
protected:
void readConfig(KConfigBase &config);
void readConfig(TDEConfigBase &config);
protected:
unsigned int mCurrent; // current frame in sequence

@ -48,8 +48,8 @@ AmorConfig::AmorConfig()
//
void AmorConfig::read()
{
KConfig *config = kapp->config();
KConfigGroupSaver cs(config, "General");
TDEConfig *config = kapp->config();
TDEConfigGroupSaver cs(config, "General");
mOnTop = config->readBoolEntry("OnTop", false);
mOffset = config->readNumEntry("Offset", 0);
@ -66,8 +66,8 @@ void AmorConfig::read()
//
void AmorConfig::write()
{
KConfig *config = kapp->config();
KConfigGroupSaver cs(config, "General");
TDEConfig *config = kapp->config();
TDEConfigGroupSaver cs(config, "General");
config->writeEntry("OnTop", mOnTop);
config->writeEntry("Offset", mOffset);

@ -251,8 +251,8 @@ void AmorDialog::slotApply()
void AmorDialog::slotCancel()
{
// restore offset
KConfig *config = kapp->config();
KConfigGroupSaver cs(config, "General");
TDEConfig *config = kapp->config();
TDEConfigGroupSaver cs(config, "General");
emit offsetChanged(config->readNumEntry("Offset"));
reject();
}

@ -66,7 +66,7 @@ MoonPAWidget::MoonPAWidget(const TQString& configFile, Type type, int actions,
TQWidget *parent, const char *name)
: KPanelApplet(configFile, type, actions, parent, name)
{
KConfig *config = TDEGlobal::config();
TDEConfig *config = TDEGlobal::config();
config->setGroup("General");
TQVBoxLayout *vbox = new TQVBoxLayout(this, 0,0);
@ -129,7 +129,7 @@ void MoonPAWidget::settings()
moon->setAngle(dlg.getAngle());
moon->setNorthHemi(dlg.getNorthHemi());
moon->setMask(dlg.getMask());
KConfig *config = TDEGlobal::config();
TDEConfig *config = TDEGlobal::config();
config->setGroup("General");
config->writeEntry("Rotation", moon->angle());
config->writeEntry("Northern", moon->northHemi());

@ -57,7 +57,7 @@ MoonWidget::MoonWidget(TQWidget *parent, const char *name)
time_t clock;
counter = -1;
KConfig *config = TDEGlobal::config();
TDEConfig *config = TDEGlobal::config();
config->setGroup("General");
_angle = config->readNumEntry("Rotation", 0);
_north = config->readBoolEntry("Northern", true);

@ -550,13 +550,13 @@ TQString Kodometer::FormatDistance(double &dist, Units unit)
}
/*
* Use KConfig to read all settings from disk. Note that whatever
* Use TDEConfig to read all settings from disk. Note that whatever
* happens here overrides the defaults, but there's not much
* sanity-checking.
*/
void Kodometer::readSettings(void)
{
KConfig* config = TDEGlobal::config();
TDEConfig* config = TDEGlobal::config();
config->setGroup("Settings");
UseMetric = config->readNumEntry("UseMetric", false);
@ -575,7 +575,7 @@ void Kodometer::readSettings(void)
*/
void Kodometer::saveSettings(void)
{
KConfig* config = TDEGlobal::config();
TDEConfig* config = TDEGlobal::config();
config->setGroup("Settings");
config->writeEntry("UseMetric", UseMetric);

@ -69,7 +69,7 @@ TopLevel::TopLevel() : KSystemTray()
teas.clear();
KConfig *config = kapp->config();
TDEConfig *config = kapp->config();
config->setGroup("Teas");
if (config->hasKey("Number")) {
@ -186,7 +186,7 @@ TopLevel::TopLevel() : KSystemTray()
/* (not currently needed)
void TopLevel::queryExit()
{
KConfig *config = kapp->config();
TDEConfig *config = kapp->config();
// config->sync();
}
*/
@ -409,7 +409,7 @@ void TopLevel::teaSelected(int index)
menu->setItemChecked(index, true);
current_selected = index;
KConfig *config = kapp->config();
TDEConfig *config = kapp->config();
config->setGroup("General");
config->writeEntry("Tea", current_selected);
}
@ -833,7 +833,7 @@ void TopLevel::config()
rebuildTeaMenus();
// and store to config
KConfig *config = kapp->config();
TDEConfig *config = kapp->config();
// remove old-style entries from default-group (if present)
if (config->hasKey("UserTea"))
config->deleteEntry("UserTea");

@ -99,7 +99,7 @@ KSpriteSetup::~KSpriteSetup()
// read settings from config file
void KSpriteSetup::readSettings()
{
KConfig *config = TDEGlobal::config();
TDEConfig *config = TDEGlobal::config();
config->setGroup( "Settings" );
speed = config->readNumEntry( "Speed", 50 );
@ -119,7 +119,7 @@ void KSpriteSetup::slotSpeed(int s)
// Ok pressed - save settings and exit
void KSpriteSetup::slotOkPressed()
{
KConfig *config = TDEGlobal::config();
TDEConfig *config = TDEGlobal::config();
config->setGroup("Settings");
config->writeEntry("Speed", speed);
config->sync();
@ -171,7 +171,7 @@ void KSpriteSaver::readSettings()
{
TQString str;
KConfig *config = TDEGlobal::config();
TDEConfig *config = TDEGlobal::config();
config->setGroup("Settings");
mSpeed = config->readNumEntry("Speed", 50);

@ -52,7 +52,7 @@ bool SpriteObject::outOfBounds() const
//
// SpriteDef stores the animations that create an object
//
SpriteDef::SpriteDef(KConfigBase &config)
SpriteDef::SpriteDef(TDEConfigBase &config)
{
read(config);
}
@ -82,7 +82,7 @@ SpriteObject *SpriteDef::create( TQCanvas *c )
}
//---------------------------------------------------------------------------
void SpriteDef::read(KConfigBase &config)
void SpriteDef::read(TDEConfigBase &config)
{
mDirX.set(config.readEntry("DirectionX", "0"));
mDirY.set(config.readEntry("DirectionY", "0"));
@ -101,7 +101,7 @@ void SpriteDef::read(KConfigBase &config)
//
// SpriteGroup
//
SpriteGroup::SpriteGroup(TQCanvas *c, KConfigBase &config)
SpriteGroup::SpriteGroup(TQCanvas *c, TDEConfigBase &config)
: mCanvas(c)
{
mAvailable.setAutoDelete(true);
@ -141,7 +141,7 @@ void SpriteGroup::refresh()
//---------------------------------------------------------------------------
void SpriteGroup::read(KConfigBase &config)
void SpriteGroup::read(TDEConfigBase &config)
{
SpriteRange countRange(config.readEntry("Count", "1"));
mCount = countRange.random();

@ -49,12 +49,12 @@ protected:
class SpriteDef
{
public:
SpriteDef(KConfigBase &config);
SpriteDef(TDEConfigBase &config);
SpriteObject *create( TQCanvas *c );
protected:
void read(KConfigBase &config);
void read(TDEConfigBase &config);
protected:
SpriteRange mDirX;
@ -75,14 +75,14 @@ protected:
class SpriteGroup
{
public:
SpriteGroup(TQCanvas *c, KConfigBase &config);
SpriteGroup(TQCanvas *c, TDEConfigBase &config);
void next();
void refresh();
int refreshTime() const { return mRefresh.random(); }
protected:
void read(KConfigBase &config);
void read(TDEConfigBase &config);
protected:
TQPtrList<SpriteDef> mAvailable;

@ -112,7 +112,7 @@ SpriteSequenceManager::~SpriteSequenceManager()
// Returns:
// pointer to sprite if loaded successfully, 0 otherwise.
//
SpritePixmapSequence *SpriteSequenceManager::load(KConfigBase &config,
SpritePixmapSequence *SpriteSequenceManager::load(TDEConfigBase &config,
const TQString & name)
{
SpritePixmapSequence *sprite = mSprites.find(name);
@ -133,7 +133,7 @@ SpritePixmapSequence *SpriteSequenceManager::load(KConfigBase &config,
//---------------------------------------------------------------------------
//
SpritePixmapSequence *SpriteSequenceManager::read(KConfigBase &config)
SpritePixmapSequence *SpriteSequenceManager::read(TDEConfigBase &config)
{
TQStrList strImages;
TQStrList strDelays;

@ -67,14 +67,14 @@ public:
SpriteSequenceManager();
~SpriteSequenceManager();
SpritePixmapSequence *load(KConfigBase &config, const TQString & name);
SpritePixmapSequence *load(TDEConfigBase &config, const TQString & name);
SpritePixmapSequence *sprite(const char *name)
{ return mSprites.find(name); }
static SpriteSequenceManager *manager();
protected:
SpritePixmapSequence *read(KConfigBase &config);
SpritePixmapSequence *read(TDEConfigBase &config);
protected:
TQDict<SpritePixmapSequence> mSprites;

@ -43,14 +43,14 @@
extern "C"
{
KDE_EXPORT KCModule *create_weather( TQWidget *parent, const char * )
KDE_EXPORT TDECModule *create_weather( TQWidget *parent, const char * )
{
return new KCMWeather( parent, "kweather" );
}
}
KCMWeather::KCMWeather( TQWidget *parent, const char *name )
: KCModule( parent, name )
: TDECModule( parent, name )
{
mWeatherService = new WeatherService_stub( "KWeatherService",
"WeatherService" );
@ -162,7 +162,7 @@ void KCMWeather::textColorChanged(const TQColor &)
void KCMWeather::load()
{
kdDebug() << "Load" << endl;
KConfig config( "weather_panelappletrc" );
TDEConfig config( "weather_panelappletrc" );
config.setGroup( "General Options" );
bool enabled = config.readBoolEntry( "logging", false );
@ -188,7 +188,7 @@ void KCMWeather::load()
void KCMWeather::save()
{
kdDebug() << "Save" << endl;
KConfig config( "weather_panelappletrc" );
TDEConfig config( "weather_panelappletrc" );
config.setGroup( "General Options" );
config.writeEntry( "logging", mWidget->m_enableLog->isChecked() );

@ -1,7 +1,7 @@
[Desktop Entry]
Icon=configure
Type=Service
ServiceTypes=KCModule
ServiceTypes=TDECModule
X-TDE-ModuleType=Library
X-TDE-Library=weather

@ -27,7 +27,7 @@
class prefsDialogData;
class KCMWeather : public KCModule
class KCMWeather : public TDECModule
{
Q_OBJECT

@ -33,13 +33,13 @@
extern "C"
{
KDE_EXPORT KCModule *create_weatherservice( TQWidget *parent, const char * ) {
KDE_EXPORT TDECModule *create_weatherservice( TQWidget *parent, const char * ) {
return new KCMWeatherService( parent, "kweather" );
}
}
KCMWeatherService::KCMWeatherService( TQWidget *parent, const char *name )
: KCModule( parent, name )
: TDECModule( parent, name )
{
TQVBoxLayout *layout = new TQVBoxLayout( this );
mWidget = new ServiceConfigWidget( this );

@ -1,7 +1,7 @@
[Desktop Entry]
Icon=kweather
Type=Service
ServiceTypes=KCModule
ServiceTypes=TDECModule
X-TDE-ModuleType=Library
X-TDE-Library=weatherservice

@ -28,7 +28,7 @@
class ServiceConfigWidget;
class KCMWeatherService : public KCModule
class KCMWeatherService : public TDECModule
{
Q_OBJECT

@ -204,7 +204,7 @@ void kweather::slotReportFinished(){
/** load the application */
void kweather::loadPrefs(){
kdDebug(12004) << "Loading Prefs" << endl;
KConfig *kcConfig = config();
TDEConfig *kcConfig = config();
kcConfig->reparseConfiguration();
if (!kcConfig->hasGroup ("General Options") )
@ -223,7 +223,7 @@ void kweather::loadPrefs(){
/** Save the application mPrefs. */
void kweather::savePrefs(){
kdDebug(12004) << "Saving Prefs..." << endl;
KConfig *kcConfig = config();
TDEConfig *kcConfig = config();
kcConfig->setGroup("General Options");
kcConfig->writeEntry("logging", logOn);
@ -324,7 +324,7 @@ void kweather::refresh(TQString stationID)
void kweather::slotPrefsAccepted()
{
// Preferences have been saved in the config file by the KCModule,
// Preferences have been saved in the config file by the TDECModule,
// so read them out.
loadPrefs();

@ -37,7 +37,7 @@ reportView::reportView(const TQString &reportLocation)
TQVBox *vbox = makeVBoxMainWidget();
m_reportView = new KHTMLPart(vbox, "m_reportView");
KConfig config( "weather_panelappletrc" );
TDEConfig config( "weather_panelappletrc" );
config.setGroup( "General Options" );
TQSize defaultSize( 450, 325 );
resize( config.readSizeEntry( "reportview_size", &defaultSize ) );
@ -57,7 +57,7 @@ reportView::~reportView(){
// we do not have to delete m_reportView because this class is
// the parent of the TQVBox, and that is the parent of the KHTMLPart.
KConfig config( "weather_panelappletrc" );
TDEConfig config( "weather_panelappletrc" );
config.setGroup( "General Options" );
config.writeEntry( "reportview_size", size() );
}

@ -163,7 +163,7 @@ void ServiceConfigWidget::initGUI()
void ServiceConfigWidget::loadLocations()
{
KConfig config( locate( "data", "kweatherservice/weather_stations.desktop" ) );
TDEConfig config( locate( "data", "kweatherservice/weather_stations.desktop" ) );
config.setGroup( "Main" );
TQStringList regions = TQStringList::split( ' ', config.readEntry( "regions" ) );

@ -57,7 +57,7 @@ class WeatherLib::Data
KTempFile *target;
bool downloading;
bool updated;
KIO::Job *job;
TDEIO::Job *job;
};
WeatherLib::Data::Data()
@ -94,14 +94,14 @@ WeatherLib::~WeatherLib()
{
}
void WeatherLib::slotCopyDone(KIO::Job* job)
void WeatherLib::slotCopyDone(TDEIO::Job* job)
{
kdDebug(12006) << "Copy done..." << endl;
if( job->error())
{
kdDebug(12006) << "Error code: " << job->error() << endl;
//job->showErrorDialog(0L);
if ((job->error() == KIO::ERR_COULD_NOT_CONNECT || job->error() == KIO::ERR_UNKNOWN_HOST)
if ((job->error() == TDEIO::ERR_COULD_NOT_CONNECT || job->error() == TDEIO::ERR_UNKNOWN_HOST)
&& !hostDown)
{
hostDown= true;
@ -164,15 +164,15 @@ void WeatherLib::slotCopyDone(KIO::Job* job)
d->job = 0L;
}
else if( job->error() == KIO::ERR_DOES_NOT_EXIST)
else if( job->error() == TDEIO::ERR_DOES_NOT_EXIST)
{
data.remove(d->wi.reportLocation);
kdDebug( 12006 ) << "Bad station data so i am going to remove it" << endl;
KPassivePopup::message( i18n("KWeather Error!"),
i18n("The requested station does not exist."), 0L,"error" );
}
else if(job->error() == KIO::ERR_COULD_NOT_CONNECT ||
job->error() == KIO::ERR_UNKNOWN_HOST)
else if(job->error() == TDEIO::ERR_COULD_NOT_CONNECT ||
job->error() == TDEIO::ERR_UNKNOWN_HOST)
{
kdDebug( 12006 ) << "Offline now..." << endl;
d->clear();
@ -207,10 +207,10 @@ void WeatherLib::getData(Data *d, bool force /* try even if host was down last t
KURL url(u);
KURL local(d->target->name());
d->job = KIO::file_copy( url, local, -1, true, false, false);
d->job = TDEIO::file_copy( url, local, -1, true, false, false);
d->job->addMetaData("cache", "reload"); // Make sure to get fresh info
connect( d->job, TQT_SIGNAL( result( KIO::Job *)),
TQT_SLOT(slotCopyDone(KIO::Job *)));
connect( d->job, TQT_SIGNAL( result( TDEIO::Job *)),
TQT_SLOT(slotCopyDone(TDEIO::Job *)));
kdDebug( 12006 ) << "Copying " << url.prettyURL() << " to "
<< local.prettyURL() << endl;
emit fileUpdating(d->wi.reportLocation);

@ -22,7 +22,7 @@
#include <tqregexp.h>
#include <tqdict.h>
namespace KIO
namespace TDEIO
{
class Job;
}
@ -67,7 +67,7 @@ class WeatherLib : public TQObject
void stationRemoved(const TQString &stationID);
private slots:
void slotCopyDone(KIO::Job*);
void slotCopyDone(TDEIO::Job*);
private:
Data* findData(const TQString &stationID);

@ -45,7 +45,7 @@ WeatherService::WeatherService(TQObject *parent, const char *name) : TQObject (p
connect(m_weatherLib, TQT_SIGNAL(stationRemoved(const TQString&)),
TQT_SLOT(slotStationRemoved(const TQString&)));
KConfig *conf = kapp->config();
TDEConfig *conf = kapp->config();
conf->setGroup("WEATHERSTATIONS");
TQStringList stations =conf->readListEntry("stations");
@ -213,7 +213,7 @@ TQStringList WeatherService::listStations()
void WeatherService::saveSettings()
{
KConfig *conf = kapp->config();
TDEConfig *conf = kapp->config();
conf->setGroup("WEATHERSTATIONS");
conf->writeEntry( "stations", m_weatherLib->stations());
conf->sync();

@ -113,7 +113,7 @@ void FlagList::removeAllFlags()
_flags.clear();
}
void FlagList::save(KConfig *config)
void FlagList::save(TDEConfig *config)
{
config->writeEntry("Flags", _flags.count());
@ -129,7 +129,7 @@ void FlagList::save(KConfig *config)
}
void FlagList::load(KConfig *config)
void FlagList::load(TDEConfig *config)
{
_flags.clear();
int num = config->readNumEntry("Flags", 0);

@ -81,8 +81,8 @@ public:
void removeNearestFlag(const TQPoint &target, int w, int h, int offset);
void removeAllFlags();
void save(KConfig *config);
void load(KConfig *config);
void save(TDEConfig *config);
void load(TDEConfig *config);
private:

@ -74,7 +74,7 @@ WorldWideWatch::WorldWideWatch(bool restore, TQWidget *parent, const char *name)
}
void WorldWideWatch::load(KConfig *config)
void WorldWideWatch::load(TDEConfig *config)
{
_map->load(config);
_clocks->load(config);
@ -84,7 +84,7 @@ void WorldWideWatch::load(KConfig *config)
}
void WorldWideWatch::save(KConfig *config)
void WorldWideWatch::save(TDEConfig *config)
{
_map->save(config);
_clocks->save(config);

@ -46,14 +46,14 @@ public:
WorldWideWatch(bool restore=false, TQWidget *parent=0, const char *name=0);
void save(KConfig *config);
void load(KConfig *load);
void save(TDEConfig *config);
void load(TDEConfig *load);
protected:
void readProperties(KConfig *sc) { load(sc); };
void saveProperties(KConfig *sc) { save(sc); };
void readProperties(TDEConfig *sc) { load(sc); };
void saveProperties(TDEConfig *sc) { save(sc); };
private slots:

@ -69,9 +69,9 @@ MapWidget::MapWidget(bool applet, bool restore, TQWidget *parent, const char *na
if (restore)
{
KConfig *config = kapp->config();
TDEConfig *config = kapp->config();
if (applet)
config = new KConfig("kwwwappletrc");
config = new TDEConfig("kwwwappletrc");
_theme = config->readEntry("Theme", "depths");
if (applet)
delete config;
@ -162,7 +162,7 @@ MapWidget::~MapWidget()
{
if (_applet)
{
KConfig *conf = new KConfig("kwwwappletrc");
TDEConfig *conf = new TDEConfig("kwwwappletrc");
save(conf);
delete conf;
}
@ -171,7 +171,7 @@ MapWidget::~MapWidget()
}
void MapWidget::load(KConfig *config)
void MapWidget::load(TDEConfig *config)
{
setCities(config->readBoolEntry("Cities", true));
setIllumination(config->readBoolEntry("Illumination", true));
@ -190,7 +190,7 @@ void MapWidget::load(KConfig *config)
}
void MapWidget::save(KConfig *config)
void MapWidget::save(TDEConfig *config)
{
config->writeEntry("Cities", _cities);
config->writeEntry("Illumination", _illumination);

@ -70,8 +70,8 @@ public:
void setFlags(bool f);
void setSize(int w, int h);
void save(KConfig *config);
void load(KConfig *config);
void save(TDEConfig *config);
void load(TDEConfig *config);
void updateBackground();

@ -259,7 +259,7 @@ void ZoneClockPanel::addClock(const TQString &zone)
}
void ZoneClockPanel::save(KConfig *config)
void ZoneClockPanel::save(TDEConfig *config)
{
config->writeEntry("Clocks", _clocks.count());
@ -276,7 +276,7 @@ void ZoneClockPanel::save(KConfig *config)
}
void ZoneClockPanel::load(KConfig *config)
void ZoneClockPanel::load(TDEConfig *config)
{
_clocks.clear();

@ -37,7 +37,7 @@
class TQLabel;
class SimpleFlow;
class KConfig;
class TDEConfig;
class ClockDialog;
@ -106,8 +106,8 @@ public:
void addClock(const TQString &zone, const TQString &name);
void save(KConfig *config);
void load(KConfig *config);
void save(TDEConfig *config);
void load(TDEConfig *config);
public slots:

Loading…
Cancel
Save