summaryrefslogtreecommitdiffstats
path: root/twin4
diff options
context:
space:
mode:
Diffstat (limited to 'twin4')
-rw-r--r--twin4/twin4/kspritecache.cpp12
-rw-r--r--twin4/twin4/kspritecache.h20
-rw-r--r--twin4/twin4/twin4.cpp8
-rw-r--r--twin4/twin4/twin4.h4
-rw-r--r--twin4/twin4/twin4doc.cpp4
-rw-r--r--twin4/twin4/twin4doc.h4
-rw-r--r--twin4/twin4/twin4player.cpp4
-rw-r--r--twin4/twin4/twin4player.h6
-rw-r--r--twin4/twin4/twin4view.cpp8
9 files changed, 35 insertions, 35 deletions
diff --git a/twin4/twin4/kspritecache.cpp b/twin4/twin4/kspritecache.cpp
index 994507d5..046893cf 100644
--- a/twin4/twin4/kspritecache.cpp
+++ b/twin4/twin4/kspritecache.cpp
@@ -62,7 +62,7 @@ bool KSpriteCache::setGrafixDir(TQString name)
// TODO check for filename
kdDebug(11002) << "Opening config " << file << endl;
- mConfig=new KConfig(file,false,false);
+ mConfig=new TDEConfig(file,false,false);
mGrafixDir=d;
return true;
}
@@ -185,7 +185,7 @@ TQPixmap * KSpriteCache::loadPixmap(TQString file,TQString mask,TQString dir)
-TQCanvasPixmapArray *KSpriteCache::createPixmapArray(KConfig *config,TQString name)
+TQCanvasPixmapArray *KSpriteCache::createPixmapArray(TDEConfig *config,TQString name)
{
config->setGroup(name);
TQPoint defaultoffset=TQPoint(0,0);
@@ -292,7 +292,7 @@ TQCanvasPixmapArray *KSpriteCache::createPixmapArray(KConfig *config,TQString na
return pixmaparray;
}
-void KSpriteCache::applyFilter(TQPixmap *pixmap,KConfig *config,TQString name)
+void KSpriteCache::applyFilter(TQPixmap *pixmap,TDEConfig *config,TQString name)
{
TQValueList<int> filterList;
filterList=config->readIntListEntry(name+"colorfilter");
@@ -376,7 +376,7 @@ void KSpriteCache::changeGrey(TQPixmap *pixmap,int lighter)
pixmap->convertFromImage(img); // slow
}
-TQCanvasItem *KSpriteCache::loadItem(KConfig *config,TQString name)
+TQCanvasItem *KSpriteCache::loadItem(TDEConfig *config,TQString name)
{
if (!config) return 0;
int rtti=config->readNumEntry("rtti",0);
@@ -459,7 +459,7 @@ TQCanvasItem *KSpriteCache::cloneItem(TQCanvasItem *original)
}
-void KSpriteCache::configureCanvasItem(KConfig *config, TQCanvasItem *sprite)
+void KSpriteCache::configureCanvasItem(TDEConfig *config, TQCanvasItem *sprite)
{
double x=config->readDoubleNumEntry("x",0.0);
double y=config->readDoubleNumEntry("y",0.0);
@@ -491,7 +491,7 @@ void KSpriteCache::createAnimations(KSprite *original,KSprite *sprite)
}
}
-void KSpriteCache::createAnimations(KConfig *config,KSprite *sprite)
+void KSpriteCache::createAnimations(TDEConfig *config,KSprite *sprite)
{
if (!sprite) return ;
for (int i=0;i<1000;i++)
diff --git a/twin4/twin4/kspritecache.h b/twin4/twin4/kspritecache.h
index 03e17b0b..35e99af5 100644
--- a/twin4/twin4/kspritecache.h
+++ b/twin4/twin4/kspritecache.h
@@ -20,7 +20,7 @@
#include <tqcanvas.h>
#include <tqdict.h>
-class KConfig;
+class TDEConfig;
class KSprite;
@@ -234,7 +234,7 @@ class KSprite : public TQCanvasSprite
/**
* The KSpriteCache class is used to load and cache sprites. Loading
- * is done via a @ref KConfig file which contains the definitions of the
+ * is done via a @ref TDEConfig file which contains the definitions of the
* sprite in text form. Usng this approach allows you to tun the sprites
* without chaning the sourcecode of the program. This is especially useful if
* the graphics team is independent of the programmer or if you want to write
@@ -335,12 +335,12 @@ class KSpriteCache : public TQObject
void setCanvas(TQCanvas *c) {mCanvas=c;}
/**
- * returns the @ref KConfig configuration file where thegraphical data is
+ * returns the @ref TDEConfig configuration file where thegraphical data is
* read. Access to this is necessary if you want to store general game infos
* in theis file to or if you want to read additional sprite data which are
* not read be the default functions.
**/
- KConfig *config() {return mConfig;}
+ TDEConfig *config() {return mConfig;}
/**
* Main function to create a sprite. You call this like
@@ -399,7 +399,7 @@ class KSpriteCache : public TQObject
* z=(double)
* </pre>
**/
- void configureCanvasItem(KConfig *config,TQCanvasItem *item);
+ void configureCanvasItem(TDEConfig *config,TQCanvasItem *item);
/**
* Copies the default properties for all TQCanvasItems from another sprite.
@@ -411,7 +411,7 @@ class KSpriteCache : public TQObject
* Loads an item with the given name form the given config file. From the
* rtti entry it is determined what type it is and then it is loaded.
**/
- virtual TQCanvasItem *loadItem(KConfig *config,TQString name);
+ virtual TQCanvasItem *loadItem(TDEConfig *config,TQString name);
/**
* Clone the sprite from another sprite, mostly from the copy stored in the
@@ -446,7 +446,7 @@ class KSpriteCache : public TQObject
* colorfilter=2,g : make it gray and lighter (positiv) or darker (negative)
* </pre>
**/
- virtual TQCanvasPixmapArray *createPixmapArray(KConfig *config,TQString name);
+ virtual TQCanvasPixmapArray *createPixmapArray(TDEConfig *config,TQString name);
/**
* Reads the animations from the config file and calls the corresponding
@@ -464,7 +464,7 @@ class KSpriteCache : public TQObject
* @param config - the config file the sprite is read from
* @param sprite - the sprite whose animations are set
**/
- void createAnimations(KConfig *config,KSprite *sprite);
+ void createAnimations(TDEConfig *config,KSprite *sprite);
/**
* Same as above but to copy the animations from an existing sprite
@@ -487,7 +487,7 @@ class KSpriteCache : public TQObject
* Apply the filters as defined in the config file to the sprite name
* (TODO is this argument needed) to the pixmap.
*/
- virtual void applyFilter(TQPixmap *pixmap,KConfig *config,TQString name);
+ virtual void applyFilter(TQPixmap *pixmap,TDEConfig *config,TQString name);
/**
* resets the cache (?)
@@ -500,7 +500,7 @@ class KSpriteCache : public TQObject
TQString mGrafixDir;
TQString mRcFile;
- KConfig *mConfig;
+ TDEConfig *mConfig;
TQCanvas *mCanvas;
};
diff --git a/twin4/twin4/twin4.cpp b/twin4/twin4/twin4.cpp
index 31e2c87e..b21847a2 100644
--- a/twin4/twin4/twin4.cpp
+++ b/twin4/twin4/twin4.cpp
@@ -288,7 +288,7 @@ void Kwin4App::changeAction(const char *action, bool enable){
/**
* Store the current game
*/
-void Kwin4App::saveProperties(KConfig *cfg)
+void Kwin4App::saveProperties(TDEConfig *cfg)
{
TQString tempfile = kapp->tempSaveName(TQDir::currentDirPath()+"twin4");
cfg->writePathEntry("filename", tempfile );
@@ -298,7 +298,7 @@ void Kwin4App::saveProperties(KConfig *cfg)
/**
* Load game back
*/
-void Kwin4App::readProperties(KConfig* cfg)
+void Kwin4App::readProperties(TDEConfig* cfg)
{
TQString filename = cfg->readPathEntry("filename");
if(!filename.isEmpty())
@@ -613,10 +613,10 @@ void Kwin4App::slotDebugKGame()
* Show Configure dialog.
*/
void Kwin4App::showSettings(){
- if(KConfigDialog::showDialog("settings"))
+ if(TDEConfigDialog::showDialog("settings"))
return;
- KConfigDialog *dialog = new KConfigDialog(this, "settings", Prefs::self(), KDialogBase::Swallow);
+ TDEConfigDialog *dialog = new TDEConfigDialog(this, "settings", Prefs::self(), KDialogBase::Swallow);
Settings *general = new Settings(0, "General");
dialog->addPage(general, i18n("General"), "package_settings");
connect(dialog, TQT_SIGNAL(settingsChanged()), doc, TQT_SLOT(loadSettings()));
diff --git a/twin4/twin4/twin4.h b/twin4/twin4/twin4.h
index 572cff81..717e19ed 100644
--- a/twin4/twin4/twin4.h
+++ b/twin4/twin4/twin4.h
@@ -79,8 +79,8 @@ protected:
void initStatusBar();
void initDocument();
- virtual void saveProperties(KConfig *cfg);
- virtual void readProperties(KConfig *cfg);
+ virtual void saveProperties(TDEConfig *cfg);
+ virtual void readProperties(TDEConfig *cfg);
public slots:
void slotServerTypeChanged(int t);
diff --git a/twin4/twin4/twin4doc.cpp b/twin4/twin4/twin4doc.cpp
index 7983b7a2..2fd408bb 100644
--- a/twin4/twin4/twin4doc.cpp
+++ b/twin4/twin4/twin4doc.cpp
@@ -694,7 +694,7 @@ void Kwin4Doc::loadSettings(){
/**
* read config file
*/
-void Kwin4Doc::ReadConfig(KConfig *config)
+void Kwin4Doc::ReadConfig(TDEConfig *config)
{
loadSettings();
@@ -708,7 +708,7 @@ void Kwin4Doc::ReadConfig(KConfig *config)
/**
* write config file
*/
-void Kwin4Doc::WriteConfig(KConfig *config)
+void Kwin4Doc::WriteConfig(TDEConfig *config)
{
config->setGroup("YellowPlayer");
getPlayer(Gelb)->writeConfig(config);
diff --git a/twin4/twin4/twin4doc.h b/twin4/twin4/twin4doc.h
index 4a304c91..49ed1307 100644
--- a/twin4/twin4/twin4doc.h
+++ b/twin4/twin4/twin4doc.h
@@ -99,8 +99,8 @@ public:
/** Returns colour */
FARBE QueryColour(int x,int y);
- void ReadConfig(KConfig *config);
- void WriteConfig(KConfig *config);
+ void ReadConfig(TDEConfig *config);
+ void WriteConfig(TDEConfig *config);
FARBE QueryCurrentPlayer();
void SetCurrentPlayer(FARBE i);
diff --git a/twin4/twin4/twin4player.cpp b/twin4/twin4/twin4player.cpp
index 65a55d52..bbed450c 100644
--- a/twin4/twin4/twin4player.cpp
+++ b/twin4/twin4/twin4player.cpp
@@ -99,7 +99,7 @@ void Kwin4Player::slotPlayerPropertyChanged(KGamePropertyBase *prop, KPlayer * /
}
}
-void Kwin4Player::readConfig(KConfig *config)
+void Kwin4Player::readConfig(TDEConfig *config)
{
mAllWin.setValue(config->readNumEntry("win",0));
mAllRemis.setValue(config->readNumEntry("remis",0));
@@ -107,7 +107,7 @@ void Kwin4Player::readConfig(KConfig *config)
mAllBrk.setValue(config->readNumEntry("brk",0));
}
-void Kwin4Player::writeConfig(KConfig *config)
+void Kwin4Player::writeConfig(TDEConfig *config)
{
config->writeEntry("win",mAllWin.value());
config->writeEntry("remis",mAllRemis.value());
diff --git a/twin4/twin4/twin4player.h b/twin4/twin4/twin4player.h
index 26e76634..89ea213a 100644
--- a/twin4/twin4/twin4player.h
+++ b/twin4/twin4/twin4player.h
@@ -25,7 +25,7 @@
#include <kplayer.h>
class StatusWidget;
-class KConfig;
+class TDEConfig;
class Kwin4Player : public KPlayer
{
@@ -38,8 +38,8 @@ class Kwin4Player : public KPlayer
Kwin4Player();
int rtti() const {return 1;}
void setWidget(StatusWidget *w) {sWidget=w;}
- void readConfig(KConfig *config);
- void writeConfig(KConfig *config);
+ void readConfig(TDEConfig *config);
+ void writeConfig(TDEConfig *config);
void incWin();
void incRemis();
void incLost();
diff --git a/twin4/twin4/twin4view.cpp b/twin4/twin4/twin4view.cpp
index 879a6024..277dc71c 100644
--- a/twin4/twin4/twin4view.cpp
+++ b/twin4/twin4/twin4view.cpp
@@ -137,7 +137,7 @@ Kwin4View::Kwin4View(Kwin4Doc *theDoc, TQWidget *parent, const char *name)
mCache=new KSpriteCache(mGrafix,TQT_TQOBJECT(this));
mCache->setCanvas(mCanvas);
- KConfig *config=mCache->config();
+ TDEConfig *config=mCache->config();
TQPoint pnt;
config->setGroup("game");
@@ -192,7 +192,7 @@ void Kwin4View::initView(bool deleteall)
// mCanvas->setAdvancePeriod(period);
mCanvas->setAdvancePeriod(15);
- KConfig *config=mCache->config();
+ TDEConfig *config=mCache->config();
config->setGroup("game");
mSpreadX=config->readNumEntry("spread_x",0);
mSpreadY=config->readNumEntry("spread_y",0);
@@ -263,7 +263,7 @@ void Kwin4View::EndGame()
{
KSprite *sprite;
sprite=(KSprite *)(mCache->getItem("gameover",1));
- KConfig *config=mCache->config();
+ TDEConfig *config=mCache->config();
int dest=config->readNumEntry("destY",150);
int src=config->readNumEntry("y",0);
//kdDebug(12010) << "MOVING gameover to " << dest << endl;
@@ -337,7 +337,7 @@ void Kwin4View::drawIntro(bool /*remove*/)
sprite=(KSprite *)(mCache->getItem("win4about",2));
if (sprite)
{
- KConfig *config=mCache->config();
+ TDEConfig *config=mCache->config();
double dest=config->readDoubleNumEntry("x2",250.0);
sprite->setX(dest);
sprite->show();