Use tdeApp

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
pull/47/head
Michele Calgaro 8 months ago
parent 3191f81874
commit bd4ee3ccc1
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -104,7 +104,7 @@ Atlantik::Atlantik ()
// Toolbar: Game // Toolbar: Game
// KStdGameAction::gameNew(this, TQ_SLOT(slotNewGame()), actionCollection(), "game_new"); // KStdGameAction::gameNew(this, TQ_SLOT(slotNewGame()), actionCollection(), "game_new");
m_showEventLog = new TDEAction(i18n("Show Event &Log")/*, "atlantik_showeventlog"*/, CTRL+Key_L, this, TQ_SLOT(showEventLog()), actionCollection(), "showeventlog"); m_showEventLog = new TDEAction(i18n("Show Event &Log")/*, "atlantik_showeventlog"*/, CTRL+Key_L, this, TQ_SLOT(showEventLog()), actionCollection(), "showeventlog");
KStdGameAction::quit(kapp, TQ_SLOT(closeAllWindows()), actionCollection(), "game_quit"); KStdGameAction::quit(tdeApp, TQ_SLOT(closeAllWindows()), actionCollection(), "game_quit");
// Toolbar: Settings // Toolbar: Settings
KStdAction::preferences(this, TQ_SLOT(slotConfigure()), actionCollection()); KStdAction::preferences(this, TQ_SLOT(slotConfigure()), actionCollection());
@ -212,7 +212,7 @@ Atlantik::Atlantik ()
void Atlantik::readConfig() void Atlantik::readConfig()
{ {
// Read configuration settings // Read configuration settings
TDEConfig *config = kapp->config(); TDEConfig *config = tdeApp->config();
// General configuration // General configuration
config->setGroup("General"); config->setGroup("General");
@ -508,7 +508,7 @@ void Atlantik::configureNotifications()
void Atlantik::slotUpdateConfig() void Atlantik::slotUpdateConfig()
{ {
TDEConfig *config=kapp->config(); TDEConfig *config=tdeApp->config();
bool optBool, configChanged = false; bool optBool, configChanged = false;
TQString optStr; TQString optStr;
@ -761,7 +761,7 @@ void Atlantik::initNetworkObject()
void Atlantik::clientCookie(TQString cookie) void Atlantik::clientCookie(TQString cookie)
{ {
TDEConfig *config = kapp->config(); TDEConfig *config = tdeApp->config();
if (cookie.isNull()) if (cookie.isNull())
{ {
@ -798,7 +798,7 @@ void Atlantik::statusBarClick(int item)
{ {
if ( item == 0 ) if ( item == 0 )
{ {
TDEAboutApplication dialog(kapp->aboutData(), this); TDEAboutApplication dialog(tdeApp->aboutData(), this);
dialog.exec(); dialog.exec();
} }
else if ( item == 1) else if ( item == 1)
@ -847,7 +847,7 @@ void Atlantik::closeEvent(TQCloseEvent *e)
if ( m_atlantikNetwork ) if ( m_atlantikNetwork )
m_atlantikNetwork->leaveGame(); m_atlantikNetwork->leaveGame();
saveMainWindowSettings(kapp->config(), "AtlantikMainWindow"); saveMainWindowSettings(tdeApp->config(), "AtlantikMainWindow");
TDEMainWindow::closeEvent(e); TDEMainWindow::closeEvent(e);
} }
} }

@ -394,7 +394,7 @@ url="http://klickety.sourceforge.net">http://klickety.sourceforge.net</ulink>.</
<appendix id="installation"> <appendix id="installation">
<title>Installation</title> <title>Installation</title>
<sect1 id="getting-kapp"> <sect1 id="getting-tdeApp">
<title>How to obtain &klickety;</title> <title>How to obtain &klickety;</title>
&install.intro.documentation; &install.intro.documentation;

@ -531,7 +531,7 @@ Also include any keys that have a special function but have no equivalent in the
menus or toolbars. This may not be necessary for small apps or apps with no tool menus or toolbars. This may not be necessary for small apps or apps with no tool
or menu bars. --> or menu bars. -->
<sect1 id="kapp-mainwindow"> <sect1 id="tdeApp-mainwindow">
<title>The main &kmahjongg; window</title> <title>The main &kmahjongg; window</title>
<screenshot> <screenshot>

@ -15,7 +15,7 @@
#include "view.moc" #include "view.moc"
#define IMG_BACKGROUND "bg.png" #define IMG_BACKGROUND "bg.png"
#define SPRITES_PREFIX kapp->kde_datadir() + "/kasteroids/" #define SPRITES_PREFIX tdeApp->kde_datadir() + "/kasteroids/"
#define REFRESH_DELAY 33 #define REFRESH_DELAY 33
#define SHIP_SPEED 0.3 #define SHIP_SPEED 0.3

@ -118,8 +118,8 @@ void GameWidget::getMoves(int moves)
void GameWidget::mergeHighScores(int l) void GameWidget::mergeHighScores(int l)
{ {
TDEConfigGroup oldConfig(kapp->config(), TQString("High Scores Level %1").arg(l).utf8()); TDEConfigGroup oldConfig(tdeApp->config(), TQString("High Scores Level %1").arg(l).utf8());
TDEConfigGroup newConfig(kapp->config(), TQString("Highscores Level %1").arg(l).utf8()); TDEConfigGroup newConfig(tdeApp->config(), TQString("Highscores Level %1").arg(l).utf8());
newConfig.writeEntry("LastPlayer", oldConfig.readEntry("LastPlayer")); newConfig.writeEntry("LastPlayer", oldConfig.readEntry("LastPlayer"));
@ -132,7 +132,7 @@ void GameWidget::mergeHighScores(int l)
key = "Pos" + num + "Score"; key = "Pos" + num + "Score";
newConfig.writeEntry(key, oldConfig.readEntry(key, "-")); newConfig.writeEntry(key, oldConfig.readEntry(key, "-"));
} }
kapp->config()->sync(); tdeApp->config()->sync();
} }
void GameWidget::updateLevel (int l) void GameWidget::updateLevel (int l)
@ -147,8 +147,8 @@ void GameWidget::updateLevel (int l)
cfg.setGroup("Level"); cfg.setGroup("Level");
feld->load(cfg); feld->load(cfg);
if (!kapp->config()->hasGroup(TQString("Highscores Level %1").arg(level)) && if (!tdeApp->config()->hasGroup(TQString("Highscores Level %1").arg(level)) &&
kapp->config()->hasGroup(TQString("High Scores Level %1").arg(level))) tdeApp->config()->hasGroup(TQString("High Scores Level %1").arg(level)))
mergeHighScores(level); mergeHighScores(level);
highScore->setConfigGroup(TQString("Highscores Level %1").arg(level)); highScore->setConfigGroup(TQString("Highscores Level %1").arg(level));

@ -84,7 +84,7 @@ void KBgEngineFIBS::start()
*/ */
void KBgEngineFIBS::readConfig() void KBgEngineFIBS::readConfig()
{ {
TDEConfig *config = kapp->config(); TDEConfig *config = tdeApp->config();
config->setGroup("fibs engine"); config->setGroup("fibs engine");
// history variables // history variables
@ -119,7 +119,7 @@ void KBgEngineFIBS::readConfig()
*/ */
void KBgEngineFIBS::saveConfig() void KBgEngineFIBS::saveConfig()
{ {
TDEConfig *config = kapp->config(); TDEConfig *config = tdeApp->config();
config->setGroup("fibs engine"); config->setGroup("fibs engine");
// history variables // history variables
@ -207,7 +207,7 @@ void KBgEngineFIBS::getSetupPages(KDialogBase *nb)
* Main Widget * Main Widget
*/ */
TQVBox *vbp = nb->addVBoxPage(i18n("FIBS Engine"), i18n("Here you can configure the FIBS backgammon engine"), TQVBox *vbp = nb->addVBoxPage(i18n("FIBS Engine"), i18n("Here you can configure the FIBS backgammon engine"),
kapp->iconLoader()->loadIcon(PROG_NAME "_engine", TDEIcon::Desktop)); tdeApp->iconLoader()->loadIcon(PROG_NAME "_engine", TDEIcon::Desktop));
/* /*
* Get a multi page work space * Get a multi page work space
@ -657,7 +657,7 @@ bool KBgEngineFIBS::queryClose()
*/ */
bool KBgEngineFIBS::queryExit() bool KBgEngineFIBS::queryExit()
{ {
if( kapp->sessionSaving()) if( tdeApp->sessionSaving())
return true; return true;
if (connection->state() != TQSocket::Idle) if (connection->state() != TQSocket::Idle)
disconnectFIBS(); disconnectFIBS();

@ -216,7 +216,7 @@ KBgChat::KBgChat(TQWidget *parent, const char *name)
/* /*
* some eye candy :) * some eye candy :)
*/ */
setIcon(kapp->miniIcon()); setIcon(tdeApp->miniIcon());
setCaption(i18n("Chat Window")); setCaption(i18n("Chat Window"));
TQWhatsThis::add(this, i18n("This is the chat window.\n\n" TQWhatsThis::add(this, i18n("This is the chat window.\n\n"
@ -229,11 +229,11 @@ KBgChat::KBgChat(TQWidget *parent, const char *name)
* Define set of available actions * Define set of available actions
*/ */
d->mAct[KBgChatPrivate::Inquire] = new TDEAction(i18n("Info On"), d->mAct[KBgChatPrivate::Inquire] = new TDEAction(i18n("Info On"),
TQIconSet(kapp->iconLoader()->loadIcon( TQIconSet(tdeApp->iconLoader()->loadIcon(
"help.xpm", TDEIcon::Small)), "help.xpm", TDEIcon::Small)),
0, this, TQ_SLOT(slotInquire()), actions); 0, this, TQ_SLOT(slotInquire()), actions);
d->mAct[KBgChatPrivate::Talk] = new TDEAction(i18n("Talk To"), d->mAct[KBgChatPrivate::Talk] = new TDEAction(i18n("Talk To"),
TQIconSet(kapp->iconLoader()->loadIcon( TQIconSet(tdeApp->iconLoader()->loadIcon(
PROG_NAME "-chat.png", TDEIcon::Small)), PROG_NAME "-chat.png", TDEIcon::Small)),
0, this, TQ_SLOT(slotTalk()), actions); 0, this, TQ_SLOT(slotTalk()), actions);
@ -304,7 +304,7 @@ KBgChat::~KBgChat()
*/ */
void KBgChat::readConfig() void KBgChat::readConfig()
{ {
TDEConfig* config = kapp->config(); TDEConfig* config = tdeApp->config();
config->setGroup("chat window"); config->setGroup("chat window");
TQPoint pos(10, 10); TQPoint pos(10, 10);
@ -324,7 +324,7 @@ void KBgChat::readConfig()
*/ */
void KBgChat::saveConfig() void KBgChat::saveConfig()
{ {
TDEConfig* config = kapp->config(); TDEConfig* config = tdeApp->config();
config->setGroup("chat window"); config->setGroup("chat window");
config->writeEntry("ori", pos()); config->writeEntry("ori", pos());
@ -800,7 +800,7 @@ void KBgChat::slotCopy()
d->mText.replace(TQRegExp("</font>"), ""); d->mText.replace(TQRegExp("</font>"), "");
d->mText.replace(TQRegExp("^.*\">"), ""); d->mText.replace(TQRegExp("^.*\">"), "");
kapp->clipboard()->setText(d->mText); tdeApp->clipboard()->setText(d->mText);
} }
/* /*

@ -254,7 +254,7 @@ KFibsPlayerList::KFibsPlayerList(TQWidget *parent, const char *name)
* configuration - needed for the column information. * configuration - needed for the column information.
*/ */
updateCaption(); updateCaption();
setIcon(kapp->miniIcon()); setIcon(tdeApp->miniIcon());
TQWhatsThis::add(this, i18n("This window contains the player list. It shows " TQWhatsThis::add(this, i18n("This window contains the player list. It shows "
"all players that are currently logged into FIBS." "all players that are currently logged into FIBS."
"Use the right mouse button to get a context " "Use the right mouse button to get a context "
@ -286,11 +286,11 @@ KFibsPlayerList::KFibsPlayerList(TQWidget *parent, const char *name)
* Create the whole set of actions * Create the whole set of actions
*/ */
d->mAct[KFibsPlayerListPrivate::Info] = new TDEAction(i18n("Info"), d->mAct[KFibsPlayerListPrivate::Info] = new TDEAction(i18n("Info"),
TQIconSet(kapp->iconLoader()->loadIcon TQIconSet(tdeApp->iconLoader()->loadIcon
("help.xpm", TDEIcon::Small)), ("help.xpm", TDEIcon::Small)),
0, this, TQ_SLOT(slotInfo()), actions); 0, this, TQ_SLOT(slotInfo()), actions);
d->mAct[KFibsPlayerListPrivate::Talk] = new TDEAction(i18n("Talk"), d->mAct[KFibsPlayerListPrivate::Talk] = new TDEAction(i18n("Talk"),
TQIconSet(kapp->iconLoader()->loadIcon TQIconSet(tdeApp->iconLoader()->loadIcon
(PROG_NAME "-chat.png", TDEIcon::Small)), (PROG_NAME "-chat.png", TDEIcon::Small)),
0, this, TQ_SLOT(slotTalk()), actions); 0, this, TQ_SLOT(slotTalk()), actions);
@ -507,7 +507,7 @@ void KFibsPlayerList::setupDefault()
*/ */
void KFibsPlayerList::readColumns() void KFibsPlayerList::readColumns()
{ {
TDEConfig* config = kapp->config(); TDEConfig* config = tdeApp->config();
config->setGroup(name()); config->setGroup(name());
for (int i = 0; i < LVEnd; i++) { for (int i = 0; i < LVEnd; i++) {
@ -521,7 +521,7 @@ void KFibsPlayerList::readColumns()
*/ */
void KFibsPlayerList::readConfig() void KFibsPlayerList::readConfig()
{ {
TDEConfig* config = kapp->config(); TDEConfig* config = tdeApp->config();
config->setGroup(name()); config->setGroup(name());
TQPoint pos, defpos(10, 10); TQPoint pos, defpos(10, 10);
@ -539,7 +539,7 @@ void KFibsPlayerList::readConfig()
*/ */
void KFibsPlayerList::saveConfig() void KFibsPlayerList::saveConfig()
{ {
TDEConfig* config = kapp->config(); TDEConfig* config = tdeApp->config();
config->setGroup(name()); config->setGroup(name());
config->writeEntry("ori", pos()); config->writeEntry("ori", pos());
@ -656,7 +656,7 @@ void KFibsPlayerList::slotLook()
*/ */
void KFibsPlayerList::slotMail() void KFibsPlayerList::slotMail()
{ {
kapp->invokeMailer(d->mMail, TQString()); tdeApp->invokeMailer(d->mMail, TQString());
} }
/* /*

@ -379,7 +379,7 @@ void KBgEngineGNU::getSetupPages(KDialogBase *nb)
* Main Widget * Main Widget
*/ */
TQVBox *w = nb->addVBoxPage(i18n("GNU Engine"), i18n("Here you can configure the GNU backgammon engine"), TQVBox *w = nb->addVBoxPage(i18n("GNU Engine"), i18n("Here you can configure the GNU backgammon engine"),
kapp->iconLoader()->loadIcon(PROG_NAME "_engine", TDEIcon::Desktop)); tdeApp->iconLoader()->loadIcon(PROG_NAME "_engine", TDEIcon::Desktop));
} }
/* /*
@ -387,7 +387,7 @@ void KBgEngineGNU::getSetupPages(KDialogBase *nb)
*/ */
void KBgEngineGNU::readConfig() void KBgEngineGNU::readConfig()
{ {
TDEConfig* config = kapp->config(); TDEConfig* config = tdeApp->config();
config->setGroup("gnu engine"); config->setGroup("gnu engine");
// nothing yet // nothing yet
@ -398,7 +398,7 @@ void KBgEngineGNU::readConfig()
*/ */
void KBgEngineGNU::saveConfig() void KBgEngineGNU::saveConfig()
{ {
TDEConfig* config = kapp->config(); TDEConfig* config = tdeApp->config();
config->setGroup("gnu engine"); config->setGroup("gnu engine");
// nothing yet // nothing yet

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

@ -179,7 +179,7 @@ void KBgEngineOffline::getSetupPages(KDialogBase *nb)
* Main Widget * Main Widget
*/ */
TQVBox *vbp = nb->addVBoxPage(i18n("Offline Engine"), i18n("Use this to configure the Offline engine"), TQVBox *vbp = nb->addVBoxPage(i18n("Offline Engine"), i18n("Use this to configure the Offline engine"),
kapp->iconLoader()->loadIcon(PROG_NAME "_engine", TDEIcon::Desktop)); tdeApp->iconLoader()->loadIcon(PROG_NAME "_engine", TDEIcon::Desktop));
/* /*
* Get a multi page work space * Get a multi page work space
@ -246,7 +246,7 @@ void KBgEngineOffline::setupCancel()
*/ */
void KBgEngineOffline::readConfig() void KBgEngineOffline::readConfig()
{ {
TDEConfig* config = kapp->config(); TDEConfig* config = tdeApp->config();
config->setGroup("offline engine"); config->setGroup("offline engine");
d->mName[0] = config->readEntry("player-one", i18n("South")); // same as above d->mName[0] = config->readEntry("player-one", i18n("South")); // same as above
@ -259,7 +259,7 @@ void KBgEngineOffline::readConfig()
*/ */
void KBgEngineOffline::saveConfig() void KBgEngineOffline::saveConfig()
{ {
TDEConfig* config = kapp->config(); TDEConfig* config = tdeApp->config();
config->setGroup("offline engine"); config->setGroup("offline engine");
config->writeEntry("player-one", d->mName[0] ); config->writeEntry("player-one", d->mName[0] );

@ -120,7 +120,7 @@ KBg::KBg()
rollAction->setEnabled(false); rollAction->setEnabled(false);
endAction = KStdGameAction::endTurn(this, TQ_SLOT(done()), actionCollection()); endAction = KStdGameAction::endTurn(this, TQ_SLOT(done()), actionCollection());
endAction->setEnabled(false); endAction->setEnabled(false);
cubeAction = new TDEAction(i18n("Double Cube"), TQIconSet(kapp->iconLoader()->loadIcon cubeAction = new TDEAction(i18n("Double Cube"), TQIconSet(tdeApp->iconLoader()->loadIcon
(PROG_NAME "-double.xpm", TDEIcon::Toolbar)), (PROG_NAME "-double.xpm", TDEIcon::Toolbar)),
0, this, TQ_SLOT(cube()), actionCollection(), "move_cube"); 0, this, TQ_SLOT(cube()), actionCollection(), "move_cube");
cubeAction->setEnabled(false); cubeAction->setEnabled(false);
@ -267,7 +267,7 @@ void KBg::setupEngine()
} }
statusBar()->message(engineString[currEngine]); statusBar()->message(engineString[currEngine]);
TDEConfig* config = kapp->config(); TDEConfig* config = tdeApp->config();
config->setGroup("global settings"); config->setGroup("global settings");
if (config->readBoolEntry("enable timeout", true)) if (config->readBoolEntry("enable timeout", true))
engine[currEngine]->setCommit(config->readDoubleNumEntry("timeout", 2.5)); engine[currEngine]->setCommit(config->readDoubleNumEntry("timeout", 2.5));
@ -307,7 +307,7 @@ void KBg::setupEngine()
*/ */
void KBg::saveConfig() void KBg::saveConfig()
{ {
TDEConfig* config = kapp->config(); TDEConfig* config = tdeApp->config();
config->setGroup("global settings"); config->setGroup("global settings");
/* /*
@ -351,7 +351,7 @@ void KBg::saveConfig()
*/ */
void KBg::readConfig() void KBg::readConfig()
{ {
TDEConfig* config = kapp->config(); TDEConfig* config = tdeApp->config();
config->setGroup("global settings"); config->setGroup("global settings");
/* /*
@ -363,7 +363,7 @@ void KBg::readConfig()
config->setGroup("main window"); config->setGroup("main window");
TQPoint pos, defpos(10, 10); TQPoint pos, defpos(10, 10);
TQFont kappFont = kapp->font(); TQFont kappFont = tdeApp->font();
pos = config->readPointEntry("origin", &defpos); pos = config->readPointEntry("origin", &defpos);
@ -406,7 +406,7 @@ void KBg::readConfig()
void KBg::setupOk() void KBg::setupOk()
{ {
// global settings // global settings
TDEConfig* config = kapp->config(); TDEConfig* config = tdeApp->config();
config->setGroup("global settings"); config->setGroup("global settings");
config->writeEntry("enable timeout", cbt->isChecked()); config->writeEntry("enable timeout", cbt->isChecked());
@ -499,15 +499,15 @@ void KBg::setupDlg()
KDialogBase::Apply|KDialogBase::Help, KDialogBase::Apply|KDialogBase::Help,
KDialogBase::Ok, this, "setup", true, true); KDialogBase::Ok, this, "setup", true, true);
TDEConfig* config = kapp->config(); TDEConfig* config = tdeApp->config();
config->setGroup("global settings"); config->setGroup("global settings");
/* /*
* Main Widget * Main Widget
*/ */
TQVBox *w = nb->addVBoxPage(i18n("General"), i18n("Here you can configure general settings of %1"). TQVBox *w = nb->addVBoxPage(i18n("General"), i18n("Here you can configure general settings of %1").
arg(kapp->aboutData()->programName()), arg(tdeApp->aboutData()->programName()),
kapp->iconLoader()->loadIcon("go", TDEIcon::Desktop)); tdeApp->iconLoader()->loadIcon("go", TDEIcon::Desktop));
/* /*
* Group boxes * Group boxes
@ -569,7 +569,7 @@ void KBg::setupDlg()
TQWhatsThis::add(gbe, i18n("Event notification of %1 is configured as part of the " TQWhatsThis::add(gbe, i18n("Event notification of %1 is configured as part of the "
"system-wide notification process. Click here, and you " "system-wide notification process. Click here, and you "
"will be able to configure system sounds, etc."). "will be able to configure system sounds, etc.").
arg(kapp->aboutData()->programName())); arg(tdeApp->aboutData()->programName()));
TQGridLayout *gle = new TQGridLayout(gbe, 1, 1, nb->spacingHint()); TQGridLayout *gle = new TQGridLayout(gbe, 1, 1, nb->spacingHint());
KURLLabel *lab = new KURLLabel("tdecmshell kcmnotify", KURLLabel *lab = new KURLLabel("tdecmshell kcmnotify",
@ -636,7 +636,7 @@ void KBg::print()
{ {
KPrinter *prt = new KPrinter(); KPrinter *prt = new KPrinter();
TDEConfig* config = kapp->config(); TDEConfig* config = tdeApp->config();
config->setGroup("printing"); config->setGroup("printing");
prt->setNumCopies(config->readNumEntry("numcopies", 1)); prt->setNumCopies(config->readNumEntry("numcopies", 1));
@ -707,7 +707,7 @@ void KBg::wwwRule() {showWWW(RuleHome);}
void KBg::showWWW(int t) void KBg::showWWW(int t)
{ {
kapp->invokeBrowser(helpTopic[t][1]); tdeApp->invokeBrowser(helpTopic[t][1]);
} }
/* /*

@ -128,7 +128,7 @@ void KBgBoardSetup::getSetupPages(KDialogBase *nb)
* =========== * ===========
*/ */
TQVBox *vbp = nb->addVBoxPage(i18n("Board"), i18n("Here you can configure the backgammon board"), TQVBox *vbp = nb->addVBoxPage(i18n("Board"), i18n("Here you can configure the backgammon board"),
kapp->iconLoader()->loadIcon(PROG_NAME, TDEIcon::Desktop)); tdeApp->iconLoader()->loadIcon(PROG_NAME, TDEIcon::Desktop));
/* /*
* Need more than one page * Need more than one page
@ -306,7 +306,7 @@ void KBgBoardSetup::selectBackgroundColor()
*/ */
void KBgBoard::saveConfig() void KBgBoard::saveConfig()
{ {
TDEConfig* config = kapp->config(); TDEConfig* config = tdeApp->config();
config->setGroup(name()); config->setGroup(name());
config->writeEntry("bgcolor", backgroundColor()); config->writeEntry("bgcolor", backgroundColor());
@ -325,7 +325,7 @@ void KBgBoard::readConfig()
TQColor col(200, 200, 166); TQColor col(200, 200, 166);
TQFont fon("Serif", 18, TQFont::Normal); TQFont fon("Serif", 18, TQFont::Normal);
TDEConfig* config = kapp->config(); TDEConfig* config = tdeApp->config();
config->setGroup(name()); config->setGroup(name());
setBackgroundColor(config->readColorEntry("bgcolor", &col)); setBackgroundColor(config->readColorEntry("bgcolor", &col));

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

@ -65,7 +65,7 @@ void KBattleshipWindow::init()
m_placeable = false; m_placeable = false;
m_shootable = false; m_shootable = false;
m_serverHasClient = false; m_serverHasClient = false;
m_config = kapp->config(); m_config = tdeApp->config();
initStatusBar(); initStatusBar();
initActions(); initActions();
readOptions(); readOptions();

@ -63,7 +63,7 @@ bool KChatWidget::eventFilter(TQObject *obj, TQEvent *e)
{ {
if(obj == commentEdit && e->type() == TQEvent::Wheel) if(obj == commentEdit && e->type() == TQEvent::Wheel)
{ {
kapp->notify(chatView, e); tdeApp->notify(chatView, e);
return true; return true;
} }
return chatDlg::eventFilter(obj, e); return chatDlg::eventFilter(obj, e);

@ -34,7 +34,7 @@ KClientDialog::KClientDialog(TQWidget *parent, const char *name)
pageLayout->addWidget(m_mainWidget, 0, 0); pageLayout->addWidget(m_mainWidget, 0, 0);
enableButtonOK(false); enableButtonOK(false);
m_config = kapp->config(); m_config = tdeApp->config();
KUser u; KUser u;
m_mainWidget->nicknameEdit->setText(u.loginName()); m_mainWidget->nicknameEdit->setText(u.loginName());

@ -109,7 +109,7 @@ KBBGame::KBBGame()
TDEConfig *kConf; TDEConfig *kConf;
int j; int j;
kConf = kapp->config(); kConf = tdeApp->config();
kConf->setGroup( "KBlackBox Setup" ); kConf->setGroup( "KBlackBox Setup" );
if (kConf->hasKey( "Balls" )) { if (kConf->hasKey( "Balls" )) {
i = kConf->readNumEntry( "Balls" ); i = kConf->readNumEntry( "Balls" );
@ -166,7 +166,7 @@ KBBGame::~KBBGame()
TDEConfig *kConf; TDEConfig *kConf;
TQString s; TQString s;
kConf = kapp->config(); kConf = tdeApp->config();
kConf->setGroup( "KBlackBox Setup" ); kConf->setGroup( "KBlackBox Setup" );
kConf->writeEntry( "Balls", balls ); kConf->writeEntry( "Balls", balls );
kConf->writeEntry( "Width", gr->numC() - 4); kConf->writeEntry( "Width", gr->numC() - 4);

@ -344,7 +344,7 @@ JezzGame::JezzGame( const TQPixmap &background, int ballNum, TQWidget *parent, c
: TQWidget( parent, name ), m_wall1( 0 ), m_wall2( 0 ), : TQWidget( parent, name ), m_wall1( 0 ), m_wall2( 0 ),
m_text( 0 ), m_running( false ), m_percent( 0 ), m_pictured( false ) m_text( 0 ), m_running( false ), m_percent( 0 ), m_pictured( false )
{ {
TQString path = kapp->dirs()->findResourceDir( "data", "kbounce/pics/ball0000.png" ) + "kbounce/pics/"; TQString path = tdeApp->dirs()->findResourceDir( "data", "kbounce/pics/ball0000.png" ) + "kbounce/pics/";
// load gfx // load gfx
m_ballPixmaps = new TQCanvasPixmapArray( path + "ball%1.png", 25 ); m_ballPixmaps = new TQCanvasPixmapArray( path + "ball%1.png", 25 );
@ -359,7 +359,7 @@ JezzGame::JezzGame( const TQPixmap &background, int ballNum, TQWidget *parent, c
if ( m_artsServer->isNull() ) if ( m_artsServer->isNull() )
kdDebug(12008) << "Can't connect to aRts sound server" << endl; kdDebug(12008) << "Can't connect to aRts sound server" << endl;
#endif #endif
m_soundPath = kapp->dirs()->findResourceDir( "data", "kbounce/sounds/death.au" ) + m_soundPath = tdeApp->dirs()->findResourceDir( "data", "kbounce/sounds/death.au" ) +
"kbounce/sounds/"; "kbounce/sounds/";
// create field // create field
@ -391,10 +391,10 @@ JezzGame::JezzGame( const TQPixmap &background, int ballNum, TQWidget *parent, c
{ {
Ball *ball = new Ball( m_ballPixmaps, m_field ); Ball *ball = new Ball( m_ballPixmaps, m_field );
m_balls.append( ball ); m_balls.append( ball );
ball->setVelocity( ((kapp->random() & 1)*2-1)*2, ((kapp->random() & 1)*2-1)*2 ); ball->setVelocity( ((tdeApp->random() & 1)*2-1)*2, ((tdeApp->random() & 1)*2-1)*2 );
ball->setFrame( kapp->random() % 25 ); ball->setFrame( tdeApp->random() % 25 );
ball->move( 4*TILE_SIZE + kapp->random() % ( (FIELD_WIDTH-8)*TILE_SIZE ), ball->move( 4*TILE_SIZE + tdeApp->random() % ( (FIELD_WIDTH-8)*TILE_SIZE ),
4*TILE_SIZE + kapp->random() % ( (FIELD_HEIGHT-8)*TILE_SIZE ) ); 4*TILE_SIZE + tdeApp->random() % ( (FIELD_HEIGHT-8)*TILE_SIZE ) );
ball->show(); ball->show();
} }
@ -693,7 +693,7 @@ void JezzGame::tick()
if ( m_wall2 ) m_wall2->update(); if ( m_wall2 ) m_wall2->update();
} }
//kapp->syncX(); //tdeApp->syncX();
} }
#include "game.moc" #include "game.moc"

@ -41,7 +41,7 @@ KJezzball::KJezzball()
m_game.score = 0; m_game.score = 0;
m_state = Idle; m_state = Idle;
TDEConfig *config = kapp->config(); TDEConfig *config = tdeApp->config();
m_backgroundDir = config->readPathEntry( "BackgroundDir" ); m_backgroundDir = config->readPathEntry( "BackgroundDir" );
m_showBackground = config->readBoolEntry( "ShowBackground", false ); m_showBackground = config->readBoolEntry( "ShowBackground", false );
@ -110,7 +110,7 @@ KJezzball::KJezzball()
KJezzball::~KJezzball() KJezzball::~KJezzball()
{ {
TDEConfig *config = kapp->config(); TDEConfig *config = tdeApp->config();
config->writeEntry( "PlaySounds", m_soundAction->isChecked() ); config->writeEntry( "PlaySounds", m_soundAction->isChecked() );
} }
@ -264,7 +264,7 @@ void KJezzball::selectBackground()
m_backgroundShowAction->setEnabled(true); m_backgroundShowAction->setEnabled(true);
// save settings // save settings
TDEConfig *config = kapp->config(); TDEConfig *config = tdeApp->config();
config->writePathEntry( "BackgroundDir", m_backgroundDir ); config->writePathEntry( "BackgroundDir", m_backgroundDir );
config->sync(); config->sync();
@ -289,7 +289,7 @@ void KJezzball::showBackground()
m_showBackground = show; m_showBackground = show;
// save setting // save setting
TDEConfig *config = kapp->config(); TDEConfig *config = tdeApp->config();
config->writeEntry( "ShowBackground", m_showBackground ); config->writeEntry( "ShowBackground", m_showBackground );
config->sync(); config->sync();
@ -315,7 +315,7 @@ TQPixmap KJezzball::getBackgroundPixmap()
if (dir.count() > 1) if (dir.count() > 1)
{ {
// return random pixmap // return random pixmap
int num = kapp->random() % dir.count(); int num = tdeApp->random() % dir.count();
return TQPixmap( dir.absFilePath( dir[num] ) ); return TQPixmap( dir.absFilePath( dir[num] ) );
} }
else if (dir.count()==1) else if (dir.count()==1)

@ -244,7 +244,7 @@ void AbTop::readConfig()
{ {
kdDebug(12011) << "Reading config..." << endl; kdDebug(12011) << "Reading config..." << endl;
TDEConfig* config = kapp->config(); TDEConfig* config = tdeApp->config();
config->setGroup("Options"); config->setGroup("Options");
readOptions(config); readOptions(config);
@ -312,7 +312,7 @@ void AbTop::writeConfig()
{ {
kdDebug(12011) << "Writing config..." << endl; kdDebug(12011) << "Writing config..." << endl;
TDEConfig* config = kapp->config(); TDEConfig* config = tdeApp->config();
config->setGroup("Options"); config->setGroup("Options");
writeOptions(config); writeOptions(config);
@ -352,14 +352,14 @@ void AbTop::saveProperties(TDEConfig *config)
void AbTop::savePosition() void AbTop::savePosition()
{ {
TDEConfig* config = kapp->config(); TDEConfig* config = tdeApp->config();
config->setGroup("SavedPosition"); config->setGroup("SavedPosition");
config->writeEntry("Position", board->getState(moveNo)); config->writeEntry("Position", board->getState(moveNo));
} }
void AbTop::restorePosition() void AbTop::restorePosition()
{ {
TDEConfig* config = kapp->config(); TDEConfig* config = tdeApp->config();
config->setGroup("SavedPosition"); config->setGroup("SavedPosition");
TQString entry = config->readEntry("Position"); TQString entry = config->readEntry("Position");
@ -453,7 +453,7 @@ void AbTop::updateBestMove(Move& m, int value)
TQString tmp; TQString tmp;
tmp.sprintf("%s : %+d", (const char*) m.name().utf8(), value-actValue); tmp.sprintf("%s : %+d", (const char*) m.name().utf8(), value-actValue);
updateSpy(tmp); updateSpy(tmp);
kapp->processEvents(); tdeApp->processEvents();
} }
} }
@ -559,7 +559,7 @@ void AbTop::updateActions()
/* let the program be responsive even in a long search... */ /* let the program be responsive even in a long search... */
void AbTop::searchBreak() void AbTop::searchBreak()
{ {
kapp->processEvents(); tdeApp->processEvents();
} }
@ -673,7 +673,7 @@ void AbTop::playGame()
return; return;
} }
boardWidget->setCursor(waitCursor); boardWidget->setCursor(waitCursor);
kapp->processEvents(); tdeApp->processEvents();
if (moveNo <4) { if (moveNo <4) {
/* Chose a random move making the position better for actual color */ /* Chose a random move making the position better for actual color */

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

@ -126,7 +126,7 @@ void Spy::update(int depth, int value, Move& m, bool wait)
} }
while(!next) while(!next)
kapp->processEvents(); tdeApp->processEvents();
} }
void Spy::updateBest(int depth, int value, Move& m, bool cutoff) void Spy::updateBest(int depth, int value, Move& m, bool cutoff)

@ -82,11 +82,11 @@ int main(int argc, char **argv)
CommonHighscores highscores; CommonHighscores highscores;
(void) Prefs::self(); // Create preferences (void) Prefs::self(); // Create preferences
if ( kapp->isRestored() ) RESTORE(FEMainWindow) if ( tdeApp->isRestored() ) RESTORE(FEMainWindow)
else { else {
FEMainWindow *mw = new FEMainWindow; FEMainWindow *mw = new FEMainWindow;
kapp->setMainWidget(mw); tdeApp->setMainWidget(mw);
mw->show(); mw->show();
} }
return kapp->exec(); return tdeApp->exec();
} }

@ -284,7 +284,7 @@ double Brain::doMove(int row, int column, CubeBox::Player player , CubeBox box)
{ {
for(i=0;i<moves;i++) for(i=0;i<moves;i++)
{ {
kapp->processEvents(); tdeApp->processEvents();
// if thinking process stopped // if thinking process stopped
if(stopped) if(stopped)

@ -90,7 +90,7 @@ KCubeWidget::KCubeWidget(TQWidget* parent,const char* name
hintCounter=0; hintCounter=0;
connect(hintTimer,TQ_SIGNAL(timeout()),TQ_SLOT(hint())); connect(hintTimer,TQ_SIGNAL(timeout()),TQ_SLOT(hint()));
setPalette(kapp->palette()); setPalette(tdeApp->palette());
// show values // show values
repaint(false); repaint(false);
@ -192,7 +192,7 @@ void KCubeWidget::updateColors()
else if(owner()==Two) else if(owner()==Two)
setPalette(color2); setPalette(color2);
else if(owner()==Nobody) else if(owner()==Nobody)
setPalette(kapp->palette()); setPalette(tdeApp->palette());
} }
void KCubeWidget::stopHint() void KCubeWidget::stopHint()

@ -54,7 +54,7 @@ void Field::start()
{ {
init(false, false, true, true, TQString()); init(false, false, true, true, TQString());
GTInitData data; GTInitData data;
data.seed = kapp->random(); data.seed = tdeApp->random();
BaseField::start(data); BaseField::start(data);
elapsedTime->reset(); elapsedTime->reset();
} }

@ -63,11 +63,11 @@ int main(int argc, char **argv)
KLPieceInfo pieceInfo; KLPieceInfo pieceInfo;
KLHighscores highscores; KLHighscores highscores;
if ( kapp->isRestored() ) RESTORE(KLMainWindow) if ( tdeApp->isRestored() ) RESTORE(KLMainWindow)
else { else {
KLMainWindow *mw = new KLMainWindow; KLMainWindow *mw = new KLMainWindow;
kapp->setMainWidget(mw); tdeApp->setMainWidget(mw);
mw->show(); mw->show();
} }
return kapp->exec(); return tdeApp->exec();
} }

@ -741,7 +741,7 @@ void LinesBoard::demoClick(int x, int y)
TQCursor::setPos(p); TQCursor::setPos(p);
TQApplication::flushX(); TQApplication::flushX();
TQTimer::singleShot(80, this, TQ_SLOT(demoClickStep())); TQTimer::singleShot(80, this, TQ_SLOT(demoClickStep()));
kapp->enter_loop(); tdeApp->enter_loop();
} }
TQCursor::setPos(dest); TQCursor::setPos(dest);
TQMouseEvent ev(TQEvent::MouseButtonPress, lDest, dest, TQt::LeftButton, TQt::LeftButton); TQMouseEvent ev(TQEvent::MouseButtonPress, lDest, dest, TQt::LeftButton, TQt::LeftButton);
@ -750,5 +750,5 @@ void LinesBoard::demoClick(int x, int y)
void LinesBoard::demoClickStep() void LinesBoard::demoClickStep()
{ {
kapp->exit_loop(); tdeApp->exit_loop();
} }

@ -82,7 +82,7 @@ Editor::Editor
tiles.loadTileset(tile); tiles.loadTileset(tile);
// tell the user what we do // tell the user what we do
setCaption(kapp->makeStdCaption(i18n("Edit Board Layout"))); setCaption(tdeApp->makeStdCaption(i18n("Edit Board Layout")));
connect( drawFrame, TQ_SIGNAL(mousePressed(TQMouseEvent *) ), connect( drawFrame, TQ_SIGNAL(mousePressed(TQMouseEvent *) ),

@ -159,7 +159,7 @@ HighScore::HighScore
loadTables(); loadTables();
currTable = tables; currTable = tables;
setCaption(kapp->makeStdCaption(i18n("Scores"))); setCaption(tdeApp->makeStdCaption(i18n("Scores")));
selectedLine = -1; selectedLine = -1;

@ -125,7 +125,7 @@ void Preview::initialise(const PreviewType type)
// we start with no change indicated // we start with no change indicated
markUnchanged(); markUnchanged();
m_fileList = kapp->dirs()->findAllResources("appdata", "pics/*"+extension, false, true); m_fileList = tdeApp->dirs()->findAllResources("appdata", "pics/*"+extension, false, true);
// get rid of files from the last invocation // get rid of files from the last invocation
m_combo->clear(); m_combo->clear();

@ -46,7 +46,7 @@ BoardWidget::BoardWidget( TQWidget* parent, const char *name )
KMessageBox::error(this, KMessageBox::error(this,
i18n("An error occurred when loading the tileset file %1\n" i18n("An error occurred when loading the tileset file %1\n"
"KMahjongg will now terminate.").arg(tFile)); "KMahjongg will now terminate.").arg(tFile));
kapp->quit(); tdeApp->quit();
} }
getFileOrDefault(Prefs::background(), "bgnd", tFile); getFileOrDefault(Prefs::background(), "bgnd", tFile);
@ -57,7 +57,7 @@ BoardWidget::BoardWidget( TQWidget* parent, const char *name )
KMessageBox::error(this, KMessageBox::error(this,
i18n("An error occurred when loading the background image\n%1").arg(tFile)+ i18n("An error occurred when loading the background image\n%1").arg(tFile)+
i18n("KMahjongg will now terminate.")); i18n("KMahjongg will now terminate."));
kapp->quit(); tdeApp->quit();
} }
getFileOrDefault(Prefs::layout(), "layout", tFile); getFileOrDefault(Prefs::layout(), "layout", tFile);
@ -66,7 +66,7 @@ BoardWidget::BoardWidget( TQWidget* parent, const char *name )
KMessageBox::error(this, KMessageBox::error(this,
i18n("An error occurred when loading the board layout %1\n" i18n("An error occurred when loading the board layout %1\n"
"KMahjongg will now terminate.").arg(tFile)); "KMahjongg will now terminate.").arg(tFile));
kapp->quit(); tdeApp->quit();
} }
setDisplayedWidth(); setDisplayedWidth();
loadSettings(); loadSettings();
@ -87,7 +87,7 @@ void BoardWidget::loadSettings(){
void BoardWidget::saveSettings(){ void BoardWidget::saveSettings(){
// Preview can't handle this. TODO // Preview can't handle this. TODO
//TDEConfig *config=kapp->config(); //TDEConfig *config=tdeApp->config();
//config->setGroup("General"); //config->setGroup("General");
//config->writePathEntry("Tileset_file", tileFile); //config->writePathEntry("Tileset_file", tileFile);
@ -112,7 +112,7 @@ void BoardWidget::getFileOrDefault(TQString filename, TQString type, TQString &r
KMessageBox::error(this, i18n("KMahjongg could not locate the file: %1\n" KMessageBox::error(this, i18n("KMahjongg could not locate the file: %1\n"
"or the default file of type: %2\n" "or the default file of type: %2\n"
"KMahjongg will now terminate").arg(filename).arg(type) ); "KMahjongg will now terminate").arg(filename).arg(type) );
kapp->quit(); tdeApp->quit();
} }
} }
@ -733,7 +733,7 @@ void BoardWidget::calculateNewGame( int gNumber)
} }
if (gNumber == -1) { if (gNumber == -1) {
gameGenerationNum = kapp->random(); gameGenerationNum = tdeApp->random();
} else { } else {
gameGenerationNum = gNumber; gameGenerationNum = gNumber;
} }

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

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

@ -359,9 +359,9 @@ void MainWindow::rotate(int index, bool toleft)
updateConnections(); updateConnections();
for(int i = 0; i < 14; i++) for(int i = 0; i < 14; i++)
{ {
kapp->eventLoop()->processEvents(TQEventLoop::ExcludeUserInput); tdeApp->eventLoop()->processEvents(TQEventLoop::ExcludeUserInput);
TQTimer::singleShot(20, board[index], TQ_SLOT(update())); TQTimer::singleShot(20, board[index], TQ_SLOT(update()));
kapp->eventLoop()->processEvents(TQEventLoop::ExcludeUserInput | TQEventLoop::WaitForMore); tdeApp->eventLoop()->processEvents(TQEventLoop::ExcludeUserInput | TQEventLoop::WaitForMore);
board[index]->rotate(toleft ? -6 : 6); board[index]->rotate(toleft ? -6 : 6);
} }
@ -388,9 +388,9 @@ void MainWindow::blink(int index)
{ {
for(int i = 0; i < board[index]->width() * 2; i += 2) for(int i = 0; i < board[index]->width() * 2; i += 2)
{ {
kapp->eventLoop()->processEvents(TQEventLoop::ExcludeUserInput); tdeApp->eventLoop()->processEvents(TQEventLoop::ExcludeUserInput);
TQTimer::singleShot(20, board[index], TQ_SLOT(update())); TQTimer::singleShot(20, board[index], TQ_SLOT(update()));
kapp->eventLoop()->processEvents(TQEventLoop::ExcludeUserInput | tdeApp->eventLoop()->processEvents(TQEventLoop::ExcludeUserInput |
TQEventLoop::WaitForMore); TQEventLoop::WaitForMore);
board[index]->setLight(i); board[index]->setLight(i);
} }

@ -29,7 +29,7 @@ Ball::Ball(TQCanvas *canvas)
m_placeOnGround = false; m_placeOnGround = false;
m_forceStillGoing = false; m_forceStillGoing = false;
frictionMultiplier = 1.0; frictionMultiplier = 1.0;
TQFont font(kapp->font()); TQFont font(tdeApp->font());
//font.setPixelSize(10); //font.setPixelSize(10);
label = new TQCanvasText("", font, canvas); label = new TQCanvasText("", font, canvas);
label->setColor(white); label->setColor(white);
@ -70,9 +70,9 @@ void Ball::advance(int phase)
} }
const double diff = 8; const double diff = 8;
double randnum = kapp->random(); double randnum = tdeApp->random();
const double width = 6 + randnum * (diff / RAND_MAX); const double width = 6 + randnum * (diff / RAND_MAX);
randnum = kapp->random(); randnum = tdeApp->random();
const double height = 6 + randnum * (diff / RAND_MAX); const double height = 6 + randnum * (diff / RAND_MAX);
setSize(width, height); setSize(width, height);
blowUpCount++; blowUpCount++;

@ -626,7 +626,7 @@ void Sign::draw(TQPainter &painter)
Bridge::draw(painter); Bridge::draw(painter);
painter.setPen(TQPen(black, 1)); painter.setPen(TQPen(black, 1));
TQSimpleRichText txt(m_text, kapp->font()); TQSimpleRichText txt(m_text, tdeApp->font());
const int indent = wallPen().width() + 3; const int indent = wallPen().width() + 3;
txt.setWidth(width() - 2*indent); txt.setWidth(width() - 2*indent);
TQColorGroup colorGroup; TQColorGroup colorGroup;
@ -1120,7 +1120,7 @@ bool Bumper::collision(Ball *ball, long int /*id*/)
betweenVector.setMagnitude(speed); betweenVector.setMagnitude(speed);
// add some randomness so we don't go indefinetely // add some randomness so we don't go indefinetely
betweenVector.setDirection(betweenVector.direction() + deg2rad((kapp->random() % 3) - 1)); betweenVector.setDirection(betweenVector.direction() + deg2rad((tdeApp->random() % 3) - 1));
ball->setVector(betweenVector); ball->setVector(betweenVector);
// for some reason, x is always switched... // for some reason, x is always switched...
@ -1222,7 +1222,7 @@ BlackHole::BlackHole(TQCanvas *canvas)
m_maxSpeed = 5.0; m_maxSpeed = 5.0;
runs = 0; runs = 0;
const TQColor myColor((TQRgb)(kapp->random() % 0x01000000)); const TQColor myColor((TQRgb)(tdeApp->random() % 0x01000000));
outside = new TQCanvasEllipse(canvas); outside = new TQCanvasEllipse(canvas);
outside->setZ(z() - .001); outside->setZ(z() - .001);
@ -2232,7 +2232,7 @@ KolfGame::KolfGame(ObjectList *obj, PlayerList *players, TQString filename, TQWi
infoText = new TQCanvasText(course); infoText = new TQCanvasText(course);
infoText->setText(""); infoText->setText("");
infoText->setColor(white); infoText->setColor(white);
TQFont font = kapp->font(); TQFont font = tdeApp->font();
font.setPixelSize(12); font.setPixelSize(12);
infoText->move(15, width/2); infoText->move(15, width/2);
infoText->setZ(10001); infoText->setZ(10001);
@ -3938,7 +3938,7 @@ void KolfGame::lastHole()
void KolfGame::randHole() void KolfGame::randHole()
{ {
int newHole = 1 + (int)((double)kapp->random() * ((double)(highestHole - 1) / (double)RAND_MAX)); int newHole = 1 + (int)((double)tdeApp->random() * ((double)(highestHole - 1) / (double)RAND_MAX));
switchHole(newHole); switchHole(newHole);
} }
@ -4161,7 +4161,7 @@ void KolfGame::print(KPrinter &pr)
if (pr.option("kde-kolf-title") == "true") if (pr.option("kde-kolf-title") == "true")
{ {
TQString text = i18n("%1 - Hole %2; by %3").arg(holeInfo.name()).arg(curHole).arg(holeInfo.author()); TQString text = i18n("%1 - Hole %2; by %3").arg(holeInfo.name()).arg(curHole).arg(holeInfo.author());
TQFont font(kapp->font()); TQFont font(tdeApp->font());
font.setPointSize(18); font.setPointSize(18);
TQRect rect = TQFontMetrics(font).boundingRect(text); TQRect rect = TQFontMetrics(font).boundingRect(text);
p.setFont(font); p.setFont(font);

@ -117,7 +117,7 @@ void Kolf::initGUI()
useMouseAction = new TDEToggleAction(i18n("Enable &Mouse for Moving Putter"), 0, this, TQ_SLOT(emptySlot()), actionCollection(), "usemouse"); useMouseAction = new TDEToggleAction(i18n("Enable &Mouse for Moving Putter"), 0, this, TQ_SLOT(emptySlot()), actionCollection(), "usemouse");
useMouseAction->setCheckedState(i18n("Disable &Mouse for Moving Putter")); useMouseAction->setCheckedState(i18n("Disable &Mouse for Moving Putter"));
connect(useMouseAction, TQ_SIGNAL(toggled(bool)), this, TQ_SLOT(useMouseChanged(bool))); connect(useMouseAction, TQ_SIGNAL(toggled(bool)), this, TQ_SLOT(useMouseChanged(bool)));
TDEConfig *config = kapp->config(); TDEConfig *config = tdeApp->config();
config->setGroup("Settings"); config->setGroup("Settings");
useMouseAction->setChecked(config->readBoolEntry("useMouse", true)); useMouseAction->setChecked(config->readBoolEntry("useMouse", true));
@ -719,27 +719,27 @@ void Kolf::titleChanged(const TQString &newTitle)
void Kolf::useMouseChanged(bool yes) void Kolf::useMouseChanged(bool yes)
{ {
TDEConfig *config = kapp->config(); config->setGroup("Settings"); config->writeEntry("useMouse", yes); config->sync(); TDEConfig *config = tdeApp->config(); config->setGroup("Settings"); config->writeEntry("useMouse", yes); config->sync();
} }
void Kolf::useAdvancedPuttingChanged(bool yes) void Kolf::useAdvancedPuttingChanged(bool yes)
{ {
TDEConfig *config = kapp->config(); config->setGroup("Settings"); config->writeEntry("useAdvancedPutting", yes); config->sync(); TDEConfig *config = tdeApp->config(); config->setGroup("Settings"); config->writeEntry("useAdvancedPutting", yes); config->sync();
} }
void Kolf::showInfoChanged(bool yes) void Kolf::showInfoChanged(bool yes)
{ {
TDEConfig *config = kapp->config(); config->setGroup("Settings"); config->writeEntry("showInfo", yes); config->sync(); TDEConfig *config = tdeApp->config(); config->setGroup("Settings"); config->writeEntry("showInfo", yes); config->sync();
} }
void Kolf::showGuideLineChanged(bool yes) void Kolf::showGuideLineChanged(bool yes)
{ {
TDEConfig *config = kapp->config(); config->setGroup("Settings"); config->writeEntry("showGuideLine", yes); config->sync(); TDEConfig *config = tdeApp->config(); config->setGroup("Settings"); config->writeEntry("showGuideLine", yes); config->sync();
} }
void Kolf::soundChanged(bool yes) void Kolf::soundChanged(bool yes)
{ {
TDEConfig *config = kapp->config(); config->setGroup("Settings"); config->writeEntry("sound", yes); config->sync(); TDEConfig *config = tdeApp->config(); config->setGroup("Settings"); config->writeEntry("sound", yes); config->sync();
} }
void Kolf::initPlugins() void Kolf::initPlugins()

@ -41,7 +41,7 @@ NewGameDialog::NewGameDialog(bool enableCourses, TQWidget *parent, const char *_
this->enableCourses = enableCourses; this->enableCourses = enableCourses;
editors.setAutoDelete(true); editors.setAutoDelete(true);
TDEConfig *config = kapp->config(); TDEConfig *config = tdeApp->config();
// lots o' colors :) // lots o' colors :)
startColors << yellow << blue << red << lightGray << cyan << darkBlue << magenta << darkGray << darkMagenta << darkYellow; startColors << yellow << blue << red << lightGray << cyan << darkBlue << magenta << darkGray << darkMagenta << darkYellow;
@ -92,7 +92,7 @@ NewGameDialog::NewGameDialog(bool enableCourses, TQWidget *parent, const char *_
TQVBoxLayout *coursePageLayout = new TQVBoxLayout(coursePage, marginHint(), spacingHint()); TQVBoxLayout *coursePageLayout = new TQVBoxLayout(coursePage, marginHint(), spacingHint());
KURLLabel *coursesLink = new KURLLabel("http://web.mit.edu/~jasonkb/www/kolf/", "http://web.mit.edu/~jasonkb/www/kolf/", coursePage); KURLLabel *coursesLink = new KURLLabel("http://web.mit.edu/~jasonkb/www/kolf/", "http://web.mit.edu/~jasonkb/www/kolf/", coursePage);
connect(coursesLink, TQ_SIGNAL(leftClickedURL(const TQString &)), kapp, TQ_SLOT(invokeBrowser(const TQString &))); connect(coursesLink, TQ_SIGNAL(leftClickedURL(const TQString &)), tdeApp, TQ_SLOT(invokeBrowser(const TQString &)));
coursePageLayout->addWidget(coursesLink); coursePageLayout->addWidget(coursesLink);
TQHBoxLayout *hlayout = new TQHBoxLayout(coursePageLayout, spacingHint()); TQHBoxLayout *hlayout = new TQHBoxLayout(coursePageLayout, spacingHint());
@ -183,7 +183,7 @@ NewGameDialog::NewGameDialog(bool enableCourses, TQWidget *parent, const char *_
void NewGameDialog::slotOk() void NewGameDialog::slotOk()
{ {
TDEConfig *config = kapp->config(); TDEConfig *config = tdeApp->config();
config->setGroup("New Game Dialog Mode"); config->setGroup("New Game Dialog Mode");
config->writeEntry("competition", mode->isChecked()); config->writeEntry("competition", mode->isChecked());

@ -39,7 +39,7 @@ void Test::advance(int phase)
if (count % m_switchEvery == 0) if (count % m_switchEvery == 0)
{ {
// random color // random color
const TQColor myColor((TQRgb)(kapp->random() % 0x01000000)); const TQColor myColor((TQRgb)(tdeApp->random() % 0x01000000));
// set the brush, so our shape is drawn // set the brush, so our shape is drawn
// with the random color // with the random color

@ -42,7 +42,7 @@ Slope::Slope(TQRect rect, TQCanvas *canvas)
point = new RectPoint(color.light(), this, canvas); point = new RectPoint(color.light(), this, canvas);
TQFont font(kapp->font()); TQFont font(tdeApp->font());
font.setPixelSize(18); font.setPixelSize(18);
text = new TQCanvasText(canvas); text = new TQCanvasText(canvas);
text->setZ(99999.99); text->setZ(99999.99);

@ -38,7 +38,7 @@ int FleetDlgListViewItem::compare(TQListViewItem *i, int col, bool) const
FleetDlg::FleetDlg( TQWidget *parent, AttackFleetList *fleets ) FleetDlg::FleetDlg( TQWidget *parent, AttackFleetList *fleets )
: TQDialog(parent, "FleetDlg", true ), fleetList(fleets) : TQDialog(parent, "FleetDlg", true ), fleetList(fleets)
{ {
setCaption( kapp->makeStdCaption(i18n("Fleet Overview")) ); setCaption( tdeApp->makeStdCaption(i18n("Fleet Overview")) );
fleetTable = new TDEListView( this, 0 ); fleetTable = new TDEListView( this, 0 );
fleetTable->addColumn(i18n("Fleet No.")); fleetTable->addColumn(i18n("Fleet No."));

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

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

@ -30,7 +30,7 @@ int ScoreDlgListViewItem::compare(TQListViewItem *i, int col, bool) const
ScoreDlg::ScoreDlg( TQWidget *parent, const TQString& title, PlayerList *players ) ScoreDlg::ScoreDlg( TQWidget *parent, const TQString& title, PlayerList *players )
: TQDialog(parent, "ScoreDlg", true ), plrList(players) : TQDialog(parent, "ScoreDlg", true ), plrList(players)
{ {
setCaption( kapp->makeStdCaption(title) ); setCaption( tdeApp->makeStdCaption(title) );
scoreTable = new TDEListView( this, 0 ); scoreTable = new TDEListView( this, 0 );
scoreTable->addColumn(i18n("Player")); scoreTable->addColumn(i18n("Player"));

@ -51,7 +51,7 @@ cardMap::cardMap(const TQColor &dim) : dimcolor(dim)
card_height = 0; card_height = 0;
kdDebug(11111) << "cardMap\n"; kdDebug(11111) << "cardMap\n";
TDEConfig *config = kapp->config(); TDEConfig *config = tdeApp->config();
TDEConfigGroupSaver cs(config, settings_group ); TDEConfigGroupSaver cs(config, settings_group );
TQString bg = config->readEntry( "Back", KCardDialog::getDefaultDeck()); TQString bg = config->readEntry( "Back", KCardDialog::getDefaultDeck());
@ -66,7 +66,7 @@ cardMap::cardMap(const TQColor &dim) : dimcolor(dim)
bool cardMap::setCardDir( const TQString &dir) bool cardMap::setCardDir( const TQString &dir)
{ {
TDEConfig *config = kapp->config(); TDEConfig *config = tdeApp->config();
TDEConfigGroupSaver cs(config, settings_group ); TDEConfigGroupSaver cs(config, settings_group );
// create an animation window while loading pixmaps (this // create an animation window while loading pixmaps (this

@ -73,7 +73,7 @@ Dealer::Dealer( TDEMainWindow* _parent , const char* _name )
setVScrollBarMode(AlwaysOff); setVScrollBarMode(AlwaysOff);
setHScrollBarMode(AlwaysOff); setHScrollBarMode(AlwaysOff);
setGameNumber(kapp->random()); setGameNumber(tdeApp->random());
myCanvas.setAdvancePeriod(30); myCanvas.setAdvancePeriod(30);
// myCanvas.setBackgroundColor( darkGreen ); // myCanvas.setBackgroundColor( darkGreen );
setCanvas(&myCanvas); setCanvas(&myCanvas);
@ -1122,7 +1122,7 @@ void Dealer::won()
// update score, 'win' in demo mode also counts (keep it that way?) // update score, 'win' in demo mode also counts (keep it that way?)
{ // wrap in own scope to make TDEConfigGroupSave work { // wrap in own scope to make TDEConfigGroupSave work
TDEConfig *config = kapp->config(); TDEConfig *config = tdeApp->config();
TDEConfigGroupSaver kcs(config, scores_group); TDEConfigGroupSaver kcs(config, scores_group);
unsigned int n = config->readUnsignedNumEntry(TQString("won%1").arg(_id),0) + 1; unsigned int n = config->readUnsignedNumEntry(TQString("won%1").arg(_id),0) + 1;
config->writeEntry(TQString("won%1").arg(_id),n); config->writeEntry(TQString("won%1").arg(_id),n);
@ -1154,8 +1154,8 @@ void Dealer::won()
TQRect p(0, 0, (*it).ptr->width(), (*it).ptr->height()); TQRect p(0, 0, (*it).ptr->width(), (*it).ptr->height());
int x, y; int x, y;
do { do {
x = 3*canvas()->width()/2 - kapp->random() % (canvas()->width() * 2); x = 3*canvas()->width()/2 - tdeApp->random() % (canvas()->width() * 2);
y = 3*canvas()->height()/2 - (kapp->random() % (canvas()->height() * 2)); y = 3*canvas()->height()/2 - (tdeApp->random() % (canvas()->height() * 2));
p.moveTopLeft(TQPoint(x, y)); p.moveTopLeft(TQPoint(x, y));
} while (can.intersects(p)); } while (can.intersects(p));
@ -1392,7 +1392,7 @@ void Dealer::countGame()
{ {
if ( !_gameRecorded ) { if ( !_gameRecorded ) {
kdDebug(11111) << "counting game as played." << endl; kdDebug(11111) << "counting game as played." << endl;
TDEConfig *config = kapp->config(); TDEConfig *config = tdeApp->config();
TDEConfigGroupSaver kcs(config, scores_group); TDEConfigGroupSaver kcs(config, scores_group);
unsigned int Total = config->readUnsignedNumEntry(TQString("total%1").arg(_id),0); unsigned int Total = config->readUnsignedNumEntry(TQString("total%1").arg(_id),0);
++Total; ++Total;
@ -1405,7 +1405,7 @@ void Dealer::countLoss()
{ {
if ( _gameRecorded ) { if ( _gameRecorded ) {
// update score // update score
TDEConfig *config = kapp->config(); TDEConfig *config = tdeApp->config();
TDEConfigGroupSaver kcs(config, scores_group); TDEConfigGroupSaver kcs(config, scores_group);
unsigned int n = config->readUnsignedNumEntry(TQString("loosestreak%1").arg(_id),0) + 1; unsigned int n = config->readUnsignedNumEntry(TQString("loosestreak%1").arg(_id),0) + 1;
config->writeEntry(TQString("loosestreak%1").arg(_id),n); config->writeEntry(TQString("loosestreak%1").arg(_id),n);

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

@ -59,7 +59,7 @@ pWidget::pWidget()
{ {
current_pwidget = this; current_pwidget = this;
// TDECrash::setEmergencySaveFunction(::saveGame); // TDECrash::setEmergencySaveFunction(::saveGame);
KStdAction::quit(kapp, TQ_SLOT(quit()), actionCollection(), "game_exit"); KStdAction::quit(tdeApp, TQ_SLOT(quit()), actionCollection(), "game_exit");
undo = KStdAction::undo(this, TQ_SLOT(undoMove()), undo = KStdAction::undo(this, TQ_SLOT(undoMove()),
actionCollection(), "undo_move"); actionCollection(), "undo_move");
@ -145,7 +145,7 @@ pWidget::pWidget()
actionCollection(), "enable_autodrop"); actionCollection(), "enable_autodrop");
dropaction->setCheckedState(i18n("Disable Autodrop")); dropaction->setCheckedState(i18n("Disable Autodrop"));
TDEConfig *config = kapp->config(); TDEConfig *config = tdeApp->config();
TDEConfigGroupSaver cs(config, settings_group ); TDEConfigGroupSaver cs(config, settings_group );
TQString bgpath = config->readPathEntry("Background"); TQString bgpath = config->readPathEntry("Background");
@ -189,7 +189,7 @@ void pWidget::helpGame()
{ {
if (!dill) if (!dill)
return; return;
kapp->invokeHelp(dill->anchorName()); tdeApp->invokeHelp(dill->anchorName());
} }
void pWidget::undoPossible(bool poss) void pWidget::undoPossible(bool poss)
@ -198,7 +198,7 @@ void pWidget::undoPossible(bool poss)
} }
void pWidget::changeBackside() { void pWidget::changeBackside() {
TDEConfig *config = kapp->config(); TDEConfig *config = tdeApp->config();
TDEConfigGroupSaver kcs(config, settings_group); TDEConfigGroupSaver kcs(config, settings_group);
TQString deck = config->readEntry("Back", KCardDialog::getDefaultDeck()); TQString deck = config->readEntry("Back", KCardDialog::getDefaultDeck());
@ -262,7 +262,7 @@ void pWidget::changeWallpaper()
midcolor = TQColor(r, b, g); midcolor = TQColor(r, b, g);
if (dill) { if (dill) {
TDEConfig *config = kapp->config(); TDEConfig *config = tdeApp->config();
TDEConfigGroupSaver kcs(config, settings_group); TDEConfigGroupSaver kcs(config, settings_group);
TQString deck = config->readEntry("Back", KCardDialog::getDefaultDeck()); TQString deck = config->readEntry("Back", KCardDialog::getDefaultDeck());
@ -278,7 +278,7 @@ void pWidget::changeWallpaper()
void pWidget::animationChanged() { void pWidget::animationChanged() {
bool anim = animation->isChecked(); bool anim = animation->isChecked();
TDEConfig *config = kapp->config(); TDEConfig *config = tdeApp->config();
TDEConfigGroupSaver cs(config, settings_group ); TDEConfigGroupSaver cs(config, settings_group );
config->writeEntry( "Animation", anim); config->writeEntry( "Animation", anim);
} }
@ -286,7 +286,7 @@ void pWidget::animationChanged() {
void pWidget::enableAutoDrop() void pWidget::enableAutoDrop()
{ {
bool drop = dropaction->isChecked(); bool drop = dropaction->isChecked();
TDEConfig *config = kapp->config(); TDEConfig *config = tdeApp->config();
TDEConfigGroupSaver cs(config, settings_group ); TDEConfigGroupSaver cs(config, settings_group );
config->writeEntry( "Autodrop", drop); config->writeEntry( "Autodrop", drop);
dill->setAutoDropEnabled(drop); dill->setAutoDropEnabled(drop);
@ -308,7 +308,7 @@ void pWidget::newGame()
"careaboutstats" ) == KMessageBox::Cancel) "careaboutstats" ) == KMessageBox::Cancel)
return; return;
dill->setGameNumber(kapp->random()); dill->setGameNumber(tdeApp->random());
setGameCaption(); setGameCaption();
restart(); restart();
} }
@ -377,7 +377,7 @@ void pWidget::newGameType()
setGameCaption(); setGameCaption();
TDEConfig *config = kapp->config(); TDEConfig *config = tdeApp->config();
TDEConfigGroupSaver kcs(config, settings_group); TDEConfigGroupSaver kcs(config, settings_group);
config->writeEntry("DefaultGame", id); config->writeEntry("DefaultGame", id);
@ -411,7 +411,7 @@ void pWidget::slotUpdateMoves()
void pWidget::setBackSide(const TQString &deck, const TQString &cards) void pWidget::setBackSide(const TQString &deck, const TQString &cards)
{ {
TDEConfig *config = kapp->config(); TDEConfig *config = tdeApp->config();
TDEConfigGroupSaver kcs(config, settings_group); TDEConfigGroupSaver kcs(config, settings_group);
TQPixmap pm(deck); TQPixmap pm(deck);
if(!pm.isNull()) { if(!pm.isNull()) {

@ -182,7 +182,7 @@ kpok::kpok(TQWidget *parent, const char *name)
lastHandText = ""; lastHandText = "";
version = kapp->caption() + " " + KPOKER_VERSION; version = tdeApp->caption() + " " + KPOKER_VERSION;
setCaption( version ); setCaption( version );
mOptions = 0; mOptions = 0;
@ -208,7 +208,7 @@ kpok::~kpok()
// cashPerRound = mOptions->getCashPerRound(); // NOT(!) configurable // cashPerRound = mOptions->getCashPerRound(); // NOT(!) configurable
} }
TDEConfig* conf = kapp->config(); TDEConfig* conf = tdeApp->config();
conf->setGroup("General"); conf->setGroup("General");
conf->writeEntry("MinBet", m_game.getMinBet()); conf->writeEntry("MinBet", m_game.getMinBet());
conf->writeEntry("MaxBet", m_game.getMaxBet()); conf->writeEntry("MaxBet", m_game.getMaxBet());
@ -314,7 +314,7 @@ void kpok::initWindow()
cardImages = new CardImages(this, 0); cardImages = new CardImages(this, 0);
// The configuration // The configuration
TDEConfig* conf = kapp->config(); TDEConfig* conf = tdeApp->config();
conf->setGroup("General"); conf->setGroup("General");
// Load the card deck. // Load the card deck.
@ -606,16 +606,16 @@ void kpok::initPoker(unsigned int numPlayers)
PokerGameType gametype = (numPlayers == 1) ? SinglePlayer : MultiPlayer; PokerGameType gametype = (numPlayers == 1) ? SinglePlayer : MultiPlayer;
// Read some defaults. // Read some defaults.
kapp->config()->setGroup("General"); tdeApp->config()->setGroup("General");
int minBet = kapp->config()->readNumEntry("MinBet", MIN_BET); int minBet = tdeApp->config()->readNumEntry("MinBet", MIN_BET);
int maxBet = kapp->config()->readNumEntry("MaxBet", MAX_BET); int maxBet = tdeApp->config()->readNumEntry("MaxBet", MAX_BET);
// Start a new poker game using the data found out above. // Start a new poker game using the data found out above.
m_game.newGame(gametype, m_numPlayers, m_players, minBet, maxBet); m_game.newGame(gametype, m_numPlayers, m_players, minBet, maxBet);
// Not (yet) configurable // Not (yet) configurable
cashPerRound = CASH_PER_ROUND; cashPerRound = CASH_PER_ROUND;
drawDelay = kapp->config()->readNumEntry("DrawDelay", DRAWDELAY); drawDelay = tdeApp->config()->readNumEntry("DrawDelay", DRAWDELAY);
m_blinkingBox = 0; m_blinkingBox = 0;
currentMustBet = m_game.getMinBet(); currentMustBet = m_game.getMinBet();
@ -1215,7 +1215,7 @@ PokerPlayer* kpok::findHumanPlayer()
bool kpok::readEntriesAndInitPoker() bool kpok::readEntriesAndInitPoker()
{ {
NewGameDlg *newGameDlg = NULL; NewGameDlg *newGameDlg = NULL;
TDEConfig *conf = kapp->config(); TDEConfig *conf = tdeApp->config();
int numPlayers = DEFAULT_PLAYERS; int numPlayers = DEFAULT_PLAYERS;
conf->setGroup("NewGameDlg"); conf->setGroup("NewGameDlg");
@ -1293,8 +1293,8 @@ void kpok::betChange(int betChange)
void kpok::saveGame() void kpok::saveGame()
{ {
kapp->config()->setGroup("Save"); tdeApp->config()->setGroup("Save");
saveGame(kapp->config()); saveGame(tdeApp->config());
} }
@ -1393,8 +1393,8 @@ void kpok::readOptions()
bool kpok::loadGame() bool kpok::loadGame()
{ {
kapp->config()->setGroup("Save"); tdeApp->config()->setGroup("Save");
return loadGame(kapp->config()); return loadGame(tdeApp->config());
} }
@ -1450,9 +1450,9 @@ void kpok::exchangeCard5() { playerBox[0]->cardClicked(5); }
void kpok::slotCardDeck() void kpok::slotCardDeck()
{ {
kapp->config()->setGroup("General"); tdeApp->config()->setGroup("General");
TQString deckPath = kapp->config()->readPathEntry("DeckPath", 0); TQString deckPath = tdeApp->config()->readPathEntry("DeckPath", 0);
TQString cardPath = kapp->config()->readPathEntry("CardPath", 0); TQString cardPath = tdeApp->config()->readPathEntry("CardPath", 0);
bool randomDeck, randomCardDir; bool randomDeck, randomCardDir;
// Show the "Select Card Deck" dialog and load the images for the // Show the "Select Card Deck" dialog and load the images for the
@ -1473,10 +1473,10 @@ void kpok::slotCardDeck()
} }
// Save selected stuff in the configuration. // Save selected stuff in the configuration.
kapp->config()->writePathEntry("DeckPath", deckPath); tdeApp->config()->writePathEntry("DeckPath", deckPath);
kapp->config()->writeEntry("RandomDeck", randomDeck); tdeApp->config()->writeEntry("RandomDeck", randomDeck);
kapp->config()->writePathEntry("CardPath", cardPath); tdeApp->config()->writePathEntry("CardPath", cardPath);
kapp->config()->writeEntry("RandomCardDir", randomCardDir); tdeApp->config()->writeEntry("RandomCardDir", randomCardDir);
} }
} }

@ -41,7 +41,7 @@ NewGameDlg::NewGameDlg(TQWidget* parent)
TQVBoxLayout *topLayout = new TQVBoxLayout(plainPage(), spacingHint()); TQVBoxLayout *topLayout = new TQVBoxLayout(plainPage(), spacingHint());
TQHBoxLayout *l = new TQHBoxLayout(topLayout); TQHBoxLayout *l = new TQHBoxLayout(topLayout);
TDEConfig* conf = kapp->config(); TDEConfig* conf = tdeApp->config();
conf->setGroup("NewGameDlg"); conf->setGroup("NewGameDlg");
bool showNewGameDlg = conf->readBoolEntry("showNewGameDlgOnStartup", bool showNewGameDlg = conf->readBoolEntry("showNewGameDlgOnStartup",
SHOWNEWGAME_DEFAULT); SHOWNEWGAME_DEFAULT);
@ -100,7 +100,7 @@ NewGameDlg::NewGameDlg(TQWidget* parent)
NewGameDlg::~NewGameDlg() NewGameDlg::~NewGameDlg()
{ {
if (result() == Accepted) { if (result() == Accepted) {
TDEConfig* conf = kapp->config(); TDEConfig* conf = tdeApp->config();
conf->setGroup("NewGameDlg"); // defaults for the newGameDlg only conf->setGroup("NewGameDlg"); // defaults for the newGameDlg only
conf->writeEntry("showNewGameDlgOnStartup", showOnStartup()); conf->writeEntry("showNewGameDlgOnStartup", showOnStartup());
conf->writeEntry("readFromConfig", readFromConfigFile()); // just a default! conf->writeEntry("readFromConfig", readFromConfigFile()); // just a default!
@ -123,11 +123,11 @@ NewGameDlg::~NewGameDlg()
void NewGameDlg::setPlayerNames(int no, TQString playerName) void NewGameDlg::setPlayerNames(int no, TQString playerName)
{ {
if (no < 0) { if (no < 0) {
kapp->config()->setGroup("Save"); tdeApp->config()->setGroup("Save");
player1Name->setText(kapp->config()->readEntry("Name_0", i18n("You"))); player1Name->setText(tdeApp->config()->readEntry("Name_0", i18n("You")));
computerNames->clear(); computerNames->clear();
for (int i = 1; i < MAX_PLAYERS; i++) { for (int i = 1; i < MAX_PLAYERS; i++) {
computerNames->insertItem(kapp->config()->readEntry(TQString("Name_%1").arg(i), i18n("Computer %1").arg(i))); computerNames->insertItem(tdeApp->config()->readEntry(TQString("Name_%1").arg(i), i18n("Computer %1").arg(i)));
} }
} else if (no == 0) { } else if (no == 0) {
player1Name->setText(playerName); player1Name->setText(playerName);

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

@ -290,7 +290,7 @@ void QReversiBoardView::rotateChip(uint row, uint col)
for (uint i = from; i != end; i += delta) { for (uint i = from; i != end; i += delta) {
drawOnePiece(row, col, i); drawOnePiece(row, col, i);
kapp->flushX(); // FIXME: use TQCanvas to avoid flicker... tdeApp->flushX(); // FIXME: use TQCanvas to avoid flicker...
usleep(ANIMATION_DELAY * anim_speed); usleep(ANIMATION_DELAY * anim_speed);
} }
} }

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

@ -258,7 +258,7 @@ void KReversi::slotNewGame()
void KReversi::slotOpenGame() void KReversi::slotOpenGame()
{ {
TDEConfig *config = kapp->config(); TDEConfig *config = tdeApp->config();
config->setGroup("Savegame"); config->setGroup("Savegame");
if (loadGame(config)) if (loadGame(config))
@ -274,7 +274,7 @@ void KReversi::slotOpenGame()
void KReversi::slotSave() void KReversi::slotSave()
{ {
TDEConfig *config = kapp->config(); TDEConfig *config = tdeApp->config();
config->setGroup("Savegame"); config->setGroup("Savegame");
saveGame(config); saveGame(config);
@ -404,7 +404,7 @@ void KReversi::slotSwitchSides()
// Update the human color in the window. // Update the human color in the window.
m_gameView->setHumanColor(m_humanColor); m_gameView->setHumanColor(m_humanColor);
kapp->processEvents(); tdeApp->processEvents();
computerMakeMove(); computerMakeMove();
} }
@ -794,11 +794,11 @@ void KReversi::setState(State newState)
m_state = newState; m_state = newState;
if (m_state == Thinking){ if (m_state == Thinking){
kapp->setOverrideCursor(waitCursor); tdeApp->setOverrideCursor(waitCursor);
stopAction->setEnabled(true); stopAction->setEnabled(true);
} }
else { else {
kapp->restoreOverrideCursor(); tdeApp->restoreOverrideCursor();
stopAction->setEnabled(false); stopAction->setEnabled(false);
} }

@ -89,10 +89,10 @@ KSameWidget::KSameWidget(TQWidget *parent, const char* name, WFlags fl) :
random->setChecked(true); random->setChecked(true);
setScore(0); setScore(0);
if (!kapp->isRestored()) if (!tdeApp->isRestored())
newGame(kapp->random(),default_colors); newGame(tdeApp->random(),default_colors);
TDEConfig *cfg = kapp->config(); TDEConfig *cfg = tdeApp->config();
if (cfg->readBoolEntry("showRemaining")) if (cfg->readBoolEntry("showRemaining"))
{ {
showNumberRemaining->setChecked(true); showNumberRemaining->setChecked(true);
@ -126,7 +126,7 @@ void KSameWidget::showNumberRemainingToggled()
} }
else status->changeItem(i18n("%1 Colors").arg(stone->colors()),1); else status->changeItem(i18n("%1 Colors").arg(stone->colors()),1);
TDEConfig *cfg = kapp->config(); TDEConfig *cfg = tdeApp->config();
cfg->writeEntry("showRemaining", showNumberRemaining->isChecked()); cfg->writeEntry("showRemaining", showNumberRemaining->isChecked());
cfg->sync(); cfg->sync();
} }
@ -148,7 +148,7 @@ bool KSameWidget::confirmAbort() {
void KSameWidget::m_new() { void KSameWidget::m_new() {
if (random->isChecked()) { if (random->isChecked()) {
if (confirmAbort()) if (confirmAbort())
newGame(kapp->random(),default_colors); newGame(tdeApp->random(),default_colors);
} else { } else {
KDialogBase dlg(this, "boardchooser", true, KDialogBase dlg(this, "boardchooser", true,
i18n("Select Board"), i18n("Select Board"),

@ -44,7 +44,7 @@ int main( int argc, char **argv ) {
TDEGlobal::locale()->insertCatalogue("libtdegames"); TDEGlobal::locale()->insertCatalogue("libtdegames");
KSameWidget *w = new KSameWidget; KSameWidget *w = new KSameWidget;
if (kapp->isRestored()) { if (tdeApp->isRestored()) {
if (KSameWidget::canBeRestored(1)) if (KSameWidget::canBeRestored(1))
w->restore(1); w->restore(1);
} else } else

@ -97,7 +97,7 @@ App::App(TQWidget *parent, const char *name) : TDEMainWindow(parent, name),
connect(board, TQ_SIGNAL(endOfGame()), this, TQ_SLOT(slotEndOfGame())); connect(board, TQ_SIGNAL(endOfGame()), this, TQ_SLOT(slotEndOfGame()));
connect(board, TQ_SIGNAL(resized()), this, TQ_SLOT(boardResized())); connect(board, TQ_SIGNAL(resized()), this, TQ_SLOT(boardResized()));
kapp->processEvents(); tdeApp->processEvents();
updateScore(); updateScore();
enableItems(); enableItems();
@ -141,7 +141,7 @@ void App::newGame()
void App::quitGame() void App::quitGame()
{ {
kapp->quit(); tdeApp->quit();
} }
void App::restartGame() void App::restartGame()
@ -502,7 +502,7 @@ void App::readOldHighscore()
// this is for before-KHighscore-highscores // this is for before-KHighscore-highscores
int i; int i;
TQString s, e, grp; TQString s, e, grp;
TDEConfig *conf = kapp->config(); TDEConfig *conf = tdeApp->config();
highscore.resize(0); highscore.resize(0);
i = 0; i = 0;

@ -883,7 +883,7 @@ void Board::finish()
ready = true; ready = true;
marked(p.front().x, p.front().y); marked(p.front().x, p.front().y);
marked(p.back().x, p.back().y); marked(p.back().x, p.back().y);
kapp->processEvents(); tdeApp->processEvents();
usleep(250*1000); usleep(250*1000);
} }
} }

@ -81,11 +81,11 @@ int main(int argc, char **argv)
(void) Prefs::self(); // Create preferences (void) Prefs::self(); // Create preferences
if ( kapp->isRestored() ) RESTORE(KSMainWindow) if ( tdeApp->isRestored() ) RESTORE(KSMainWindow)
else { else {
KSMainWindow *mw = new KSMainWindow; KSMainWindow *mw = new KSMainWindow;
kapp->setMainWidget(mw); tdeApp->setMainWidget(mw);
mw->show(); mw->show();
} }
return kapp->exec(); return tdeApp->exec();
} }

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

@ -344,7 +344,7 @@ void Rattler::restartDemo()
if (!gameState.testBit(Demo)) if (!gameState.testBit(Demo))
return; return;
int r = 50000+ (kapp->random() % 30000); int r = 50000+ (tdeApp->random() % 30000);
TQTimer::singleShot( r, this, TQ_SLOT(restartDemo()) ); TQTimer::singleShot( r, this, TQ_SLOT(restartDemo()) );
stop(); stop();

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

@ -57,7 +57,7 @@ MainWindow::createCollectionMenu() {
} }
checkedCollection_ = 0; checkedCollection_ = 0;
TDEConfig *cfg=(TDEApplication::kApplication())->config(); TDEConfig *cfg=tdeApp->config();
cfg->setGroup("settings"); cfg->setGroup("settings");
int id = cfg->readNumEntry("collection", 10); int id = cfg->readNumEntry("collection", 10);
@ -76,7 +76,7 @@ MainWindow::MainWindow() : TDEMainWindow(0), externalCollection_(0) {
setEraseColor(TQColor(0,0,0)); setEraseColor(TQColor(0,0,0));
TDEConfig *cfg=(TDEApplication::kApplication())->config(); TDEConfig *cfg=tdeApp->config();
cfg->setGroup("Geometry"); cfg->setGroup("Geometry");
int width = cfg->readNumEntry("width", 750); int width = cfg->readNumEntry("width", 750);
int height = cfg->readNumEntry("height", 562); int height = cfg->readNumEntry("height", 562);
@ -107,7 +107,7 @@ MainWindow::MainWindow() : TDEMainWindow(0), externalCollection_(0) {
game_->insertItem(TQIconSet(pixmap), i18n("&Redo"), playField_, TQ_SLOT(redo()), TQKeySequence( (TDEStdAccel::redo()).toString())); game_->insertItem(TQIconSet(pixmap), i18n("&Redo"), playField_, TQ_SLOT(redo()), TQKeySequence( (TDEStdAccel::redo()).toString()));
game_->insertSeparator(); game_->insertSeparator();
pixmap = SmallIcon("system-log-out"); pixmap = SmallIcon("system-log-out");
game_->insertItem(TQIconSet(pixmap), i18n("&Quit"), TDEApplication::kApplication(), TQ_SLOT(closeAllWindows()), TQKeySequence( (TDEStdAccel::quit()).toString())); game_->insertItem(TQIconSet(pixmap), i18n("&Quit"), tdeApp, TQ_SLOT(closeAllWindows()), TQKeySequence( (TDEStdAccel::quit()).toString()));
menu_->insertItem(i18n("&Game"), game_); menu_->insertItem(i18n("&Game"), game_);
animation_ = new TQPopupMenu(0,"animation menu"); animation_ = new TQPopupMenu(0,"animation menu");
@ -190,7 +190,7 @@ MainWindow::MainWindow() : TDEMainWindow(0), externalCollection_(0) {
MainWindow::~MainWindow() MainWindow::~MainWindow()
{ {
TDEConfig *cfg=(TDEApplication::kApplication())->config(); TDEConfig *cfg=tdeApp->config();
cfg->setGroup("Geometry"); cfg->setGroup("Geometry");
cfg->writeEntry("width", width()); cfg->writeEntry("width", width());
@ -297,7 +297,7 @@ MainWindow::changeCollection(int id)
void void
MainWindow::loadLevels() { MainWindow::loadLevels() {
TDEConfig *cfg=(TDEApplication::kApplication())->config(); TDEConfig *cfg=tdeApp->config();
cfg->setGroup("settings"); cfg->setGroup("settings");
TQString lastFile = cfg->readPathEntry("lastLevelFile"); TQString lastFile = cfg->readPathEntry("lastLevelFile");
@ -309,7 +309,7 @@ MainWindow::loadLevels() {
void void
MainWindow::openURL(KURL _url) { MainWindow::openURL(KURL _url) {
TDEConfig *cfg=(TDEApplication::kApplication())->config(); TDEConfig *cfg=tdeApp->config();
// int namepos = _url.path().findRev('/') + 1; // NOTE: findRev can return -1 // int namepos = _url.path().findRev('/') + 1; // NOTE: findRev can return -1
// TQString levelName = _url.path().mid(namepos); // TQString levelName = _url.path().mid(namepos);

@ -108,7 +108,7 @@ ModalLabel::eventFilter (TQObject *, TQEvent *e) {
void void
ModalLabel::message (const TQString &text, TQWidget *parent) { ModalLabel::message (const TQString &text, TQWidget *parent) {
TDEApplication *app = TDEApplication::kApplication (); TDEApplication *app = tdeApp;
ModalLabel cl (text, parent); ModalLabel cl (text, parent);
while (!cl.completed_) app->processOneEvent (); while (!cl.completed_) app->processOneEvent ();

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

@ -110,7 +110,7 @@ void MyMainView::setActionCollection(TDEActionCollection *a)
void MyMainView::readConfig() void MyMainView::readConfig()
{ {
TDEConfig *cfg = kapp->config(); TDEConfig *cfg = tdeApp->config();
int i; int i;
cfg->setGroup("Game"); cfg->setGroup("Game");
@ -186,7 +186,7 @@ void MyMainView::readConfig()
void MyMainView::writeConfig() void MyMainView::writeConfig()
{ {
TDEConfig *cfg; TDEConfig *cfg;
cfg=TDEApplication::kApplication()->config(); cfg=tdeApp->config();
cfg->setGroup("Game"); cfg->setGroup("Game");
cfg->writeEntry("gravity",customConfig.gravity); cfg->writeEntry("gravity",customConfig.gravity);

@ -215,7 +215,7 @@ void TopLevel::readOptions()
TDEConfig *config; TDEConfig *config;
TQString option; TQString option;
config = TDEApplication::kApplication()->config(); config = tdeApp->config();
config->setGroup("General"); config->setGroup("General");
option = config->readEntry("Sound", "on"); option = config->readEntry("Sound", "on");
@ -238,7 +238,7 @@ void TopLevel::writeOptions()
{ {
TDEConfig *config; TDEConfig *config;
config = TDEApplication::kApplication()->config(); config = tdeApp->config();
config->setGroup("General"); config->setGroup("General");
config->writeEntry("Sound", soundEnabled? "on": "off"); config->writeEntry("Sound", soundEnabled? "on": "off");
@ -258,7 +258,7 @@ void TopLevel::setupTDEAction()
KStdGameAction::load(this, TQ_SLOT(fileOpen()), actionCollection()); KStdGameAction::load(this, TQ_SLOT(fileOpen()), actionCollection());
KStdGameAction::save(this, TQ_SLOT(fileSave()), actionCollection()); KStdGameAction::save(this, TQ_SLOT(fileSave()), actionCollection());
KStdGameAction::print(this, TQ_SLOT(filePrint()), actionCollection()); KStdGameAction::print(this, TQ_SLOT(filePrint()), actionCollection());
KStdGameAction::quit(kapp, TQ_SLOT(quit()), actionCollection()); KStdGameAction::quit(tdeApp, TQ_SLOT(quit()), actionCollection());
(void) new TDEAction(i18n("Save &as Picture..."), 0, this, TQ_SLOT(filePicture()), actionCollection(), "game_save_picture"); (void) new TDEAction(i18n("Save &as Picture..."), 0, this, TQ_SLOT(filePicture()), actionCollection(), "game_save_picture");
//Edit //Edit

@ -35,7 +35,7 @@ void BaseFactory::init(int argc, char **argv)
BaseFactory::~BaseFactory() BaseFactory::~BaseFactory()
{ {
delete kapp; delete tdeApp;
delete _aboutData; delete _aboutData;
Q_ASSERT(_self); Q_ASSERT(_self);
_self = 0; _self = 0;

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

@ -122,7 +122,7 @@ uint Interface::next(uint i) const
void Interface::_treatInit() void Interface::_treatInit()
{ {
ServerInitData sid; ServerInitData sid;
sid.seed = kapp->random(); sid.seed = tdeApp->random();
sid.initLevel = CommonPrefs::initialGameLevel(); sid.initLevel = CommonPrefs::initialGameLevel();
for (uint i=0; i<nbPlayers(); i++) { for (uint i=0; i<nbPlayers(); i++) {
sid.prevName = playerName(prev(i)); sid.prevName = playerName(prev(i));

@ -66,7 +66,7 @@ void MPInterface::dialog()
TQPtrList<RemoteHostData> rhd; TQPtrList<RemoteHostData> rhd;
rhd.setAutoDelete(TRUE); rhd.setAutoDelete(TRUE);
if (cd.network) { if (cd.network) {
cId id(kapp->name(), gameInfo.gameId); cId id(tdeApp->name(), gameInfo.gameId);
MPOptionWidget *ow = newOptionWidget(); MPOptionWidget *ow = newOptionWidget();
NetMeeting *nm; NetMeeting *nm;
if (cd.server) nm = new ServerNetMeeting(id, cd.rhd, ow, rhd, this); if (cd.server) nm = new ServerNetMeeting(id, cd.rhd, ow, rhd, this);
@ -95,7 +95,7 @@ void MPInterface::specialLocalGame(uint nbHumans, uint nbAIs)
ConnectionData cd; ConnectionData cd;
BoardData bd; BoardData bd;
PlayerComboBox::Type t; PlayerComboBox::Type t;
TDEConfigGroupSaver cg(kapp->config(), MP_GROUP); TDEConfigGroupSaver cg(tdeApp->config(), MP_GROUP);
for (uint i=0; i<(nbHumans+nbAIs); i++) { for (uint i=0; i<(nbHumans+nbAIs); i++) {
bd.type = (i<nbHumans ? PlayerComboBox::Human : PlayerComboBox::AI); bd.type = (i<nbHumans ? PlayerComboBox::Human : PlayerComboBox::AI);
bd.name = TQString(); bd.name = TQString();

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

@ -1,5 +1,5 @@
dnl AB: checking for a system-wide highscore file. If "no" then the default dnl AB: checking for a system-wide highscore file. If "no" then the default
dnl (just kapp->config()) is used. See KHighscore for details. dnl (just tdeApp->config()) is used. See KHighscore for details.
AC_MSG_CHECKING(whether to use system-wide highscores) AC_MSG_CHECKING(whether to use system-wide highscores)
AC_ARG_ENABLE(highscore-dir, AC_ARG_ENABLE(highscore-dir,

@ -444,7 +444,7 @@ void ConfigDialog::accept()
{ {
if ( save() ) { if ( save() ) {
KDialogBase::accept(); KDialogBase::accept();
kapp->config()->sync(); // safer tdeApp->config()->sync(); // safer
} }
} }

@ -177,7 +177,7 @@ class ConfigGroup : public TDEConfigGroupSaver
{ {
public: public:
ConfigGroup(const TQString &group = TQString()) ConfigGroup(const TQString &group = TQString())
: TDEConfigGroupSaver(kapp->config(), group) {} : TDEConfigGroupSaver(tdeApp->config(), group) {}
}; };
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------

@ -143,7 +143,7 @@ bool KHighscore::lockForWriting(TQWidget *widget)
void KHighscore::writeAndUnlock() void KHighscore::writeAndUnlock()
{ {
if ( !d->global ) { if ( !d->global ) {
kapp->config()->sync(); tdeApp->config()->sync();
return; return;
} }
if ( !isLocked() ) return; if ( !isLocked() ) return;
@ -162,7 +162,7 @@ KHighscore::~KHighscore()
TDEConfig* KHighscore::config() const TDEConfig* KHighscore::config() const
{ {
return (d->global ? _config : kapp->config()); return (d->global ? _config : tdeApp->config());
} }
void KHighscore::writeEntry(int entry, const TQString& key, const TQVariant& value) void KHighscore::writeEntry(int entry, const TQString& key, const TQVariant& value)

@ -295,7 +295,7 @@ protected:
/** /**
* @return A pointer to the TDEConfig object to be used. This is * @return A pointer to the TDEConfig object to be used. This is
* either kapp->config() (default) or a KSimpleConfig object for * either tdeApp->config() (default) or a KSimpleConfig object for
* a system-wide highscore file. * a system-wide highscore file.
**/ **/
TDEConfig* config() const; TDEConfig* config() const;

@ -275,7 +275,7 @@ void KScoreDialog::loadScores()
TQString key, value; TQString key, value;
d->loaded = true; d->loaded = true;
d->scores.clear(); d->scores.clear();
TDEConfigGroup config(kapp->config(), d->configGroup.utf8()); TDEConfigGroup config(tdeApp->config(), d->configGroup.utf8());
d->player = config.readEntry("LastPlayer"); d->player = config.readEntry("LastPlayer");
@ -298,7 +298,7 @@ void KScoreDialog::loadScores()
void KScoreDialog::saveScores() void KScoreDialog::saveScores()
{ {
TQString key, value; TQString key, value;
TDEConfigGroup config(kapp->config(), d->configGroup.utf8()); TDEConfigGroup config(tdeApp->config(), d->configGroup.utf8());
config.writeEntry("LastPlayer", d->player); config.writeEntry("LastPlayer", d->player);
@ -315,7 +315,7 @@ void KScoreDialog::saveScores()
} }
} }
} }
kapp->config()->sync(); tdeApp->config()->sync();
} }
int KScoreDialog::addScore(int newScore, const FieldInfo &newInfo, bool askName) int KScoreDialog::addScore(int newScore, const FieldInfo &newInfo, bool askName)

@ -63,7 +63,7 @@ class KCardDialogPrivate;
* deck/carddir. You have to save the value of those parameters in your config * deck/carddir. You have to save the value of those parameters in your config
* file - that's why the parameters are needed. * file - that's why the parameters are needed.
* *
* You can also provide a TDEConfig pointer (usually kapp->config()). This * You can also provide a TDEConfig pointer (usually tdeApp->config()). This
* pointer is used to store information about the dialog in an own group * pointer is used to store information about the dialog in an own group
* ("KCardDailog"). * ("KCardDailog").
* So you can just ignore the randomCardDir and randomDeck * So you can just ignore the randomCardDir and randomDeck

@ -235,8 +235,8 @@ void KChatBase::init(bool noComboBox)
d->mAcceptMessage = true; // by default d->mAcceptMessage = true; // by default
setMaxItems(-1); // unlimited setMaxItems(-1); // unlimited
if (kapp) { if (tdeApp) {
// kapp might be NULL as well - in case we are in TQt designer. // tdeApp might be NULL as well - in case we are in TQt designer.
readConfig(); readConfig();
} }
} }
@ -469,7 +469,7 @@ void KChatBase::saveConfig(TDEConfig* conf)
{ {
TQString oldGroup; TQString oldGroup;
if (!conf) { if (!conf) {
conf = kapp->config(); conf = tdeApp->config();
oldGroup = conf->group(); oldGroup = conf->group();
conf->setGroup("KChatBase"); conf->setGroup("KChatBase");
} }
@ -489,7 +489,7 @@ void KChatBase::readConfig(TDEConfig* conf)
{ {
TQString oldGroup; TQString oldGroup;
if (!conf) { if (!conf) {
conf = kapp->config(); conf = tdeApp->config();
oldGroup = conf->group(); oldGroup = conf->group();
conf->setGroup("KChatBase"); conf->setGroup("KChatBase");
} }

@ -362,18 +362,18 @@ public:
/** /**
* Save the configuration of the dialog to a TDEConfig object. If * Save the configuration of the dialog to a TDEConfig object. If
* the supplied TDEConfig pointer is NULL then kapp->config() is used * the supplied TDEConfig pointer is NULL then tdeApp->config() is used
* instead (and the group is changed to "KChatBase") butr the current * instead (and the group is changed to "KChatBase") butr the current
* group is restored at the end. * group is restored at the end.
* @param conf A pointer to the TDEConfig object to save the config * @param conf A pointer to the TDEConfig object to save the config
* to. If you use 0 then kapp->config() is used and the group is changed * to. If you use 0 then tdeApp->config() is used and the group is changed
* to "KChatBase" (the current group is restored at the end). * to "KChatBase" (the current group is restored at the end).
**/ **/
virtual void saveConfig(TDEConfig* conf = 0); virtual void saveConfig(TDEConfig* conf = 0);
/** /**
* Read the configuration from a TDEConfig object. If the pointer is * Read the configuration from a TDEConfig object. If the pointer is
* NULL kapp->config() is used and the group is changed to "KChatBase". * NULL tdeApp->config() is used and the group is changed to "KChatBase".
* The current TDEConfig::group is restored after this call. * The current TDEConfig::group is restored after this call.
**/ **/
virtual void readConfig(TDEConfig* conf = 0); virtual void readConfig(TDEConfig* conf = 0);

@ -72,13 +72,13 @@ void KGameProgress::initialize()
bar_style = Solid; bar_style = Solid;
text_enabled = TRUE; text_enabled = TRUE;
setBackgroundMode( PaletteBackground ); setBackgroundMode( PaletteBackground );
connect(kapp, TQ_SIGNAL(appearanceChanged()), this, TQ_SLOT(paletteChange())); connect(tdeApp, TQ_SIGNAL(appearanceChanged()), this, TQ_SLOT(paletteChange()));
paletteChange(); paletteChange();
} }
void KGameProgress::paletteChange() void KGameProgress::paletteChange()
{ {
TQPalette p = kapp->palette(); TQPalette p = tdeApp->palette();
const TQColorGroup &colorGroup = p.active(); const TQColorGroup &colorGroup = p.active();
if (!use_supplied_bar_color) if (!use_supplied_bar_color)
bar_color = colorGroup.highlight(); bar_color = colorGroup.highlight();

@ -47,11 +47,11 @@
LSkatApp::LSkatApp() : TDEMainWindow(0) LSkatApp::LSkatApp() : TDEMainWindow(0)
{ {
config=kapp->config(); config=tdeApp->config();
// localise data file // localise data file
TQString file=TQString::fromLatin1("lskat/grafix/t1.png"); TQString file=TQString::fromLatin1("lskat/grafix/t1.png");
mGrafix=kapp->dirs()->findResourceDir("data", file); mGrafix=tdeApp->dirs()->findResourceDir("data", file);
if (mGrafix.isNull()) mGrafix = TQCString("grafix/"); if (mGrafix.isNull()) mGrafix = TQCString("grafix/");
else mGrafix+=TQCString("lskat/grafix/"); else mGrafix+=TQCString("lskat/grafix/");
if (global_debug>3) printf("Localised datafile=%s\n",mGrafix.latin1()); if (global_debug>3) printf("Localised datafile=%s\n",mGrafix.latin1());
@ -299,7 +299,7 @@ void LSkatApp::saveProperties(TDEConfig *_cfg)
_cfg->writePathEntry("filename", filename); _cfg->writePathEntry("filename", filename);
_cfg->writeEntry("modified", doc->isModified()); _cfg->writeEntry("modified", doc->isModified());
TQString tempname = kapp->tempSaveName(filename); TQString tempname = tdeApp->tempSaveName(filename);
doc->saveDocument(tempname); doc->saveDocument(tempname);
} }
} }
@ -312,7 +312,7 @@ void LSkatApp::readProperties(TDEConfig* _cfg)
if(modified) if(modified)
{ {
bool canRecover; bool canRecover;
TQString tempname = kapp->checkRecoverFile(filename, canRecover); TQString tempname = tdeApp->checkRecoverFile(filename, canRecover);
if(canRecover) if(canRecover)
{ {
@ -332,7 +332,7 @@ void LSkatApp::readProperties(TDEConfig* _cfg)
} }
} }
//TQString caption=kapp->caption(); //TQString caption=tdeApp->caption();
setCaption(i18n("Lieutenant Skat")); setCaption(i18n("Lieutenant Skat"));
} }
@ -728,7 +728,7 @@ bool LSkatApp::MakeInputDevice(int no)
{ {
if (mInput->QueryType(no)!=type) if (mInput->QueryType(no)!=type)
{ {
// TQString path=kapp->dirs()->findExe(doc->QueryProcessName()); // TQString path=tdeApp->dirs()->findExe(doc->QueryProcessName());
TQString path=doc->GetProcess(); TQString path=doc->GetProcess();
if (global_debug>5) if (global_debug>5)
{ {

@ -123,7 +123,7 @@ Kwin4App::Kwin4App(TQWidget *parent, const char *name) : TDEMainWindow(parent,na
setupGUI(); setupGUI();
doc->ReadConfig(kapp->config()); doc->ReadConfig(tdeApp->config());
checkMenus(); checkMenus();
} }
@ -290,7 +290,7 @@ void Kwin4App::changeAction(const char *action, bool enable){
*/ */
void Kwin4App::saveProperties(TDEConfig *cfg) void Kwin4App::saveProperties(TDEConfig *cfg)
{ {
TQString tempfile = kapp->tempSaveName(TQDir::currentDirPath()+"twin4"); TQString tempfile = tdeApp->tempSaveName(TQDir::currentDirPath()+"twin4");
cfg->writePathEntry("filename", tempfile ); cfg->writePathEntry("filename", tempfile );
doc->save(tempfile); doc->save(tempfile);
} }

@ -129,7 +129,7 @@ void Kwin4Doc::initPlayers()
Kwin4Doc::~Kwin4Doc() Kwin4Doc::~Kwin4Doc()
{ {
WriteConfig(kapp->config()); WriteConfig(tdeApp->config());
if (mHintProcess) if (mHintProcess)
delete mHintProcess; delete mHintProcess;
} }
@ -788,7 +788,7 @@ TQString Kwin4Doc::QueryProcessName()
if (global_debug>1) kdDebug(12010) << " Found local process " << filename << endl; if (global_debug>1) kdDebug(12010) << " Found local process " << filename << endl;
return filename; return filename;
} }
TQString path=kapp->dirs()->findExe("twin4proc"); TQString path=tdeApp->dirs()->findExe("twin4proc");
if (!path.isNull()) if (!path.isNull())
{ {
if (global_debug>1) kdDebug(12010) << " Found system process " << path << endl; if (global_debug>1) kdDebug(12010) << " Found system process " << path << endl;

@ -109,7 +109,7 @@ Kwin4View::Kwin4View(Kwin4Doc *theDoc, TQWidget *parent, const char *name)
// localise data file // localise data file
TQString file="twin4/grafix/default/grafix.rc"; TQString file="twin4/grafix/default/grafix.rc";
TQString mGrafix=kapp->dirs()->findResourceDir("data",file); TQString mGrafix=tdeApp->dirs()->findResourceDir("data",file);
if (mGrafix.isNull()) if (mGrafix.isNull())
mGrafix="grafix/default/"; mGrafix="grafix/default/";
else else
@ -119,8 +119,8 @@ Kwin4View::Kwin4View(Kwin4Doc *theDoc, TQWidget *parent, const char *name)
// Allow overriding of the grafix directory // Allow overriding of the grafix directory
// This is a cheap and dirty way for theming // This is a cheap and dirty way for theming
kapp->config()->setGroup("Themes"); tdeApp->config()->setGroup("Themes");
mGrafix = kapp->config()->readPathEntry("grafixdir", mGrafix); mGrafix = tdeApp->config()->readPathEntry("grafixdir", mGrafix);
setVScrollBarMode(AlwaysOff); setVScrollBarMode(AlwaysOff);
@ -599,7 +599,7 @@ bool Kwin4View::wrongPlayer(KPlayer *player,KGameIO::IOMode io)
return false; return false;
clearError(); clearError();
int rnd=(kapp->random()%4) +1; int rnd=(tdeApp->random()%4) +1;
TQString m; TQString m;
m=TQString("text%1").arg(rnd); m=TQString("text%1").arg(rnd);
TQString ms; TQString ms;

Loading…
Cancel
Save