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

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

@ -45,7 +45,7 @@ void Monopigator::loadData(const KURL &url)
m_downloadData->open(IO_WriteOnly);
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));
if (!m_timer)
@ -54,18 +54,18 @@ void Monopigator::loadData(const KURL &url)
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(result(KIO::Job *)), TQT_SLOT(slotResult(KIO::Job *)));
connect(m_job, TQT_SIGNAL(data(TDEIO::Job *, const TQByteArray &)), TQT_SLOT(slotData(TDEIO::Job *, const TQByteArray &)));
connect(m_job, TQT_SIGNAL(result(TDEIO::Job *)), TQT_SLOT(slotResult(TDEIO::Job *)));
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_downloadData->writeBlock(data.data(), data.size());
}
void Monopigator::slotResult(KIO::Job *job)
void Monopigator::slotResult(TDEIO::Job *job)
{
processData(m_downloadData->buffer(), !job->error());
m_job = 0;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

@ -805,7 +805,7 @@ void KBattleshipWindow::slotNewServer()
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(cancelClicked()), TQT_TQOBJECT(this), TQT_SLOT(slotDeleteServerDialog()));
m_server->show();

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

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

@ -21,7 +21,7 @@
#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")))
{
TQFrame* page = plainPage();
@ -37,29 +37,29 @@ KServerDialog::KServerDialog(TQWidget *parent, const char *name) :
m_mainWidget->gamenameEdit->setText(gamename);
}
void KServerDialog::slotOk()
void TDEServerDialog::slotOk()
{
hide();
emit okClicked();
}
void KServerDialog::slotCancel()
void TDEServerDialog::slotCancel()
{
hide();
emit cancelClicked();
}
TQString KServerDialog::port() const
TQString TDEServerDialog::port() const
{
return TQString::number(m_mainWidget->portEdit->value());
}
TQString KServerDialog::nickname() const
TQString TDEServerDialog::nickname() const
{
return m_mainWidget->nicknameEdit->text();
}
TQString KServerDialog::gamename() const
TQString TDEServerDialog::gamename() const
{
return m_mainWidget->gamenameEdit->text();
}

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

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

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

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

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

