author | zecke <zecke> | 2004-09-10 11:14:02 (UTC) |
---|---|---|
committer | zecke <zecke> | 2004-09-10 11:14:02 (UTC) |
commit | b8baf551919868737c6f56a05e6efa1bad4d97ac (patch) (unidiff) | |
tree | 402c587e55356aff7f13990e1efcf57775bb9670 /noncore/games/zsame/ZSameWidget.cpp | |
parent | 046bff8abb6727f5522748a2dc8a259d27b5979b (diff) | |
download | opie-b8baf551919868737c6f56a05e6efa1bad4d97ac.zip opie-b8baf551919868737c6f56a05e6efa1bad4d97ac.tar.gz opie-b8baf551919868737c6f56a05e6efa1bad4d97ac.tar.bz2 |
Remove unused parameter
Diffstat (limited to 'noncore/games/zsame/ZSameWidget.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/games/zsame/ZSameWidget.cpp | 12 |
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 ) | |||
88 | desktop_widget(foo); | 88 | desktop_widget(foo); |
89 | stone = new StoneWidget(this,foo[0],foo[1]); | 89 | stone = new StoneWidget(this,foo[0],foo[1]); |
90 | 90 | ||
91 | connect( stone, SIGNAL(s_gameover()), this, SLOT(gameover())); | 91 | connect( stone, SIGNAL(s_gameover()), this, SLOT(gameover())); |
92 | 92 | ||
93 | connect( stone, SIGNAL(s_colors(int)), this, SLOT(setColors(int))); | 93 | connect( stone, SIGNAL(s_colors(int)), this, SLOT(setColors(int))); |
94 | connect( stone, SIGNAL(s_board(int)), this, SLOT(setBoard(int))); | 94 | connect( stone, SIGNAL(s_board(int)), this, SLOT(setBoard(int))); |
95 | connect( stone, SIGNAL(s_marked(int)), this, SLOT(setMarked(int))); | 95 | connect( stone, SIGNAL(s_marked(int)), this, SLOT(setMarked(int))); |
96 | connect( stone, SIGNAL(s_score(int)), this, SLOT(setScore(int))); | 96 | connect( stone, SIGNAL(s_score(int)), this, SLOT(setScore(int))); |
97 | connect( stone, SIGNAL(s_remove(int,int)), this, SLOT(stonesRemoved(int,int))); | 97 | connect( stone, SIGNAL(s_remove(int,int)), this, SLOT(stonesRemoved(int,int))); |
98 | 98 | ||
99 | connect(stone, SIGNAL(s_sizechanged()), this, SLOT(sizeChanged())); | 99 | connect(stone, SIGNAL(s_sizechanged()), this, SLOT(sizeChanged())); |
100 | 100 | ||
101 | sizeChanged(); | 101 | sizeChanged(); |
102 | setCentralWidget(stone); | 102 | setCentralWidget(stone); |
103 | 103 | ||
104 | 104 | ||
105 | setScore(0); | 105 | setScore(0); |
106 | } | 106 | } |
107 | 107 | ||
108 | ZSameWidget::~ZSameWidget() { | 108 | ZSameWidget::~ZSameWidget() { |
109 | 109 | ||
110 | } | 110 | } |
111 | 111 | ||
112 | void ZSameWidget::readProperties(Config *conf) { | 112 | void ZSameWidget::readProperties(Config *) { |
113 | /* | 113 | /* |
114 | Q_ASSERT(conf); | 114 | Q_ASSERT(conf); |
115 | stone->readProperties(conf); | 115 | stone->readProperties(conf); |
116 | */ | 116 | */ |
117 | } | 117 | } |
118 | 118 | ||
119 | void ZSameWidget::saveProperties(Config *conf) { | 119 | void ZSameWidget::saveProperties(Config *) { |
120 | /* | 120 | /* |
121 | Q_ASSERT(conf); | 121 | Q_ASSERT(conf); |
122 | stone->saveProperties(conf); | 122 | stone->saveProperties(conf); |
123 | conf->sync(); | 123 | conf->sync(); |
124 | */ | 124 | */ |
125 | } | 125 | } |
126 | 126 | ||
127 | void ZSameWidget::sizeChanged() { | 127 | void ZSameWidget::sizeChanged() { |
128 | //stone->setFixedSize(stone->sizeHint()); | 128 | //stone->setFixedSize(stone->sizeHint()); |
129 | } | 129 | } |
130 | 130 | ||
131 | void ZSameWidget::newGame(unsigned int board,int colors) { | 131 | void ZSameWidget::newGame(unsigned int board,int colors) { |
132 | while (board>=1000000) board-=1000000; | 132 | while (board>=1000000) board-=1000000; |
133 | // kdDebug() << "newgame board " << board << " colors " << colors << endl; | 133 | // kdDebug() << "newgame board " << board << " colors " << colors << endl; |
134 | stone->newGame(board,colors); | 134 | stone->newGame(board,colors); |
135 | setScore(0); | 135 | setScore(0); |
136 | } | 136 | } |
137 | 137 | ||
138 | bool ZSameWidget::confirmAbort() { | 138 | bool ZSameWidget::confirmAbort() { |
139 | return stone->isGameover() || | 139 | return stone->isGameover() || |
140 | stone->isOriginalBoard() || | 140 | stone->isOriginalBoard() || |
141 | (QMessageBox::warning(this, i18n("Resign"), i18n("<qt>Do you want to resign?</qt>"), | 141 | (QMessageBox::warning(this, i18n("Resign"), i18n("<qt>Do you want to resign?</qt>"), |
142 | QMessageBox::Yes, | 142 | QMessageBox::Yes, |
143 | QMessageBox::No|QMessageBox::Default|QMessageBox::Escape, 0) == QMessageBox::Yes ); | 143 | QMessageBox::No|QMessageBox::Default|QMessageBox::Escape, 0) == QMessageBox::Yes ); |
@@ -168,66 +168,66 @@ void ZSameWidget::m_undo() { | |||
168 | } | 168 | } |
169 | 169 | ||
170 | 170 | ||
171 | void ZSameWidget::m_showhs() { | 171 | void ZSameWidget::m_showhs() { |
172 | /* Q_ASSERT(stone); | 172 | /* Q_ASSERT(stone); |
173 | stone->unmark(); | 173 | stone->unmark(); |
174 | KScoreDialog d(KScoreDialog::Name | KScoreDialog::Score, this); | 174 | KScoreDialog d(KScoreDialog::Name | KScoreDialog::Score, this); |
175 | d.addField(Board, i18n("Board"), "Board"); | 175 | d.addField(Board, i18n("Board"), "Board"); |
176 | d.exec(); | 176 | d.exec(); |
177 | */ | 177 | */ |
178 | } | 178 | } |
179 | 179 | ||
180 | void ZSameWidget::m_quit() { | 180 | void ZSameWidget::m_quit() { |
181 | // Q_ASSERT(stone); | 181 | // Q_ASSERT(stone); |
182 | stone->unmark(); | 182 | stone->unmark(); |
183 | qApp->quit(); | 183 | qApp->quit(); |
184 | // delete this; | 184 | // delete this; |
185 | } | 185 | } |
186 | 186 | ||
187 | void ZSameWidget::m_tglboard() { | 187 | void ZSameWidget::m_tglboard() { |
188 | //kdDebug() << "toggled" << endl; | 188 | //kdDebug() << "toggled" << endl; |
189 | } | 189 | } |
190 | 190 | ||
191 | 191 | ||
192 | void ZSameWidget::setColors(int colors) { | 192 | void ZSameWidget::setColors(int ) { |
193 | //status->changeItem(i18n("%1 Colors").arg(colors),1); | 193 | //status->changeItem(i18n("%1 Colors").arg(colors),1); |
194 | } | 194 | } |
195 | 195 | ||
196 | void ZSameWidget::setBoard(int board) { | 196 | void ZSameWidget::setBoard(int ) { |
197 | //status->changeItem(i18n("Board: %1").arg(board, 6), 2); | 197 | //status->changeItem(i18n("Board: %1").arg(board, 6), 2); |
198 | } | 198 | } |
199 | 199 | ||
200 | void ZSameWidget::setMarked(int m) { | 200 | void ZSameWidget::setMarked(int ) { |
201 | // status->changeItem(i18n("Marked: %1").arg(m, 6),3); | 201 | // status->changeItem(i18n("Marked: %1").arg(m, 6),3); |
202 | } | 202 | } |
203 | 203 | ||
204 | void ZSameWidget::stonesRemoved(int,int) { | 204 | void ZSameWidget::stonesRemoved(int,int) { |
205 | //KNotifyClient::event("stones removed", | 205 | //KNotifyClient::event("stones removed", |
206 | // i18n("%1 stones removed.").arg(stone->marked())); | 206 | // i18n("%1 stones removed.").arg(stone->marked())); |
207 | } | 207 | } |
208 | 208 | ||
209 | void ZSameWidget::setScore(int score) { | 209 | void ZSameWidget::setScore(int ) { |
210 | // status->changeItem(i18n("Score: %1").arg(score, 6),4); | 210 | // status->changeItem(i18n("Score: %1").arg(score, 6),4); |
211 | // undo->setEnabled(stone->undoPossible()); | 211 | // undo->setEnabled(stone->undoPossible()); |
212 | // restart->setEnabled(!stone->isOriginalBoard()); | 212 | // restart->setEnabled(!stone->isOriginalBoard()); |
213 | } | 213 | } |
214 | 214 | ||
215 | void ZSameWidget::gameover() { | 215 | void ZSameWidget::gameover() { |
216 | // kdDebug() << "GameOver" << endl; | 216 | // kdDebug() << "GameOver" << endl; |
217 | if (stone->hasBonus()) { | 217 | if (stone->hasBonus()) { |
218 | QMessageBox::information(this,i18n("Game won"), | 218 | QMessageBox::information(this,i18n("Game won"), |
219 | i18n("<qt>You even removed the last stone, great job! " | 219 | i18n("<qt>You even removed the last stone, great job! " |
220 | "This gave you a score of %1 in total.</qt>").arg(stone->score())); | 220 | "This gave you a score of %1 in total.</qt>").arg(stone->score())); |
221 | } else { | 221 | } else { |
222 | QMessageBox::information(this,i18n("Game over"), | 222 | QMessageBox::information(this,i18n("Game over"), |
223 | i18n("<qt>There are no more removeable stones. " | 223 | i18n("<qt>There are no more removeable stones. " |
224 | "You got a score of %1 in total.</qt>").arg(stone->score())); | 224 | "You got a score of %1 in total.</qt>").arg(stone->score())); |
225 | } | 225 | } |
226 | stone->unmark(); | 226 | stone->unmark(); |
227 | } | 227 | } |
228 | 228 | ||
229 | void ZSameWidget::desktop_widget(int *f)const{ | 229 | void ZSameWidget::desktop_widget(int *f)const{ |
230 | 230 | ||
231 | QWidget* wid = QApplication::desktop(); | 231 | QWidget* wid = QApplication::desktop(); |
232 | /* width > height landscape mode */ | 232 | /* width > height landscape mode */ |
233 | if ( wid->width() > wid->height() ) { | 233 | if ( wid->width() > wid->height() ) { |