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

pull/1/head
Timothy Pearson 12 years ago
parent 3f7edc4861
commit d1a1ded763

@ -161,12 +161,12 @@ bool FlowLayout::moveItem(const TQLayoutItem* which, const TQLayoutItem* relate,
return true;
}
void FlowLayout::updatePositions(KConfig * inKConfig){
void FlowLayout::updatePositions(TDEConfig * inTDEConfig){
//kdDebug() << "updating all positions..." << endl;
int pos = 0;
TQPtrListIterator<TQLayoutItem> it(mLayoutItems);
while(it.current() != NULL) {
mSources[it.current()]->setPosition(pos, inKConfig);
mSources[it.current()]->setPosition(pos, inTDEConfig);
++it;
++pos;
}

@ -24,7 +24,7 @@
#include <tqptrlist.h>
class Source;
class KConfig;
class TDEConfig;
class FlowLayout : public TQLayout{
Q_OBJECT
@ -44,7 +44,7 @@ public:
/**
* tells all sources their positions
*/
void updatePositions(KConfig * inKConfig);
void updatePositions(TDEConfig * inTDEConfig);
void addItem(TQLayoutItem* item);
void addSource(Source* src);
void remove(TQWidget* widget);

@ -93,8 +93,8 @@ Kima::Kima(const TQString& inConfigFile, Type inType, int inActions, TQWidget* i
mPrefs = 0; // the prefs ui is created in the preferences() method
// Get the current application configuration handle
mKConfig = config();
mKConfig->setGroup("Kima");
mTDEConfig = config();
mTDEConfig->setGroup("Kima");
// automatically delete pointers
mSources.setAutoDelete(TRUE);
@ -128,7 +128,7 @@ Kima::Kima(const TQString& inConfigFile, Type inType, int inActions, TQWidget* i
++itSync;
registerSource(source);
}
mLayout->updatePositions(mKConfig);
mLayout->updatePositions(mTDEConfig);
// create the menu
mMenu = new KPopupMenu(this);
@ -292,14 +292,14 @@ void Kima::savePreferences(){
while((source = it.current()) != 0){
++it;
source->applyPrefs();
source->savePrefs(mKConfig);
source->savePrefs(mTDEConfig);
}
// save the position of all sources because they might have changed.
mLayout->updatePositions(mKConfig);
mLayout->updatePositions(mTDEConfig);
// update the source widgets
updateSourceWidgets();
// write config
mKConfig->sync();
mTDEConfig->sync();
// reset cached witdh for height to force recalculation of the applets width
mCachedWFH = 0;
}
@ -367,9 +367,9 @@ void Kima::mouseMoveEvent( TQMouseEvent* inEvent ) {
TQRect crect = c->rect();
double relPos = c->mapFromGlobal(inEvent->globalPos()).y() * mDragFactor;
if(mLayout->moveItem(mDraggedSourceItem, it.current(), crect.height()/2.0 > relPos ? FlowLayout::ABOVE : FlowLayout::BELOW)){
mLayout->updatePositions(mKConfig);
mLayout->updatePositions(mTDEConfig);
updateGeometry();
mKConfig->sync(); // write config
mTDEConfig->sync(); // write config
updateSourceWidgets();
}
break;
@ -404,7 +404,7 @@ void Kima::registerSource(Source* source) {
// load prefs from the configuration
// this call also emits enabledChanged
source->loadPrefs(mKConfig);
source->loadPrefs(mTDEConfig);
// add the source to the layout if necessary
displaySource(source->isEnabled() && source->showOnApplet(), source);

@ -46,7 +46,7 @@ class TQMouseEvent;
class KDialogBase;
class Prefs;
class TQListViewItem;
class KConfig;
class TDEConfig;
class TQLayoutItem;
/**
@ -189,7 +189,7 @@ private:
*/
Source* findSource(int inPosition);
KConfig* mKConfig;
TDEConfig* mTDEConfig;
FlowLayout* mLayout;
mutable int mCachedWFH;
mutable int mCachedHeight;

@ -99,21 +99,21 @@ void LabelSource::applyPrefs(){
updateLabel(mValue);
}
void LabelSource::savePrefs(KConfig* inKConfig){
TriggeredSource::savePrefs(inKConfig);
inKConfig->writeEntry(mID + "_color", mLabelSourcePrefs->colorButton->color());
inKConfig->writeEntry(mID + "_font", mLabelSourcePrefs->fontRequester->font());
inKConfig->writeEntry(mID + "_align", mLabel->alignment());
void LabelSource::savePrefs(TDEConfig* inTDEConfig){
TriggeredSource::savePrefs(inTDEConfig);
inTDEConfig->writeEntry(mID + "_color", mLabelSourcePrefs->colorButton->color());
inTDEConfig->writeEntry(mID + "_font", mLabelSourcePrefs->fontRequester->font());
inTDEConfig->writeEntry(mID + "_align", mLabel->alignment());
}
void LabelSource::loadPrefs(KConfig* inKConfig){
TriggeredSource::loadPrefs(inKConfig);
TQColor color = inKConfig->readColorEntry(mID + "_color");
void LabelSource::loadPrefs(TDEConfig* inTDEConfig){
TriggeredSource::loadPrefs(inTDEConfig);
TQColor color = inTDEConfig->readColorEntry(mID + "_color");
if(!color.isValid())
color.setRgb(0,0,0);
mLabel->setPaletteForegroundColor(color);
mLabel->setFont(inKConfig->readFontEntry(mID + "_font"));
mLabel->setAlignment(inKConfig->readNumEntry(mID + "_align"));
mLabel->setFont(inTDEConfig->readFontEntry(mID + "_font"));
mLabel->setAlignment(inTDEConfig->readNumEntry(mID + "_align"));
}
void LabelSource::updateLabel(const TQString& inValue){

@ -70,12 +70,12 @@ protected slots:
/**
* Saves the prefs (implicit apply)
*/
virtual void savePrefs(KConfig* inKConfig);
virtual void savePrefs(TDEConfig* inTDEConfig);
/**
* Loads the prefs
*/
virtual void loadPrefs(KConfig* inKConfig);
virtual void loadPrefs(TDEConfig* inTDEConfig);
/**
* This method enables or disables various widgets of the preferences dialog depending on isEnabled and isShownOnApplet

@ -55,9 +55,9 @@ int Source::getPosition() const{
return mPosition;
}
void Source::setPosition(int inPosition, KConfig* inKConfig){
void Source::setPosition(int inPosition, TDEConfig* inTDEConfig){
mPosition = inPosition;
inKConfig->writeEntry(mID + "_position", mPosition);
inTDEConfig->writeEntry(mID + "_position", mPosition);
}
const TQString& Source::getName() const{
@ -169,24 +169,24 @@ void Source::applyPrefs(){
mShowOnApplet = mMaybeShowOnApplet;
}
void Source::savePrefs(KConfig* inKConfig){
inKConfig->writeEntry(mID + "_position", mPosition);
inKConfig->writeEntry(mID + "_enabled", mEnabled);
inKConfig->writeEntry(mID + "_showOnApplet", mShowOnApplet);
inKConfig->writeEntry(mID + "_showName", mShowName);
inKConfig->writeEntry(mID + "_name", mName);
inKConfig->writeEntry(mID + "_toolTipEnabled", mToolTipEnabled);
void Source::savePrefs(TDEConfig* inTDEConfig){
inTDEConfig->writeEntry(mID + "_position", mPosition);
inTDEConfig->writeEntry(mID + "_enabled", mEnabled);
inTDEConfig->writeEntry(mID + "_showOnApplet", mShowOnApplet);
inTDEConfig->writeEntry(mID + "_showName", mShowName);
inTDEConfig->writeEntry(mID + "_name", mName);
inTDEConfig->writeEntry(mID + "_toolTipEnabled", mToolTipEnabled);
}
void Source::loadPrefs(KConfig* inKConfig){
mPosition = inKConfig->readNumEntry(mID + "_position", mPosition);
mEnabled = inKConfig->readBoolEntry(mID + "_enabled", mEnabled);
void Source::loadPrefs(TDEConfig* inTDEConfig){
mPosition = inTDEConfig->readNumEntry(mID + "_position", mPosition);
mEnabled = inTDEConfig->readBoolEntry(mID + "_enabled", mEnabled);
mMaybeEnabled = mEnabled;
mShowOnApplet = inKConfig->readBoolEntry(mID + "_showOnApplet", mShowOnApplet);
mShowOnApplet = inTDEConfig->readBoolEntry(mID + "_showOnApplet", mShowOnApplet);
mMaybeShowOnApplet = mShowOnApplet;
mShowName = inKConfig->readBoolEntry(mID + "_showName", mShowName);
mName = inKConfig->readEntry(mID + "_name", mName);
mToolTipEnabled = inKConfig->readBoolEntry(mID + "_toolTipEnabled", mToolTipEnabled);
mShowName = inTDEConfig->readBoolEntry(mID + "_showName", mShowName);
mName = inTDEConfig->readEntry(mID + "_name", mName);
mToolTipEnabled = inTDEConfig->readBoolEntry(mID + "_toolTipEnabled", mToolTipEnabled);
// initializing
// this signal is usually catched by the ThreadedTrigger who enables or disables the fetch loop

@ -55,7 +55,7 @@ public:
/**
* Sets the position of this source in the layout
*/
void setPosition(int inPosition, KConfig* inKConfig);
void setPosition(int inPosition, TDEConfig* inTDEConfig);
/**
* Returns the Name of this source
@ -134,12 +134,12 @@ public slots:
/**
* Saves the preferences (implicit apply)
*/
virtual void savePrefs(KConfig* inKConfig);
virtual void savePrefs(TDEConfig* inTDEConfig);
/**
* Loads the preferences
*/
virtual void loadPrefs(KConfig* inKConfig);
virtual void loadPrefs(TDEConfig* inTDEConfig);
signals:
/**

Loading…
Cancel
Save