summaryrefslogtreecommitdiff
path: root/noncore/games/zsame/ZSameWidget.cpp
Side-by-side diff
Diffstat (limited to 'noncore/games/zsame/ZSameWidget.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/games/zsame/ZSameWidget.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/noncore/games/zsame/ZSameWidget.cpp b/noncore/games/zsame/ZSameWidget.cpp
index 4fab0f6..04ad825 100644
--- a/noncore/games/zsame/ZSameWidget.cpp
+++ b/noncore/games/zsame/ZSameWidget.cpp
@@ -88,56 +88,56 @@ ZSameWidget::ZSameWidget( QWidget* parent, const char* name, WFlags fl )
desktop_widget(foo);
stone = new StoneWidget(this,foo[0],foo[1]);
connect( stone, SIGNAL(s_gameover()), this, SLOT(gameover()));
connect( stone, SIGNAL(s_colors(int)), this, SLOT(setColors(int)));
connect( stone, SIGNAL(s_board(int)), this, SLOT(setBoard(int)));
connect( stone, SIGNAL(s_marked(int)), this, SLOT(setMarked(int)));
connect( stone, SIGNAL(s_score(int)), this, SLOT(setScore(int)));
connect( stone, SIGNAL(s_remove(int,int)), this, SLOT(stonesRemoved(int,int)));
connect(stone, SIGNAL(s_sizechanged()), this, SLOT(sizeChanged()));
sizeChanged();
setCentralWidget(stone);
setScore(0);
}
ZSameWidget::~ZSameWidget() {
}
-void ZSameWidget::readProperties(Config *conf) {
+void ZSameWidget::readProperties(Config *) {
/*
Q_ASSERT(conf);
stone->readProperties(conf);
*/
}
-void ZSameWidget::saveProperties(Config *conf) {
+void ZSameWidget::saveProperties(Config *) {
/*
Q_ASSERT(conf);
stone->saveProperties(conf);
conf->sync();
*/
}
void ZSameWidget::sizeChanged() {
// stone->setFixedSize(stone->sizeHint());
}
void ZSameWidget::newGame(unsigned int board,int colors) {
while (board>=1000000) board-=1000000;
// kdDebug() << "newgame board " << board << " colors " << colors << endl;
stone->newGame(board,colors);
setScore(0);
}
bool ZSameWidget::confirmAbort() {
return stone->isGameover() ||
stone->isOriginalBoard() ||
(QMessageBox::warning(this, i18n("Resign"), i18n("<qt>Do you want to resign?</qt>"),
QMessageBox::Yes,
QMessageBox::No|QMessageBox::Default|QMessageBox::Escape, 0) == QMessageBox::Yes );
@@ -168,66 +168,66 @@ void ZSameWidget::m_undo() {
}
void ZSameWidget::m_showhs() {
/* Q_ASSERT(stone);
stone->unmark();
KScoreDialog d(KScoreDialog::Name | KScoreDialog::Score, this);
d.addField(Board, i18n("Board"), "Board");
d.exec();
*/
}
void ZSameWidget::m_quit() {
// Q_ASSERT(stone);
stone->unmark();
qApp->quit();
// delete this;
}
void ZSameWidget::m_tglboard() {
// kdDebug() << "toggled" << endl;
}
-void ZSameWidget::setColors(int colors) {
+void ZSameWidget::setColors(int ) {
// status->changeItem(i18n("%1 Colors").arg(colors),1);
}
-void ZSameWidget::setBoard(int board) {
+void ZSameWidget::setBoard(int ) {
// status->changeItem(i18n("Board: %1").arg(board, 6), 2);
}
-void ZSameWidget::setMarked(int m) {
+void ZSameWidget::setMarked(int ) {
// status->changeItem(i18n("Marked: %1").arg(m, 6),3);
}
void ZSameWidget::stonesRemoved(int,int) {
// KNotifyClient::event("stones removed",
// i18n("%1 stones removed.").arg(stone->marked()));
}
-void ZSameWidget::setScore(int score) {
+void ZSameWidget::setScore(int ) {
// status->changeItem(i18n("Score: %1").arg(score, 6),4);
// undo->setEnabled(stone->undoPossible());
// restart->setEnabled(!stone->isOriginalBoard());
}
void ZSameWidget::gameover() {
// kdDebug() << "GameOver" << endl;
if (stone->hasBonus()) {
QMessageBox::information(this,i18n("Game won"),
i18n("<qt>You even removed the last stone, great job! "
"This gave you a score of %1 in total.</qt>").arg(stone->score()));
} else {
QMessageBox::information(this,i18n("Game over"),
i18n("<qt>There are no more removeable stones. "
"You got a score of %1 in total.</qt>").arg(stone->score()));
}
stone->unmark();
}
void ZSameWidget::desktop_widget(int *f)const{
QWidget* wid = QApplication::desktop();
/* width > height landscape mode */
if ( wid->width() > wid->height() ) {