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; return true;
} }
void FlowLayout::updatePositions(KConfig * inKConfig){ void FlowLayout::updatePositions(TDEConfig * inTDEConfig){
//kdDebug() << "updating all positions..." << endl; //kdDebug() << "updating all positions..." << endl;
int pos = 0; int pos = 0;
TQPtrListIterator<TQLayoutItem> it(mLayoutItems); TQPtrListIterator<TQLayoutItem> it(mLayoutItems);
while(it.current() != NULL) { while(it.current() != NULL) {
mSources[it.current()]->setPosition(pos, inKConfig); mSources[it.current()]->setPosition(pos, inTDEConfig);
++it; ++it;
++pos; ++pos;
} }

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

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

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

@ -70,12 +70,12 @@ protected slots:
/** /**
* Saves the prefs (implicit apply) * Saves the prefs (implicit apply)
*/ */
virtual void savePrefs(KConfig* inKConfig); virtual void savePrefs(TDEConfig* inTDEConfig);
/** /**
* Loads the prefs * 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 * 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; return mPosition;
} }
void Source::setPosition(int inPosition, KConfig* inKConfig){ void Source::setPosition(int inPosition, TDEConfig* inTDEConfig){
mPosition = inPosition; mPosition = inPosition;
inKConfig->writeEntry(mID + "_position", mPosition); inTDEConfig->writeEntry(mID + "_position", mPosition);
} }
const TQString& Source::getName() const{ const TQString& Source::getName() const{
@ -169,24 +169,24 @@ void Source::applyPrefs(){
mShowOnApplet = mMaybeShowOnApplet; mShowOnApplet = mMaybeShowOnApplet;
} }
void Source::savePrefs(KConfig* inKConfig){ void Source::savePrefs(TDEConfig* inTDEConfig){
inKConfig->writeEntry(mID + "_position", mPosition); inTDEConfig->writeEntry(mID + "_position", mPosition);
inKConfig->writeEntry(mID + "_enabled", mEnabled); inTDEConfig->writeEntry(mID + "_enabled", mEnabled);
inKConfig->writeEntry(mID + "_showOnApplet", mShowOnApplet); inTDEConfig->writeEntry(mID + "_showOnApplet", mShowOnApplet);
inKConfig->writeEntry(mID + "_showName", mShowName); inTDEConfig->writeEntry(mID + "_showName", mShowName);
inKConfig->writeEntry(mID + "_name", mName); inTDEConfig->writeEntry(mID + "_name", mName);
inKConfig->writeEntry(mID + "_toolTipEnabled", mToolTipEnabled); inTDEConfig->writeEntry(mID + "_toolTipEnabled", mToolTipEnabled);
} }
void Source::loadPrefs(KConfig* inKConfig){ void Source::loadPrefs(TDEConfig* inTDEConfig){
mPosition = inKConfig->readNumEntry(mID + "_position", mPosition); mPosition = inTDEConfig->readNumEntry(mID + "_position", mPosition);
mEnabled = inKConfig->readBoolEntry(mID + "_enabled", mEnabled); mEnabled = inTDEConfig->readBoolEntry(mID + "_enabled", mEnabled);
mMaybeEnabled = mEnabled; mMaybeEnabled = mEnabled;
mShowOnApplet = inKConfig->readBoolEntry(mID + "_showOnApplet", mShowOnApplet); mShowOnApplet = inTDEConfig->readBoolEntry(mID + "_showOnApplet", mShowOnApplet);
mMaybeShowOnApplet = mShowOnApplet; mMaybeShowOnApplet = mShowOnApplet;
mShowName = inKConfig->readBoolEntry(mID + "_showName", mShowName); mShowName = inTDEConfig->readBoolEntry(mID + "_showName", mShowName);
mName = inKConfig->readEntry(mID + "_name", mName); mName = inTDEConfig->readEntry(mID + "_name", mName);
mToolTipEnabled = inKConfig->readBoolEntry(mID + "_toolTipEnabled", mToolTipEnabled); mToolTipEnabled = inTDEConfig->readBoolEntry(mID + "_toolTipEnabled", mToolTipEnabled);
// initializing // initializing
// this signal is usually catched by the ThreadedTrigger who enables or disables the fetch loop // 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 * 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 * Returns the Name of this source
@ -134,12 +134,12 @@ public slots:
/** /**
* Saves the preferences (implicit apply) * Saves the preferences (implicit apply)
*/ */
virtual void savePrefs(KConfig* inKConfig); virtual void savePrefs(TDEConfig* inTDEConfig);
/** /**
* Loads the preferences * Loads the preferences
*/ */
virtual void loadPrefs(KConfig* inKConfig); virtual void loadPrefs(TDEConfig* inTDEConfig);
signals: signals:
/** /**

Loading…
Cancel
Save