|
|
|
@ -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);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|