@ -10,7 +10,7 @@
#include <krandomsequence.h>
#include "Move.h"
class KConfig;
class TDEConfig;
class EvalScheme;
/* 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( evalList, TQT_SIGNAL( highlighted(int) ), this, TQT_SLOT( select(int) ) );
KConfig* config = kapp->config();
TDEConfig* config = kapp->config();
config->setGroup("General");
TQStringList list = config->readListEntry("EvalSchemes");
evalList->insertItem( i18n("Current") );
@ -235,7 +235,7 @@ void EvalDlgImpl::deleteEntry()
TQString name = evalList->text(i);
evalList->removeItem(i);
KConfig* config = kapp->config();
TDEConfig* config = kapp->config();
config->setGroup("General");
TQStringList list = config->readListEntry("EvalSchemes");
list.remove(name);
@ -251,7 +251,7 @@ void EvalDlgImpl::saveas()
if (dlg.exec()) {
TQString name=dlg.text();
KConfig* config = kapp->config();
TDEConfig* config = kapp->config();
config->setGroup("General");
TQStringList list = config->readListEntry("EvalSchemes");
TQListBoxItem *it = evalList->findItem(name);
@ -286,7 +286,7 @@ void EvalDlgImpl::select(int i)
else {
// read in the Scheme from the config file
_scheme = new EvalScheme(name);
KConfig* config = kapp->config();
TDEConfig* config = kapp->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);
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);
config->setGroup(confSection);

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

@ -711,7 +711,7 @@ void KGoldrunner::showEnemy4() {game->showEnemyState (4);}
void KGoldrunner::showEnemy5() {game->showEnemyState (5);}
void KGoldrunner::showEnemy6() {game->showEnemyState (6);}
void KGoldrunner::saveProperties(KConfig *config)
void KGoldrunner::saveProperties(TDEConfig *config)
{
// The 'config' object points to the session managed
// config file. Anything you write here will be available
@ -722,7 +722,7 @@ void KGoldrunner::saveProperties(KConfig *config)
// config->writeEntry("qqq", qqq);
}
void KGoldrunner::readProperties(KConfig *config)
void KGoldrunner::readProperties(TDEConfig *config)
{
// The 'config' object points to the session managed
// 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
* 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
* with @ref saveProperties.
*/
void readProperties(KConfig *);
void readProperties(TDEConfig *);
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())
{
@ -275,7 +275,7 @@ void KCubeBoxWidget::saveProperties(KConfigBase* config)
config->writeEntry("CubeDim",dim());
}
void KCubeBoxWidget::readProperties(KConfigBase* config)
void KCubeBoxWidget::readProperties(TDEConfigBase* config)
{
TQStrList list;
list.setAutoDelete(true);

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

@ -120,7 +120,7 @@ void KJumpingCube::saveGame(bool saveAs)
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"
"Do you want to overwrite it?").arg(url.url());
@ -144,7 +144,7 @@ void KJumpingCube::saveGame(bool saveAs)
view->saveGame(&config);
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");
s=s.arg(gameURL.url());
@ -166,7 +166,7 @@ void KJumpingCube::openGame()
url = KFileDialog::getOpenURL( gameURL.url(), "*.kjc", this, 0 );
if( url.isEmpty() )
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());
KMessageBox::sorry(this,mes);
@ -176,7 +176,7 @@ void KJumpingCube::openGame()
while(!fileOk);
TQString tempFile;
if( KIO::NetAccess::download( url, tempFile, this ) )
if( TDEIO::NetAccess::download( url, tempFile, this ) )
{
KSimpleConfig config(tempFile,true);
config.setGroup("KJumpingCube");
@ -194,7 +194,7 @@ void KJumpingCube::openGame()
undoAction->setEnabled(false);
KIO::NetAccess::removeTempFile( tempFile );
TDEIO::NetAccess::removeTempFile( tempFile );
}
else
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.
*/
void KJumpingCube::showOptions(){
if(KConfigDialog::showDialog("settings"))
if(TDEConfigDialog::showDialog("settings"))
return;
KConfigDialog *dialog = new KConfigDialog(this, "settings", Prefs::self(), KDialogBase::Swallow);
TDEConfigDialog *dialog = new TDEConfigDialog(this, "settings", Prefs::self(), KDialogBase::Swallow);
dialog->addPage(new Settings(0, "General"), i18n("General"), "package_settings");
connect(dialog, TQT_SIGNAL(settingsChanged()), view, TQT_SLOT(loadSettings()));
dialog->show();

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

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

@ -79,7 +79,7 @@
* fixed repaint of LCDs in inactive mode
2.1.3 (29 November 2001)
* use KConfigGroupSaver everywhere
* use TDEConfigGroupSaver everywhere
* config entry for wwhs server url (just in case ...)
2.1.2 (19 November 2001)
@ -293,7 +293,7 @@ Mario Weilguni <mweilguni@kde.org>
system defines something called "Status"...
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
0.4

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

@ -155,9 +155,9 @@ void MainWidget::focusOutEvent(TQFocusEvent *e)
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;
dialog->addPage(gc, i18n("Game"), "package_system");
dialog->addPage(new AppearanceConfig, i18n("Appearance"), "style");

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

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

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

@ -6,7 +6,7 @@
#include "config.h"
class Ball;
class KConfig;
class TDEConfig;
class StateDB;
class KolfGame;
@ -16,9 +16,9 @@ public:
CanvasItem() { game = 0; }
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.
*/
@ -38,7 +38,7 @@ public:
/**
* save your settings.
*/
virtual void save(KConfig *cfg);
virtual void save(TDEConfig *cfg);
/**
* save a point if you wish. Rarely necessary.
*/

@ -220,7 +220,7 @@ void Floater::loadState(StateDB *db)
move(moveTo.x(), moveTo.y());
}
void Floater::save(KConfig *cfg)
void Floater::save(TDEConfig *cfg)
{
cfg->writeEntry("speed", speed);
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);
}
void Floater::load(KConfig *cfg)
void Floater::load(TDEConfig *cfg)
{
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 void saveState(StateDB *db);
virtual void loadState(StateDB *db);
virtual void save(KConfig *cfg);
virtual void load(KConfig *cfg);
virtual void save(TDEConfig *cfg);
virtual void load(TDEConfig *cfg);
virtual bool loadLast() const { return true; }
virtual void firstMove(int x, int y);
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);
}
void Bridge::doLoad(KConfig *cfg)
void Bridge::doLoad(TDEConfig *cfg)
{
newSize(cfg->readNumEntry("width", width()), cfg->readNumEntry("height", height()));
setTopWallVisible(cfg->readBoolEntry("topWallVisible", topWallVisible()));
@ -360,12 +360,12 @@ void Bridge::doLoad(KConfig *cfg)
setRightWallVisible(cfg->readBoolEntry("rightWallVisible", rightWallVisible()));
}
void Bridge::save(KConfig *cfg)
void Bridge::save(TDEConfig *cfg)
{
doSave(cfg);
}
void Bridge::doSave(KConfig *cfg)
void Bridge::doSave(TDEConfig *cfg)
{
cfg->writeEntry("width", width());
cfg->writeEntry("height", height());
@ -506,7 +506,7 @@ void Windmill::setGame(KolfGame *game)
right->setGame(game);
}
void Windmill::save(KConfig *cfg)
void Windmill::save(TDEConfig *cfg)
{
cfg->writeEntry("speed", speed);
cfg->writeEntry("bottom", m_bottom);
@ -514,7 +514,7 @@ void Windmill::save(KConfig *cfg)
doSave(cfg);
}
void Windmill::load(KConfig *cfg)
void Windmill::load(TDEConfig *cfg)
{
setSpeed(cfg->readNumEntry("speed", -1));
@ -598,7 +598,7 @@ Sign::Sign(TQCanvas *canvas)
setRightWallVisible(true);
}
void Sign::load(KConfig *cfg)
void Sign::load(TDEConfig *cfg)
{
m_text = cfg->readEntry("Comment", m_text);
m_untranslatedText = cfg->readEntryUntranslated("Comment", m_untranslatedText);
@ -606,7 +606,7 @@ void Sign::load(KConfig *cfg)
doLoad(cfg);
}
void Sign::save(KConfig *cfg)
void Sign::save(TDEConfig *cfg)
{
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()));
setChangeEvery(cfg->readNumEntry("changeEvery", changeEvery()));
@ -804,7 +804,7 @@ void Ellipse::load(KConfig *cfg)
newSize(newWidth, newHeight);
}
void Ellipse::save(KConfig *cfg)
void Ellipse::save(TDEConfig *cfg)
{
cfg->writeEntry("changeEvery", changeEvery());
cfg->writeEntry("changeEnabled", changeEnabled());
@ -1207,7 +1207,7 @@ bool Cup::place(Ball *ball, bool /*wasCenter*/)
return true;
}
void Cup::save(KConfig *cfg)
void Cup::save(TDEConfig *cfg)
{
cfg->writeEntry("dummykey", true);
}
@ -1380,7 +1380,7 @@ void BlackHole::halfway()
playSound("blackhole");
}
void BlackHole::load(KConfig *cfg)
void BlackHole::load(TDEConfig *cfg)
{
TQPoint exit = cfg->readPointEntry("exit", &exit);
exitItem->setX(exit.x());
@ -1421,7 +1421,7 @@ void BlackHole::finishMe()
exitItem->setVisible(true);
}
void BlackHole::save(KConfig *cfg)
void BlackHole::save(TDEConfig *cfg)
{
cfg->writeEntry("exit", TQPoint(exitItem->x(), exitItem->y()));
cfg->writeEntry("exitDeg", exitDeg);
@ -1932,7 +1932,7 @@ bool Wall::collision(Ball *ball, long int id)
return false;
}
void Wall::load(KConfig *cfg)
void Wall::load(TDEConfig *cfg)
{
TQPoint start(startPoint());
start = cfg->readPointEntry("startPoint", &start);
@ -1946,7 +1946,7 @@ void Wall::load(KConfig *cfg)
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("endPoint", TQPoint(endItem->x(), endItem->y()));
@ -2334,7 +2334,7 @@ void KolfGame::setFilename(const TQString &filename)
{
this->filename = filename;
delete cfg;
cfg = new KConfig(filename, false, false);
cfg = new TDEConfig(filename, false, false);
}
KolfGame::~KolfGame()
@ -4209,7 +4209,7 @@ void KolfGame::setSound(bool yes)
void KolfGame::courseInfo(CourseInfo &info, const TQString& filename)
{
KConfig cfg(filename);
TDEConfig cfg(filename);
cfg.setGroup("0-course@-50,-50");
info.author = cfg.readEntry("author", info.author);
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;
}
void KolfGame::scoresFromSaved(KConfig *config, PlayerList &players)
void KolfGame::scoresFromSaved(TDEConfig *config, PlayerList &players)
{
config->setGroup("0 Saved Game");
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
TQStringList groups = config->groupList();

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

@ -86,7 +86,7 @@ TQString KComboBoxDialog::getItem( const TQString &_text, const TQString &_capti
TQString prevAnswer;
if ( !dontAskAgainName.isEmpty() )
{
KConfig *config = TDEGlobal::config();
TDEConfig *config = TDEGlobal::config();
config->setGroup( "Notification Messages" );
prevAnswer = config->readEntry( dontAskAgainName );
if ( !prevAnswer.isEmpty() )
@ -106,7 +106,7 @@ TQString KComboBoxDialog::getItem( const TQString &_text, const TQString &_capti
{
if ( !dontAskAgainName.isEmpty() && !text.isEmpty() )
{
KConfig *config = TDEGlobal::config();
TDEConfig *config = TDEGlobal::config();
config->setGroup ( "Notification Messages" );
config->writeEntry( dontAskAgainName, text );
}
@ -115,7 +115,7 @@ TQString KComboBoxDialog::getItem( const TQString &_text, const TQString &_capti
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);
if ( !_caption.isNull() )

@ -98,13 +98,13 @@ public:
* @param ok Variable to store whether the user hit OK
* @param parent Parent widget for the dialog
* @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,
const TQString &_value = TQString(),
bool *ok = 0, TQWidget *parent = 0,
const TQString &configName = TQString(),
KConfig *config = TDEGlobal::config());
TDEConfig *config = TDEGlobal::config());
protected:
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->setCheckedState(i18n("Disable &Mouse for Moving Putter"));
connect(useMouseAction, TQT_SIGNAL(toggled(bool)), TQT_TQOBJECT(this), TQT_SLOT(useMouseChanged(bool)));
KConfig *config = kapp->config();
TDEConfig *config = kapp->config();
config->setGroup("Settings");
useMouseAction->setChecked(config->readBoolEntry("useMouse", true));
@ -196,7 +196,7 @@ void Kolf::startNewGame()
}
else
{
KConfig config(loadedGame);
TDEConfig config(loadedGame);
config.setGroup("0 Saved Game");
if (isTutorial)
@ -524,7 +524,7 @@ void Kolf::saveGame()
return;
}
KConfig config(loadedGame);
TDEConfig config(loadedGame);
config.setGroup("0 Saved Game");
config.writeEntry("Competition", competition);
@ -550,7 +550,7 @@ void Kolf::loadGame()
void Kolf::openURL(KURL url)
{
TQString target;
if (KIO::NetAccess::download(url, target, this))
if (TDEIO::NetAccess::download(url, target, this))
{
isTutorial = false;
TQString mimeType = KMimeType::findByPath(target)->name();
@ -719,27 +719,27 @@ void Kolf::titleChanged(const TQString &newTitle)
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)
{
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)
{
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)
{
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)
{
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()

@ -41,7 +41,7 @@ NewGameDialog::NewGameDialog(bool enableCourses, TQWidget *parent, const char *_
this->enableCourses = enableCourses;
editors.setAutoDelete(true);
KConfig *config = kapp->config();
TDEConfig *config = kapp->config();
// lots o' colors :)
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()
{
KConfig *config = kapp->config();
TDEConfig *config = kapp->config();
config->setGroup("New Game Dialog Mode");
config->writeEntry("competition", mode->isChecked());

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

@ -13,7 +13,7 @@
#include <kolf/object.h>
class StateDB;
class KConfig;
class TDEConfig;
class PoolBallFactory : KLibFactory {
Q_OBJECT
@ -32,9 +32,9 @@ public:
virtual Config *config(TQWidget *parent);
virtual void saveState(StateDB *);
virtual void save(KConfig *cfg);
virtual void save(TDEConfig *cfg);
virtual void loadState(StateDB *);
virtual void load(KConfig *cfg);
virtual void load(TDEConfig *cfg);
virtual void draw(TQPainter &);
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
// (courses are represented as KConfig files)
// (courses are represented as TDEConfig files)
cfg->writeEntry("switchEvery", switchEvery());
}
void Test::load(KConfig *cfg)
void Test::load(TDEConfig *cfg)
{
// load our option
setSwitchEvery(cfg->readNumEntry("switchEvery", 50));

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

@ -1,5 +1,5 @@
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)

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

@ -70,7 +70,7 @@
2.1.2 (29 November 2001)
* fix pause behaviour in menu (forward port from 2.2 branch)
* use KConfigGroupSaver everywhere
* use TDEConfigGroupSaver everywhere
* World-wide highscores for KSirtet and KFoulEggs !!
2.1.1 (17 October 2001)
@ -283,7 +283,7 @@
0.2.2
* 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]
0.2.1

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

@ -1,6 +1,6 @@
Version 0.4.0:
* [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] Lots of general code cleanup (headers/indentation/variable naming).
* [Benjamin Meyer] Added copyright headers to all of the source files.

@ -144,10 +144,10 @@ void Game::togglePaused()
* Show Settings dialog.
*/
void Game::showSettings(){
if(KConfigDialog::showDialog("settings"))
if(TDEConfigDialog::showDialog("settings"))
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");
Appearance *a = new Appearance(0, "Appearance");

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

@ -57,7 +57,7 @@ MainWindow::createCollectionMenu() {
}
checkedCollection_ = 0;
KConfig *cfg=(TDEApplication::kApplication())->config();
TDEConfig *cfg=(TDEApplication::kApplication())->config();
cfg->setGroup("settings");
int id = cfg->readNumEntry("collection", 10);
@ -76,7 +76,7 @@ MainWindow::MainWindow() : KMainWindow(0), externalCollection_(0) {
setEraseColor(TQColor(0,0,0));
KConfig *cfg=(TDEApplication::kApplication())->config();
TDEConfig *cfg=(TDEApplication::kApplication())->config();
cfg->setGroup("Geometry");
int width = cfg->readNumEntry("width", 750);
int height = cfg->readNumEntry("height", 562);
@ -190,7 +190,7 @@ MainWindow::MainWindow() : KMainWindow(0), externalCollection_(0) {
MainWindow::~MainWindow()
{
KConfig *cfg=(TDEApplication::kApplication())->config();
TDEConfig *cfg=(TDEApplication::kApplication())->config();
cfg->setGroup("Geometry");
cfg->writeEntry("width", width());
@ -297,7 +297,7 @@ MainWindow::changeCollection(int id)
void
MainWindow::loadLevels() {
KConfig *cfg=(TDEApplication::kApplication())->config();
TDEConfig *cfg=(TDEApplication::kApplication())->config();
cfg->setGroup("settings");
TQString lastFile = cfg->readPathEntry("lastLevelFile");
@ -309,7 +309,7 @@ MainWindow::loadLevels() {
void
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
// TQString levelName = _url.path().mid(namepos);
@ -320,12 +320,12 @@ MainWindow::openURL(KURL _url) {
levelFile = _url.path();
} else {
// levelFile = locateLocal("appdata", "levels/" + levelName);
if(!KIO::NetAccess::download( _url, levelFile ) )
if(!TDEIO::NetAccess::download( _url, levelFile ) )
return;
}
LevelCollection *tmpCollection = new LevelCollection(levelFile, levelName);
KIO::NetAccess::removeTempFile(levelFile );
TDEIO::NetAccess::removeTempFile(levelFile );
if (tmpCollection->noOfLevels() < 1) {
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;
KConfig *cfg = (TDEApplication::kApplication())->config();
TDEConfig *cfg = (TDEApplication::kApplication())->config();
cfg->setGroup("settings");
imageData_ = new StaticImage;
@ -82,7 +82,7 @@ PlayField::PlayField(TQWidget *parent, const char *name, WFlags f)
}
PlayField::~PlayField() {
KConfig *cfg = (TDEApplication::kApplication())->config();
TDEConfig *cfg = (TDEApplication::kApplication())->config();
cfg->setGroup("settings");
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)
: KConfigDialog( parent, name, Options::self())
: TDEConfigDialog( parent, name, Options::self())
{
General *general = new General();
addPage(general, i18n("General"), "package_settings", i18n("General Settings"));

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

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

@ -179,10 +179,10 @@ void KTron::paletteChange(const TQPalette &/*oldPalette*/){
* Show Settings dialog.
*/
void KTron::showSettings(){
if(KConfigDialog::showDialog("settings"))
if(TDEConfigDialog::showDialog("settings"))
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 Ai(0, "Ai"), i18n("A.I."), "personal");
dialog->addPage(new Appearance(0, "Appearance"), i18n("Appearance"), "style");

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

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

@ -78,9 +78,9 @@ void BaseMainWindow::configureHighscores()
void BaseMainWindow::configureSettings()
{
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();
if (w) dialog->addPage(w, i18n("Game"), "package_system");
w = bfactory->createAppearanceConfig();

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

@ -343,14 +343,14 @@ TQCString AIConfig::coefficientKey(const char *name)
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);
return item->property().toDouble();
}
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);
return item->property().toInt();
}

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

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

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

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

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

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

@ -26,11 +26,11 @@
#include <ksimpleconfig.h>
class KConfigRawBackEnd : public KConfigINIBackEnd
class TDEConfigRawBackEnd : public TDEConfigINIBackEnd
{
public:
KConfigRawBackEnd(KConfigBase *_config, int fd);
~KConfigRawBackEnd();
TDEConfigRawBackEnd(TDEConfigBase *_config, int fd);
~TDEConfigRawBackEnd();
bool parseConfigFiles();
@ -41,8 +41,8 @@ private:
FILE *_stream;
TQFile _file;
class KConfigRawBackEndPrivate;
KConfigRawBackEndPrivate *d;
class TDEConfigRawBackEndPrivate;
TDEConfigRawBackEndPrivate *d;
};
class KRawConfig : public KSimpleConfig
@ -51,7 +51,7 @@ class KRawConfig : public KSimpleConfig
public:
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);
if ( url.isEmpty() ) return;
if ( KIO::NetAccess::exists(url, true, this) ) {
if ( TDEIO::NetAccess::exists(url, true, this) ) {
KGuiItem gi = KStdGuiItem::save();
gi.setText(i18n("Overwrite"));
int res = KMessageBox::warningContinueCancel(this,
@ -264,7 +264,7 @@ void HighscoresDialog::slotUser2()
KTempFile tmp;
internal->exportHighscores(*tmp.textStream());
tmp.close();
KIO::NetAccess::upload(tmp.name(), url, this);
TDEIO::NetAccess::upload(tmp.name(), url, this);
tmp.unlink();
}

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

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

@ -160,7 +160,7 @@ KHighscore::~KHighscore()
delete d;
}
KConfig* KHighscore::config() const
TDEConfig* KHighscore::config() const
{
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)
{
Q_ASSERT( isLocked() );
KConfigGroupSaver cg(config(), group());
TDEConfigGroupSaver cg(config(), group());
TQString confKey = TQString("%1_%2").arg(entry).arg(key);
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)
{
Q_ASSERT( isLocked() );
KConfigGroupSaver cg(config(), group());
TDEConfigGroupSaver cg(config(), group());
TQString confKey = TQString("%1_%2").arg(entry).arg(key);
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)
{
Q_ASSERT (isLocked() );
KConfigGroupSaver cg(config(), group());
TDEConfigGroupSaver cg(config(), group());
TQString confKey = TQString("%1_%2").arg(entry).arg(key);
cg.config()->writeEntry(confKey, value);
}
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);
return cg.config()->readPropertyEntry(confKey, pDefault);
}
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);
return cg.config()->readEntry(confKey, pDefault);
}
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);
return cg.config()->readNumEntry(confKey, pDefault);
}
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);
return cg.config()->hasKey(confKey);
}

@ -26,7 +26,7 @@
#include <tqstring.h>
#include <tqobject.h>
#include <kdemacros.h>
class KConfig;
class TDEConfig;
class KFileLock;
class KRawConfig;
class KHighscorePrivate;
@ -39,7 +39,7 @@ class KHighscorePrivate;
* --enable-highscore-dir=/var/games) and a theoretically unlimited number of
* 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
* will probably use something like this to save the name of the player on the
* 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.
*
* 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".
* You might use this e.g. to create different highscore tables like
* \code
@ -164,7 +164,7 @@ public:
/**
* @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
* 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
* @param value The value of this entry
**/
@ -179,7 +179,7 @@ public:
/**
* This is an overloaded member function, provided for convenience.
* 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);
@ -187,7 +187,7 @@ public:
* Reads an entry from the highscore table.
* @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
* 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
* @param pDefault This will be used as default value if the key+pair
* entry can't be found.
@ -200,7 +200,7 @@ public:
* Read a numeric value.
* @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
* 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
* @param pDefault This will be used as default value if the key+pair
* entry can't be found.
@ -211,7 +211,7 @@ public:
/**
* 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
* pair doesn't exist or
@ -234,7 +234,7 @@ public:
* readEntry(i, key) where i is from 1 to 20. Note that this function
* depends on "1" as the first entry!
* @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
* @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
@ -250,7 +250,7 @@ public:
* way of calling writeEntry(i, key, list[i]) from i = 1 to
* list.count()
* @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
* @param list The list of values
**/
@ -288,17 +288,17 @@ public:
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_"
**/
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
* a system-wide highscore file.
**/
KConfig* config() const;
TDEConfig* config() const;
void init(bool forceLocal);

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

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

@ -26,7 +26,7 @@
#include <kdemacros.h>
class TQIconViewItem;
class KConfig;
class TDEConfig;
class KCardDialogPrivate;
@ -63,7 +63,7 @@ class KCardDialogPrivate;
* deck/carddir. You have to save the value of those parameters in your config
* 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
* ("KCardDailog").
* So you can just ignore the randomCardDir and randomDeck
@ -156,7 +156,7 @@ public:
*/
static int getCardDeck(TQString &deck,TQString &carddir, TQWidget *parent=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
@ -173,7 +173,7 @@ public:
* random cardDir if this is desired according to the config)
* @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
@ -301,7 +301,7 @@ public:
* Load the default settings into the dialog (e.g. whether the "use random
* 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
@ -309,7 +309,7 @@ public:
* ("KCardDialog"). These settings are used by @ref loadConfig and @ref
* getConfigCardDeck.
**/
void saveConfig(KConfig* conf);
void saveConfig(TDEConfig* conf);
protected:

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

@ -27,7 +27,7 @@
#include <kdemacros.h>
class TQListBoxItem;
class KConfig;
class TDEConfig;
class KChatBaseTextPrivate;
@ -361,22 +361,22 @@ public:
const TQFont& systemMessageFont() const;
/**
* Save the configuration of the dialog to a KConfig object. If
* the supplied KConfig pointer is NULL then kapp->config() is used
* Save the configuration of the dialog to a TDEConfig object. If
* the supplied TDEConfig pointer is NULL then kapp->config() is used
* instead (and the group is changed to "KChatBase") butr the current
* 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 "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".
* 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

@ -12,8 +12,8 @@
the user...
- 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?
- 05.06.2001: KGameDialog::saveConfig(KConfig*) might be useful (as well as
KGameDialog::loadConfig(KConfig*). Should set an own group in the
- 05.06.2001: KGameDialog::saveConfig(TDEConfig*) might be useful (as well as
KGameDialog::loadConfig(TDEConfig*). Should set an own group in the
config file (setGroup("KGameDialog")). Problem: shalll network
settings be saved? Could be used for startup configuration (i.e.
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
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>
*/
class KMessageServerSocket : public TQServerSocket

@ -345,7 +345,7 @@ void KRServerSocket::slotAccept( int )
return;
}
emit accepted( new KSocket( new_sock ) );
emit accepted( new TDESocket( new_sock ) );
}
else if ( domain == PF_UNIX )
{
@ -360,7 +360,7 @@ void KRServerSocket::slotAccept( int )
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.
*
* 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
* 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.
*
@ -117,9 +117,9 @@ public slots:
signals:
/**
* 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:
bool init( short unsigned int );

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

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

@ -287,7 +287,7 @@ LSkatDoc *LSkatApp::getDocument() const
return doc;
}
void LSkatApp::saveProperties(KConfig *_cfg)
void LSkatApp::saveProperties(TDEConfig *_cfg)
{
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");
bool modified = _cfg->readBoolEntry("modified", false);

@ -60,7 +60,7 @@ class LSkatView;
* full session management as well as keyboard accelerator configuration by using KAccel.
* @see KMainWindow
* @see TDEApplication
* @see KConfig
* @see TDEConfig
* @see KAccel
*
* @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.
* @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
* temporary files saved by saveProperties()
* @see KMainWindow#readProperties
*/
virtual void readProperties(KConfig *_cfg);
virtual void readProperties(TDEConfig *_cfg);
public slots:
void slotPrepareProcessMove(KEMessage *msg);
@ -204,7 +204,7 @@ protected: // Protected attributes
TQStrList recentFiles;
/** the configuration object of the application */
KConfig *config;
TDEConfig *config;
LSkatView *view;
/** doc represents your actual document and is created only once. It keeps

@ -162,7 +162,7 @@ void LSkatDoc::closeDocument()
deleteContents();
}
bool LSkatDoc::newDocument(KConfig * /*config*/,TQString path)
bool LSkatDoc::newDocument(TDEConfig * /*config*/,TQString path)
{
int res;
modified=false;
@ -729,9 +729,9 @@ void LSkatDoc::ClearStats()
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" );
TQString name = emailCfg.readEntry( "FullName" );
if ( name.isEmpty() )
@ -782,7 +782,7 @@ void LSkatDoc::ReadConfig(KConfig *config)
}
/** write config file */
void LSkatDoc::WriteConfig(KConfig *config)
void LSkatDoc::WriteConfig(TDEConfig *config)
{
config->setGroup("Parameter");
config->writeEntry("host",host);

@ -67,7 +67,7 @@ class LSkatDoc : public TQObject
/** deletes the document's contents */
void deleteContents();
/** initializes the document generally */
bool newDocument(KConfig *config,TQString path);
bool newDocument(TDEConfig *config,TQString path);
/** closes the acutal document */
void closeDocument();
/** 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 GetStatPoints(int no);
void WriteConfig(KConfig *config);
void ReadConfig(KConfig *config);
void WriteConfig(TDEConfig *config);
void ReadConfig(TDEConfig *config);
void SetInputHandler(KEInput *i);
KEInput *QueryInputHandler();

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

@ -20,7 +20,7 @@
#include <tqcanvas.h>
#include <tqdict.h>
class KConfig;
class TDEConfig;
class KSprite;
@ -234,7 +234,7 @@ class KSprite : public TQCanvasSprite
/**
* The KSpriteCache class is used to load and cache sprites. Loading
* is done via a @ref KConfig file which contains the definitions of the
* is done via a @ref TDEConfig file which contains the definitions of the
* sprite in text form. Usng this approach allows you to tun the sprites
* without chaning the sourcecode of the program. This is especially useful if
* the graphics team is independent of the programmer or if you want to write
@ -335,12 +335,12 @@ class KSpriteCache : public TQObject
void setCanvas(TQCanvas *c) {mCanvas=c;}
/**
* returns the @ref KConfig configuration file where thegraphical data is
* returns the @ref TDEConfig configuration file where thegraphical data is
* read. Access to this is necessary if you want to store general game infos
* in theis file to or if you want to read additional sprite data which are
* not read be the default functions.
**/
KConfig *config() {return mConfig;}
TDEConfig *config() {return mConfig;}
/**
* Main function to create a sprite. You call this like
@ -399,7 +399,7 @@ class KSpriteCache : public TQObject
* z=(double)
* </pre>
**/
void configureCanvasItem(KConfig *config,TQCanvasItem *item);
void configureCanvasItem(TDEConfig *config,TQCanvasItem *item);
/**
* Copies the default properties for all TQCanvasItems from another sprite.
@ -411,7 +411,7 @@ class KSpriteCache : public TQObject
* Loads an item with the given name form the given config file. From the
* rtti entry it is determined what type it is and then it is loaded.
**/
virtual TQCanvasItem *loadItem(KConfig *config,TQString name);
virtual TQCanvasItem *loadItem(TDEConfig *config,TQString name);
/**
* Clone the sprite from another sprite, mostly from the copy stored in the
@ -446,7 +446,7 @@ class KSpriteCache : public TQObject
* colorfilter=2,g : make it gray and lighter (positiv) or darker (negative)
* </pre>
**/
virtual TQCanvasPixmapArray *createPixmapArray(KConfig *config,TQString name);
virtual TQCanvasPixmapArray *createPixmapArray(TDEConfig *config,TQString name);
/**
* Reads the animations from the config file and calls the corresponding
@ -464,7 +464,7 @@ class KSpriteCache : public TQObject
* @param config - the config file the sprite is read from
* @param sprite - the sprite whose animations are set
**/
void createAnimations(KConfig *config,KSprite *sprite);
void createAnimations(TDEConfig *config,KSprite *sprite);
/**
* Same as above but to copy the animations from an existing sprite
@ -487,7 +487,7 @@ class KSpriteCache : public TQObject
* Apply the filters as defined in the config file to the sprite name
* (TODO is this argument needed) to the pixmap.
*/
virtual void applyFilter(TQPixmap *pixmap,KConfig *config,TQString name);
virtual void applyFilter(TQPixmap *pixmap,TDEConfig *config,TQString name);
/**
* resets the cache (?)
@ -500,7 +500,7 @@ class KSpriteCache : public TQObject
TQString mGrafixDir;
TQString mRcFile;
KConfig *mConfig;
TDEConfig *mConfig;
TQCanvas *mCanvas;
};

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

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

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

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

@ -99,7 +99,7 @@ void Kwin4Player::slotPlayerPropertyChanged(KGamePropertyBase *prop, KPlayer * /
}
}
void Kwin4Player::readConfig(KConfig *config)
void Kwin4Player::readConfig(TDEConfig *config)
{
mAllWin.setValue(config->readNumEntry("win",0));
mAllRemis.setValue(config->readNumEntry("remis",0));
@ -107,7 +107,7 @@ void Kwin4Player::readConfig(KConfig *config)
mAllBrk.setValue(config->readNumEntry("brk",0));
}
void Kwin4Player::writeConfig(KConfig *config)
void Kwin4Player::writeConfig(TDEConfig *config)
{
config->writeEntry("win",mAllWin.value());
config->writeEntry("remis",mAllRemis.value());

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

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

Loading…
Cancel
Save