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

pull/1/head
Timothy Pearson 12 years ago
parent d6f3812c8d
commit 2f84d0e2d3

@ -212,7 +212,7 @@ Atlantik::Atlantik ()
void Atlantik::readConfig() void Atlantik::readConfig()
{ {
// Read configuration settings // Read configuration settings
KConfig *config = kapp->config(); TDEConfig *config = kapp->config();
// General configuration // General configuration
config->setGroup("General"); config->setGroup("General");
@ -508,7 +508,7 @@ void Atlantik::configureNotifications()
void Atlantik::slotUpdateConfig() void Atlantik::slotUpdateConfig()
{ {
KConfig *config=kapp->config(); TDEConfig *config=kapp->config();
bool optBool, configChanged = false; bool optBool, configChanged = false;
TQString optStr; TQString optStr;
@ -761,7 +761,7 @@ void Atlantik::initNetworkObject()
void Atlantik::clientCookie(TQString cookie) void Atlantik::clientCookie(TQString cookie)
{ {
KConfig *config = kapp->config(); TDEConfig *config = kapp->config();
if (cookie.isNull()) if (cookie.isNull())
{ {

@ -102,7 +102,7 @@ public:
Atlantik(); Atlantik();
/** /**
* Read the configuration settings using KConfig. * Read the configuration settings using TDEConfig.
* *
*/ */
void readConfig(); void readConfig();

@ -45,7 +45,7 @@ void Monopigator::loadData(const KURL &url)
m_downloadData->open(IO_WriteOnly); m_downloadData->open(IO_WriteOnly);
m_downloadData->reset(); m_downloadData->reset();
m_job = KIO::get(url, true, false); m_job = TDEIO::get(url, true, false);
m_job->addMetaData(TQString::fromLatin1("UserAgent"), TQString::fromLatin1("Atlantik/" ATLANTIK_VERSION_STRING)); m_job->addMetaData(TQString::fromLatin1("UserAgent"), TQString::fromLatin1("Atlantik/" ATLANTIK_VERSION_STRING));
if (!m_timer) if (!m_timer)
@ -54,18 +54,18 @@ void Monopigator::loadData(const KURL &url)
m_timer->start(10000, true); m_timer->start(10000, true);
} }
connect(m_job, TQT_SIGNAL(data(KIO::Job *, const TQByteArray &)), TQT_SLOT(slotData(KIO::Job *, const TQByteArray &))); connect(m_job, TQT_SIGNAL(data(TDEIO::Job *, const TQByteArray &)), TQT_SLOT(slotData(TDEIO::Job *, const TQByteArray &)));
connect(m_job, TQT_SIGNAL(result(KIO::Job *)), TQT_SLOT(slotResult(KIO::Job *))); connect(m_job, TQT_SIGNAL(result(TDEIO::Job *)), TQT_SLOT(slotResult(TDEIO::Job *)));
connect(m_timer, TQT_SIGNAL(timeout()), TQT_SLOT(slotTimeout())); connect(m_timer, TQT_SIGNAL(timeout()), TQT_SLOT(slotTimeout()));
} }
void Monopigator::slotData(KIO::Job *, const TQByteArray &data) void Monopigator::slotData(TDEIO::Job *, const TQByteArray &data)
{ {
m_timer->stop(); m_timer->stop();
m_downloadData->writeBlock(data.data(), data.size()); m_downloadData->writeBlock(data.data(), data.size());
} }
void Monopigator::slotResult(KIO::Job *job) void Monopigator::slotResult(TDEIO::Job *job)
{ {
processData(m_downloadData->buffer(), !job->error()); processData(m_downloadData->buffer(), !job->error());
m_job = 0; m_job = 0;

@ -44,8 +44,8 @@ signals:
void timeout(); void timeout();
private slots: private slots:
void slotData(KIO::Job *, const TQByteArray &); void slotData(TDEIO::Job *, const TQByteArray &);
void slotResult(KIO::Job *); void slotResult(TDEIO::Job *);
void slotTimeout(); void slotTimeout();
private: private:
@ -53,7 +53,7 @@ private:
TQBuffer *m_downloadData; TQBuffer *m_downloadData;
TQTimer *m_timer; TQTimer *m_timer;
KIO::Job *m_job; TDEIO::Job *m_job;
}; };
class MonopigatorEntry : public TQObject, public TQListViewItem class MonopigatorEntry : public TQObject, public TQListViewItem

@ -14,7 +14,7 @@
// the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, // the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
// Boston, MA 02110-1301, USA. // Boston, MA 02110-1301, USA.
class AtlantikProtocol : public KIO::SlaveBase class AtlantikProtocol : public TDEIO::SlaveBase
{ {
public: public:
AtlantikProtocol( const TQCString &pool, const TQCString &app) : SlaveBase( "atlantik", pool, app ) {} AtlantikProtocol( const TQCString &pool, const TQCString &app) : SlaveBase( "atlantik", pool, app ) {}

@ -583,10 +583,10 @@ void KAstTopLevel::slotKeyConfig()
void KAstTopLevel::slotPref() void KAstTopLevel::slotPref()
{ {
if(KConfigDialog::showDialog("settings")) if(TDEConfigDialog::showDialog("settings"))
return; return;
KConfigDialog *dialog = new KConfigDialog(this, "settings", Settings::self(), KDialogBase::Swallow); TDEConfigDialog *dialog = new TDEConfigDialog(this, "settings", Settings::self(), KDialogBase::Swallow);
/* Make widget */ /* Make widget */
TQWidget *w = new TQWidget(0, "Settings"); TQWidget *w = new TQWidget(0, "Settings");

@ -118,8 +118,8 @@ void GameWidget::getMoves(int moves)
void GameWidget::mergeHighScores(int l) void GameWidget::mergeHighScores(int l)
{ {
KConfigGroup oldConfig(kapp->config(), TQString("High Scores Level %1").arg(l).utf8()); TDEConfigGroup oldConfig(kapp->config(), TQString("High Scores Level %1").arg(l).utf8());
KConfigGroup newConfig(kapp->config(), TQString("Highscores Level %1").arg(l).utf8()); TDEConfigGroup newConfig(kapp->config(), TQString("Highscores Level %1").arg(l).utf8());
newConfig.writeEntry("LastPlayer", oldConfig.readEntry("LastPlayer")); newConfig.writeEntry("LastPlayer", oldConfig.readEntry("LastPlayer"));
@ -229,7 +229,7 @@ GameWidget::GameWidget ( TQWidget *parent, const char* name )
updateLevel(1); updateLevel(1);
KConfig *config = TDEGlobal::config(); TDEConfig *config = TDEGlobal::config();
config->setGroup("Options"); config->setGroup("Options");
settings.anim_speed = config->readNumEntry("Animation Speed", 1); settings.anim_speed = config->readNumEntry("Animation Speed", 1);
if (settings.anim_speed < 1 || settings.anim_speed > MAX_SPEED) if (settings.anim_speed < 1 || settings.anim_speed > MAX_SPEED)

@ -9,7 +9,7 @@
class GameWidget; class GameWidget;
class KAction; class KAction;
class KConfig; class TDEConfig;
#include <kmainwindow.h> #include <kmainwindow.h>
@ -47,7 +47,7 @@ class AtomTopLevel : public KMainWindow
// called before exiting -> save configuration // called before exiting -> save configuration
virtual bool queryExit(); virtual bool queryExit();
KConfig *config; TDEConfig *config;
GameWidget *main; GameWidget *main;

@ -85,7 +85,7 @@ void KBgEngineFIBS::start()
*/ */
void KBgEngineFIBS::readConfig() void KBgEngineFIBS::readConfig()
{ {
KConfig *config = kapp->config(); TDEConfig *config = kapp->config();
config->setGroup("fibs engine"); config->setGroup("fibs engine");
// history variables // history variables
@ -120,7 +120,7 @@ void KBgEngineFIBS::readConfig()
*/ */
void KBgEngineFIBS::saveConfig() void KBgEngineFIBS::saveConfig()
{ {
KConfig *config = kapp->config(); TDEConfig *config = kapp->config();
config->setGroup("fibs engine"); config->setGroup("fibs engine");
// history variables // history variables

@ -306,7 +306,7 @@ KBgChat::~KBgChat()
*/ */
void KBgChat::readConfig() void KBgChat::readConfig()
{ {
KConfig* config = kapp->config(); TDEConfig* config = kapp->config();
config->setGroup("chat window"); config->setGroup("chat window");
TQPoint pos(10, 10); TQPoint pos(10, 10);
@ -326,7 +326,7 @@ void KBgChat::readConfig()
*/ */
void KBgChat::saveConfig() void KBgChat::saveConfig()
{ {
KConfig* config = kapp->config(); TDEConfig* config = kapp->config();
config->setGroup("chat window"); config->setGroup("chat window");
config->writeEntry("ori", pos()); config->writeEntry("ori", pos());

@ -508,7 +508,7 @@ void KFibsPlayerList::setupDefault()
*/ */
void KFibsPlayerList::readColumns() void KFibsPlayerList::readColumns()
{ {
KConfig* config = kapp->config(); TDEConfig* config = kapp->config();
config->setGroup(name()); config->setGroup(name());
for (int i = 0; i < LVEnd; i++) { for (int i = 0; i < LVEnd; i++) {
@ -522,7 +522,7 @@ void KFibsPlayerList::readColumns()
*/ */
void KFibsPlayerList::readConfig() void KFibsPlayerList::readConfig()
{ {
KConfig* config = kapp->config(); TDEConfig* config = kapp->config();
config->setGroup(name()); config->setGroup(name());
TQPoint pos, defpos(10, 10); TQPoint pos, defpos(10, 10);
@ -540,7 +540,7 @@ void KFibsPlayerList::readConfig()
*/ */
void KFibsPlayerList::saveConfig() void KFibsPlayerList::saveConfig()
{ {
KConfig* config = kapp->config(); TDEConfig* config = kapp->config();
config->setGroup(name()); config->setGroup(name());
config->writeEntry("ori", pos()); config->writeEntry("ori", pos());

@ -388,7 +388,7 @@ void KBgEngineGNU::getSetupPages(KDialogBase *nb)
*/ */
void KBgEngineGNU::readConfig() void KBgEngineGNU::readConfig()
{ {
KConfig* config = kapp->config(); TDEConfig* config = kapp->config();
config->setGroup("gnu engine"); config->setGroup("gnu engine");
// nothing yet // nothing yet
@ -399,7 +399,7 @@ void KBgEngineGNU::readConfig()
*/ */
void KBgEngineGNU::saveConfig() void KBgEngineGNU::saveConfig()
{ {
KConfig* config = kapp->config(); TDEConfig* config = kapp->config();
config->setGroup("gnu engine"); config->setGroup("gnu engine");
// nothing yet // nothing yet

@ -447,7 +447,7 @@ KBgEngineNg::~KBgEngineNg()
*/ */
void KBgEngineNg::readConfig() void KBgEngineNg::readConfig()
{ {
KConfig* config = kapp->config(); TDEConfig* config = kapp->config();
config->setGroup("next generation engine"); config->setGroup("next generation engine");
_port = config->readNumEntry("port", PROG_COOKIE); _port = config->readNumEntry("port", PROG_COOKIE);
@ -462,7 +462,7 @@ void KBgEngineNg::readConfig()
*/ */
void KBgEngineNg::saveConfig() void KBgEngineNg::saveConfig()
{ {
KConfig* config = kapp->config(); TDEConfig* config = kapp->config();
config->setGroup("next generation engine"); config->setGroup("next generation engine");
config->writeEntry("port", _port); config->writeEntry("port", _port);

@ -247,7 +247,7 @@ void KBgEngineOffline::setupCancel()
*/ */
void KBgEngineOffline::readConfig() void KBgEngineOffline::readConfig()
{ {
KConfig* config = kapp->config(); TDEConfig* config = kapp->config();
config->setGroup("offline engine"); config->setGroup("offline engine");
d->mName[0] = config->readEntry("player-one", i18n("South")); // same as above d->mName[0] = config->readEntry("player-one", i18n("South")); // same as above
@ -260,7 +260,7 @@ void KBgEngineOffline::readConfig()
*/ */
void KBgEngineOffline::saveConfig() void KBgEngineOffline::saveConfig()
{ {
KConfig* config = kapp->config(); TDEConfig* config = kapp->config();
config->setGroup("offline engine"); config->setGroup("offline engine");
config->writeEntry("player-one", d->mName[0] ); config->writeEntry("player-one", d->mName[0] );

@ -268,7 +268,7 @@ void KBg::setupEngine()
} }
statusBar()->message(engineString[currEngine]); statusBar()->message(engineString[currEngine]);
KConfig* config = kapp->config(); TDEConfig* config = kapp->config();
config->setGroup("global settings"); config->setGroup("global settings");
if (config->readBoolEntry("enable timeout", true)) if (config->readBoolEntry("enable timeout", true))
engine[currEngine]->setCommit(config->readDoubleNumEntry("timeout", 2.5)); engine[currEngine]->setCommit(config->readDoubleNumEntry("timeout", 2.5));
@ -308,7 +308,7 @@ void KBg::setupEngine()
*/ */
void KBg::saveConfig() void KBg::saveConfig()
{ {
KConfig* config = kapp->config(); TDEConfig* config = kapp->config();
config->setGroup("global settings"); config->setGroup("global settings");
/* /*
@ -352,7 +352,7 @@ void KBg::saveConfig()
*/ */
void KBg::readConfig() void KBg::readConfig()
{ {
KConfig* config = kapp->config(); TDEConfig* config = kapp->config();
config->setGroup("global settings"); config->setGroup("global settings");
/* /*
@ -407,7 +407,7 @@ void KBg::readConfig()
void KBg::setupOk() void KBg::setupOk()
{ {
// global settings // global settings
KConfig* config = kapp->config(); TDEConfig* config = kapp->config();
config->setGroup("global settings"); config->setGroup("global settings");
config->writeEntry("enable timeout", cbt->isChecked()); config->writeEntry("enable timeout", cbt->isChecked());
@ -500,7 +500,7 @@ void KBg::setupDlg()
KDialogBase::Apply|KDialogBase::Help, KDialogBase::Apply|KDialogBase::Help,
KDialogBase::Ok, this, "setup", true, true); KDialogBase::Ok, this, "setup", true, true);
KConfig* config = kapp->config(); TDEConfig* config = kapp->config();
config->setGroup("global settings"); config->setGroup("global settings");
/* /*
@ -637,7 +637,7 @@ void KBg::print()
{ {
KPrinter *prt = new KPrinter(); KPrinter *prt = new KPrinter();
KConfig* config = kapp->config(); TDEConfig* config = kapp->config();
config->setGroup("printing"); config->setGroup("printing");
prt->setNumCopies(config->readNumEntry("numcopies", 1)); prt->setNumCopies(config->readNumEntry("numcopies", 1));

@ -307,7 +307,7 @@ void KBgBoardSetup::selectBackgroundColor()
*/ */
void KBgBoard::saveConfig() void KBgBoard::saveConfig()
{ {
KConfig* config = kapp->config(); TDEConfig* config = kapp->config();
config->setGroup(name()); config->setGroup(name());
config->writeEntry("bgcolor", backgroundColor()); config->writeEntry("bgcolor", backgroundColor());
@ -326,7 +326,7 @@ void KBgBoard::readConfig()
TQColor col(200, 200, 166); TQColor col(200, 200, 166);
TQFont fon("Serif", 18, TQFont::Normal); TQFont fon("Serif", 18, TQFont::Normal);
KConfig* config = kapp->config(); TDEConfig* config = kapp->config();
config->setGroup(name()); config->setGroup(name());
setBackgroundColor(config->readColorEntry("bgcolor", &col)); setBackgroundColor(config->readColorEntry("bgcolor", &col));

@ -84,7 +84,7 @@ void KBgTextView::selectFont()
*/ */
void KBgTextView::readConfig() void KBgTextView::readConfig()
{ {
KConfig* config = kapp->config(); TDEConfig* config = kapp->config();
config->setGroup(name()); config->setGroup(name());
// nothing to restore // nothing to restore
@ -95,7 +95,7 @@ void KBgTextView::readConfig()
*/ */
void KBgTextView::saveConfig() void KBgTextView::saveConfig()
{ {
KConfig* config = kapp->config(); TDEConfig* config = kapp->config();
config->setGroup(name()); config->setGroup(name());
// nothing to save // nothing to save

@ -805,7 +805,7 @@ void KBattleshipWindow::slotNewServer()
slotStatusMsg(i18n("Loading Start-Server dialog...")); slotStatusMsg(i18n("Loading Start-Server dialog..."));
m_server = new KServerDialog(this); m_server = new TDEServerDialog(this);
connect(m_server, TQT_SIGNAL(okClicked()), TQT_TQOBJECT(this), TQT_SLOT(slotStartBattleshipServer())); connect(m_server, TQT_SIGNAL(okClicked()), TQT_TQOBJECT(this), TQT_SLOT(slotStartBattleshipServer()));
connect(m_server, TQT_SIGNAL(cancelClicked()), TQT_TQOBJECT(this), TQT_SLOT(slotDeleteServerDialog())); connect(m_server, TQT_SIGNAL(cancelClicked()), TQT_TQOBJECT(this), TQT_SLOT(slotDeleteServerDialog()));
m_server->show(); m_server->show();

@ -137,7 +137,7 @@ private:
TQString m_enemyClientDescription; TQString m_enemyClientDescription;
TQString m_enemyProtocolVersion; TQString m_enemyProtocolVersion;
KConfig *m_config; TDEConfig *m_config;
KBAIPlayer *m_aiPlayer; KBAIPlayer *m_aiPlayer;
KonnectionHandling *m_connection; KonnectionHandling *m_connection;
KBattleshipServer *m_kbserver; KBattleshipServer *m_kbserver;
@ -153,7 +153,7 @@ private:
KToggleAction *m_configSound; KToggleAction *m_configSound;
KToggleAction *m_configGrid; KToggleAction *m_configGrid;
KClientDialog *m_client; KClientDialog *m_client;
KServerDialog *m_server; TDEServerDialog *m_server;
KShipList *m_ownshiplist; KShipList *m_ownshiplist;
KShipList *m_enemyshiplist; KShipList *m_enemyshiplist;
TQString m_ownNickname; TQString m_ownNickname;

@ -54,7 +54,7 @@ signals:
void sigCancelConnect(); void sigCancelConnect();
private: private:
KConfig *m_config; TDEConfig *m_config;
DNSSD::ServiceBrowser *m_browser; DNSSD::ServiceBrowser *m_browser;
clientConnectDlg *m_mainWidget; clientConnectDlg *m_mainWidget;
}; };

@ -21,7 +21,7 @@
#include "kserverdialog.h" #include "kserverdialog.h"
KServerDialog::KServerDialog(TQWidget *parent, const char *name) : TDEServerDialog::TDEServerDialog(TQWidget *parent, const char *name) :
KDialogBase(Plain, i18n("Start Server"), Ok|Cancel, Ok, parent, name, true, false, KGuiItem(i18n("&Start"))) KDialogBase(Plain, i18n("Start Server"), Ok|Cancel, Ok, parent, name, true, false, KGuiItem(i18n("&Start")))
{ {
TQFrame* page = plainPage(); TQFrame* page = plainPage();
@ -37,29 +37,29 @@ KServerDialog::KServerDialog(TQWidget *parent, const char *name) :
m_mainWidget->gamenameEdit->setText(gamename); m_mainWidget->gamenameEdit->setText(gamename);
} }
void KServerDialog::slotOk() void TDEServerDialog::slotOk()
{ {
hide(); hide();
emit okClicked(); emit okClicked();
} }
void KServerDialog::slotCancel() void TDEServerDialog::slotCancel()
{ {
hide(); hide();
emit cancelClicked(); emit cancelClicked();
} }
TQString KServerDialog::port() const TQString TDEServerDialog::port() const
{ {
return TQString::number(m_mainWidget->portEdit->value()); return TQString::number(m_mainWidget->portEdit->value());
} }
TQString KServerDialog::nickname() const TQString TDEServerDialog::nickname() const
{ {
return m_mainWidget->nicknameEdit->text(); return m_mainWidget->nicknameEdit->text();
} }
TQString KServerDialog::gamename() const TQString TDEServerDialog::gamename() const
{ {
return m_mainWidget->gamenameEdit->text(); return m_mainWidget->gamenameEdit->text();
} }

@ -28,12 +28,12 @@
#include "dialogs/serverDlg.h" #include "dialogs/serverDlg.h"
class KServerDialog : public KDialogBase class TDEServerDialog : public KDialogBase
{ {
Q_OBJECT Q_OBJECT
public: public:
KServerDialog(TQWidget *parent = 0, const char *name = 0); TDEServerDialog(TQWidget *parent = 0, const char *name = 0);
TQString port() const; TQString port() const;
TQString nickname() const; TQString nickname() const;

@ -107,7 +107,7 @@ KBBGame::KBBGame()
running = FALSE; running = FALSE;
gameBoard = NULL; gameBoard = NULL;
KConfig *kConf; TDEConfig *kConf;
int j; int j;
kConf = kapp->config(); kConf = kapp->config();
kConf->setGroup( "KBlackBox Setup" ); kConf->setGroup( "KBlackBox Setup" );
@ -163,7 +163,7 @@ KBBGame::KBBGame()
KBBGame::~KBBGame() KBBGame::~KBBGame()
{ {
KConfig *kConf; TDEConfig *kConf;
TQString s; TQString s;
kConf = kapp->config(); kConf = kapp->config();

@ -41,7 +41,7 @@ KJezzball::KJezzball()
m_game.score = 0; m_game.score = 0;
m_state = Idle; m_state = Idle;
KConfig *config = kapp->config(); TDEConfig *config = kapp->config();
m_backgroundDir = config->readPathEntry( "BackgroundDir" ); m_backgroundDir = config->readPathEntry( "BackgroundDir" );
m_showBackground = config->readBoolEntry( "ShowBackground", false ); m_showBackground = config->readBoolEntry( "ShowBackground", false );
@ -110,7 +110,7 @@ KJezzball::KJezzball()
KJezzball::~KJezzball() KJezzball::~KJezzball()
{ {
KConfig *config = kapp->config(); TDEConfig *config = kapp->config();
config->writeEntry( "PlaySounds", m_soundAction->isChecked() ); config->writeEntry( "PlaySounds", m_soundAction->isChecked() );
} }
@ -264,7 +264,7 @@ void KJezzball::selectBackground()
m_backgroundShowAction->setEnabled(true); m_backgroundShowAction->setEnabled(true);
// save settings // save settings
KConfig *config = kapp->config(); TDEConfig *config = kapp->config();
config->writePathEntry( "BackgroundDir", m_backgroundDir ); config->writePathEntry( "BackgroundDir", m_backgroundDir );
config->sync(); config->sync();
@ -289,7 +289,7 @@ void KJezzball::showBackground()
m_showBackground = show; m_showBackground = show;
// save setting // save setting
KConfig *config = kapp->config(); TDEConfig *config = kapp->config();
config->writeEntry( "ShowBackground", m_showBackground ); config->writeEntry( "ShowBackground", m_showBackground );
config->sync(); config->sync();

@ -244,7 +244,7 @@ void AbTop::readConfig()
{ {
kdDebug(12011) << "Reading config..." << endl; kdDebug(12011) << "Reading config..." << endl;
KConfig* config = kapp->config(); TDEConfig* config = kapp->config();
config->setGroup("Options"); config->setGroup("Options");
readOptions(config); readOptions(config);
@ -258,7 +258,7 @@ void AbTop::readConfig()
board->setEvalScheme( currentEvalScheme ); board->setEvalScheme( currentEvalScheme );
} }
void AbTop::readOptions(KConfig* config) void AbTop::readOptions(TDEConfig* config)
{ {
TQString entry = config->readEntry("Level"); TQString entry = config->readEntry("Level");
for (uint i=0; i<Nb_Levels; i++) for (uint i=0; i<Nb_Levels; i++)
@ -280,7 +280,7 @@ void AbTop::readOptions(KConfig* config)
showSpyAction->setChecked( showSpy ); showSpyAction->setChecked( showSpy );
} }
void AbTop::readProperties(KConfig *config) void AbTop::readProperties(TDEConfig *config)
{ {
TQString entry; TQString entry;
@ -312,7 +312,7 @@ void AbTop::writeConfig()
{ {
kdDebug(12011) << "Writing config..." << endl; kdDebug(12011) << "Writing config..." << endl;
KConfig* config = kapp->config(); TDEConfig* config = kapp->config();
config->setGroup("Options"); config->setGroup("Options");
writeOptions(config); writeOptions(config);
@ -325,7 +325,7 @@ void AbTop::writeConfig()
} }
void AbTop::writeOptions(KConfig *config) void AbTop::writeOptions(TDEConfig *config)
{ {
config->writeEntry("Level", LEVEL[levelAction->currentItem()].key); config->writeEntry("Level", LEVEL[levelAction->currentItem()].key);
config->writeEntry("Computer", IPLAY[iplayAction->currentItem()].key); config->writeEntry("Computer", IPLAY[iplayAction->currentItem()].key);
@ -335,7 +335,7 @@ void AbTop::writeOptions(KConfig *config)
config->writeEntry("ShowSpy", showSpy); config->writeEntry("ShowSpy", showSpy);
} }
void AbTop::saveProperties(KConfig *config) void AbTop::saveProperties(TDEConfig *config)
{ {
writeOptions(config); writeOptions(config);
if (currentEvalScheme) if (currentEvalScheme)
@ -352,14 +352,14 @@ void AbTop::saveProperties(KConfig *config)
void AbTop::savePosition() void AbTop::savePosition()
{ {
KConfig* config = kapp->config(); TDEConfig* config = kapp->config();
config->setGroup("SavedPosition"); config->setGroup("SavedPosition");
config->writeEntry("Position", board->getState(moveNo)); config->writeEntry("Position", board->getState(moveNo));
} }
void AbTop::restorePosition() void AbTop::restorePosition()
{ {
KConfig* config = kapp->config(); TDEConfig* config = kapp->config();
config->setGroup("SavedPosition"); config->setGroup("SavedPosition");
TQString entry = config->readEntry("Position"); TQString entry = config->readEntry("Position");

@ -49,8 +49,8 @@ public:
void netHost(char* h) { hosts.append(h); } void netHost(char* h) { hosts.append(h); }
protected: protected:
virtual void saveProperties( KConfig * ); virtual void saveProperties( TDEConfig * );
virtual void readProperties( KConfig * ); virtual void readProperties( TDEConfig * );
public slots: public slots:
@ -99,8 +99,8 @@ private:
void setMoveNo(int, bool updateGUI = false); void setMoveNo(int, bool updateGUI = false);
bool iPlayNow(); bool iPlayNow();
Move haveHint(); Move haveHint();
void readOptions(KConfig *); void readOptions(TDEConfig *);
void writeOptions(KConfig *); void writeOptions(TDEConfig *);
Move actMove; Move actMove;
Board* board; Board* board;

@ -10,7 +10,7 @@
#include <krandomsequence.h> #include <krandomsequence.h>
#include "Move.h" #include "Move.h"
class KConfig; class TDEConfig;
class EvalScheme; class EvalScheme;
/* Class for best moves so far */ /* Class for best moves so far */

@ -30,7 +30,7 @@ EvalDlgImpl::EvalDlgImpl(TQWidget* parent, Board* board)
connect( evalSaveAs, TQT_SIGNAL( clicked() ), this, TQT_SLOT( saveas() ) ); connect( evalSaveAs, TQT_SIGNAL( clicked() ), this, TQT_SLOT( saveas() ) );
connect( evalList, TQT_SIGNAL( highlighted(int) ), this, TQT_SLOT( select(int) ) ); connect( evalList, TQT_SIGNAL( highlighted(int) ), this, TQT_SLOT( select(int) ) );
KConfig* config = kapp->config(); TDEConfig* config = kapp->config();
config->setGroup("General"); config->setGroup("General");
TQStringList list = config->readListEntry("EvalSchemes"); TQStringList list = config->readListEntry("EvalSchemes");
evalList->insertItem( i18n("Current") ); evalList->insertItem( i18n("Current") );
@ -235,7 +235,7 @@ void EvalDlgImpl::deleteEntry()
TQString name = evalList->text(i); TQString name = evalList->text(i);
evalList->removeItem(i); evalList->removeItem(i);
KConfig* config = kapp->config(); TDEConfig* config = kapp->config();
config->setGroup("General"); config->setGroup("General");
TQStringList list = config->readListEntry("EvalSchemes"); TQStringList list = config->readListEntry("EvalSchemes");
list.remove(name); list.remove(name);
@ -251,7 +251,7 @@ void EvalDlgImpl::saveas()
if (dlg.exec()) { if (dlg.exec()) {
TQString name=dlg.text(); TQString name=dlg.text();
KConfig* config = kapp->config(); TDEConfig* config = kapp->config();
config->setGroup("General"); config->setGroup("General");
TQStringList list = config->readListEntry("EvalSchemes"); TQStringList list = config->readListEntry("EvalSchemes");
TQListBoxItem *it = evalList->findItem(name); TQListBoxItem *it = evalList->findItem(name);
@ -286,7 +286,7 @@ void EvalDlgImpl::select(int i)
else { else {
// read in the Scheme from the config file // read in the Scheme from the config file
_scheme = new EvalScheme(name); _scheme = new EvalScheme(name);
KConfig* config = kapp->config(); TDEConfig* config = kapp->config();
_scheme->read(config); _scheme->read(config);
} }

@ -74,7 +74,7 @@ void EvalScheme::setDefaults()
} }
void EvalScheme::read(KConfig *config) void EvalScheme::read(TDEConfig *config)
{ {
TQString confSection = TQString("%1 Evaluation Scheme").arg(_name); TQString confSection = TQString("%1 Evaluation Scheme").arg(_name);
config->setGroup(confSection); config->setGroup(confSection);
@ -115,7 +115,7 @@ void EvalScheme::read(KConfig *config)
} }
void EvalScheme::save(KConfig* config) void EvalScheme::save(TDEConfig* config)
{ {
TQString confSection = TQString("%1 Evaluation Scheme").arg(_name); TQString confSection = TQString("%1 Evaluation Scheme").arg(_name);
config->setGroup(confSection); config->setGroup(confSection);

@ -14,7 +14,7 @@
#include "Move.h" #include "Move.h"
class KConfig; class TDEConfig;
/* /*
* The constructor gets a name, and tries to read the scheme * The constructor gets a name, and tries to read the scheme
@ -30,8 +30,8 @@ class EvalScheme
~EvalScheme() {} ~EvalScheme() {}
void setDefaults(); void setDefaults();
void read(KConfig*); void read(TDEConfig*);
void save(KConfig*); void save(TDEConfig*);
static EvalScheme* create(TQString); static EvalScheme* create(TQString);
TQString ascii(); TQString ascii();

@ -711,7 +711,7 @@ void KGoldrunner::showEnemy4() {game->showEnemyState (4);}
void KGoldrunner::showEnemy5() {game->showEnemyState (5);} void KGoldrunner::showEnemy5() {game->showEnemyState (5);}
void KGoldrunner::showEnemy6() {game->showEnemyState (6);} void KGoldrunner::showEnemy6() {game->showEnemyState (6);}
void KGoldrunner::saveProperties(KConfig *config) void KGoldrunner::saveProperties(TDEConfig *config)
{ {
// The 'config' object points to the session managed // The 'config' object points to the session managed
// config file. Anything you write here will be available // config file. Anything you write here will be available
@ -722,7 +722,7 @@ void KGoldrunner::saveProperties(KConfig *config)
// config->writeEntry("qqq", qqq); // config->writeEntry("qqq", qqq);
} }
void KGoldrunner::readProperties(KConfig *config) void KGoldrunner::readProperties(TDEConfig *config)
{ {
// The 'config' object points to the session managed // The 'config' object points to the session managed
// config file. This function is automatically called whenever // config file. This function is automatically called whenever

@ -59,14 +59,14 @@ protected:
* This function is called when it is time for the app to save its * This function is called when it is time for the app to save its
* properties for session management purposes. * properties for session management purposes.
*/ */
void saveProperties(KConfig *); void saveProperties(TDEConfig *);
/** /**
* This function is called when this app is restored. The KConfig * This function is called when this app is restored. The TDEConfig
* object points to the session management config file that was saved * object points to the session management config file that was saved
* with @ref saveProperties. * with @ref saveProperties.
*/ */
void readProperties(KConfig *); void readProperties(TDEConfig *);
bool queryClose (); // To save edits before closing. bool queryClose (); // To save edits before closing.

@ -242,7 +242,7 @@ void KCubeBoxWidget::stopActivities()
} }
void KCubeBoxWidget::saveProperties(KConfigBase* config) void KCubeBoxWidget::saveProperties(TDEConfigBase* config)
{ {
if(isMoving()) if(isMoving())
{ {
@ -275,7 +275,7 @@ void KCubeBoxWidget::saveProperties(KConfigBase* config)
config->writeEntry("CubeDim",dim()); config->writeEntry("CubeDim",dim());
} }
void KCubeBoxWidget::readProperties(KConfigBase* config) void KCubeBoxWidget::readProperties(TDEConfigBase* config)
{ {
TQStrList list; TQStrList list;
list.setAutoDelete(true); list.setAutoDelete(true);

@ -31,7 +31,7 @@ class TQGridLayout;
class CubeBox; class CubeBox;
class TQPalette; class TQPalette;
class TQTimer; class TQTimer;
class KConfigBase; class TDEConfigBase;
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
#include <config.h> #include <config.h>
@ -108,8 +108,8 @@ public:
*/ */
void checkComputerplayer(Player player); void checkComputerplayer(Player player);
inline void saveGame(KConfigBase *c) { saveProperties(c); } inline void saveGame(TDEConfigBase *c) { saveProperties(c); }
inline void restoreGame(KConfigBase *c) { readProperties(c); } inline void restoreGame(TDEConfigBase *c) { readProperties(c); }
public slots: public slots:
/** stops all activities like getting a hint or doing a move */ /** stops all activities like getting a hint or doing a move */
@ -135,8 +135,8 @@ protected:
virtual void deleteCubes(); virtual void deleteCubes();
virtual void initCubes(); virtual void initCubes();
void saveProperties(KConfigBase *); void saveProperties(TDEConfigBase *);
void readProperties(KConfigBase *); void readProperties(TDEConfigBase *);
protected slots: protected slots:
/** sets the cursor to an waitcursor */ /** sets the cursor to an waitcursor */

@ -120,7 +120,7 @@ void KJumpingCube::saveGame(bool saveAs)
url.setFileName( url.filename()+".kjc" ); url.setFileName( url.filename()+".kjc" );
} }
if(KIO::NetAccess::exists(url,false,this)) if(TDEIO::NetAccess::exists(url,false,this))
{ {
TQString mes=i18n("The file %1 exists.\n" TQString mes=i18n("The file %1 exists.\n"
"Do you want to overwrite it?").arg(url.url()); "Do you want to overwrite it?").arg(url.url());
@ -144,7 +144,7 @@ void KJumpingCube::saveGame(bool saveAs)
view->saveGame(&config); view->saveGame(&config);
config.sync(); config.sync();
if(KIO::NetAccess::upload( tempFile.name(),gameURL,this )) if(TDEIO::NetAccess::upload( tempFile.name(),gameURL,this ))
{ {
TQString s=i18n("game saved as %1"); TQString s=i18n("game saved as %1");
s=s.arg(gameURL.url()); s=s.arg(gameURL.url());
@ -166,7 +166,7 @@ void KJumpingCube::openGame()
url = KFileDialog::getOpenURL( gameURL.url(), "*.kjc", this, 0 ); url = KFileDialog::getOpenURL( gameURL.url(), "*.kjc", this, 0 );
if( url.isEmpty() ) if( url.isEmpty() )
return; return;
if(!KIO::NetAccess::exists(url,true,this)) if(!TDEIO::NetAccess::exists(url,true,this))
{ {
TQString mes=i18n("The file %1 does not exist!").arg(url.url()); TQString mes=i18n("The file %1 does not exist!").arg(url.url());
KMessageBox::sorry(this,mes); KMessageBox::sorry(this,mes);
@ -176,7 +176,7 @@ void KJumpingCube::openGame()
while(!fileOk); while(!fileOk);
TQString tempFile; TQString tempFile;
if( KIO::NetAccess::download( url, tempFile, this ) ) if( TDEIO::NetAccess::download( url, tempFile, this ) )
{ {
KSimpleConfig config(tempFile,true); KSimpleConfig config(tempFile,true);
config.setGroup("KJumpingCube"); config.setGroup("KJumpingCube");
@ -194,7 +194,7 @@ void KJumpingCube::openGame()
undoAction->setEnabled(false); undoAction->setEnabled(false);
KIO::NetAccess::removeTempFile( tempFile ); TDEIO::NetAccess::removeTempFile( tempFile );
} }
else else
KMessageBox::sorry(this,i18n("There was an error loading file\n%1").arg( url.url() )); KMessageBox::sorry(this,i18n("There was an error loading file\n%1").arg( url.url() ));
@ -265,10 +265,10 @@ void KJumpingCube::enableStop_Thinking(){
* Show Configure dialog. * Show Configure dialog.
*/ */
void KJumpingCube::showOptions(){ void KJumpingCube::showOptions(){
if(KConfigDialog::showDialog("settings")) if(TDEConfigDialog::showDialog("settings"))
return; return;
KConfigDialog *dialog = new KConfigDialog(this, "settings", Prefs::self(), KDialogBase::Swallow); TDEConfigDialog *dialog = new TDEConfigDialog(this, "settings", Prefs::self(), KDialogBase::Swallow);
dialog->addPage(new Settings(0, "General"), i18n("General"), "package_settings"); dialog->addPage(new Settings(0, "General"), i18n("General"), "package_settings");
connect(dialog, TQT_SIGNAL(settingsChanged()), view, TQT_SLOT(loadSettings())); connect(dialog, TQT_SIGNAL(settingsChanged()), view, TQT_SLOT(loadSettings()));
dialog->show(); dialog->show();

@ -87,7 +87,7 @@ void BoardWidget::loadSettings(){
void BoardWidget::saveSettings(){ void BoardWidget::saveSettings(){
// Preview can't handle this. TODO // Preview can't handle this. TODO
//KConfig *config=kapp->config(); //TDEConfig *config=kapp->config();
//config->setGroup("General"); //config->setGroup("General");
//config->writePathEntry("Tileset_file", tileFile); //config->writePathEntry("Tileset_file", tileFile);

@ -233,10 +233,10 @@ void KMahjongg::redo()
* Show Configure dialog. * Show Configure dialog.
*/ */
void KMahjongg::showSettings(){ void KMahjongg::showSettings(){
if(KConfigDialog::showDialog("settings")) if(TDEConfigDialog::showDialog("settings"))
return; return;
KConfigDialog *dialog = new KConfigDialog(this, "settings", Prefs::self(), KDialogBase::Swallow); TDEConfigDialog *dialog = new TDEConfigDialog(this, "settings", Prefs::self(), KDialogBase::Swallow);
dialog->addPage(new Settings(0, "General"), i18n("General"), "package_settings"); dialog->addPage(new Settings(0, "General"), i18n("General"), "package_settings");
connect(dialog, TQT_SIGNAL(settingsChanged()), bw, TQT_SLOT(loadSettings())); connect(dialog, TQT_SIGNAL(settingsChanged()), bw, TQT_SLOT(loadSettings()));
connect(dialog, TQT_SIGNAL(settingsChanged()), TQT_TQOBJECT(this), TQT_SLOT(setDisplayedWidth())); connect(dialog, TQT_SIGNAL(settingsChanged()), TQT_TQOBJECT(this), TQT_SLOT(setDisplayedWidth()));
@ -466,7 +466,7 @@ void KMahjongg::loadGame() {
if ( url.isEmpty() ) if ( url.isEmpty() )
return; return;
KIO::NetAccess::download( url, fname, this ); TDEIO::NetAccess::download( url, fname, this );
// open the file for reading // open the file for reading
FILE *outFile = fopen( TQFile::encodeName(fname), "r"); FILE *outFile = fopen( TQFile::encodeName(fname), "r");
@ -496,7 +496,7 @@ void KMahjongg::loadGame() {
// close the file before exit // close the file before exit
fclose(outFile); fclose(outFile);
KIO::NetAccess::removeTempFile( fname ); TDEIO::NetAccess::removeTempFile( fname );
// refresh the board // refresh the board
bw->gameLoaded(); bw->gameLoaded();

@ -79,7 +79,7 @@
* fixed repaint of LCDs in inactive mode * fixed repaint of LCDs in inactive mode
2.1.3 (29 November 2001) 2.1.3 (29 November 2001)
* use KConfigGroupSaver everywhere * use TDEConfigGroupSaver everywhere
* config entry for wwhs server url (just in case ...) * config entry for wwhs server url (just in case ...)
2.1.2 (19 November 2001) 2.1.2 (19 November 2001)
@ -293,7 +293,7 @@ Mario Weilguni <mweilguni@kde.org>
system defines something called "Status"... system defines something called "Status"...
0.5 0.5
* use KApp for configuration and highscoring save (via KConfig) * use KApp for configuration and highscoring save (via TDEConfig)
* better look of option & highscores windows * better look of option & highscores windows
0.4 0.4

@ -68,7 +68,7 @@ void ExtManager::convertLegacy(uint gameType)
case Level::NB_TYPES: Q_ASSERT(false); case Level::NB_TYPES: Q_ASSERT(false);
} }
KConfigGroupSaver cg(kapp->config(), group); TDEConfigGroupSaver cg(kapp->config(), group);
TQString name = cg.config()->readEntry("Name", TQString()); TQString name = cg.config()->readEntry("Name", TQString());
if ( name.isNull() ) return; if ( name.isNull() ) return;
if ( name.isEmpty() ) name = i18n("anonymous"); if ( name.isEmpty() ) name = i18n("anonymous");

@ -155,9 +155,9 @@ void MainWidget::focusOutEvent(TQFocusEvent *e)
void MainWidget::configureSettings() void MainWidget::configureSettings()
{ {
if ( KConfigDialog::showDialog("settings") ) return; if ( TDEConfigDialog::showDialog("settings") ) return;
KConfigDialog *dialog = new KConfigDialog(this, "settings", Settings::self()); TDEConfigDialog *dialog = new TDEConfigDialog(this, "settings", Settings::self());
GameConfig *gc = new GameConfig; GameConfig *gc = new GameConfig;
dialog->addPage(gc, i18n("Game"), "package_system"); dialog->addPage(gc, i18n("Game"), "package_system");
dialog->addPage(new AppearanceConfig, i18n("Appearance"), "style"); dialog->addPage(new AppearanceConfig, i18n("Appearance"), "style");

@ -339,7 +339,7 @@ void Status::saveLog()
{ {
KURL url = KFileDialog::getSaveURL(TQString(), TQString(), this); KURL url = KFileDialog::getSaveURL(TQString(), TQString(), this);
if ( url.isEmpty() ) return; if ( url.isEmpty() ) return;
if ( KIO::NetAccess::exists(url, false, this) ) { if ( TDEIO::NetAccess::exists(url, false, this) ) {
KGuiItem gi = KStdGuiItem::save(); KGuiItem gi = KStdGuiItem::save();
gi.setText(i18n("Overwrite")); gi.setText(i18n("Overwrite"));
int res = KMessageBox::warningYesNo(this, int res = KMessageBox::warningYesNo(this,
@ -350,7 +350,7 @@ void Status::saveLog()
KTempFile tmp; KTempFile tmp;
(*tmp.textStream()) << _log.toString(); (*tmp.textStream()) << _log.toString();
tmp.close(); tmp.close();
KIO::NetAccess::upload(tmp.name(), url, this); TDEIO::NetAccess::upload(tmp.name(), url, this);
tmp.unlink(); tmp.unlink();
} }
@ -361,7 +361,7 @@ void Status::loadLog()
TQString tmpFile; TQString tmpFile;
bool success = false; bool success = false;
TQDomDocument doc; TQDomDocument doc;
if( KIO::NetAccess::download(url, tmpFile, this) ) { if( TDEIO::NetAccess::download(url, tmpFile, this) ) {
TQFile file(tmpFile); TQFile file(tmpFile);
if ( file.open(IO_ReadOnly) ) { if ( file.open(IO_ReadOnly) ) {
int errorLine; int errorLine;
@ -373,7 +373,7 @@ void Status::loadLog()
} }
success = true; success = true;
} }
KIO::NetAccess::removeTempFile(tmpFile); TDEIO::NetAccess::removeTempFile(tmpFile);
} }
if ( !success ) { if ( !success ) {

@ -63,7 +63,7 @@ namespace KExtHighscore
default: Q_ASSERT(false); default: Q_ASSERT(false);
} }
KConfigGroupSaver cg(kapp->config(), group); TDEConfigGroupSaver cg(kapp->config(), group);
TQString name = cg.config()->readEntry("Name", TQString()); TQString name = cg.config()->readEntry("Name", TQString());
if ( name.isNull() ) return; if ( name.isNull() ) return;
if ( name.isEmpty() ) name = i18n("anonymous"); if ( name.isEmpty() ) name = i18n("anonymous");

@ -35,7 +35,7 @@ TQCanvasRectangle *CanvasItem::onVStrut()
return aboveVStrut && ritem? ritem : 0; return aboveVStrut && ritem? ritem : 0;
} }
void CanvasItem::save(KConfig *cfg) void CanvasItem::save(TDEConfig *cfg)
{ {
cfg->writeEntry("dummykey", true); cfg->writeEntry("dummykey", true);
} }

@ -6,7 +6,7 @@
#include "config.h" #include "config.h"
class Ball; class Ball;
class KConfig; class TDEConfig;
class StateDB; class StateDB;
class KolfGame; class KolfGame;
@ -16,9 +16,9 @@ public:
CanvasItem() { game = 0; } CanvasItem() { game = 0; }
virtual ~CanvasItem() {} virtual ~CanvasItem() {}
/** /**
* load your settings from the KConfig, which represents a course. * load your settings from the TDEConfig, which represents a course.
*/ */
virtual void load(KConfig *) {} virtual void load(TDEConfig *) {}
/** /**
* load a point if you wish. Rarely necessary. * load a point if you wish. Rarely necessary.
*/ */
@ -38,7 +38,7 @@ public:
/** /**
* save your settings. * save your settings.
*/ */
virtual void save(KConfig *cfg); virtual void save(TDEConfig *cfg);
/** /**
* save a point if you wish. Rarely necessary. * save a point if you wish. Rarely necessary.
*/ */

@ -220,7 +220,7 @@ void Floater::loadState(StateDB *db)
move(moveTo.x(), moveTo.y()); move(moveTo.x(), moveTo.y());
} }
void Floater::save(KConfig *cfg) void Floater::save(TDEConfig *cfg)
{ {
cfg->writeEntry("speed", speed); cfg->writeEntry("speed", speed);
cfg->writeEntry("startPoint", TQPoint(wall->startPoint().x() + wall->x(), wall->startPoint().y() + wall->y())); cfg->writeEntry("startPoint", TQPoint(wall->startPoint().x() + wall->x(), wall->startPoint().y() + wall->y()));
@ -229,7 +229,7 @@ void Floater::save(KConfig *cfg)
doSave(cfg); doSave(cfg);
} }
void Floater::load(KConfig *cfg) void Floater::load(TDEConfig *cfg)
{ {
move(firstPoint.x(), firstPoint.y()); move(firstPoint.x(), firstPoint.y());

@ -41,8 +41,8 @@ public:
virtual bool collision(Ball *ball, long int id) { Bridge::collision(ball, id); return false; } virtual bool collision(Ball *ball, long int id) { Bridge::collision(ball, id); return false; }
virtual void saveState(StateDB *db); virtual void saveState(StateDB *db);
virtual void loadState(StateDB *db); virtual void loadState(StateDB *db);
virtual void save(KConfig *cfg); virtual void save(TDEConfig *cfg);
virtual void load(KConfig *cfg); virtual void load(TDEConfig *cfg);
virtual bool loadLast() const { return true; } virtual bool loadLast() const { return true; }
virtual void firstMove(int x, int y); virtual void firstMove(int x, int y);
virtual void aboutToSave(); virtual void aboutToSave();

@ -346,12 +346,12 @@ void Bridge::moveBy(double dx, double dy)
} }
} }
void Bridge::load(KConfig *cfg) void Bridge::load(TDEConfig *cfg)
{ {
doLoad(cfg); doLoad(cfg);
} }
void Bridge::doLoad(KConfig *cfg) void Bridge::doLoad(TDEConfig *cfg)
{ {
newSize(cfg->readNumEntry("width", width()), cfg->readNumEntry("height", height())); newSize(cfg->readNumEntry("width", width()), cfg->readNumEntry("height", height()));
setTopWallVisible(cfg->readBoolEntry("topWallVisible", topWallVisible())); setTopWallVisible(cfg->readBoolEntry("topWallVisible", topWallVisible()));
@ -360,12 +360,12 @@ void Bridge::doLoad(KConfig *cfg)
setRightWallVisible(cfg->readBoolEntry("rightWallVisible", rightWallVisible())); setRightWallVisible(cfg->readBoolEntry("rightWallVisible", rightWallVisible()));
} }
void Bridge::save(KConfig *cfg) void Bridge::save(TDEConfig *cfg)
{ {
doSave(cfg); doSave(cfg);
} }
void Bridge::doSave(KConfig *cfg) void Bridge::doSave(TDEConfig *cfg)
{ {
cfg->writeEntry("width", width()); cfg->writeEntry("width", width());
cfg->writeEntry("height", height()); cfg->writeEntry("height", height());
@ -506,7 +506,7 @@ void Windmill::setGame(KolfGame *game)
right->setGame(game); right->setGame(game);
} }
void Windmill::save(KConfig *cfg) void Windmill::save(TDEConfig *cfg)
{ {
cfg->writeEntry("speed", speed); cfg->writeEntry("speed", speed);
cfg->writeEntry("bottom", m_bottom); cfg->writeEntry("bottom", m_bottom);
@ -514,7 +514,7 @@ void Windmill::save(KConfig *cfg)
doSave(cfg); doSave(cfg);
} }
void Windmill::load(KConfig *cfg) void Windmill::load(TDEConfig *cfg)
{ {
setSpeed(cfg->readNumEntry("speed", -1)); setSpeed(cfg->readNumEntry("speed", -1));
@ -598,7 +598,7 @@ Sign::Sign(TQCanvas *canvas)
setRightWallVisible(true); setRightWallVisible(true);
} }
void Sign::load(KConfig *cfg) void Sign::load(TDEConfig *cfg)
{ {
m_text = cfg->readEntry("Comment", m_text); m_text = cfg->readEntry("Comment", m_text);
m_untranslatedText = cfg->readEntryUntranslated("Comment", m_untranslatedText); m_untranslatedText = cfg->readEntryUntranslated("Comment", m_untranslatedText);
@ -606,7 +606,7 @@ void Sign::load(KConfig *cfg)
doLoad(cfg); doLoad(cfg);
} }
void Sign::save(KConfig *cfg) void Sign::save(TDEConfig *cfg)
{ {
cfg->writeEntry("Comment", m_untranslatedText); cfg->writeEntry("Comment", m_untranslatedText);
@ -794,7 +794,7 @@ void Ellipse::advance(int phase)
} }
} }
void Ellipse::load(KConfig *cfg) void Ellipse::load(TDEConfig *cfg)
{ {
setChangeEnabled(cfg->readBoolEntry("changeEnabled", changeEnabled())); setChangeEnabled(cfg->readBoolEntry("changeEnabled", changeEnabled()));
setChangeEvery(cfg->readNumEntry("changeEvery", changeEvery())); setChangeEvery(cfg->readNumEntry("changeEvery", changeEvery()));
@ -804,7 +804,7 @@ void Ellipse::load(KConfig *cfg)
newSize(newWidth, newHeight); newSize(newWidth, newHeight);
} }
void Ellipse::save(KConfig *cfg) void Ellipse::save(TDEConfig *cfg)
{ {
cfg->writeEntry("changeEvery", changeEvery()); cfg->writeEntry("changeEvery", changeEvery());
cfg->writeEntry("changeEnabled", changeEnabled()); cfg->writeEntry("changeEnabled", changeEnabled());
@ -1207,7 +1207,7 @@ bool Cup::place(Ball *ball, bool /*wasCenter*/)
return true; return true;
} }
void Cup::save(KConfig *cfg) void Cup::save(TDEConfig *cfg)
{ {
cfg->writeEntry("dummykey", true); cfg->writeEntry("dummykey", true);
} }
@ -1380,7 +1380,7 @@ void BlackHole::halfway()
playSound("blackhole"); playSound("blackhole");
} }
void BlackHole::load(KConfig *cfg) void BlackHole::load(TDEConfig *cfg)
{ {
TQPoint exit = cfg->readPointEntry("exit", &exit); TQPoint exit = cfg->readPointEntry("exit", &exit);
exitItem->setX(exit.x()); exitItem->setX(exit.x());
@ -1421,7 +1421,7 @@ void BlackHole::finishMe()
exitItem->setVisible(true); exitItem->setVisible(true);
} }
void BlackHole::save(KConfig *cfg) void BlackHole::save(TDEConfig *cfg)
{ {
cfg->writeEntry("exit", TQPoint(exitItem->x(), exitItem->y())); cfg->writeEntry("exit", TQPoint(exitItem->x(), exitItem->y()));
cfg->writeEntry("exitDeg", exitDeg); cfg->writeEntry("exitDeg", exitDeg);
@ -1932,7 +1932,7 @@ bool Wall::collision(Ball *ball, long int id)
return false; return false;
} }
void Wall::load(KConfig *cfg) void Wall::load(TDEConfig *cfg)
{ {
TQPoint start(startPoint()); TQPoint start(startPoint());
start = cfg->readPointEntry("startPoint", &start); start = cfg->readPointEntry("startPoint", &start);
@ -1946,7 +1946,7 @@ void Wall::load(KConfig *cfg)
endItem->move(end.x(), end.y()); endItem->move(end.x(), end.y());
} }
void Wall::save(KConfig *cfg) void Wall::save(TDEConfig *cfg)
{ {
cfg->writeEntry("startPoint", TQPoint(startItem->x(), startItem->y())); cfg->writeEntry("startPoint", TQPoint(startItem->x(), startItem->y()));
cfg->writeEntry("endPoint", TQPoint(endItem->x(), endItem->y())); cfg->writeEntry("endPoint", TQPoint(endItem->x(), endItem->y()));
@ -2334,7 +2334,7 @@ void KolfGame::setFilename(const TQString &filename)
{ {
this->filename = filename; this->filename = filename;
delete cfg; delete cfg;
cfg = new KConfig(filename, false, false); cfg = new TDEConfig(filename, false, false);
} }
KolfGame::~KolfGame() KolfGame::~KolfGame()
@ -4209,7 +4209,7 @@ void KolfGame::setSound(bool yes)
void KolfGame::courseInfo(CourseInfo &info, const TQString& filename) void KolfGame::courseInfo(CourseInfo &info, const TQString& filename)
{ {
KConfig cfg(filename); TDEConfig cfg(filename);
cfg.setGroup("0-course@-50,-50"); cfg.setGroup("0-course@-50,-50");
info.author = cfg.readEntry("author", info.author); info.author = cfg.readEntry("author", info.author);
info.name = cfg.readEntry("Name", cfg.readEntry("name", info.name)); info.name = cfg.readEntry("Name", cfg.readEntry("name", info.name));
@ -4236,7 +4236,7 @@ void KolfGame::courseInfo(CourseInfo &info, const TQString& filename)
info.holes = hole; info.holes = hole;
} }
void KolfGame::scoresFromSaved(KConfig *config, PlayerList &players) void KolfGame::scoresFromSaved(TDEConfig *config, PlayerList &players)
{ {
config->setGroup("0 Saved Game"); config->setGroup("0 Saved Game");
int numPlayers = config->readNumEntry("Players", 0); int numPlayers = config->readNumEntry("Players", 0);
@ -4261,7 +4261,7 @@ void KolfGame::scoresFromSaved(KConfig *config, PlayerList &players)
} }
} }
void KolfGame::saveScores(KConfig *config) void KolfGame::saveScores(TDEConfig *config)
{ {
// wipe out old player info // wipe out old player info
TQStringList groups = config->groupList(); TQStringList groups = config->groupList();

@ -38,7 +38,7 @@ class TQTimer;
class TQKeyEvent; class TQKeyEvent;
class TQMouseEvent; class TQMouseEvent;
class TQPainter; class TQPainter;
class KConfig; class TDEConfig;
class KPrinter; class KPrinter;
class KolfGame; class KolfGame;
@ -51,8 +51,8 @@ class Player;
class BallStateInfo class BallStateInfo
{ {
public: public:
void saveState(KConfig *cfg); void saveState(TDEConfig *cfg);
void loadState(KConfig *cfg); void loadState(TDEConfig *cfg);
int id; int id;
TQPoint spot; TQPoint spot;
@ -178,8 +178,8 @@ public:
virtual void editModeChanged(bool changed); virtual void editModeChanged(bool changed);
virtual void save(KConfig *cfg); virtual void save(TDEConfig *cfg);
virtual void load(KConfig *cfg); virtual void load(TDEConfig *cfg);
virtual Config *config(TQWidget *parent); virtual Config *config(TQWidget *parent);
@ -300,7 +300,7 @@ class Cup : public Hole
public: public:
Cup(TQCanvas *canvas); Cup(TQCanvas *canvas);
virtual bool place(Ball *ball, bool wasCenter); virtual bool place(Ball *ball, bool wasCenter);
virtual void save(KConfig *cfg); virtual void save(TDEConfig *cfg);
virtual bool canBeMovedByOthers() const { return true; } virtual bool canBeMovedByOthers() const { return true; }
virtual void draw(TQPainter &painter); virtual void draw(TQPainter &painter);
@ -384,8 +384,8 @@ public:
virtual void showInfo(); virtual void showInfo();
virtual void hideInfo(); virtual void hideInfo();
virtual bool place(Ball *ball, bool wasCenter); virtual bool place(Ball *ball, bool wasCenter);
virtual void save(KConfig *cfg); virtual void save(TDEConfig *cfg);
virtual void load(KConfig *cfg); virtual void load(TDEConfig *cfg);
virtual Config *config(TQWidget *parent) { return new BlackHoleConfig(this, parent); } virtual Config *config(TQWidget *parent) { return new BlackHoleConfig(this, parent); }
virtual TQPtrList<TQCanvasItem> moveableItems() const; virtual TQPtrList<TQCanvasItem> moveableItems() const;
double minSpeed() const { return m_minSpeed; } double minSpeed() const { return m_minSpeed; }
@ -438,8 +438,8 @@ public:
virtual void setZ(double newz); virtual void setZ(double newz);
virtual void setPen(TQPen p); virtual void setPen(TQPen p);
virtual bool collision(Ball *ball, long int id); virtual bool collision(Ball *ball, long int id);
virtual void save(KConfig *cfg); virtual void save(TDEConfig *cfg);
virtual void load(KConfig *cfg); virtual void load(TDEConfig *cfg);
virtual void selectedItem(TQCanvasItem *item); virtual void selectedItem(TQCanvasItem *item);
virtual void editModeChanged(bool changed); virtual void editModeChanged(bool changed);
virtual void moveBy(double dx, double dy); virtual void moveBy(double dx, double dy);
@ -574,11 +574,11 @@ public:
virtual void aboutToDie(); virtual void aboutToDie();
virtual void editModeChanged(bool changed); virtual void editModeChanged(bool changed);
virtual void moveBy(double dx, double dy); virtual void moveBy(double dx, double dy);
virtual void load(KConfig *cfg); virtual void load(TDEConfig *cfg);
virtual void save(KConfig *cfg); virtual void save(TDEConfig *cfg);
virtual bool vStrut() const { return true; } virtual bool vStrut() const { return true; }
void doLoad(KConfig *cfg); void doLoad(TDEConfig *cfg);
void doSave(KConfig *cfg); void doSave(TDEConfig *cfg);
virtual void newSize(int width, int height); virtual void newSize(int width, int height);
virtual void setGame(KolfGame *game); virtual void setGame(KolfGame *game);
virtual Config *config(TQWidget *parent) { return new BridgeConfig(this, parent); } virtual Config *config(TQWidget *parent) { return new BridgeConfig(this, parent); }
@ -638,8 +638,8 @@ public:
virtual void draw(TQPainter &painter); virtual void draw(TQPainter &painter);
virtual bool vStrut() const { return false; } virtual bool vStrut() const { return false; }
virtual Config *config(TQWidget *parent) { return new SignConfig(this, parent); } virtual Config *config(TQWidget *parent) { return new SignConfig(this, parent); }
virtual void save(KConfig *cfg); virtual void save(TDEConfig *cfg);
virtual void load(KConfig *cfg); virtual void load(TDEConfig *cfg);
protected: protected:
TQString m_text; TQString m_text;
@ -685,8 +685,8 @@ public:
Windmill(TQRect rect, TQCanvas *canvas); Windmill(TQRect rect, TQCanvas *canvas);
virtual void aboutToDie(); virtual void aboutToDie();
virtual void newSize(int width, int height); virtual void newSize(int width, int height);
virtual void save(KConfig *cfg); virtual void save(TDEConfig *cfg);
virtual void load(KConfig *cfg); virtual void load(TDEConfig *cfg);
virtual void setGame(KolfGame *game); virtual void setGame(KolfGame *game);
virtual Config *config(TQWidget *parent) { return new WindmillConfig(this, parent); } virtual Config *config(TQWidget *parent) { return new WindmillConfig(this, parent); }
void setSize(int width, int height); void setSize(int width, int height);
@ -834,7 +834,7 @@ public:
void hidePutter() { putter->setVisible(false); } void hidePutter() { putter->setVisible(false); }
void ignoreEvents(bool ignore) { m_ignoreEvents = ignore; } void ignoreEvents(bool ignore) { m_ignoreEvents = ignore; }
static void scoresFromSaved(KConfig *, PlayerList &players); static void scoresFromSaved(TDEConfig *, PlayerList &players);
static void courseInfo(CourseInfo &info, const TQString &filename); static void courseInfo(CourseInfo &info, const TQString &filename);
public slots: public slots:
@ -866,7 +866,7 @@ public slots:
void setSound(bool yes); void setSound(bool yes);
void undoShot(); void undoShot();
void timeout(); void timeout();
void saveScores(KConfig *); void saveScores(TDEConfig *);
void startFirstHole(int hole); void startFirstHole(int hole);
void sayWhosGoing(); void sayWhosGoing();
@ -1013,7 +1013,7 @@ private:
bool infoShown; bool infoShown;
KConfig *cfg; TDEConfig *cfg;
inline void addBorderWall(TQPoint start, TQPoint end); inline void addBorderWall(TQPoint start, TQPoint end);
void shotStart(); void shotStart();

@ -86,7 +86,7 @@ TQString KComboBoxDialog::getItem( const TQString &_text, const TQString &_capti
TQString prevAnswer; TQString prevAnswer;
if ( !dontAskAgainName.isEmpty() ) if ( !dontAskAgainName.isEmpty() )
{ {
KConfig *config = TDEGlobal::config(); TDEConfig *config = TDEGlobal::config();
config->setGroup( "Notification Messages" ); config->setGroup( "Notification Messages" );
prevAnswer = config->readEntry( dontAskAgainName ); prevAnswer = config->readEntry( dontAskAgainName );
if ( !prevAnswer.isEmpty() ) if ( !prevAnswer.isEmpty() )
@ -106,7 +106,7 @@ TQString KComboBoxDialog::getItem( const TQString &_text, const TQString &_capti
{ {
if ( !dontAskAgainName.isEmpty() && !text.isEmpty() ) if ( !dontAskAgainName.isEmpty() && !text.isEmpty() )
{ {
KConfig *config = TDEGlobal::config(); TDEConfig *config = TDEGlobal::config();
config->setGroup ( "Notification Messages" ); config->setGroup ( "Notification Messages" );
config->writeEntry( dontAskAgainName, text ); config->writeEntry( dontAskAgainName, text );
} }
@ -115,7 +115,7 @@ TQString KComboBoxDialog::getItem( const TQString &_text, const TQString &_capti
return text; return text;
} }
TQString KComboBoxDialog::getText(const TQString &_caption, const TQString &_text, const TQString &_value, bool *ok, TQWidget *parent, const TQString &configName, KConfig *config) TQString KComboBoxDialog::getText(const TQString &_caption, const TQString &_text, const TQString &_value, bool *ok, TQWidget *parent, const TQString &configName, TDEConfig *config)
{ {
KComboBoxDialog dlg(_text, TQStringList(), _value, false, parent); KComboBoxDialog dlg(_text, TQStringList(), _value, false, parent);
if ( !_caption.isNull() ) if ( !_caption.isNull() )

@ -98,13 +98,13 @@ public:
* @param ok Variable to store whether the user hit OK * @param ok Variable to store whether the user hit OK
* @param parent Parent widget for the dialog * @param parent Parent widget for the dialog
* @param configName Name of the dialog for saving the completion and history * @param configName Name of the dialog for saving the completion and history
* @parma config KConfig for saving the completion and history * @parma config TDEConfig for saving the completion and history
*/ */
static TQString getText(const TQString &_caption, const TQString &_text, static TQString getText(const TQString &_caption, const TQString &_text,
const TQString &_value = TQString(), const TQString &_value = TQString(),
bool *ok = 0, TQWidget *parent = 0, bool *ok = 0, TQWidget *parent = 0,
const TQString &configName = TQString(), const TQString &configName = TQString(),
KConfig *config = TDEGlobal::config()); TDEConfig *config = TDEGlobal::config());
protected: protected:
KHistoryCombo *combo; KHistoryCombo *combo;

@ -117,7 +117,7 @@ void Kolf::initGUI()
useMouseAction = new KToggleAction(i18n("Enable &Mouse for Moving Putter"), 0, TQT_TQOBJECT(this), TQT_SLOT(emptySlot()), actionCollection(), "usemouse"); useMouseAction = new KToggleAction(i18n("Enable &Mouse for Moving Putter"), 0, TQT_TQOBJECT(this), TQT_SLOT(emptySlot()), actionCollection(), "usemouse");
useMouseAction->setCheckedState(i18n("Disable &Mouse for Moving Putter")); useMouseAction->setCheckedState(i18n("Disable &Mouse for Moving Putter"));
connect(useMouseAction, TQT_SIGNAL(toggled(bool)), TQT_TQOBJECT(this), TQT_SLOT(useMouseChanged(bool))); connect(useMouseAction, TQT_SIGNAL(toggled(bool)), TQT_TQOBJECT(this), TQT_SLOT(useMouseChanged(bool)));
KConfig *config = kapp->config(); TDEConfig *config = kapp->config();
config->setGroup("Settings"); config->setGroup("Settings");
useMouseAction->setChecked(config->readBoolEntry("useMouse", true)); useMouseAction->setChecked(config->readBoolEntry("useMouse", true));
@ -196,7 +196,7 @@ void Kolf::startNewGame()
} }
else else
{ {
KConfig config(loadedGame); TDEConfig config(loadedGame);
config.setGroup("0 Saved Game"); config.setGroup("0 Saved Game");
if (isTutorial) if (isTutorial)
@ -524,7 +524,7 @@ void Kolf::saveGame()
return; return;
} }
KConfig config(loadedGame); TDEConfig config(loadedGame);
config.setGroup("0 Saved Game"); config.setGroup("0 Saved Game");
config.writeEntry("Competition", competition); config.writeEntry("Competition", competition);
@ -550,7 +550,7 @@ void Kolf::loadGame()
void Kolf::openURL(KURL url) void Kolf::openURL(KURL url)
{ {
TQString target; TQString target;
if (KIO::NetAccess::download(url, target, this)) if (TDEIO::NetAccess::download(url, target, this))
{ {
isTutorial = false; isTutorial = false;
TQString mimeType = KMimeType::findByPath(target)->name(); TQString mimeType = KMimeType::findByPath(target)->name();
@ -719,27 +719,27 @@ void Kolf::titleChanged(const TQString &newTitle)
void Kolf::useMouseChanged(bool yes) void Kolf::useMouseChanged(bool yes)
{ {
KConfig *config = kapp->config(); config->setGroup("Settings"); config->writeEntry("useMouse", yes); config->sync(); TDEConfig *config = kapp->config(); config->setGroup("Settings"); config->writeEntry("useMouse", yes); config->sync();
} }
void Kolf::useAdvancedPuttingChanged(bool yes) void Kolf::useAdvancedPuttingChanged(bool yes)
{ {
KConfig *config = kapp->config(); config->setGroup("Settings"); config->writeEntry("useAdvancedPutting", yes); config->sync(); TDEConfig *config = kapp->config(); config->setGroup("Settings"); config->writeEntry("useAdvancedPutting", yes); config->sync();
} }
void Kolf::showInfoChanged(bool yes) void Kolf::showInfoChanged(bool yes)
{ {
KConfig *config = kapp->config(); config->setGroup("Settings"); config->writeEntry("showInfo", yes); config->sync(); TDEConfig *config = kapp->config(); config->setGroup("Settings"); config->writeEntry("showInfo", yes); config->sync();
} }
void Kolf::showGuideLineChanged(bool yes) void Kolf::showGuideLineChanged(bool yes)
{ {
KConfig *config = kapp->config(); config->setGroup("Settings"); config->writeEntry("showGuideLine", yes); config->sync(); TDEConfig *config = kapp->config(); config->setGroup("Settings"); config->writeEntry("showGuideLine", yes); config->sync();
} }
void Kolf::soundChanged(bool yes) void Kolf::soundChanged(bool yes)
{ {
KConfig *config = kapp->config(); config->setGroup("Settings"); config->writeEntry("sound", yes); config->sync(); TDEConfig *config = kapp->config(); config->setGroup("Settings"); config->writeEntry("sound", yes); config->sync();
} }
void Kolf::initPlugins() void Kolf::initPlugins()

@ -41,7 +41,7 @@ NewGameDialog::NewGameDialog(bool enableCourses, TQWidget *parent, const char *_
this->enableCourses = enableCourses; this->enableCourses = enableCourses;
editors.setAutoDelete(true); editors.setAutoDelete(true);
KConfig *config = kapp->config(); TDEConfig *config = kapp->config();
// lots o' colors :) // lots o' colors :)
startColors << yellow << blue << red << lightGray << cyan << darkBlue << magenta << darkGray << darkMagenta << darkYellow; startColors << yellow << blue << red << lightGray << cyan << darkBlue << magenta << darkGray << darkMagenta << darkYellow;
@ -183,7 +183,7 @@ NewGameDialog::NewGameDialog(bool enableCourses, TQWidget *parent, const char *_
void NewGameDialog::slotOk() void NewGameDialog::slotOk()
{ {
KConfig *config = kapp->config(); TDEConfig *config = kapp->config();
config->setGroup("New Game Dialog Mode"); config->setGroup("New Game Dialog Mode");
config->writeEntry("competition", mode->isChecked()); config->writeEntry("competition", mode->isChecked());

@ -26,7 +26,7 @@ PoolBall::PoolBall(TQCanvas *canvas)
m_number = 1; m_number = 1;
} }
void PoolBall::save(KConfig *cfg) void PoolBall::save(TDEConfig *cfg)
{ {
cfg->writeEntry("number", number()); cfg->writeEntry("number", number());
} }
@ -36,7 +36,7 @@ void PoolBall::saveState(StateDB *db)
db->setPoint(TQPoint(x(), y())); db->setPoint(TQPoint(x(), y()));
} }
void PoolBall::load(KConfig *cfg) void PoolBall::load(TDEConfig *cfg)
{ {
setNumber(cfg->readNumEntry("number", 1)); setNumber(cfg->readNumEntry("number", 1));
} }

@ -13,7 +13,7 @@
#include <kolf/object.h> #include <kolf/object.h>
class StateDB; class StateDB;
class KConfig; class TDEConfig;
class PoolBallFactory : KLibFactory { class PoolBallFactory : KLibFactory {
Q_OBJECT Q_OBJECT
@ -32,9 +32,9 @@ public:
virtual Config *config(TQWidget *parent); virtual Config *config(TQWidget *parent);
virtual void saveState(StateDB *); virtual void saveState(StateDB *);
virtual void save(KConfig *cfg); virtual void save(TDEConfig *cfg);
virtual void loadState(StateDB *); virtual void loadState(StateDB *);
virtual void load(KConfig *cfg); virtual void load(TDEConfig *cfg);
virtual void draw(TQPainter &); virtual void draw(TQPainter &);
virtual bool fastAdvance() const { return true; } virtual bool fastAdvance() const { return true; }

@ -52,14 +52,14 @@ void Test::advance(int phase)
} }
} }
void Test::save(KConfig *cfg) void Test::save(TDEConfig *cfg)
{ {
// save our option from the course // save our option from the course
// (courses are represented as KConfig files) // (courses are represented as TDEConfig files)
cfg->writeEntry("switchEvery", switchEvery()); cfg->writeEntry("switchEvery", switchEvery());
} }
void Test::load(KConfig *cfg) void Test::load(TDEConfig *cfg)
{ {
// load our option // load our option
setSwitchEvery(cfg->readNumEntry("switchEvery", 50)); setSwitchEvery(cfg->readNumEntry("switchEvery", 50));

@ -9,7 +9,7 @@
#include <kolf/canvasitem.h> #include <kolf/canvasitem.h>
#include <kolf/object.h> #include <kolf/object.h>
class KConfig; class TDEConfig;
class TestFactory : KLibFactory { class TestFactory : KLibFactory {
Q_OBJECT Q_OBJECT
@ -25,8 +25,8 @@ public:
Test(TQCanvas *canvas); Test(TQCanvas *canvas);
virtual Config *config(TQWidget *parent); virtual Config *config(TQWidget *parent);
virtual void save(KConfig *cfg); virtual void save(TDEConfig *cfg);
virtual void load(KConfig *cfg); virtual void load(TDEConfig *cfg);
virtual void advance(int phase); virtual void advance(int phase);

@ -207,7 +207,7 @@ void Slope::updateZ(TQCanvasRectangle *vStrut)
setZ(((double)1 / (area == 0? 1 : area)) + newZ); setZ(((double)1 / (area == 0? 1 : area)) + newZ);
} }
void Slope::load(KConfig *cfg) void Slope::load(TDEConfig *cfg)
{ {
stuckOnGround = cfg->readBoolEntry("stuckOnGround", stuckOnGround); stuckOnGround = cfg->readBoolEntry("stuckOnGround", stuckOnGround);
grade = cfg->readDoubleNumEntry("grade", grade); grade = cfg->readDoubleNumEntry("grade", grade);
@ -221,7 +221,7 @@ void Slope::load(KConfig *cfg)
setGradient(gradientType); setGradient(gradientType);
} }
void Slope::save(KConfig *cfg) void Slope::save(TDEConfig *cfg)
{ {
cfg->writeEntry("reversed", reversed); cfg->writeEntry("reversed", reversed);
cfg->writeEntry("width", width()); cfg->writeEntry("width", width());

@ -57,8 +57,8 @@ public:
bool isStuckOnGround() const { return stuckOnGround; } bool isStuckOnGround() const { return stuckOnGround; }
void setStuckOnGround(bool yes) { stuckOnGround = yes; updateZ(); } void setStuckOnGround(bool yes) { stuckOnGround = yes; updateZ(); }
virtual void load(KConfig *cfg); virtual void load(TDEConfig *cfg);
virtual void save(KConfig *cfg); virtual void save(TDEConfig *cfg);
virtual bool collision(Ball *ball, long int id); virtual bool collision(Ball *ball, long int id);
virtual bool terrainCollisions() const; virtual bool terrainCollisions() const;

@ -45,7 +45,7 @@ GameEndDlg::~GameEndDlg()
void void
GameEndDlg::init() GameEndDlg::init()
{ {
KConfig *config = kapp->config(); TDEConfig *config = kapp->config();
config->setGroup("Game"); config->setGroup("Game");
int turns = config->readNumEntry("ExtraTurns", 10); int turns = config->readNumEntry("ExtraTurns", 10);
turnCount->setValue(turns); turnCount->setValue(turns);
@ -55,7 +55,7 @@ GameEndDlg::init()
void void
GameEndDlg::slotYes() GameEndDlg::slotYes()
{ {
KConfig *config = kapp->config(); TDEConfig *config = kapp->config();
config->setGroup("Game"); config->setGroup("Game");
config->writeEntry("ExtraTurns", extraTurns()); config->writeEntry("ExtraTurns", extraTurns());
config->sync(); config->sync();

@ -74,7 +74,7 @@ NewGameDlg::slotDefault()
void void
NewGameDlg::init() NewGameDlg::init()
{ {
KConfig *config = kapp->config(); TDEConfig *config = kapp->config();
config->setGroup("Game"); config->setGroup("Game");
int nrOfPlayers = config->readNumEntry("NrOfPlayers"); int nrOfPlayers = config->readNumEntry("NrOfPlayers");
if (nrOfPlayers < 2) if (nrOfPlayers < 2)
@ -258,7 +258,7 @@ NewGameDlg::slotOk()
void void
NewGameDlg::save() NewGameDlg::save()
{ {
KConfig *config = kapp->config(); TDEConfig *config = kapp->config();
config->setGroup("Game"); config->setGroup("Game");
config->writeEntry("NrOfPlayers", w->sliderPlayers->value()); config->writeEntry("NrOfPlayers", w->sliderPlayers->value());

@ -88,7 +88,7 @@ since kpat-0.6
- new KDE FSSTND compliant - new KDE FSSTND compliant
- depending on display colors sets either a - depending on display colors sets either a
16 color or high color icon and miniicon 16 color or high color icon and miniicon
- fixes for new KConfig - fixes for new TDEConfig
since kpat-0.5 since kpat-0.5

@ -52,8 +52,8 @@ cardMap::cardMap(const TQColor &dim) : dimcolor(dim)
card_height = 0; card_height = 0;
kdDebug(11111) << "cardMap\n"; kdDebug(11111) << "cardMap\n";
KConfig *config = kapp->config(); TDEConfig *config = kapp->config();
KConfigGroupSaver cs(config, settings_group ); TDEConfigGroupSaver cs(config, settings_group );
TQString bg = config->readEntry( "Back", KCardDialog::getDefaultDeck()); TQString bg = config->readEntry( "Back", KCardDialog::getDefaultDeck());
setBackSide( bg, false); setBackSide( bg, false);
@ -67,8 +67,8 @@ cardMap::cardMap(const TQColor &dim) : dimcolor(dim)
bool cardMap::setCardDir( const TQString &dir) bool cardMap::setCardDir( const TQString &dir)
{ {
KConfig *config = kapp->config(); TDEConfig *config = kapp->config();
KConfigGroupSaver cs(config, settings_group ); TDEConfigGroupSaver cs(config, settings_group );
// create an animation window while loading pixmaps (this // create an animation window while loading pixmaps (this
// may take a while (approx. 3 seconds on my AMD K6PR200) // may take a while (approx. 3 seconds on my AMD K6PR200)

@ -1157,9 +1157,9 @@ void Dealer::won()
_won = true; _won = true;
// update score, 'win' in demo mode also counts (keep it that way?) // update score, 'win' in demo mode also counts (keep it that way?)
{ // wrap in own scope to make KConfigGroupSave work { // wrap in own scope to make TDEConfigGroupSave work
KConfig *config = kapp->config(); TDEConfig *config = kapp->config();
KConfigGroupSaver kcs(config, scores_group); TDEConfigGroupSaver kcs(config, scores_group);
unsigned int n = config->readUnsignedNumEntry(TQString("won%1").arg(_id),0) + 1; unsigned int n = config->readUnsignedNumEntry(TQString("won%1").arg(_id),0) + 1;
config->writeEntry(TQString("won%1").arg(_id),n); config->writeEntry(TQString("won%1").arg(_id),n);
n = config->readUnsignedNumEntry(TQString("winstreak%1").arg(_id),0) + 1; n = config->readUnsignedNumEntry(TQString("winstreak%1").arg(_id),0) + 1;
@ -1428,8 +1428,8 @@ void Dealer::countGame()
{ {
if ( !_gameRecorded ) { if ( !_gameRecorded ) {
kdDebug(11111) << "counting game as played." << endl; kdDebug(11111) << "counting game as played." << endl;
KConfig *config = kapp->config(); TDEConfig *config = kapp->config();
KConfigGroupSaver kcs(config, scores_group); TDEConfigGroupSaver kcs(config, scores_group);
unsigned int Total = config->readUnsignedNumEntry(TQString("total%1").arg(_id),0); unsigned int Total = config->readUnsignedNumEntry(TQString("total%1").arg(_id),0);
++Total; ++Total;
config->writeEntry(TQString("total%1").arg(_id),Total); config->writeEntry(TQString("total%1").arg(_id),Total);
@ -1441,8 +1441,8 @@ void Dealer::countLoss()
{ {
if ( _gameRecorded ) { if ( _gameRecorded ) {
// update score // update score
KConfig *config = kapp->config(); TDEConfig *config = kapp->config();
KConfigGroupSaver kcs(config, scores_group); TDEConfigGroupSaver kcs(config, scores_group);
unsigned int n = config->readUnsignedNumEntry(TQString("loosestreak%1").arg(_id),0) + 1; unsigned int n = config->readUnsignedNumEntry(TQString("loosestreak%1").arg(_id),0) + 1;
config->writeEntry(TQString("loosestreak%1").arg(_id),n); config->writeEntry(TQString("loosestreak%1").arg(_id),n);
unsigned int m = config->readUnsignedNumEntry(TQString("maxloosestreak%1").arg(_id),0); unsigned int m = config->readUnsignedNumEntry(TQString("maxloosestreak%1").arg(_id),0);

@ -40,8 +40,8 @@ void GameStatsImpl::setGameType(int id)
{ {
// Trick to reset string to original value // Trick to reset string to original value
languageChange(); languageChange();
KConfig *config = kapp->config(); TDEConfig *config = kapp->config();
KConfigGroupSaver kcs(config, scores_group); TDEConfigGroupSaver kcs(config, scores_group);
unsigned int t = config->readUnsignedNumEntry(TQString("total%1").arg(id),0); unsigned int t = config->readUnsignedNumEntry(TQString("total%1").arg(id),0);
Played->setText(Played->text().arg(t)); Played->setText(Played->text().arg(t));
unsigned int w = config->readUnsignedNumEntry(TQString("won%1").arg(id),0); unsigned int w = config->readUnsignedNumEntry(TQString("won%1").arg(id),0);

@ -145,8 +145,8 @@ pWidget::pWidget()
actionCollection(), "enable_autodrop"); actionCollection(), "enable_autodrop");
dropaction->setCheckedState(i18n("Disable Autodrop")); dropaction->setCheckedState(i18n("Disable Autodrop"));
KConfig *config = kapp->config(); TDEConfig *config = kapp->config();
KConfigGroupSaver cs(config, settings_group ); TDEConfigGroupSaver cs(config, settings_group );
TQString bgpath = config->readPathEntry("Background"); TQString bgpath = config->readPathEntry("Background");
kdDebug(11111) << "bgpath '" << bgpath << "'" << endl; kdDebug(11111) << "bgpath '" << bgpath << "'" << endl;
@ -198,8 +198,8 @@ void pWidget::undoPossible(bool poss)
} }
void pWidget::changeBackside() { void pWidget::changeBackside() {
KConfig *config = kapp->config(); TDEConfig *config = kapp->config();
KConfigGroupSaver kcs(config, settings_group); TDEConfigGroupSaver kcs(config, settings_group);
TQString deck = config->readEntry("Back", KCardDialog::getDefaultDeck()); TQString deck = config->readEntry("Back", KCardDialog::getDefaultDeck());
TQString cards = config->readEntry("Cards", KCardDialog::getDefaultCardDir()); TQString cards = config->readEntry("Cards", KCardDialog::getDefaultCardDir());
@ -262,8 +262,8 @@ void pWidget::changeWallpaper()
midcolor = TQColor(r, b, g); midcolor = TQColor(r, b, g);
if (dill) { if (dill) {
KConfig *config = kapp->config(); TDEConfig *config = kapp->config();
KConfigGroupSaver kcs(config, settings_group); TDEConfigGroupSaver kcs(config, settings_group);
TQString deck = config->readEntry("Back", KCardDialog::getDefaultDeck()); TQString deck = config->readEntry("Back", KCardDialog::getDefaultDeck());
TQString dummy = config->readEntry("Cards", KCardDialog::getDefaultCardDir()); TQString dummy = config->readEntry("Cards", KCardDialog::getDefaultCardDir());
@ -278,16 +278,16 @@ void pWidget::changeWallpaper()
void pWidget::animationChanged() { void pWidget::animationChanged() {
bool anim = animation->isChecked(); bool anim = animation->isChecked();
KConfig *config = kapp->config(); TDEConfig *config = kapp->config();
KConfigGroupSaver cs(config, settings_group ); TDEConfigGroupSaver cs(config, settings_group );
config->writeEntry( "Animation", anim); config->writeEntry( "Animation", anim);
} }
void pWidget::enableAutoDrop() void pWidget::enableAutoDrop()
{ {
bool drop = dropaction->isChecked(); bool drop = dropaction->isChecked();
KConfig *config = kapp->config(); TDEConfig *config = kapp->config();
KConfigGroupSaver cs(config, settings_group ); TDEConfigGroupSaver cs(config, settings_group );
config->writeEntry( "Autodrop", drop); config->writeEntry( "Autodrop", drop);
dill->setAutoDropEnabled(drop); dill->setAutoDropEnabled(drop);
} }
@ -377,8 +377,8 @@ void pWidget::newGameType()
setGameCaption(); setGameCaption();
KConfig *config = kapp->config(); TDEConfig *config = kapp->config();
KConfigGroupSaver kcs(config, settings_group); TDEConfigGroupSaver kcs(config, settings_group);
config->writeEntry("DefaultGame", id); config->writeEntry("DefaultGame", id);
TQSize min(700,400); TQSize min(700,400);
@ -411,8 +411,8 @@ void pWidget::slotUpdateMoves()
void pWidget::setBackSide(const TQString &deck, const TQString &cards) void pWidget::setBackSide(const TQString &deck, const TQString &cards)
{ {
KConfig *config = kapp->config(); TDEConfig *config = kapp->config();
KConfigGroupSaver kcs(config, settings_group); TDEConfigGroupSaver kcs(config, settings_group);
TQPixmap pm(deck); TQPixmap pm(deck);
if(!pm.isNull()) { if(!pm.isNull()) {
cardMap::self()->setBackSide(pm, false); cardMap::self()->setBackSide(pm, false);
@ -467,11 +467,11 @@ void pWidget::gameLost()
// The following code is taken out of kmessagebox.cpp in tdeui. // The following code is taken out of kmessagebox.cpp in tdeui.
// Is there a better way? // Is there a better way?
KConfig *config = 0; TDEConfig *config = 0;
TQString grpNotifMsgs = TQString::fromLatin1("Notification Messages"); TQString grpNotifMsgs = TQString::fromLatin1("Notification Messages");
config = TDEGlobal::config(); config = TDEGlobal::config();
KConfigGroupSaver saver(config, TDEConfigGroupSaver saver(config,
TQString::fromLatin1("Notification Messages")); TQString::fromLatin1("Notification Messages"));
TQString dontAsk = config->readEntry(dontAskAgainName).lower(); TQString dontAsk = config->readEntry(dontAskAgainName).lower();
@ -498,7 +498,7 @@ void pWidget::gameLost()
void pWidget::openGame(const KURL &url) void pWidget::openGame(const KURL &url)
{ {
TQString tmpFile; TQString tmpFile;
if( KIO::NetAccess::download( url, tmpFile, this ) ) if( TDEIO::NetAccess::download( url, tmpFile, this ) )
{ {
TQFile of(tmpFile); TQFile of(tmpFile);
of.open(IO_ReadOnly); of.open(IO_ReadOnly);
@ -522,7 +522,7 @@ void pWidget::openGame(const KURL &url)
} }
dill->openGame(doc); dill->openGame(doc);
setGameCaption(); setGameCaption();
KIO::NetAccess::removeTempFile( tmpFile ); TDEIO::NetAccess::removeTempFile( tmpFile );
recent->addURL(url); recent->addURL(url);
recent->saveEntries(TDEGlobal::config()); recent->saveEntries(TDEGlobal::config());
} }
@ -543,7 +543,7 @@ void pWidget::saveGame()
TQTextStream *stream = file.textStream(); TQTextStream *stream = file.textStream();
*stream << doc.toString(); *stream << doc.toString();
file.close(); file.close();
KIO::NetAccess::upload(file.name(), url, this); TDEIO::NetAccess::upload(file.name(), url, this);
recent->addURL(url); recent->addURL(url);
recent->saveEntries(TDEGlobal::config()); recent->saveEntries(TDEGlobal::config());
} }

@ -21,7 +21,7 @@
#include <kconfig.h> #include <kconfig.h>
extern KLocale *locale; extern KLocale *locale;
extern KConfig *conf; extern TDEConfig *conf;
#endif #endif

@ -208,7 +208,7 @@ kpok::~kpok()
// cashPerRound = mOptions->getCashPerRound(); // NOT(!) configurable // cashPerRound = mOptions->getCashPerRound(); // NOT(!) configurable
} }
KConfig* conf = kapp->config(); TDEConfig* conf = kapp->config();
conf->setGroup("General"); conf->setGroup("General");
conf->writeEntry("MinBet", m_game.getMinBet()); conf->writeEntry("MinBet", m_game.getMinBet());
conf->writeEntry("MaxBet", m_game.getMaxBet()); conf->writeEntry("MaxBet", m_game.getMaxBet());
@ -314,7 +314,7 @@ void kpok::initWindow()
cardImages = new CardImages(this, 0); cardImages = new CardImages(this, 0);
// The configuration // The configuration
KConfig* conf = kapp->config(); TDEConfig* conf = kapp->config();
conf->setGroup("General"); conf->setGroup("General");
// Load the card deck. // Load the card deck.
@ -1215,7 +1215,7 @@ PokerPlayer* kpok::findHumanPlayer()
bool kpok::readEntriesAndInitPoker() bool kpok::readEntriesAndInitPoker()
{ {
NewGameDlg *newGameDlg = NULL; NewGameDlg *newGameDlg = NULL;
KConfig *conf = kapp->config(); TDEConfig *conf = kapp->config();
int numPlayers = DEFAULT_PLAYERS; int numPlayers = DEFAULT_PLAYERS;
conf->setGroup("NewGameDlg"); conf->setGroup("NewGameDlg");
@ -1298,7 +1298,7 @@ void kpok::saveGame()
} }
void kpok::saveGame(KConfig* conf) void kpok::saveGame(TDEConfig* conf)
{ {
// kdWarning() << "save game" << endl; // kdWarning() << "save game" << endl;
int players = m_game.getNumPlayers(); int players = m_game.getNumPlayers();
@ -1398,7 +1398,7 @@ bool kpok::loadGame()
} }
bool kpok::loadGame(KConfig* conf) bool kpok::loadGame(TDEConfig* conf)
{ {
int numPlayers = DEFAULT_PLAYERS; int numPlayers = DEFAULT_PLAYERS;

@ -41,7 +41,7 @@ class TQHBoxLayout;
class TQVBoxLayout; class TQVBoxLayout;
// KDE classes // KDE classes
class KConfig; class TDEConfig;
// own classes // own classes
@ -285,9 +285,9 @@ class kpok : public TQWidget
* The game can be loaded on startup by activating the button * The game can be loaded on startup by activating the button
* 'read from config' * 'read from config'
**/ **/
void saveGame(KConfig* conf); void saveGame(TDEConfig* conf);
bool loadGame(KConfig* conf); bool loadGame(TDEConfig* conf);
bool loadGame(); bool loadGame();
// void commandCallback(int id); // void commandCallback(int id);
void newGame(); void newGame();

@ -41,7 +41,7 @@ NewGameDlg::NewGameDlg(TQWidget* parent)
TQVBoxLayout *topLayout = new TQVBoxLayout(plainPage(), spacingHint()); TQVBoxLayout *topLayout = new TQVBoxLayout(plainPage(), spacingHint());
TQHBoxLayout *l = new TQHBoxLayout(topLayout); TQHBoxLayout *l = new TQHBoxLayout(topLayout);
KConfig* conf = kapp->config(); TDEConfig* conf = kapp->config();
conf->setGroup("NewGameDlg"); conf->setGroup("NewGameDlg");
bool showNewGameDlg = conf->readBoolEntry("showNewGameDlgOnStartup", bool showNewGameDlg = conf->readBoolEntry("showNewGameDlgOnStartup",
SHOWNEWGAME_DEFAULT); SHOWNEWGAME_DEFAULT);
@ -100,7 +100,7 @@ NewGameDlg::NewGameDlg(TQWidget* parent)
NewGameDlg::~NewGameDlg() NewGameDlg::~NewGameDlg()
{ {
if (result() == Accepted) { if (result() == Accepted) {
KConfig* conf = kapp->config(); TDEConfig* conf = kapp->config();
conf->setGroup("NewGameDlg"); // defaults for the newGameDlg only conf->setGroup("NewGameDlg"); // defaults for the newGameDlg only
conf->writeEntry("showNewGameDlgOnStartup", showOnStartup()); conf->writeEntry("showNewGameDlgOnStartup", showOnStartup());
conf->writeEntry("readFromConfig", readFromConfigFile()); // just a default! conf->writeEntry("readFromConfig", readFromConfigFile()); // just a default!

@ -127,7 +127,7 @@ void PokerWindow::initKAction()
void PokerWindow::readOptions() void PokerWindow::readOptions()
{ {
KConfig* conf = kapp->config(); TDEConfig* conf = kapp->config();
conf->setGroup("General"); conf->setGroup("General");
if (m_kpok->getSound() != conf->readBoolEntry("Sound", true)) if (m_kpok->getSound() != conf->readBoolEntry("Sound", true))
@ -235,7 +235,7 @@ void PokerWindow::clearStatusBar()
void PokerWindow::saveOptions() void PokerWindow::saveOptions()
{ {
KConfig* conf = kapp->config(); TDEConfig* conf = kapp->config();
conf->setGroup("General"); conf->setGroup("General");
conf->writeEntry("Sound", soundAction->isChecked()); conf->writeEntry("Sound", soundAction->isChecked());

@ -43,8 +43,8 @@ class PokerWindow : public KMainWindow
void readOptions(); void readOptions();
protected slots: protected slots:
// void saveProperties(KConfig*); // void saveProperties(TDEConfig*);
// void readProperties(KConfig*); // void readProperties(TDEConfig*);
void setHand(const TQString &newHand, bool lastHand = true); void setHand(const TQString &newHand, bool lastHand = true);
void showClickToHold(bool show); void showClickToHold(bool show);
void statusBarMessage(TQString); void statusBarMessage(TQString);

@ -47,7 +47,7 @@
#include "Move.h" #include "Move.h"
class KConfig; class TDEConfig;
class QReversiGame; class QReversiGame;

@ -75,7 +75,7 @@ void ExtManager::convertLegacy(uint gameType)
if ( gameType!=0 ) if ( gameType!=0 )
return; return;
KConfigGroupSaver cg(kapp->config(), "High Score"); TDEConfigGroupSaver cg(kapp->config(), "High Score");
for (uint i = 1; i <= 10; i++) { for (uint i = 1; i <= 10; i++) {
TQString key = "Pos" + TQString::number(i); TQString key = "Pos" + TQString::number(i);

@ -258,7 +258,7 @@ void KReversi::slotNewGame()
void KReversi::slotOpenGame() void KReversi::slotOpenGame()
{ {
KConfig *config = kapp->config(); TDEConfig *config = kapp->config();
config->setGroup("Savegame"); config->setGroup("Savegame");
if (loadGame(config)) if (loadGame(config))
@ -274,7 +274,7 @@ void KReversi::slotOpenGame()
void KReversi::slotSave() void KReversi::slotSave()
{ {
KConfig *config = kapp->config(); TDEConfig *config = kapp->config();
config->setGroup("Savegame"); config->setGroup("Savegame");
saveGame(config); saveGame(config);
@ -643,7 +643,7 @@ void KReversi::showGameOver(Color color)
// Only one game at a time can be saved. // Only one game at a time can be saved.
// //
void KReversi::saveGame(KConfig *config) void KReversi::saveGame(TDEConfig *config)
{ {
// Stop thinking. // Stop thinking.
slotInterrupt(); slotInterrupt();
@ -679,7 +679,7 @@ void KReversi::saveGame(KConfig *config)
// Loads the game. Only one game at a time can be saved. // Loads the game. Only one game at a time can be saved.
bool KReversi::loadGame(KConfig *config) bool KReversi::loadGame(TDEConfig *config)
{ {
slotInterrupt(); // stop thinking slotInterrupt(); // stop thinking
@ -725,13 +725,13 @@ bool KReversi::loadGame(KConfig *config)
// ---------------------------------------------------------------- // ----------------------------------------------------------------
void KReversi::saveProperties(KConfig *c) void KReversi::saveProperties(TDEConfig *c)
{ {
saveGame(c); saveGame(c);
} }
void KReversi::readProperties(KConfig *config) { void KReversi::readProperties(TDEConfig *config) {
loadGame(config); loadGame(config);
m_gameOver = false; m_gameOver = false;
m_cheating = false; // FIXME: Is this true? It isn't saved. m_cheating = false; // FIXME: Is this true? It isn't saved.
@ -747,10 +747,10 @@ void KReversi::showHighScoreDialog()
void KReversi::slotEditSettings() void KReversi::slotEditSettings()
{ {
// If we are already editing the settings, then do nothing. // If we are already editing the settings, then do nothing.
if (KConfigDialog::showDialog("settings")) if (TDEConfigDialog::showDialog("settings"))
return; return;
KConfigDialog *dialog = new KConfigDialog(this, "settings", Prefs::self(), TDEConfigDialog *dialog = new TDEConfigDialog(this, "settings", Prefs::self(),
KDialogBase::Swallow); KDialogBase::Swallow);
Settings *general = new Settings(0, "General"); Settings *general = new Settings(0, "General");

@ -98,8 +98,8 @@ private:
virtual void writeMenubarVisibleSetting(bool visible); virtual void writeMenubarVisibleSetting(bool visible);
virtual bool menubarVisibleSetting() const; virtual bool menubarVisibleSetting() const;
virtual void saveProperties(KConfig *); virtual void saveProperties(TDEConfig *);
virtual void readProperties(KConfig *); virtual void readProperties(TDEConfig *);
virtual bool queryExit(); virtual bool queryExit();
@ -145,8 +145,8 @@ private:
void illegalMove(); void illegalMove();
void showGameOver(Color); void showGameOver(Color);
void saveGame(KConfig *); void saveGame(TDEConfig *);
bool loadGame(KConfig *); bool loadGame(TDEConfig *);
private: private:

@ -47,7 +47,7 @@
#include "Move.h" #include "Move.h"
class KConfig; class TDEConfig;
@ -77,8 +77,8 @@ class QReversiGame : public TQObject, public Game {
#if 0 #if 0
void loadSettings(); void loadSettings();
bool loadGame(KConfig *, bool noupdate = FALSE); bool loadGame(TDEConfig *, bool noupdate = FALSE);
void saveGame(KConfig *); void saveGame(TDEConfig *);
#endif #endif
signals: signals:

@ -47,7 +47,7 @@
#include "board.h" #include "board.h"
class KConfig; class TDEConfig;
class TQLabel; class TQLabel;

@ -93,7 +93,7 @@ KSameWidget::KSameWidget(TQWidget *parent, const char* name, WFlags fl) :
if (!kapp->isRestored()) if (!kapp->isRestored())
newGame(kapp->random(),default_colors); newGame(kapp->random(),default_colors);
KConfig *cfg = kapp->config(); TDEConfig *cfg = kapp->config();
if (cfg->readBoolEntry("showRemaining")) if (cfg->readBoolEntry("showRemaining"))
{ {
showNumberRemaining->setChecked(true); showNumberRemaining->setChecked(true);
@ -101,12 +101,12 @@ KSameWidget::KSameWidget(TQWidget *parent, const char* name, WFlags fl) :
} }
} }
void KSameWidget::readProperties(KConfig *conf) { void KSameWidget::readProperties(TDEConfig *conf) {
Q_ASSERT(conf); Q_ASSERT(conf);
stone->readProperties(conf); stone->readProperties(conf);
} }
void KSameWidget::saveProperties(KConfig *conf) { void KSameWidget::saveProperties(TDEConfig *conf) {
Q_ASSERT(conf); Q_ASSERT(conf);
stone->saveProperties(conf); stone->saveProperties(conf);
conf->sync(); conf->sync();
@ -127,7 +127,7 @@ void KSameWidget::showNumberRemainingToggled()
} }
else status->changeItem(i18n("%1 Colors").arg(stone->colors()),1); else status->changeItem(i18n("%1 Colors").arg(stone->colors()),1);
KConfig *cfg = kapp->config(); TDEConfig *cfg = kapp->config();
cfg->writeEntry("showRemaining", showNumberRemaining->isChecked()); cfg->writeEntry("showRemaining", showNumberRemaining->isChecked());
cfg->sync(); cfg->sync();
} }

@ -56,8 +56,8 @@ private slots:
protected: protected:
void newGame(unsigned int board, int colors); void newGame(unsigned int board, int colors);
virtual void saveProperties(KConfig *conf); virtual void saveProperties(TDEConfig *conf);
virtual void readProperties(KConfig *conf); virtual void readProperties(TDEConfig *conf);
bool confirmAbort(); bool confirmAbort();

@ -202,7 +202,7 @@ bool StoneWidget::isOriginalBoard() {
return !modified; return !modified;
} }
void StoneWidget::readProperties(KConfig *conf) { void StoneWidget::readProperties(TDEConfig *conf) {
Q_ASSERT(conf); Q_ASSERT(conf);
history.clear(); history.clear();
@ -227,7 +227,7 @@ void StoneWidget::readProperties(KConfig *conf) {
void void
StoneWidget::saveProperties(KConfig *conf) { StoneWidget::saveProperties(TDEConfig *conf) {
Q_ASSERT(conf); Q_ASSERT(conf);
TQStrList list(true); TQStrList list(true);

@ -71,8 +71,8 @@ public:
// test for unchanged start position // test for unchanged start position
bool isOriginalBoard(); bool isOriginalBoard();
virtual void readProperties(KConfig *conf); virtual void readProperties(TDEConfig *conf);
virtual void saveProperties(KConfig *conf); virtual void saveProperties(TDEConfig *conf);
int count(int color); int count(int color);
protected: protected:

@ -1,5 +1,5 @@
2004-05-14 Benjamin Meyer (v.1.5.1) 2004-05-14 Benjamin Meyer (v.1.5.1)
* Moved settings into a KConfigXT dialog. * Moved settings into a TDEConfigXT dialog.
2003-05-23 Dave Corrie <kde@davecorrie.com> (v.1.4.90) 2003-05-23 Dave Corrie <kde@davecorrie.com> (v.1.4.90)

@ -502,7 +502,7 @@ void App::readOldHighscore()
// this is for before-KHighscore-highscores // this is for before-KHighscore-highscores
int i; int i;
TQString s, e, grp; TQString s, e, grp;
KConfig *conf = kapp->config(); TDEConfig *conf = kapp->config();
highscore.resize(0); highscore.resize(0);
i = 0; i = 0;
@ -746,10 +746,10 @@ void App::keyBindings()
* Show Settings dialog. * Show Settings dialog.
*/ */
void App::showSettings(){ void App::showSettings(){
if(KConfigDialog::showDialog("settings")) if(TDEConfigDialog::showDialog("settings"))
return; 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"); Settings *general = new Settings(0, "General");
dialog->addPage(general, i18n("General"), "package_settings"); dialog->addPage(general, i18n("General"), "package_settings");
connect(dialog, TQT_SIGNAL(settingsChanged()), TQT_TQOBJECT(this), TQT_SLOT(loadSettings())); connect(dialog, TQT_SIGNAL(settingsChanged()), TQT_TQOBJECT(this), TQT_SLOT(loadSettings()));

@ -70,7 +70,7 @@
2.1.2 (29 November 2001) 2.1.2 (29 November 2001)
* fix pause behaviour in menu (forward port from 2.2 branch) * fix pause behaviour in menu (forward port from 2.2 branch)
* use KConfigGroupSaver everywhere * use TDEConfigGroupSaver everywhere
* World-wide highscores for KSirtet and KFoulEggs !! * World-wide highscores for KSirtet and KFoulEggs !!
2.1.1 (17 October 2001) 2.1.1 (17 October 2001)
@ -283,7 +283,7 @@
0.2.2 0.2.2
* use kdehelp * use kdehelp
* use of KConfig and clean the highscore dialog * use of TDEConfig and clean the highscore dialog
* use of kmsgbox for about :) [it is nice] * use of kmsgbox for about :) [it is nice]
0.2.1 0.2.1

@ -113,7 +113,7 @@ GameWindow::GameWindow(TQWidget *, const char *name)
setFixedSize(size()); setFixedSize(size());
// Read configuration // Read configuration
KConfig *config = kapp->config(); TDEConfig *config = kapp->config();
config->setGroup("Options"); config->setGroup("Options");
PiecesType pieces_type = (PiecesType)config->readNumEntry("Pieces", static_cast<int>(Pieces_Smiles)); PiecesType pieces_type = (PiecesType)config->readNumEntry("Pieces", static_cast<int>(Pieces_Smiles));
game->setPieces(pieces_type); game->setPieces(pieces_type);
@ -162,7 +162,7 @@ void GameWindow::menu_pieces()
int index = ((KSelectAction*)actionCollection()->action("settings_pieces"))->currentItem(); int index = ((KSelectAction*)actionCollection()->action("settings_pieces"))->currentItem();
game->setPieces((PiecesType)index); game->setPieces((PiecesType)index);
KConfig *config = kapp->config(); TDEConfig *config = kapp->config();
config->setGroup("Options"); config->setGroup("Options");
config->writeEntry("Pieces", index); config->writeEntry("Pieces", index);
} }
@ -172,7 +172,7 @@ void GameWindow::menu_sounds()
game->do_sounds = !game->do_sounds; game->do_sounds = !game->do_sounds;
((KToggleAction*)actionCollection()->action("settings_sounds"))->setChecked(game->do_sounds); ((KToggleAction*)actionCollection()->action("settings_sounds"))->setChecked(game->do_sounds);
KConfig *config = kapp->config(); TDEConfig *config = kapp->config();
config->setGroup("Options"); config->setGroup("Options");
config->writeEntry("Sounds", game->do_sounds); config->writeEntry("Sounds", game->do_sounds);
} }

@ -1,6 +1,6 @@
Version 0.4.0: Version 0.4.0:
* [Benjamin Meyer] Changed to use KDE highscore widget. * [Benjamin Meyer] Changed to use KDE highscore widget.
* [Benjamin Meyer] Changed to use KConfigXT and a configure dialog. * [Benjamin Meyer] Changed to use TDEConfigXT and a configure dialog.
* [Benjamin Meyer] Removed unnecessary classes. * [Benjamin Meyer] Removed unnecessary classes.
* [Benjamin Meyer] Lots of general code cleanup (headers/indentation/variable naming). * [Benjamin Meyer] Lots of general code cleanup (headers/indentation/variable naming).
* [Benjamin Meyer] Added copyright headers to all of the source files. * [Benjamin Meyer] Added copyright headers to all of the source files.

@ -144,10 +144,10 @@ void Game::togglePaused()
* Show Settings dialog. * Show Settings dialog.
*/ */
void Game::showSettings(){ void Game::showSettings(){
if(KConfigDialog::showDialog("settings")) if(TDEConfigDialog::showDialog("settings"))
return; return;
KConfigDialog *dialog = new KConfigDialog(this, "settings", Settings::self()); TDEConfigDialog *dialog = new TDEConfigDialog(this, "settings", Settings::self());
dialog->addPage(new General(0, "General"), i18n("General"), "package_settings"); dialog->addPage(new General(0, "General"), i18n("General"), "package_settings");
Appearance *a = new Appearance(0, "Appearance"); Appearance *a = new Appearance(0, "Appearance");

@ -143,7 +143,7 @@ LevelCollection::indexTextCollection() {
void void
LevelCollection::loadPrefs() { LevelCollection::loadPrefs() {
if (id_ >= 0) { if (id_ >= 0) {
KConfig *cfg=(TDEApplication::kApplication())->config(); TDEConfig *cfg=(TDEApplication::kApplication())->config();
cfg->setGroup("settings"); cfg->setGroup("settings");
TQString key; TQString key;
@ -240,7 +240,7 @@ LevelCollection::LevelCollection(const TQString &_path, const TQString &_name,
LevelCollection::~LevelCollection() { LevelCollection::~LevelCollection() {
if (id_ >= 0) { if (id_ >= 0) {
KConfig *cfg=(TDEApplication::kApplication())->config(); TDEConfig *cfg=(TDEApplication::kApplication())->config();
cfg->setGroup ("settings"); cfg->setGroup ("settings");
TQString key; TQString key;
@ -271,7 +271,7 @@ LevelCollection::levelCompleted() {
TQString key; TQString key;
key.sprintf("status%d", id_); key.sprintf("status%d", id_);
KConfig *cfg=(TDEApplication::kApplication())->config(); TDEConfig *cfg=(TDEApplication::kApplication())->config();
cfg->setGroup("settings"); cfg->setGroup("settings");
cfg->writeEntry(key, x, true, false, false); cfg->writeEntry(key, x, true, false, false);
cfg->sync(); cfg->sync();

@ -57,7 +57,7 @@ MainWindow::createCollectionMenu() {
} }
checkedCollection_ = 0; checkedCollection_ = 0;
KConfig *cfg=(TDEApplication::kApplication())->config(); TDEConfig *cfg=(TDEApplication::kApplication())->config();
cfg->setGroup("settings"); cfg->setGroup("settings");
int id = cfg->readNumEntry("collection", 10); int id = cfg->readNumEntry("collection", 10);
@ -76,7 +76,7 @@ MainWindow::MainWindow() : KMainWindow(0), externalCollection_(0) {
setEraseColor(TQColor(0,0,0)); setEraseColor(TQColor(0,0,0));
KConfig *cfg=(TDEApplication::kApplication())->config(); TDEConfig *cfg=(TDEApplication::kApplication())->config();
cfg->setGroup("Geometry"); cfg->setGroup("Geometry");
int width = cfg->readNumEntry("width", 750); int width = cfg->readNumEntry("width", 750);
int height = cfg->readNumEntry("height", 562); int height = cfg->readNumEntry("height", 562);
@ -190,7 +190,7 @@ MainWindow::MainWindow() : KMainWindow(0), externalCollection_(0) {
MainWindow::~MainWindow() MainWindow::~MainWindow()
{ {
KConfig *cfg=(TDEApplication::kApplication())->config(); TDEConfig *cfg=(TDEApplication::kApplication())->config();
cfg->setGroup("Geometry"); cfg->setGroup("Geometry");
cfg->writeEntry("width", width()); cfg->writeEntry("width", width());
@ -297,7 +297,7 @@ MainWindow::changeCollection(int id)
void void
MainWindow::loadLevels() { MainWindow::loadLevels() {
KConfig *cfg=(TDEApplication::kApplication())->config(); TDEConfig *cfg=(TDEApplication::kApplication())->config();
cfg->setGroup("settings"); cfg->setGroup("settings");
TQString lastFile = cfg->readPathEntry("lastLevelFile"); TQString lastFile = cfg->readPathEntry("lastLevelFile");
@ -309,7 +309,7 @@ MainWindow::loadLevels() {
void void
MainWindow::openURL(KURL _url) { MainWindow::openURL(KURL _url) {
KConfig *cfg=(TDEApplication::kApplication())->config(); TDEConfig *cfg=(TDEApplication::kApplication())->config();
// int namepos = _url.path().findRev('/') + 1; // NOTE: findRev can return -1 // int namepos = _url.path().findRev('/') + 1; // NOTE: findRev can return -1
// TQString levelName = _url.path().mid(namepos); // TQString levelName = _url.path().mid(namepos);
@ -320,12 +320,12 @@ MainWindow::openURL(KURL _url) {
levelFile = _url.path(); levelFile = _url.path();
} else { } else {
// levelFile = locateLocal("appdata", "levels/" + levelName); // levelFile = locateLocal("appdata", "levels/" + levelName);
if(!KIO::NetAccess::download( _url, levelFile ) ) if(!TDEIO::NetAccess::download( _url, levelFile ) )
return; return;
} }
LevelCollection *tmpCollection = new LevelCollection(levelFile, levelName); LevelCollection *tmpCollection = new LevelCollection(levelFile, levelName);
KIO::NetAccess::removeTempFile(levelFile ); TDEIO::NetAccess::removeTempFile(levelFile );
if (tmpCollection->noOfLevels() < 1) { if (tmpCollection->noOfLevels() < 1) {
KMessageBox::sorry(this, i18n("No levels found in file")); KMessageBox::sorry(this, i18n("No levels found in file"));

@ -61,7 +61,7 @@ PlayField::PlayField(TQWidget *parent, const char *name, WFlags f)
highlightX_ = highlightY_ = 0; highlightX_ = highlightY_ = 0;
KConfig *cfg = (TDEApplication::kApplication())->config(); TDEConfig *cfg = (TDEApplication::kApplication())->config();
cfg->setGroup("settings"); cfg->setGroup("settings");
imageData_ = new StaticImage; imageData_ = new StaticImage;
@ -82,7 +82,7 @@ PlayField::PlayField(TQWidget *parent, const char *name, WFlags f)
} }
PlayField::~PlayField() { PlayField::~PlayField() {
KConfig *cfg = (TDEApplication::kApplication())->config(); TDEConfig *cfg = (TDEApplication::kApplication())->config();
cfg->setGroup("settings"); cfg->setGroup("settings");
cfg->writeEntry("animDelay", animDelay_, true, false, false); cfg->writeEntry("animDelay", animDelay_, true, false, false);

@ -389,7 +389,7 @@ void ConfigSetup::sliderChanged(int val)
} }
SettingsDialog::SettingsDialog(SConfig *customConfig, TQWidget *parent, const char *name) SettingsDialog::SettingsDialog(SConfig *customConfig, TQWidget *parent, const char *name)
: KConfigDialog( parent, name, Options::self()) : TDEConfigDialog( parent, name, Options::self())
{ {
General *general = new General(); General *general = new General();
addPage(general, i18n("General"), "package_settings", i18n("General Settings")); addPage(general, i18n("General"), "package_settings", i18n("General Settings"));

@ -77,7 +77,7 @@ private:
int selectedConfig; int selectedConfig;
}; };
class SettingsDialog : public KConfigDialog class SettingsDialog : public TDEConfigDialog
{ {
Q_OBJECT Q_OBJECT

@ -110,7 +110,7 @@ void MyMainView::setActionCollection(KActionCollection *a)
void MyMainView::readConfig() void MyMainView::readConfig()
{ {
KConfig *cfg = kapp->config(); TDEConfig *cfg = kapp->config();
int i; int i;
cfg->setGroup("Game"); cfg->setGroup("Game");
@ -185,7 +185,7 @@ void MyMainView::readConfig()
void MyMainView::writeConfig() void MyMainView::writeConfig()
{ {
KConfig *cfg; TDEConfig *cfg;
cfg=TDEApplication::kApplication()->config(); cfg=TDEApplication::kApplication()->config();
cfg->setGroup("Game"); cfg->setGroup("Game");
@ -986,7 +986,7 @@ void MyMainView::gameSetup()
if(!waitForStart) if(!waitForStart)
pause(); pause();
if (KConfigDialog::showDialog("settings")) if (TDEConfigDialog::showDialog("settings"))
return; return;
SettingsDialog *settings=new SettingsDialog(&customConfig,this,"settings"); SettingsDialog *settings=new SettingsDialog(&customConfig,this,"settings");

@ -179,10 +179,10 @@ void KTron::paletteChange(const TQPalette &/*oldPalette*/){
* Show Settings dialog. * Show Settings dialog.
*/ */
void KTron::showSettings(){ void KTron::showSettings(){
if(KConfigDialog::showDialog("settings")) if(TDEConfigDialog::showDialog("settings"))
return; return;
KConfigDialog *dialog = new KConfigDialog(this, "settings", Settings::self()); TDEConfigDialog *dialog = new TDEConfigDialog(this, "settings", Settings::self());
dialog->addPage(new General(0, "General"), i18n("General"), "package_settings"); dialog->addPage(new General(0, "General"), i18n("General"), "package_settings");
dialog->addPage(new Ai(0, "Ai"), i18n("A.I."), "personal"); dialog->addPage(new Ai(0, "Ai"), i18n("A.I."), "personal");
dialog->addPage(new Appearance(0, "Appearance"), i18n("Appearance"), "style"); dialog->addPage(new Appearance(0, "Appearance"), i18n("Appearance"), "style");

@ -90,7 +90,7 @@ void Tron::loadSettings(){
KURL url ( Settings::backgroundImage() ); KURL url ( Settings::backgroundImage() );
if(!url.isEmpty()){ if(!url.isEmpty()){
TQString tmpFile; TQString tmpFile;
KIO::NetAccess::download(url, tmpFile, this); TDEIO::NetAccess::download(url, tmpFile, this);
TQPixmap pix(tmpFile); TQPixmap pix(tmpFile);
if(!pix.isNull()){ if(!pix.isNull()){
setBackgroundPix(pix); setBackgroundPix(pix);
@ -99,7 +99,7 @@ void Tron::loadSettings(){
msg=msg.arg(tmpFile); msg=msg.arg(tmpFile);
KMessageBox::sorry(this, msg); KMessageBox::sorry(this, msg);
} }
KIO::NetAccess::removeTempFile(tmpFile); TDEIO::NetAccess::removeTempFile(tmpFile);
} }
else setBackgroundPix(NULL); else setBackgroundPix(NULL);
} }

@ -212,7 +212,7 @@ void TopLevel::playSound(const TQString &ref) const
// Read options from preferences file // Read options from preferences file
void TopLevel::readOptions() void TopLevel::readOptions()
{ {
KConfig *config; TDEConfig *config;
TQString option; TQString option;
config = TDEApplication::kApplication()->config(); config = TDEApplication::kApplication()->config();
@ -236,7 +236,7 @@ void TopLevel::readOptions()
// Write options to preferences file // Write options to preferences file
void TopLevel::writeOptions() void TopLevel::writeOptions()
{ {
KConfig *config; TDEConfig *config;
config = TDEApplication::kApplication()->config(); config = TDEApplication::kApplication()->config();
@ -304,7 +304,7 @@ void TopLevel::open(const KURL &url)
TQString name; TQString name;
KIO::NetAccess::download(url, name, this); TDEIO::NetAccess::download(url, name, this);
playGround->reset(); playGround->reset();
@ -316,7 +316,7 @@ void TopLevel::open(const KURL &url)
playGround->repaintAll(); playGround->repaintAll();
KIO::NetAccess::removeTempFile( name ); TDEIO::NetAccess::removeTempFile( name );
} }
// Save gameboard // Save gameboard

@ -78,9 +78,9 @@ void BaseMainWindow::configureHighscores()
void BaseMainWindow::configureSettings() void BaseMainWindow::configureSettings()
{ {
if ( !_inter->_isPaused() ) _inter->_pause(); if ( !_inter->_isPaused() ) _inter->_pause();
if ( KConfigDialog::showDialog("settings") ) return; if ( TDEConfigDialog::showDialog("settings") ) return;
KConfigDialog *dialog = new KConfigDialog(this, "settings", BasePrefs::self() ); TDEConfigDialog *dialog = new TDEConfigDialog(this, "settings", BasePrefs::self() );
TQWidget *w = bfactory->createGameConfig(); TQWidget *w = bfactory->createGameConfig();
if (w) dialog->addPage(w, i18n("Game"), "package_system"); if (w) dialog->addPage(w, i18n("Game"), "package_system");
w = bfactory->createAppearanceConfig(); w = bfactory->createAppearanceConfig();

@ -8,7 +8,7 @@
class BaseInterface; class BaseInterface;
class KToggleAction; class KToggleAction;
class KKeyDialog; class KKeyDialog;
class KConfigDialog; class TDEConfigDialog;
class KDE_EXPORT BaseMainWindow : public KZoomMainWindow class KDE_EXPORT BaseMainWindow : public KZoomMainWindow
{ {
@ -34,7 +34,7 @@ protected:
BaseInterface *_inter; BaseInterface *_inter;
void buildGUI(TQWidget *widget); void buildGUI(TQWidget *widget);
virtual void addConfig(KConfigDialog *) {} virtual void addConfig(TDEConfigDialog *) {}
virtual void addKeys(KKeyDialog &) {} virtual void addKeys(KKeyDialog &) {}
virtual void saveKeys() {} virtual void saveKeys() {}

@ -343,14 +343,14 @@ TQCString AIConfig::coefficientKey(const char *name)
double AIConfig::coefficient(const AI::Data &data) double AIConfig::coefficient(const AI::Data &data)
{ {
KConfigSkeletonItem *item = CommonPrefs::self()->findItem( TQString("Coefficient_%1").arg(data.name) ); TDEConfigSkeletonItem *item = CommonPrefs::self()->findItem( TQString("Coefficient_%1").arg(data.name) );
assert(item); assert(item);
return item->property().toDouble(); return item->property().toDouble();
} }
int AIConfig::trigger(const AI::Data &data) int AIConfig::trigger(const AI::Data &data)
{ {
KConfigSkeletonItem *item = CommonPrefs::self()->findItem( TQString("Trigger_%1").arg(data.name) ); TDEConfigSkeletonItem *item = CommonPrefs::self()->findItem( TQString("Trigger_%1").arg(data.name) );
assert(item); assert(item);
return item->property().toInt(); return item->property().toInt();
} }

@ -20,7 +20,7 @@ CommonHighscores::CommonHighscores()
void CommonHighscores::convertLegacy(uint) void CommonHighscores::convertLegacy(uint)
{ {
KConfigGroupSaver cg(kapp->config(), "High Scores"); TDEConfigGroupSaver cg(kapp->config(), "High Scores");
for (uint i=0; i<10; i++) { for (uint i=0; i<10; i++) {
TQString name TQString name
= cg.config()->readEntry(TQString("name%1").arg(i), TQString()); = cg.config()->readEntry(TQString("name%1").arg(i), TQString());

@ -10,7 +10,7 @@
#include "inter.h" #include "inter.h"
#include "factory.h" #include "factory.h"
void MainWindow::addConfig(KConfigDialog *dialog) void MainWindow::addConfig(TDEConfigDialog *dialog)
{ {
TQWidget *w = cfactory->createAIConfig(); TQWidget *w = cfactory->createAIConfig();
if (w) dialog->addPage(w, i18n("A.I."), "personal"); if (w) dialog->addPage(w, i18n("A.I."), "personal");

@ -14,7 +14,7 @@ public:
protected: protected:
void init(); void init();
void addConfig(KConfigDialog *); void addConfig(TDEConfigDialog *);
void addKeys(KKeyDialog &); void addKeys(KKeyDialog &);
void saveKeys(); void saveKeys();
virtual void focusInEvent(TQFocusEvent *e); virtual void focusInEvent(TQFocusEvent *e);

@ -95,7 +95,7 @@ void MPInterface::specialLocalGame(uint nbHumans, uint nbAIs)
ConnectionData cd; ConnectionData cd;
BoardData bd; BoardData bd;
PlayerComboBox::Type t; PlayerComboBox::Type t;
KConfigGroupSaver cg(kapp->config(), MP_GROUP); TDEConfigGroupSaver cg(kapp->config(), MP_GROUP);
for (uint i=0; i<(nbHumans+nbAIs); i++) { for (uint i=0; i<(nbHumans+nbAIs); i++) {
bd.type = (i<nbHumans ? PlayerComboBox::Human : PlayerComboBox::AI); bd.type = (i<nbHumans ? PlayerComboBox::Human : PlayerComboBox::AI);
bd.name = TQString(); bd.name = TQString();

@ -43,7 +43,7 @@ MPWizard::MPWizard(const MPGameInfo &gi, ConnectionData &_cd,
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
void MPWizard::setupTypePage() void MPWizard::setupTypePage()
{ {
KConfigGroupSaver cg(kapp->config(), MP_GROUP); TDEConfigGroupSaver cg(kapp->config(), MP_GROUP);
typePage = new TQVBox(this); typePage = new TQVBox(this);
typePage->setMargin(KDialogBase::marginHint()); typePage->setMargin(KDialogBase::marginHint());
@ -87,7 +87,7 @@ void MPWizard::setupLocalPage(const MPGameInfo &gi)
TQSignalMapper *aism = new TQSignalMapper(TQT_TQOBJECT(this)); TQSignalMapper *aism = new TQSignalMapper(TQT_TQOBJECT(this));
if (gi.AISettingSlot) connect(aism, TQT_SIGNAL(mapped(int)), gi.AISettingSlot); if (gi.AISettingSlot) connect(aism, TQT_SIGNAL(mapped(int)), gi.AISettingSlot);
KConfigGroupSaver cg(kapp->config(), MP_GROUP); TDEConfigGroupSaver cg(kapp->config(), MP_GROUP);
TQString n; TQString n;
PlayerComboBox::Type type; PlayerComboBox::Type type;
PlayerLine *pl; PlayerLine *pl;
@ -135,7 +135,7 @@ void MPWizard::typeChanged(int t)
str = "localhost"; str = "localhost";
lserver->setText(i18n("Hostname:")); lserver->setText(i18n("Hostname:"));
} else { } else {
KConfigGroupSaver cg(kapp->config(), MP_GROUP); TDEConfigGroupSaver cg(kapp->config(), MP_GROUP);
str = cg.config()->readEntry(MP_SERVER_ADDRESS, str = cg.config()->readEntry(MP_SERVER_ADDRESS,
i18n("the.server.address")); i18n("the.server.address"));
lserver->setText(i18n("Server address:")); lserver->setText(i18n("Server address:"));
@ -159,7 +159,7 @@ void MPWizard::lineTypeChanged(int)
void MPWizard::accept() void MPWizard::accept()
{ {
KConfigGroupSaver cg(kapp->config(), MP_GROUP); TDEConfigGroupSaver cg(kapp->config(), MP_GROUP);
cd.network = ( type!=Local ); cd.network = ( type!=Local );
cd.server = ( type!=Client ); cd.server = ( type!=Client );

@ -24,26 +24,26 @@
#include <tqfile.h> #include <tqfile.h>
KConfigRawBackEnd::KConfigRawBackEnd(KConfigBase *_config, int fd) TDEConfigRawBackEnd::TDEConfigRawBackEnd(TDEConfigBase *_config, int fd)
: KConfigINIBackEnd(_config, TQString(), "config", false), : TDEConfigINIBackEnd(_config, TQString(), "config", false),
_fd(fd), _stream(0) _fd(fd), _stream(0)
{ {
_file.open(IO_ReadOnly, _fd); _file.open(IO_ReadOnly, _fd);
} }
KConfigRawBackEnd::~KConfigRawBackEnd() TDEConfigRawBackEnd::~TDEConfigRawBackEnd()
{ {
if (_stream) fclose(_stream); if (_stream) fclose(_stream);
} }
bool KConfigRawBackEnd::parseConfigFiles() bool TDEConfigRawBackEnd::parseConfigFiles()
{ {
_file.reset(); _file.reset();
parseSingleConfigFile(_file); parseSingleConfigFile(_file);
return true; return true;
} }
void KConfigRawBackEnd::sync(bool bMerge) void TDEConfigRawBackEnd::sync(bool bMerge)
{ {
// write-sync is only necessary if there are dirty entries // write-sync is only necessary if there are dirty entries
if ( !pConfig->isDirty() || pConfig->isReadOnly() ) return; if ( !pConfig->isDirty() || pConfig->isReadOnly() ) return;

@ -26,11 +26,11 @@
#include <ksimpleconfig.h> #include <ksimpleconfig.h>
class KConfigRawBackEnd : public KConfigINIBackEnd class TDEConfigRawBackEnd : public TDEConfigINIBackEnd
{ {
public: public:
KConfigRawBackEnd(KConfigBase *_config, int fd); TDEConfigRawBackEnd(TDEConfigBase *_config, int fd);
~KConfigRawBackEnd(); ~TDEConfigRawBackEnd();
bool parseConfigFiles(); bool parseConfigFiles();
@ -41,8 +41,8 @@ private:
FILE *_stream; FILE *_stream;
TQFile _file; TQFile _file;
class KConfigRawBackEndPrivate; class TDEConfigRawBackEndPrivate;
KConfigRawBackEndPrivate *d; TDEConfigRawBackEndPrivate *d;
}; };
class KRawConfig : public KSimpleConfig class KRawConfig : public KSimpleConfig
@ -51,7 +51,7 @@ class KRawConfig : public KSimpleConfig
public: public:
KRawConfig(int fd, bool readOnly) KRawConfig(int fd, bool readOnly)
: KSimpleConfig(new KConfigRawBackEnd(this, fd), readOnly) {} : KSimpleConfig(new TDEConfigRawBackEnd(this, fd), readOnly) {}
}; };

@ -253,7 +253,7 @@ void HighscoresDialog::slotUser2()
{ {
KURL url = KFileDialog::getSaveURL(TQString(), TQString(), this); KURL url = KFileDialog::getSaveURL(TQString(), TQString(), this);
if ( url.isEmpty() ) return; if ( url.isEmpty() ) return;
if ( KIO::NetAccess::exists(url, true, this) ) { if ( TDEIO::NetAccess::exists(url, true, this) ) {
KGuiItem gi = KStdGuiItem::save(); KGuiItem gi = KStdGuiItem::save();
gi.setText(i18n("Overwrite")); gi.setText(i18n("Overwrite"));
int res = KMessageBox::warningContinueCancel(this, int res = KMessageBox::warningContinueCancel(this,
@ -264,7 +264,7 @@ void HighscoresDialog::slotUser2()
KTempFile tmp; KTempFile tmp;
internal->exportHighscores(*tmp.textStream()); internal->exportHighscores(*tmp.textStream());
tmp.close(); tmp.close();
KIO::NetAccess::upload(tmp.name(), url, this); TDEIO::NetAccess::upload(tmp.name(), url, this);
tmp.unlink(); tmp.unlink();
} }

@ -605,10 +605,10 @@ const char *UNABLE_TO_CONTACT =
bool ManagerPrivate::doQuery(const KURL &url, TQWidget *parent, bool ManagerPrivate::doQuery(const KURL &url, TQWidget *parent,
TQDomNamedNodeMap *map) TQDomNamedNodeMap *map)
{ {
KIO::http_update_cache(url, true, 0); // remove cache ! TDEIO::http_update_cache(url, true, 0); // remove cache !
TQString tmpFile; TQString tmpFile;
if ( !KIO::NetAccess::download(url, tmpFile, parent) ) { if ( !TDEIO::NetAccess::download(url, tmpFile, parent) ) {
TQString details = i18n("Server URL: %1").arg(url.host()); TQString details = i18n("Server URL: %1").arg(url.host());
KMessageBox::detailedSorry(parent, i18n(UNABLE_TO_CONTACT), details); KMessageBox::detailedSorry(parent, i18n(UNABLE_TO_CONTACT), details);
return false; return false;
@ -616,7 +616,7 @@ bool ManagerPrivate::doQuery(const KURL &url, TQWidget *parent,
TQFile file(tmpFile); TQFile file(tmpFile);
if ( !file.open(IO_ReadOnly) ) { if ( !file.open(IO_ReadOnly) ) {
KIO::NetAccess::removeTempFile(tmpFile); TDEIO::NetAccess::removeTempFile(tmpFile);
TQString details = i18n("Unable to open temporary file."); TQString details = i18n("Unable to open temporary file.");
KMessageBox::detailedSorry(parent, i18n(UNABLE_TO_CONTACT), details); KMessageBox::detailedSorry(parent, i18n(UNABLE_TO_CONTACT), details);
return false; return false;
@ -625,7 +625,7 @@ bool ManagerPrivate::doQuery(const KURL &url, TQWidget *parent,
TQTextStream t(&file); TQTextStream t(&file);
TQString content = t.read().stripWhiteSpace(); TQString content = t.read().stripWhiteSpace();
file.close(); file.close();
KIO::NetAccess::removeTempFile(tmpFile); TDEIO::NetAccess::removeTempFile(tmpFile);
TQDomDocument doc; TQDomDocument doc;
if ( doc.setContent(content) ) { if ( doc.setContent(content) ) {

@ -173,11 +173,11 @@ class ScoreInfos : public ItemArray
}; };
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
class ConfigGroup : public KConfigGroupSaver class ConfigGroup : public TDEConfigGroupSaver
{ {
public: public:
ConfigGroup(const TQString &group = TQString()) ConfigGroup(const TQString &group = TQString())
: KConfigGroupSaver(kapp->config(), group) {} : TDEConfigGroupSaver(kapp->config(), group) {}
}; };
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------

@ -160,7 +160,7 @@ KHighscore::~KHighscore()
delete d; delete d;
} }
KConfig* KHighscore::config() const TDEConfig* KHighscore::config() const
{ {
return (d->global ? _config : kapp->config()); return (d->global ? _config : kapp->config());
} }
@ -168,7 +168,7 @@ KConfig* KHighscore::config() const
void KHighscore::writeEntry(int entry, const TQString& key, const TQVariant& value) void KHighscore::writeEntry(int entry, const TQString& key, const TQVariant& value)
{ {
Q_ASSERT( isLocked() ); Q_ASSERT( isLocked() );
KConfigGroupSaver cg(config(), group()); TDEConfigGroupSaver cg(config(), group());
TQString confKey = TQString("%1_%2").arg(entry).arg(key); TQString confKey = TQString("%1_%2").arg(entry).arg(key);
cg.config()->writeEntry(confKey, value); cg.config()->writeEntry(confKey, value);
} }
@ -176,7 +176,7 @@ void KHighscore::writeEntry(int entry, const TQString& key, const TQVariant& val
void KHighscore::writeEntry(int entry, const TQString& key, int value) void KHighscore::writeEntry(int entry, const TQString& key, int value)
{ {
Q_ASSERT( isLocked() ); Q_ASSERT( isLocked() );
KConfigGroupSaver cg(config(), group()); TDEConfigGroupSaver cg(config(), group());
TQString confKey = TQString("%1_%2").arg(entry).arg(key); TQString confKey = TQString("%1_%2").arg(entry).arg(key);
cg.config()->writeEntry(confKey, value); cg.config()->writeEntry(confKey, value);
} }
@ -184,35 +184,35 @@ void KHighscore::writeEntry(int entry, const TQString& key, int value)
void KHighscore::writeEntry(int entry, const TQString& key, const TQString &value) void KHighscore::writeEntry(int entry, const TQString& key, const TQString &value)
{ {
Q_ASSERT (isLocked() ); Q_ASSERT (isLocked() );
KConfigGroupSaver cg(config(), group()); TDEConfigGroupSaver cg(config(), group());
TQString confKey = TQString("%1_%2").arg(entry).arg(key); TQString confKey = TQString("%1_%2").arg(entry).arg(key);
cg.config()->writeEntry(confKey, value); cg.config()->writeEntry(confKey, value);
} }
TQVariant KHighscore::readPropertyEntry(int entry, const TQString& key, const TQVariant& pDefault) const TQVariant KHighscore::readPropertyEntry(int entry, const TQString& key, const TQVariant& pDefault) const
{ {
KConfigGroupSaver cg(config(), group()); TDEConfigGroupSaver cg(config(), group());
TQString confKey = TQString("%1_%2").arg(entry).arg(key); TQString confKey = TQString("%1_%2").arg(entry).arg(key);
return cg.config()->readPropertyEntry(confKey, pDefault); return cg.config()->readPropertyEntry(confKey, pDefault);
} }
TQString KHighscore::readEntry(int entry, const TQString& key, const TQString& pDefault) const TQString KHighscore::readEntry(int entry, const TQString& key, const TQString& pDefault) const
{ {
KConfigGroupSaver cg(config(), group()); TDEConfigGroupSaver cg(config(), group());
TQString confKey = TQString("%1_%2").arg(entry).arg(key); TQString confKey = TQString("%1_%2").arg(entry).arg(key);
return cg.config()->readEntry(confKey, pDefault); return cg.config()->readEntry(confKey, pDefault);
} }
int KHighscore::readNumEntry(int entry, const TQString& key, int pDefault) const int KHighscore::readNumEntry(int entry, const TQString& key, int pDefault) const
{ {
KConfigGroupSaver cg(config(), group()); TDEConfigGroupSaver cg(config(), group());
TQString confKey = TQString("%1_%2").arg(entry).arg(key); TQString confKey = TQString("%1_%2").arg(entry).arg(key);
return cg.config()->readNumEntry(confKey, pDefault); return cg.config()->readNumEntry(confKey, pDefault);
} }
bool KHighscore::hasEntry(int entry, const TQString& key) const bool KHighscore::hasEntry(int entry, const TQString& key) const
{ {
KConfigGroupSaver cg(config(), group()); TDEConfigGroupSaver cg(config(), group());
TQString confKey = TQString("%1_%2").arg(entry).arg(key); TQString confKey = TQString("%1_%2").arg(entry).arg(key);
return cg.config()->hasKey(confKey); return cg.config()->hasKey(confKey);
} }

@ -26,7 +26,7 @@
#include <tqstring.h> #include <tqstring.h>
#include <tqobject.h> #include <tqobject.h>
#include <kdemacros.h> #include <kdemacros.h>
class KConfig; class TDEConfig;
class KFileLock; class KFileLock;
class KRawConfig; class KRawConfig;
class KHighscorePrivate; class KHighscorePrivate;
@ -39,7 +39,7 @@ class KHighscorePrivate;
* --enable-highscore-dir=/var/games) and a theoretically unlimited number of * --enable-highscore-dir=/var/games) and a theoretically unlimited number of
* entries. * entries.
* *
* You can specify different "keys" for an entry - just like the KConfig * You can specify different "keys" for an entry - just like the TDEConfig
* keys. But it will be prefixed with the number of the entry. For example you * keys. But it will be prefixed with the number of the entry. For example you
* will probably use something like this to save the name of the player on the * will probably use something like this to save the name of the player on the
* top of the list (ie the winner): * top of the list (ie the winner):
@ -51,7 +51,7 @@ class KHighscorePrivate;
* entry. I recommend to use "1", as several convenience methods use this. * entry. I recommend to use "1", as several convenience methods use this.
* *
* You can also specify different groups using setHighscoreGroup. Just * You can also specify different groups using setHighscoreGroup. Just
* like the keys mentioned above the groups behave like groups in KConfig * like the keys mentioned above the groups behave like groups in TDEConfig
* but are prefixed with "KHighscore_". The default group is just "KHighscore". * but are prefixed with "KHighscore_". The default group is just "KHighscore".
* You might use this e.g. to create different highscore tables like * You might use this e.g. to create different highscore tables like
* \code * \code
@ -164,7 +164,7 @@ public:
/** /**
* @param entry The number of the entry / the placing of the player * @param entry The number of the entry / the placing of the player
* @param key A key for this entry. E.g. "name" for the name of the * @param key A key for this entry. E.g. "name" for the name of the
* player. Nearly the same as the usual keys in KConfig - but they * player. Nearly the same as the usual keys in TDEConfig - but they
* are prefixed with the entry number * are prefixed with the entry number
* @param value The value of this entry * @param value The value of this entry
**/ **/
@ -179,7 +179,7 @@ public:
/** /**
* This is an overloaded member function, provided for convenience. * This is an overloaded member function, provided for convenience.
* It differs from the above function only in what argument(s) it accepts. * It differs from the above function only in what argument(s) it accepts.
* See KConfigBase documentation for allowed TQVariant::Type. * See TDEConfigBase documentation for allowed TQVariant::Type.
**/ **/
void writeEntry(int entry, const TQString& key, const TQVariant &value); void writeEntry(int entry, const TQString& key, const TQVariant &value);
@ -187,7 +187,7 @@ public:
* Reads an entry from the highscore table. * Reads an entry from the highscore table.
* @param entry The number of the entry / the placing to be read * @param entry The number of the entry / the placing to be read
* @param key The key of the entry. E.g. "name" for the name of the * @param key The key of the entry. E.g. "name" for the name of the
* player. Nearly the same as the usual keys in KConfig - but they * player. Nearly the same as the usual keys in TDEConfig - but they
* are prefixed with the entry number * are prefixed with the entry number
* @param pDefault This will be used as default value if the key+pair * @param pDefault This will be used as default value if the key+pair
* entry can't be found. * entry can't be found.
@ -200,7 +200,7 @@ public:
* Read a numeric value. * Read a numeric value.
* @param entry The number of the entry / the placing to be read * @param entry The number of the entry / the placing to be read
* @param key The key of the entry. E.g. "name" for the name of the * @param key The key of the entry. E.g. "name" for the name of the
* player. Nearly the same as the usual keys in KConfig - but they * player. Nearly the same as the usual keys in TDEConfig - but they
* are prefixed with the entry number * are prefixed with the entry number
* @param pDefault This will be used as default value if the key+pair * @param pDefault This will be used as default value if the key+pair
* entry can't be found. * entry can't be found.
@ -211,7 +211,7 @@ public:
/** /**
* Read a TQVariant entry. * Read a TQVariant entry.
* See KConfigBase documentation for allowed TQVariant::Type. * See TDEConfigBase documentation for allowed TQVariant::Type.
* *
* @return the value of this entry+key pair or pDefault if the entry+key * @return the value of this entry+key pair or pDefault if the entry+key
* pair doesn't exist or * pair doesn't exist or
@ -234,7 +234,7 @@ public:
* readEntry(i, key) where i is from 1 to 20. Note that this function * readEntry(i, key) where i is from 1 to 20. Note that this function
* depends on "1" as the first entry! * depends on "1" as the first entry!
* @param key The key of the entry. E.g. "name" for the name of the * @param key The key of the entry. E.g. "name" for the name of the
* player. Nearly the same as the usual keys in KConfig - but they * player. Nearly the same as the usual keys in TDEConfig - but they
* are prefixed with the entry number * are prefixed with the entry number
* @param lastEntry the last entry which will be includes into the list. * @param lastEntry the last entry which will be includes into the list.
* 1 will include a list with maximal 1 entry - 20 a list with maximal * 1 will include a list with maximal 1 entry - 20 a list with maximal
@ -250,7 +250,7 @@ public:
* way of calling writeEntry(i, key, list[i]) from i = 1 to * way of calling writeEntry(i, key, list[i]) from i = 1 to
* list.count() * list.count()
* @param key A key for the entry. E.g. "name" for the name of the * @param key A key for the entry. E.g. "name" for the name of the
* player. Nearly the same as the usual keys in KConfig - but they * player. Nearly the same as the usual keys in TDEConfig - but they
* are prefixed with the entry number * are prefixed with the entry number
* @param list The list of values * @param list The list of values
**/ **/
@ -288,17 +288,17 @@ public:
protected: protected:
/** /**
* @return A groupname to be used in KConfig. Used internally to * @return A groupname to be used in TDEConfig. Used internally to
* prefix the value from highscoreGroup() with "KHighscore_" * prefix the value from highscoreGroup() with "KHighscore_"
**/ **/
TQString group() const; TQString group() const;
/** /**
* @return A pointer to the KConfig object to be used. This is * @return A pointer to the TDEConfig object to be used. This is
* either kapp->config() (default) or a KSimpleConfig object for * either kapp->config() (default) or a KSimpleConfig object for
* a system-wide highscore file. * a system-wide highscore file.
**/ **/
KConfig* config() const; TDEConfig* config() const;
void init(bool forceLocal); void init(bool forceLocal);

@ -275,7 +275,7 @@ void KScoreDialog::loadScores()
TQString key, value; TQString key, value;
d->loaded = true; d->loaded = true;
d->scores.clear(); d->scores.clear();
KConfigGroup config(kapp->config(), d->configGroup.utf8()); TDEConfigGroup config(kapp->config(), d->configGroup.utf8());
d->player = config.readEntry("LastPlayer"); d->player = config.readEntry("LastPlayer");
@ -298,7 +298,7 @@ void KScoreDialog::loadScores()
void KScoreDialog::saveScores() void KScoreDialog::saveScores()
{ {
TQString key, value; TQString key, value;
KConfigGroup config(kapp->config(), d->configGroup.utf8()); TDEConfigGroup config(kapp->config(), d->configGroup.utf8());
config.writeEntry("LastPlayer", d->player); config.writeEntry("LastPlayer", d->player);

@ -49,7 +49,7 @@
#define SLIDER_MIN 400 #define SLIDER_MIN 400
#define SLIDER_MAX 3000 #define SLIDER_MAX 3000
// KConfig entries // TDEConfig entries
#define CONF_GROUP "KCardDialog" #define CONF_GROUP "KCardDialog"
#define CONF_RANDOMDECK TQString::fromLatin1("RandomDeck") #define CONF_RANDOMDECK TQString::fromLatin1("RandomDeck")
#define CONF_DECK TQString::fromLatin1("Deck") #define CONF_DECK TQString::fromLatin1("Deck")
@ -111,7 +111,7 @@ public:
int KCardDialog::getCardDeck(TQString &pDeck, TQString &pCardDir, TQWidget *pParent, int KCardDialog::getCardDeck(TQString &pDeck, TQString &pCardDir, TQWidget *pParent,
CardFlags pFlags, bool* pRandomDeck, bool* pRandomCardDir, CardFlags pFlags, bool* pRandomDeck, bool* pRandomCardDir,
double* pScale, KConfig* pConf) double* pScale, TDEConfig* pConf)
{ {
KCardDialog dlg(pParent, "dlg", pFlags); KCardDialog dlg(pParent, "dlg", pFlags);
@ -176,7 +176,7 @@ int KCardDialog::getCardDeck(TQString &pDeck, TQString &pCardDir, TQWidget *pPar
return result; return result;
} }
void KCardDialog::getConfigCardDeck(KConfig* conf, TQString &pDeck, TQString &pCardDir, double& pScale) void KCardDialog::getConfigCardDeck(TDEConfig* conf, TQString &pDeck, TQString &pCardDir, double& pScale)
{ {
// TODO check for global cards/decks!!!! // TODO check for global cards/decks!!!!
if (!conf) { if (!conf) {
@ -643,7 +643,7 @@ void KCardDialog::slotRandomCardDirToggled(bool on)
} }
} }
void KCardDialog::loadConfig(KConfig* conf) void KCardDialog::loadConfig(TDEConfig* conf)
{ {
if (!conf) { if (!conf) {
return; return;
@ -717,7 +717,7 @@ void KCardDialog::slotDefaultSize()
d->scaleSlider->setValue(-1000 + SLIDER_MIN + SLIDER_MAX); d->scaleSlider->setValue(-1000 + SLIDER_MIN + SLIDER_MAX);
} }
void KCardDialog::saveConfig(KConfig* conf) void KCardDialog::saveConfig(TDEConfig* conf)
{ {
if (!conf) { if (!conf) {
return; return;

@ -26,7 +26,7 @@
#include <kdemacros.h> #include <kdemacros.h>
class TQIconViewItem; class TQIconViewItem;
class KConfig; class TDEConfig;
class KCardDialogPrivate; class KCardDialogPrivate;
@ -63,7 +63,7 @@ class KCardDialogPrivate;
* deck/carddir. You have to save the value of those parameters in your config * deck/carddir. You have to save the value of those parameters in your config
* file - that's why the parameters are needed. * file - that's why the parameters are needed.
* *
* You can also provide a KConfig pointer (usually kapp->config()). This * You can also provide a TDEConfig pointer (usually kapp->config()). This
* pointer is used to store information about the dialog in an own group * pointer is used to store information about the dialog in an own group
* ("KCardDailog"). * ("KCardDailog").
* So you can just ignore the randomCardDir and randomDeck * So you can just ignore the randomCardDir and randomDeck
@ -156,7 +156,7 @@ public:
*/ */
static int getCardDeck(TQString &deck,TQString &carddir, TQWidget *parent=0, static int getCardDeck(TQString &deck,TQString &carddir, TQWidget *parent=0,
CardFlags flags=Both, bool* randomDeck=0, CardFlags flags=Both, bool* randomDeck=0,
bool* randomCardDir=0, double* scale=0, KConfig* conf=0); bool* randomCardDir=0, double* scale=0, TDEConfig* conf=0);
/** /**
* Read the configuration from the applications rc file and put the * Read the configuration from the applications rc file and put the
@ -173,7 +173,7 @@ public:
* random cardDir if this is desired according to the config) * random cardDir if this is desired according to the config)
* @param scale The scaling factor (usually 1) * @param scale The scaling factor (usually 1)
**/ **/
static void getConfigCardDeck(KConfig* conf, TQString& deck, TQString& cardDir, double& scale); static void getConfigCardDeck(TDEConfig* conf, TQString& deck, TQString& cardDir, double& scale);
/** /**
* Returns the default path to the card deck backsides. You want * Returns the default path to the card deck backsides. You want
@ -301,7 +301,7 @@ public:
* Load the default settings into the dialog (e.g. whether the "use random * Load the default settings into the dialog (e.g. whether the "use random
* deck" checkbox is checked or not). * deck" checkbox is checked or not).
**/ **/
void loadConfig(KConfig* conf); void loadConfig(TDEConfig* conf);
/** /**
* Saves the KCardDialog config into a config file. This should be the * Saves the KCardDialog config into a config file. This should be the
@ -309,7 +309,7 @@ public:
* ("KCardDialog"). These settings are used by @ref loadConfig and @ref * ("KCardDialog"). These settings are used by @ref loadConfig and @ref
* getConfigCardDeck. * getConfigCardDeck.
**/ **/
void saveConfig(KConfig* conf); void saveConfig(TDEConfig* conf);
protected: protected:

@ -465,7 +465,7 @@ const TQFont& KChatBase::systemNameFont() const
const TQFont& KChatBase::systemMessageFont() const const TQFont& KChatBase::systemMessageFont() const
{ return d->mSystemMessageFont; } { return d->mSystemMessageFont; }
void KChatBase::saveConfig(KConfig* conf) void KChatBase::saveConfig(TDEConfig* conf)
{ {
TQString oldGroup; TQString oldGroup;
if (!conf) { if (!conf) {
@ -485,7 +485,7 @@ void KChatBase::saveConfig(KConfig* conf)
} }
} }
void KChatBase::readConfig(KConfig* conf) void KChatBase::readConfig(TDEConfig* conf)
{ {
TQString oldGroup; TQString oldGroup;
if (!conf) { if (!conf) {

@ -27,7 +27,7 @@
#include <kdemacros.h> #include <kdemacros.h>
class TQListBoxItem; class TQListBoxItem;
class KConfig; class TDEConfig;
class KChatBaseTextPrivate; class KChatBaseTextPrivate;
@ -361,22 +361,22 @@ public:
const TQFont& systemMessageFont() const; const TQFont& systemMessageFont() const;
/** /**
* Save the configuration of the dialog to a KConfig object. If * Save the configuration of the dialog to a TDEConfig object. If
* the supplied KConfig pointer is NULL then kapp->config() is used * the supplied TDEConfig pointer is NULL then kapp->config() is used
* instead (and the group is changed to "KChatBase") butr the current * instead (and the group is changed to "KChatBase") butr the current
* group is restored at the end. * group is restored at the end.
* @param conf A pointer to the KConfig object to save the config * @param conf A pointer to the TDEConfig object to save the config
* to. If you use 0 then kapp->config() is used and the group is changed * to. If you use 0 then kapp->config() is used and the group is changed
* to "KChatBase" (the current group is restored at the end). * to "KChatBase" (the current group is restored at the end).
**/ **/
virtual void saveConfig(KConfig* conf = 0); virtual void saveConfig(TDEConfig* conf = 0);
/** /**
* Read the configuration from a KConfig object. If the pointer is * Read the configuration from a TDEConfig object. If the pointer is
* NULL kapp->config() is used and the group is changed to "KChatBase". * NULL kapp->config() is used and the group is changed to "KChatBase".
* The current KConfig::group is restored after this call. * The current TDEConfig::group is restored after this call.
**/ **/
virtual void readConfig(KConfig* conf = 0); virtual void readConfig(TDEConfig* conf = 0);
/** /**
* Set the maximum number of items in the list. If the number of item * Set the maximum number of items in the list. If the number of item

@ -12,8 +12,8 @@
the user... the user...
- 03.06.2001: can we translate the group of a KPlayer? Probably not as there are - 03.06.2001: can we translate the group of a KPlayer? Probably not as there are
no international connections possible then... maybe a group id? no international connections possible then... maybe a group id?
- 05.06.2001: KGameDialog::saveConfig(KConfig*) might be useful (as well as - 05.06.2001: KGameDialog::saveConfig(TDEConfig*) might be useful (as well as
KGameDialog::loadConfig(KConfig*). Should set an own group in the KGameDialog::loadConfig(TDEConfig*). Should set an own group in the
config file (setGroup("KGameDialog")). Problem: shalll network config file (setGroup("KGameDialog")). Problem: shalll network
settings be saved? Could be used for startup configuration (i.e. settings be saved? Could be used for startup configuration (i.e.
load the config of the previous game) otherwise. load the config of the previous game) otherwise.

@ -471,7 +471,7 @@ private:
NOTE: This has to be here in the header file, because it is a subclass from NOTE: This has to be here in the header file, because it is a subclass from
TQObject and has to go through the moc. TQObject and has to go through the moc.
@short An internal class for KServerSocket @short An internal class for TDEServerSocket
@author Burkhard Lehner <Burkhard.Lehner@gmx.de> @author Burkhard Lehner <Burkhard.Lehner@gmx.de>
*/ */
class KMessageServerSocket : public TQServerSocket class KMessageServerSocket : public TQServerSocket

@ -345,7 +345,7 @@ void KRServerSocket::slotAccept( int )
return; return;
} }
emit accepted( new KSocket( new_sock ) ); emit accepted( new TDESocket( new_sock ) );
} }
else if ( domain == PF_UNIX ) else if ( domain == PF_UNIX )
{ {
@ -360,7 +360,7 @@ void KRServerSocket::slotAccept( int )
return; return;
} }
emit accepted( new KSocket( new_sock ) ); emit accepted( new TDESocket( new_sock ) );
} }
} }

@ -59,10 +59,10 @@ class KRServerSocketPrivate;
* Monitor a port for incoming TCP/IP connections. * Monitor a port for incoming TCP/IP connections.
* *
* You can use a KRServerSocket to listen on a port for incoming * You can use a KRServerSocket to listen on a port for incoming
* connections. When a connection arrived in the port, a KSocket * connections. When a connection arrived in the port, a TDESocket
* is created and the signal accepted is raised. Make sure you * is created and the signal accepted is raised. Make sure you
* always connect to this signal. If you dont the ServerSocket will * always connect to this signal. If you dont the ServerSocket will
* create new KSocket's and no one will delete them! * create new TDESocket's and no one will delete them!
* *
* If socket() is -1 or less the socket was not created properly. * If socket() is -1 or less the socket was not created properly.
* *
@ -117,9 +117,9 @@ public slots:
signals: signals:
/** /**
* A connection has been accepted. * A connection has been accepted.
* It is your task to delete the KSocket if it is no longer needed. * It is your task to delete the TDESocket if it is no longer needed.
*/ */
void accepted( KSocket* ); void accepted( TDESocket* );
protected: protected:
bool init( short unsigned int ); bool init( short unsigned int );

@ -104,19 +104,19 @@ bool tryserver;
tryserver=false; tryserver=false;
if (!IP.isEmpty()) if (!IP.isEmpty())
{ {
kSocket=new KSocket(IP.latin1(),port); kSocket=new TDESocket(IP.latin1(),port);
if (!kSocket) return false; if (!kSocket) return false;
if (kSocket->socket()!=-1) // success if (kSocket->socket()!=-1) // success
{ {
kSocket->enableRead(TRUE); kSocket->enableRead(TRUE);
//kSocket->enableWrite(TRUE); //kSocket->enableWrite(TRUE);
connect(kSocket,TQT_SIGNAL(closeEvent(KSocket *)), connect(kSocket,TQT_SIGNAL(closeEvent(TDESocket *)),
this,TQT_SLOT(socketClosed(KSocket *))); this,TQT_SLOT(socketClosed(TDESocket *)));
connect(kSocket,TQT_SIGNAL(readEvent(KSocket *)), connect(kSocket,TQT_SIGNAL(readEvent(TDESocket *)),
this,TQT_SLOT(socketRead(KSocket *))); this,TQT_SLOT(socketRead(TDESocket *)));
/* /*
connect(kSocket,TQT_SIGNAL(writeEvent(KSocket *)), connect(kSocket,TQT_SIGNAL(writeEvent(TDESocket *)),
this,TQT_SLOT(socketWrite(KSocket *))); this,TQT_SLOT(socketWrite(TDESocket *)));
*/ */
/* /*
printf("Socket(%d) %p connection built to a server\n", printf("Socket(%d) %p connection built to a server\n",
@ -187,12 +187,12 @@ bool KRemoteConnect::OfferServerSocket()
printf("Offering socket and publishing stuff\n"); printf("Offering socket and publishing stuff\n");
service = new DNSSD::PublicService(Name,LSKAT_SERVICE,port); service = new DNSSD::PublicService(Name,LSKAT_SERVICE,port);
service->publishAsync(); service->publishAsync();
connect(kServerSocket,TQT_SIGNAL(accepted(KSocket *)), connect(kServerSocket,TQT_SIGNAL(accepted(TDESocket *)),
this,TQT_SLOT(socketRequest(KSocket *))); this,TQT_SLOT(socketRequest(TDESocket *)));
return true; return true;
} }
void KRemoteConnect::socketRequest(KSocket *sock) void KRemoteConnect::socketRequest(TDESocket *sock)
{ {
if (kSocket) // already connected if (kSocket) // already connected
{ {
@ -206,13 +206,13 @@ void KRemoteConnect::socketRequest(KSocket *sock)
{ {
kSocket->enableRead(TRUE); kSocket->enableRead(TRUE);
//kSocket->enableWrite(TRUE); //kSocket->enableWrite(TRUE);
connect(kSocket,TQT_SIGNAL(closeEvent(KSocket *)), connect(kSocket,TQT_SIGNAL(closeEvent(TDESocket *)),
this,TQT_SLOT(socketClosed(KSocket *))); this,TQT_SLOT(socketClosed(TDESocket *)));
connect(kSocket,TQT_SIGNAL(readEvent(KSocket *)), connect(kSocket,TQT_SIGNAL(readEvent(TDESocket *)),
this,TQT_SLOT(socketRead(KSocket *))); this,TQT_SLOT(socketRead(TDESocket *)));
/* /*
connect(kSocket,TQT_SIGNAL(writeEvent(KSocket *)), connect(kSocket,TQT_SIGNAL(writeEvent(TDESocket *)),
this,TQT_SLOT(socketWrite(KSocket *))); this,TQT_SLOT(socketWrite(TDESocket *)));
*/ */
socketStatus=KR_SERVER; socketStatus=KR_SERVER;
delete kServerSocket; // no more connections delete kServerSocket; // no more connections
@ -228,7 +228,7 @@ void KRemoteConnect::socketRequest(KSocket *sock)
} }
} }
void KRemoteConnect::socketClosed(KSocket *sock) void KRemoteConnect::socketClosed(TDESocket *sock)
{ {
delete sock; delete sock;
kSocket=0; kSocket=0;
@ -238,7 +238,7 @@ void KRemoteConnect::socketClosed(KSocket *sock)
emit signalReceiveMsg(msg,QueryID()); emit signalReceiveMsg(msg,QueryID());
delete msg; delete msg;
} }
void KRemoteConnect::socketRead(KSocket *sock) void KRemoteConnect::socketRead(TDESocket *sock)
{ {
ssize_t buflen; ssize_t buflen;
TQString s; TQString s;
@ -288,7 +288,7 @@ void KRemoteConnect::socketRead(KSocket *sock)
} }
void KRemoteConnect::socketWrite(KSocket *) void KRemoteConnect::socketWrite(TDESocket *)
{ {
// printf("wrtie input on socket %p\n",sock); // printf("wrtie input on socket %p\n",sock);
} }

@ -33,7 +33,7 @@ class KRemoteConnect: public KChildConnect
protected: protected:
KRServerSocket *kServerSocket; KRServerSocket *kServerSocket;
KSocket *kSocket; TDESocket *kSocket;
TQString IP; TQString IP;
TQString Name; TQString Name;
ushort port; ushort port;
@ -60,10 +60,10 @@ class KRemoteConnect: public KChildConnect
bool OfferServerSocket(); bool OfferServerSocket();
protected slots: protected slots:
void socketClosed(KSocket *sock); void socketClosed(TDESocket *sock);
void socketRead(KSocket *sock); void socketRead(TDESocket *sock);
void socketWrite(KSocket *sock); void socketWrite(TDESocket *sock);
void socketRequest(KSocket *sock); void socketRequest(TDESocket *sock);

@ -287,7 +287,7 @@ LSkatDoc *LSkatApp::getDocument() const
return doc; return doc;
} }
void LSkatApp::saveProperties(KConfig *_cfg) void LSkatApp::saveProperties(TDEConfig *_cfg)
{ {
if(doc->getTitle()!=i18n("Untitled") && !doc->isModified()) if(doc->getTitle()!=i18n("Untitled") && !doc->isModified())
{ {
@ -305,7 +305,7 @@ void LSkatApp::saveProperties(KConfig *_cfg)
} }
void LSkatApp::readProperties(KConfig* _cfg) void LSkatApp::readProperties(TDEConfig* _cfg)
{ {
TQString filename = _cfg->readPathEntry("filename"); TQString filename = _cfg->readPathEntry("filename");
bool modified = _cfg->readBoolEntry("modified", false); bool modified = _cfg->readBoolEntry("modified", false);

@ -60,7 +60,7 @@ class LSkatView;
* full session management as well as keyboard accelerator configuration by using KAccel. * full session management as well as keyboard accelerator configuration by using KAccel.
* @see KMainWindow * @see KMainWindow
* @see TDEApplication * @see TDEApplication
* @see KConfig * @see TDEConfig
* @see KAccel * @see KAccel
* *
* @author Source Framework Automatically Generated by KDevelop, (c) The KDevelop Team. * @author Source Framework Automatically Generated by KDevelop, (c) The KDevelop Team.
@ -139,12 +139,12 @@ class LSkatApp : public KMainWindow
* opened file by a temporary filename provided by TDEApplication. * opened file by a temporary filename provided by TDEApplication.
* @see KMainWindow#saveProperties * @see KMainWindow#saveProperties
*/ */
virtual void saveProperties(KConfig *_cfg); virtual void saveProperties(TDEConfig *_cfg);
/** reads the session config file and restores the application's state including the last opened files and documents by reading the /** reads the session config file and restores the application's state including the last opened files and documents by reading the
* temporary files saved by saveProperties() * temporary files saved by saveProperties()
* @see KMainWindow#readProperties * @see KMainWindow#readProperties
*/ */
virtual void readProperties(KConfig *_cfg); virtual void readProperties(TDEConfig *_cfg);
public slots: public slots:
void slotPrepareProcessMove(KEMessage *msg); void slotPrepareProcessMove(KEMessage *msg);
@ -204,7 +204,7 @@ protected: // Protected attributes
TQStrList recentFiles; TQStrList recentFiles;
/** the configuration object of the application */ /** the configuration object of the application */
KConfig *config; TDEConfig *config;
LSkatView *view; LSkatView *view;
/** doc represents your actual document and is created only once. It keeps /** doc represents your actual document and is created only once. It keeps

@ -162,7 +162,7 @@ void LSkatDoc::closeDocument()
deleteContents(); deleteContents();
} }
bool LSkatDoc::newDocument(KConfig * /*config*/,TQString path) bool LSkatDoc::newDocument(TDEConfig * /*config*/,TQString path)
{ {
int res; int res;
modified=false; modified=false;
@ -729,9 +729,9 @@ void LSkatDoc::ClearStats()
stat_brk[j]=0; stat_brk[j]=0;
} }
} }
void LSkatDoc::ReadConfig(KConfig *config) void LSkatDoc::ReadConfig(TDEConfig *config)
{ {
KConfig emailCfg( "emaildefaults", true ); TDEConfig emailCfg( "emaildefaults", true );
emailCfg.setGroup( "UserInfo" ); emailCfg.setGroup( "UserInfo" );
TQString name = emailCfg.readEntry( "FullName" ); TQString name = emailCfg.readEntry( "FullName" );
if ( name.isEmpty() ) if ( name.isEmpty() )
@ -782,7 +782,7 @@ void LSkatDoc::ReadConfig(KConfig *config)
} }
/** write config file */ /** write config file */
void LSkatDoc::WriteConfig(KConfig *config) void LSkatDoc::WriteConfig(TDEConfig *config)
{ {
config->setGroup("Parameter"); config->setGroup("Parameter");
config->writeEntry("host",host); config->writeEntry("host",host);

@ -67,7 +67,7 @@ class LSkatDoc : public TQObject
/** deletes the document's contents */ /** deletes the document's contents */
void deleteContents(); void deleteContents();
/** initializes the document generally */ /** initializes the document generally */
bool newDocument(KConfig *config,TQString path); bool newDocument(TDEConfig *config,TQString path);
/** closes the acutal document */ /** closes the acutal document */
void closeDocument(); void closeDocument();
/** loads the document by filename and format and emits the updateViews() signal */ /** loads the document by filename and format and emits the updateViews() signal */
@ -134,8 +134,8 @@ class LSkatDoc : public TQObject
int GetStatAborted(int no); int GetStatAborted(int no);
int GetStatPoints(int no); int GetStatPoints(int no);
void WriteConfig(KConfig *config); void WriteConfig(TDEConfig *config);
void ReadConfig(KConfig *config); void ReadConfig(TDEConfig *config);
void SetInputHandler(KEInput *i); void SetInputHandler(KEInput *i);
KEInput *QueryInputHandler(); KEInput *QueryInputHandler();

@ -62,7 +62,7 @@ bool KSpriteCache::setGrafixDir(TQString name)
// TODO check for filename // TODO check for filename
kdDebug(11002) << "Opening config " << file << endl; kdDebug(11002) << "Opening config " << file << endl;
mConfig=new KConfig(file,false,false); mConfig=new TDEConfig(file,false,false);
mGrafixDir=d; mGrafixDir=d;
return true; 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); config->setGroup(name);
TQPoint defaultoffset=TQPoint(0,0); TQPoint defaultoffset=TQPoint(0,0);
@ -292,7 +292,7 @@ TQCanvasPixmapArray *KSpriteCache::createPixmapArray(KConfig *config,TQString na
return pixmaparray; return pixmaparray;
} }
void KSpriteCache::applyFilter(TQPixmap *pixmap,KConfig *config,TQString name) void KSpriteCache::applyFilter(TQPixmap *pixmap,TDEConfig *config,TQString name)
{ {
TQValueList<int> filterList; TQValueList<int> filterList;
filterList=config->readIntListEntry(name+"colorfilter"); filterList=config->readIntListEntry(name+"colorfilter");
@ -376,7 +376,7 @@ void KSpriteCache::changeGrey(TQPixmap *pixmap,int lighter)
pixmap->convertFromImage(img); // slow pixmap->convertFromImage(img); // slow
} }
TQCanvasItem *KSpriteCache::loadItem(KConfig *config,TQString name) TQCanvasItem *KSpriteCache::loadItem(TDEConfig *config,TQString name)
{ {
if (!config) return 0; if (!config) return 0;
int rtti=config->readNumEntry("rtti",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 x=config->readDoubleNumEntry("x",0.0);
double y=config->readDoubleNumEntry("y",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 ; if (!sprite) return ;
for (int i=0;i<1000;i++) for (int i=0;i<1000;i++)

@ -20,7 +20,7 @@
#include <tqcanvas.h> #include <tqcanvas.h>
#include <tqdict.h> #include <tqdict.h>
class KConfig; class TDEConfig;
class KSprite; class KSprite;
@ -234,7 +234,7 @@ class KSprite : public TQCanvasSprite
/** /**
* The KSpriteCache class is used to load and cache sprites. Loading * 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 * 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 * 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 * 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;} 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 * 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 * in theis file to or if you want to read additional sprite data which are
* not read be the default functions. * not read be the default functions.
**/ **/
KConfig *config() {return mConfig;} TDEConfig *config() {return mConfig;}
/** /**
* Main function to create a sprite. You call this like * Main function to create a sprite. You call this like
@ -399,7 +399,7 @@ class KSpriteCache : public TQObject
* z=(double) * z=(double)
* </pre> * </pre>
**/ **/
void configureCanvasItem(KConfig *config,TQCanvasItem *item); void configureCanvasItem(TDEConfig *config,TQCanvasItem *item);
/** /**
* Copies the default properties for all TQCanvasItems from another sprite. * 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 * 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. * 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 * 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) * colorfilter=2,g : make it gray and lighter (positiv) or darker (negative)
* </pre> * </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 * 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 config - the config file the sprite is read from
* @param sprite - the sprite whose animations are set * @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 * 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 * Apply the filters as defined in the config file to the sprite name
* (TODO is this argument needed) to the pixmap. * (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 (?) * resets the cache (?)
@ -500,7 +500,7 @@ class KSpriteCache : public TQObject
TQString mGrafixDir; TQString mGrafixDir;
TQString mRcFile; TQString mRcFile;
KConfig *mConfig; TDEConfig *mConfig;
TQCanvas *mCanvas; TQCanvas *mCanvas;
}; };

@ -288,7 +288,7 @@ void Kwin4App::changeAction(const char *action, bool enable){
/** /**
* Store the current game * Store the current game
*/ */
void Kwin4App::saveProperties(KConfig *cfg) void Kwin4App::saveProperties(TDEConfig *cfg)
{ {
TQString tempfile = kapp->tempSaveName(TQDir::currentDirPath()+"twin4"); TQString tempfile = kapp->tempSaveName(TQDir::currentDirPath()+"twin4");
cfg->writePathEntry("filename", tempfile ); cfg->writePathEntry("filename", tempfile );
@ -298,7 +298,7 @@ void Kwin4App::saveProperties(KConfig *cfg)
/** /**
* Load game back * Load game back
*/ */
void Kwin4App::readProperties(KConfig* cfg) void Kwin4App::readProperties(TDEConfig* cfg)
{ {
TQString filename = cfg->readPathEntry("filename"); TQString filename = cfg->readPathEntry("filename");
if(!filename.isEmpty()) if(!filename.isEmpty())
@ -613,10 +613,10 @@ void Kwin4App::slotDebugKGame()
* Show Configure dialog. * Show Configure dialog.
*/ */
void Kwin4App::showSettings(){ void Kwin4App::showSettings(){
if(KConfigDialog::showDialog("settings")) if(TDEConfigDialog::showDialog("settings"))
return; 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"); Settings *general = new Settings(0, "General");
dialog->addPage(general, i18n("General"), "package_settings"); dialog->addPage(general, i18n("General"), "package_settings");
connect(dialog, TQT_SIGNAL(settingsChanged()), doc, TQT_SLOT(loadSettings())); connect(dialog, TQT_SIGNAL(settingsChanged()), doc, TQT_SLOT(loadSettings()));

@ -79,8 +79,8 @@ protected:
void initStatusBar(); void initStatusBar();
void initDocument(); void initDocument();
virtual void saveProperties(KConfig *cfg); virtual void saveProperties(TDEConfig *cfg);
virtual void readProperties(KConfig *cfg); virtual void readProperties(TDEConfig *cfg);
public slots: public slots:
void slotServerTypeChanged(int t); void slotServerTypeChanged(int t);

@ -694,7 +694,7 @@ void Kwin4Doc::loadSettings(){
/** /**
* read config file * read config file
*/ */
void Kwin4Doc::ReadConfig(KConfig *config) void Kwin4Doc::ReadConfig(TDEConfig *config)
{ {
loadSettings(); loadSettings();
@ -708,7 +708,7 @@ void Kwin4Doc::ReadConfig(KConfig *config)
/** /**
* write config file * write config file
*/ */
void Kwin4Doc::WriteConfig(KConfig *config) void Kwin4Doc::WriteConfig(TDEConfig *config)
{ {
config->setGroup("YellowPlayer"); config->setGroup("YellowPlayer");
getPlayer(Gelb)->writeConfig(config); getPlayer(Gelb)->writeConfig(config);

@ -99,8 +99,8 @@ public:
/** Returns colour */ /** Returns colour */
FARBE QueryColour(int x,int y); FARBE QueryColour(int x,int y);
void ReadConfig(KConfig *config); void ReadConfig(TDEConfig *config);
void WriteConfig(KConfig *config); void WriteConfig(TDEConfig *config);
FARBE QueryCurrentPlayer(); FARBE QueryCurrentPlayer();
void SetCurrentPlayer(FARBE i); void SetCurrentPlayer(FARBE i);

@ -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)); mAllWin.setValue(config->readNumEntry("win",0));
mAllRemis.setValue(config->readNumEntry("remis",0)); mAllRemis.setValue(config->readNumEntry("remis",0));
@ -107,7 +107,7 @@ void Kwin4Player::readConfig(KConfig *config)
mAllBrk.setValue(config->readNumEntry("brk",0)); mAllBrk.setValue(config->readNumEntry("brk",0));
} }
void Kwin4Player::writeConfig(KConfig *config) void Kwin4Player::writeConfig(TDEConfig *config)
{ {
config->writeEntry("win",mAllWin.value()); config->writeEntry("win",mAllWin.value());
config->writeEntry("remis",mAllRemis.value()); config->writeEntry("remis",mAllRemis.value());

@ -25,7 +25,7 @@
#include <kplayer.h> #include <kplayer.h>
class StatusWidget; class StatusWidget;
class KConfig; class TDEConfig;
class Kwin4Player : public KPlayer class Kwin4Player : public KPlayer
{ {
@ -38,8 +38,8 @@ class Kwin4Player : public KPlayer
Kwin4Player(); Kwin4Player();
int rtti() const {return 1;} int rtti() const {return 1;}
void setWidget(StatusWidget *w) {sWidget=w;} void setWidget(StatusWidget *w) {sWidget=w;}
void readConfig(KConfig *config); void readConfig(TDEConfig *config);
void writeConfig(KConfig *config); void writeConfig(TDEConfig *config);
void incWin(); void incWin();
void incRemis(); void incRemis();
void incLost(); void incLost();

@ -137,7 +137,7 @@ Kwin4View::Kwin4View(Kwin4Doc *theDoc, TQWidget *parent, const char *name)
mCache=new KSpriteCache(mGrafix,TQT_TQOBJECT(this)); mCache=new KSpriteCache(mGrafix,TQT_TQOBJECT(this));
mCache->setCanvas(mCanvas); mCache->setCanvas(mCanvas);
KConfig *config=mCache->config(); TDEConfig *config=mCache->config();
TQPoint pnt; TQPoint pnt;
config->setGroup("game"); config->setGroup("game");
@ -192,7 +192,7 @@ void Kwin4View::initView(bool deleteall)
// mCanvas->setAdvancePeriod(period); // mCanvas->setAdvancePeriod(period);
mCanvas->setAdvancePeriod(15); mCanvas->setAdvancePeriod(15);
KConfig *config=mCache->config(); TDEConfig *config=mCache->config();
config->setGroup("game"); config->setGroup("game");
mSpreadX=config->readNumEntry("spread_x",0); mSpreadX=config->readNumEntry("spread_x",0);
mSpreadY=config->readNumEntry("spread_y",0); mSpreadY=config->readNumEntry("spread_y",0);
@ -263,7 +263,7 @@ void Kwin4View::EndGame()
{ {
KSprite *sprite; KSprite *sprite;
sprite=(KSprite *)(mCache->getItem("gameover",1)); sprite=(KSprite *)(mCache->getItem("gameover",1));
KConfig *config=mCache->config(); TDEConfig *config=mCache->config();
int dest=config->readNumEntry("destY",150); int dest=config->readNumEntry("destY",150);
int src=config->readNumEntry("y",0); int src=config->readNumEntry("y",0);
//kdDebug(12010) << "MOVING gameover to " << dest << endl; //kdDebug(12010) << "MOVING gameover to " << dest << endl;
@ -337,7 +337,7 @@ void Kwin4View::drawIntro(bool /*remove*/)
sprite=(KSprite *)(mCache->getItem("win4about",2)); sprite=(KSprite *)(mCache->getItem("win4about",2));
if (sprite) if (sprite)
{ {
KConfig *config=mCache->config(); TDEConfig *config=mCache->config();
double dest=config->readDoubleNumEntry("x2",250.0); double dest=config->readDoubleNumEntry("x2",250.0);
sprite->setX(dest); sprite->setX(dest);
sprite->show(); sprite->show();

Loading…
Cancel
Save