summaryrefslogtreecommitdiffstats
path: root/kpoker
diff options
context:
space:
mode:
authorMichele Calgaro <[email protected]>2025-01-20 18:26:21 +0900
committerMichele Calgaro <[email protected]>2025-01-27 11:03:54 +0900
commitbd4ee3ccc15d0776614a8435850a2eb1faf5a71f (patch)
treec2ce8973a25d1e56e92a5a0b179693ed1f4f42ad /kpoker
parent3191f81874fcfdd0466f6f42beb89da6245b1a0a (diff)
downloadtdegames-bd4ee3ccc15d0776614a8435850a2eb1faf5a71f.tar.gz
tdegames-bd4ee3ccc15d0776614a8435850a2eb1faf5a71f.zip
Use tdeApp
Signed-off-by: Michele Calgaro <[email protected]>
Diffstat (limited to 'kpoker')
-rw-r--r--kpoker/kpoker.cpp38
-rw-r--r--kpoker/newgamedlg.cpp10
-rw-r--r--kpoker/top.cpp4
3 files changed, 26 insertions, 26 deletions
diff --git a/kpoker/kpoker.cpp b/kpoker/kpoker.cpp
index 26330fce..a773dcac 100644
--- a/kpoker/kpoker.cpp
+++ b/kpoker/kpoker.cpp
@@ -182,7 +182,7 @@ kpok::kpok(TQWidget *parent, const char *name)
lastHandText = "";
- version = kapp->caption() + " " + KPOKER_VERSION;
+ version = tdeApp->caption() + " " + KPOKER_VERSION;
setCaption( version );
mOptions = 0;
@@ -208,7 +208,7 @@ kpok::~kpok()
// cashPerRound = mOptions->getCashPerRound(); // NOT(!) configurable
}
- TDEConfig* conf = kapp->config();
+ TDEConfig* conf = tdeApp->config();
conf->setGroup("General");
conf->writeEntry("MinBet", m_game.getMinBet());
conf->writeEntry("MaxBet", m_game.getMaxBet());
@@ -314,7 +314,7 @@ void kpok::initWindow()
cardImages = new CardImages(this, 0);
// The configuration
- TDEConfig* conf = kapp->config();
+ TDEConfig* conf = tdeApp->config();
conf->setGroup("General");
// Load the card deck.
@@ -606,16 +606,16 @@ void kpok::initPoker(unsigned int numPlayers)
PokerGameType gametype = (numPlayers == 1) ? SinglePlayer : MultiPlayer;
// Read some defaults.
- kapp->config()->setGroup("General");
- int minBet = kapp->config()->readNumEntry("MinBet", MIN_BET);
- int maxBet = kapp->config()->readNumEntry("MaxBet", MAX_BET);
+ tdeApp->config()->setGroup("General");
+ int minBet = tdeApp->config()->readNumEntry("MinBet", MIN_BET);
+ int maxBet = tdeApp->config()->readNumEntry("MaxBet", MAX_BET);
// Start a new poker game using the data found out above.
m_game.newGame(gametype, m_numPlayers, m_players, minBet, maxBet);
// Not (yet) configurable
cashPerRound = CASH_PER_ROUND;
- drawDelay = kapp->config()->readNumEntry("DrawDelay", DRAWDELAY);
+ drawDelay = tdeApp->config()->readNumEntry("DrawDelay", DRAWDELAY);
m_blinkingBox = 0;
currentMustBet = m_game.getMinBet();
@@ -1215,7 +1215,7 @@ PokerPlayer* kpok::findHumanPlayer()
bool kpok::readEntriesAndInitPoker()
{
NewGameDlg *newGameDlg = NULL;
- TDEConfig *conf = kapp->config();
+ TDEConfig *conf = tdeApp->config();
int numPlayers = DEFAULT_PLAYERS;
conf->setGroup("NewGameDlg");
@@ -1293,8 +1293,8 @@ void kpok::betChange(int betChange)
void kpok::saveGame()
{
- kapp->config()->setGroup("Save");
- saveGame(kapp->config());
+ tdeApp->config()->setGroup("Save");
+ saveGame(tdeApp->config());
}
@@ -1393,8 +1393,8 @@ void kpok::readOptions()
bool kpok::loadGame()
{
- kapp->config()->setGroup("Save");
- return loadGame(kapp->config());
+ tdeApp->config()->setGroup("Save");
+ return loadGame(tdeApp->config());
}
@@ -1450,9 +1450,9 @@ void kpok::exchangeCard5() { playerBox[0]->cardClicked(5); }
void kpok::slotCardDeck()
{
- kapp->config()->setGroup("General");
- TQString deckPath = kapp->config()->readPathEntry("DeckPath", 0);
- TQString cardPath = kapp->config()->readPathEntry("CardPath", 0);
+ tdeApp->config()->setGroup("General");
+ TQString deckPath = tdeApp->config()->readPathEntry("DeckPath", 0);
+ TQString cardPath = tdeApp->config()->readPathEntry("CardPath", 0);
bool randomDeck, randomCardDir;
// 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.
- kapp->config()->writePathEntry("DeckPath", deckPath);
- kapp->config()->writeEntry("RandomDeck", randomDeck);
- kapp->config()->writePathEntry("CardPath", cardPath);
- kapp->config()->writeEntry("RandomCardDir", randomCardDir);
+ tdeApp->config()->writePathEntry("DeckPath", deckPath);
+ tdeApp->config()->writeEntry("RandomDeck", randomDeck);
+ tdeApp->config()->writePathEntry("CardPath", cardPath);
+ tdeApp->config()->writeEntry("RandomCardDir", randomCardDir);
}
}
diff --git a/kpoker/newgamedlg.cpp b/kpoker/newgamedlg.cpp
index b84b7f69..962c239d 100644
--- a/kpoker/newgamedlg.cpp
+++ b/kpoker/newgamedlg.cpp
@@ -41,7 +41,7 @@ NewGameDlg::NewGameDlg(TQWidget* parent)
TQVBoxLayout *topLayout = new TQVBoxLayout(plainPage(), spacingHint());
TQHBoxLayout *l = new TQHBoxLayout(topLayout);
- TDEConfig* conf = kapp->config();
+ TDEConfig* conf = tdeApp->config();
conf->setGroup("NewGameDlg");
bool showNewGameDlg = conf->readBoolEntry("showNewGameDlgOnStartup",
SHOWNEWGAME_DEFAULT);
@@ -100,7 +100,7 @@ NewGameDlg::NewGameDlg(TQWidget* parent)
NewGameDlg::~NewGameDlg()
{
if (result() == Accepted) {
- TDEConfig* conf = kapp->config();
+ TDEConfig* conf = tdeApp->config();
conf->setGroup("NewGameDlg"); // defaults for the newGameDlg only
conf->writeEntry("showNewGameDlgOnStartup", showOnStartup());
conf->writeEntry("readFromConfig", readFromConfigFile()); // just a default!
@@ -123,11 +123,11 @@ NewGameDlg::~NewGameDlg()
void NewGameDlg::setPlayerNames(int no, TQString playerName)
{
if (no < 0) {
- kapp->config()->setGroup("Save");
- player1Name->setText(kapp->config()->readEntry("Name_0", i18n("You")));
+ tdeApp->config()->setGroup("Save");
+ player1Name->setText(tdeApp->config()->readEntry("Name_0", i18n("You")));
computerNames->clear();
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) {
player1Name->setText(playerName);
diff --git a/kpoker/top.cpp b/kpoker/top.cpp
index 129d450a..95229081 100644
--- a/kpoker/top.cpp
+++ b/kpoker/top.cpp
@@ -127,7 +127,7 @@ void PokerWindow::initTDEAction()
void PokerWindow::readOptions()
{
- TDEConfig* conf = kapp->config();
+ TDEConfig* conf = tdeApp->config();
conf->setGroup("General");
if (m_kpok->getSound() != conf->readBoolEntry("Sound", true))
@@ -235,7 +235,7 @@ void PokerWindow::clearStatusBar()
void PokerWindow::saveOptions()
{
- TDEConfig* conf = kapp->config();
+ TDEConfig* conf = tdeApp->config();
conf->setGroup("General");
conf->writeEntry("Sound", soundAction->isChecked());