• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdegames API Reference
  • KDE Home
  • Contact Us
 

kigo

  • sources
  • kde-4.14
  • kdegames
  • kigo
  • src
  • gui
  • graphicsview
gamescene.cpp
Go to the documentation of this file.
1 /*
2  Copyright 2008 Sascha Peilicke <sasch.pe@gmx.de>
3 
4  This program is free software; you can redistribute it and/or
5  modify it under the terms of the GNU General Public License as
6  published by the Free Software Foundation; either version 2 of
7  the License or (at your option) version 3 or any later version
8  accepted by the membership of KDE e.V. (or its successor approved
9  by the membership of KDE e.V.), which shall act as a proxy
10  defined in Section 14 of version 3 of the license.
11 
12  This program is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  GNU General Public License for more details.
16 
17  You should have received a copy of the GNU General Public License
18  along with this program. If not, see <http://www.gnu.org/licenses/>.
19 */
20 
21 #include "gamescene.h"
22 #include "game/game.h"
23 #include "preferences.h"
24 #include "themerenderer.h"
25 
26 #include <QPainter>
27 #include <QGraphicsPixmapItem>
28 #include <QGraphicsSceneMouseEvent>
29 
30 namespace Kigo {
31 
32  const int dotPositions9[] = {2,2, 2,6, 6,2, 6,6, 4,4};
33  const int dotPositions13[] = {3,3, 3,9, 9,3, 9,9, 6,6};
34  const int dotPositions19[] = {3,3, 3,9, 3,15, 9,3, 9,9, 9,15, 15,3, 15,9, 15,15};
35 
36 GameScene::GameScene(Game *game, QObject *parent)
37  : QGraphicsScene(parent), m_game(game)
38  , m_showLabels(Preferences::showBoardLabels()), m_showHint(false)
39  , m_showMoveNumbers(Preferences::showMoveNumbers())
40  , m_showPlacementMarker(true), m_showTerritory(false)
41  , m_boardSize(Preferences::boardSize()), m_placementMarkerItem(0)
42 {
43  connect(m_game, SIGNAL(boardChanged()), this, SLOT(updateStoneItems()));
44  connect(m_game, SIGNAL(boardSizeChanged(int)), this, SLOT(changeBoardSize(int)));
45  connect(m_game, SIGNAL(currentPlayerChanged(Player)), this, SLOT(hideHint()));
46  connect(ThemeRenderer::self(), SIGNAL(themeChanged(QString)), this, SLOT(themeChanged()));
47 
48  m_gamePopup.setMessageTimeout(3000);
49  m_gamePopup.setHideOnMouseClick(true);
50  addItem(&m_gamePopup);
51 }
52 
53 void GameScene::resizeScene(int width, int height)
54 {
55  setSceneRect(0, 0, width, height);
56 
57  int size = qMin(width, height) - 10; // Add 10 pixel padding around the board
58  m_boardRect.setRect(width / 2 - size / 2, height / 2 - size / 2, size, size);
59  m_cellSize = m_boardRect.width() / (m_boardSize + 1);
60 
61  size = static_cast<int>(m_cellSize * (m_boardSize - 1));
62  m_gridRect.setRect(width / 2 - size / 2, height / 2 - size / 2, size, size);
63  m_mouseRect = m_gridRect.adjusted(-m_cellSize / 2, - m_cellSize / 2, m_cellSize / 2, m_cellSize / 2);
64 
65  m_stonePixmapSize = QSize(static_cast<int>(m_cellSize * 1.4), static_cast<int>(m_cellSize * 1.4));
66  updateStoneItems(); // Resize means redraw of board items (stones)
67  updateHintItems(); // and move hint items
68  updateTerritoryItems();
69 
70  if (m_placementMarkerItem) { // Set the mouse/stone postion placementmarker
71  removeItem(m_placementMarkerItem);
72  }
73  m_placementMarkerPixmapSize = QSize(static_cast<int>(m_cellSize / 4), static_cast<int>(m_cellSize / 4));
74  m_placementMarkerItem = addPixmap(ThemeRenderer::self()->renderElement(ThemeRenderer::PlacementMarker, m_placementMarkerPixmapSize));
75  m_placementMarkerItem->setVisible(false);
76  m_placementMarkerItem->setZValue(1);
77 }
78 
79 void GameScene::showLabels(bool show)
80 {
81  m_showLabels = show;
82  invalidate(m_boardRect, QGraphicsScene::BackgroundLayer);
83 }
84 
85 void GameScene::showHint(bool show)
86 {
87  m_showHint = show;
88  updateHintItems();
89 }
90 
91 void GameScene::showMoveNumbers(bool show)
92 {
93  m_showMoveNumbers = show;
94  updateStoneItems();
95 }
96 
97 void GameScene::showPlacementMarker(bool show)
98 {
99  m_showPlacementMarker = show;
100 }
101 
102 void GameScene::showMessage(const QString &message, int msecs)
103 {
104  m_gamePopup.setMessageTimeout(msecs);
105  if (message.isEmpty()) {
106  m_gamePopup.forceHide(); // Now message hides the last one
107  } else {
108  m_gamePopup.showMessage(message, KGamePopupItem::BottomLeft, KGamePopupItem::ReplacePrevious);
109  }
110 }
111 
112 void GameScene::showTerritory(bool show)
113 {
114  m_showTerritory = show;
115  updateTerritoryItems();
116 }
117 
118 void GameScene::updateStoneItems()
119 {
120  QGraphicsPixmapItem *item;
121  int halfStoneSize = m_stonePixmapSize.width() / 2;
122 
123  foreach (item, m_stoneItems) { // Clear all stone items
124  removeItem(item);
125  }
126  m_stoneItems.clear();
127 
128  foreach (const Stone &stone, m_game->stones(m_game->blackPlayer())) {
129  item = addPixmap(ThemeRenderer::self()->renderElement(ThemeRenderer::BlackStone, m_stonePixmapSize));
130  item->setZValue(2);
131  int xOff = stone.x() >= 'I' ? stone.x() - 'A' - 1 : stone.x() - 'A';
132  item->setPos(QPointF(m_gridRect.x() + xOff * m_cellSize - halfStoneSize + 1,
133  m_gridRect.y() + (m_boardSize - stone.y()) * m_cellSize - halfStoneSize + 1));
134  m_stoneItems.append(item);
135  }
136  foreach (const Stone &stone, m_game->stones(m_game->whitePlayer())) {
137  item = addPixmap(ThemeRenderer::self()->renderElement(ThemeRenderer::WhiteStone, m_stonePixmapSize));
138  item->setZValue(2);
139  int xOff = stone.x() >= 'I' ? stone.x() - 'A' - 1 : stone.x() - 'A';
140  item->setPos(QPointF(m_gridRect.x() + xOff * m_cellSize - halfStoneSize + 1,
141  m_gridRect.y() + (m_boardSize - stone.y()) * m_cellSize - halfStoneSize + 1));
142  m_stoneItems.append(item);
143  }
144 
145  if (m_showMoveNumbers) {
146  int i = 0;
147  foreach (const Move &move, m_game->moves()) {
148  int xOff = move.stone().x() >= 'I' ? move.stone().x() - 'A' - 1 : move.stone().x() - 'A';
149  QPointF pos = QPointF(m_gridRect.x() + xOff * m_cellSize,
150  m_gridRect.y() + (m_boardSize - move.stone().y()) * m_cellSize);
151 
152  if (QGraphicsPixmapItem *item = static_cast<QGraphicsPixmapItem *>(itemAt(pos))) {
153  // We found an item in the scene that is in our move numbers, so we paint it's move number
154  // on top of the item and that's all.
155  //TODO: Check for existing move number to do special treatment
156  QPixmap pixmap = item->pixmap();
157  QPainter painter(&pixmap);
158  if (move.player()->isWhite()) {
159  painter.setPen(Qt::black);
160  } else if (move.player()->isBlack()) {
161  painter.setPen(Qt::white);
162  }
163  QFont f = painter.font();
164  f.setPointSizeF(halfStoneSize / 2);
165  painter.setFont(f);
166  painter.drawText(pixmap.rect(), Qt::AlignCenter, QString::number(i++));
167  item->setPixmap(pixmap);
168  }
169  }
170  }
171 }
172 
173 void GameScene::updateHintItems()
174 {
175  QGraphicsPixmapItem *item;
176 
177  foreach (item, m_hintItems) { // Old hint is invalid, remove it first
178  removeItem(item);
179  }
180  m_hintItems.clear();
181 
182  if (m_showHint) {
183  int halfStoneSize = m_stonePixmapSize.width() / 2;
184 
185  foreach (const Stone &move, m_game->bestMoves(m_game->currentPlayer())) {
186  QPixmap stonePixmap;
187  if (m_game->currentPlayer().isWhite()) {
188  stonePixmap = ThemeRenderer::self()->renderElement(ThemeRenderer::WhiteStoneTransparent, m_stonePixmapSize);
189  } else if (m_game->currentPlayer().isBlack()) {
190  stonePixmap = ThemeRenderer::self()->renderElement(ThemeRenderer::BlackStoneTransparent, m_stonePixmapSize);
191  }
192 
193  QPainter painter(&stonePixmap);
194  if (m_game->currentPlayer().isWhite()) {
195  painter.setPen(Qt::black);
196  } else if (m_game->currentPlayer().isBlack()) {
197  painter.setPen(Qt::white);
198  }
199  QFont f = painter.font();
200  f.setPointSizeF(m_cellSize / 4);
201  painter.setFont(f);
202  painter.drawText(stonePixmap.rect(), Qt::AlignCenter, QString::number(move.value()));
203  painter.end();
204 
205  item = addPixmap(stonePixmap);
206  item->setZValue(4);
207  int xOff = move.x() >= 'I' ? move.x() - 'A' - 1 : move.x() - 'A';
208  item->setPos(QPointF(m_gridRect.x() + xOff * m_cellSize - halfStoneSize + 2,
209  m_gridRect.y() + (m_boardSize - move.y()) * m_cellSize - halfStoneSize + 2));
210  m_hintItems.append(item);
211  }
212  }
213 }
214 
215 void GameScene::updateTerritoryItems()
216 {
217  QGraphicsPixmapItem *item;
218 
219  foreach (item, m_territoryItems) { // Old territory is invalid, remove it first
220  removeItem(item);
221  }
222  m_territoryItems.clear();
223 
224  if (m_showTerritory) {
225  QPixmap stonePixmap;
226  int halfCellSize = m_cellSize / 2;
227  kDebug() << "Fetching territory from engine ...";
228 
229  stonePixmap = ThemeRenderer::self()->renderElement(ThemeRenderer::WhiteTerritory, QSize(m_cellSize, m_cellSize));
230  foreach (const Stone &stone, m_game->finalStates(Game::FinalWhiteTerritory)) {
231  item = addPixmap(stonePixmap);
232  item->setZValue(8);
233  int xOff = stone.x() >= 'I' ? stone.x() - 'A' - 1 : stone.x() - 'A';
234  item->setPos(QPointF(m_gridRect.x() + xOff * m_cellSize - halfCellSize + 2,
235  m_gridRect.y() + (m_boardSize - stone.y()) * m_cellSize - halfCellSize + 2));
236  m_territoryItems.append(item);
237  }
238 
239  stonePixmap = ThemeRenderer::self()->renderElement(ThemeRenderer::BlackTerritory, QSize(m_cellSize, m_cellSize));
240  foreach (const Stone &stone, m_game->finalStates(Game::FinalBlackTerritory)) {
241  item = addPixmap(stonePixmap);
242  item->setZValue(8);
243  int xOff = stone.x() >= 'I' ? stone.x() - 'A' - 1 : stone.x() - 'A';
244  item->setPos(QPointF(m_gridRect.x() + xOff * m_cellSize - halfCellSize + 2,
245  m_gridRect.y() + (m_boardSize - stone.y()) * m_cellSize - halfCellSize + 2));
246  m_territoryItems.append(item);
247  }
248  }
249 }
250 
251 void GameScene::changeBoardSize(int size)
252 {
253  m_boardSize = size;
254  resizeScene(width(), height());
255  invalidate(m_boardRect, QGraphicsScene::BackgroundLayer);
256 }
257 
258 void GameScene::themeChanged()
259 {
260  invalidate(sceneRect(), QGraphicsScene::AllLayers);
261 }
262 
263 void GameScene::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
264 {
265  QPixmap map;
266 
267  if (m_mouseRect.contains(event->scenePos())) {
268  // Show a placement marker at the nearest board intersection
269  // as a visual aid for the user.
270  if (m_showPlacementMarker) {
271  int row = static_cast<int>((event->scenePos().x() - m_mouseRect.x()) / m_cellSize);
272  int col = static_cast<int>((event->scenePos().y() - m_mouseRect.y()) / m_cellSize);
273 
274  int x = m_mouseRect.x() + row * m_cellSize + m_cellSize/2 - m_placementMarkerPixmapSize.width()/2;
275  int y = m_mouseRect.y() + col * m_cellSize + m_cellSize/2 - m_placementMarkerPixmapSize.height()/2;
276 
277  m_placementMarkerItem->setVisible(true);
278  m_placementMarkerItem->setPos(x, y);
279  } else {
280  m_placementMarkerItem->setVisible(false);
281  }
282 
283  if (m_game->currentPlayer().isHuman()) {
284  if (m_game->currentPlayer().isWhite()) {
285  map = ThemeRenderer::self()->renderElement(ThemeRenderer::WhiteStoneTransparent, m_stonePixmapSize);
286  } else if (m_game->currentPlayer().isBlack()) {
287  map = ThemeRenderer::self()->renderElement(ThemeRenderer::BlackStoneTransparent, m_stonePixmapSize);
288  }
289  emit cursorPixmapChanged(map);
290  }
291  } else {
292  m_placementMarkerItem->setVisible(false);
293  emit cursorPixmapChanged(map);
294  }
295 }
296 
297 void GameScene::mousePressEvent(QGraphicsSceneMouseEvent *event)
298 {
299  if (m_mouseRect.contains(event->scenePos())) {
300  int row = static_cast<int>((event->scenePos().x() - m_mouseRect.x()) / m_cellSize);
301  int col = static_cast<int>((event->scenePos().y() - m_mouseRect.y()) / m_cellSize);
302  if (row < 0 || row >= m_boardSize || col < 0 || col >= m_boardSize) {
303  return;
304  }
305 
306  // Convert to Go board coordinates and try to play the move. GnuGo coordinates don't use the 'I'
307  // column, if the row is bigger than 'I', we have to add 1 to jump over that.
308  if (row >= 8) {
309  row += 1;
310  }
311  m_game->playMove(m_game->currentPlayer(), Stone('A' + row, m_boardSize - col));
312  }
313 }
314 
315 void GameScene::drawBackground(QPainter *painter, const QRectF &)
316 {
317  ThemeRenderer::self()->renderElement(ThemeRenderer::Background, painter, sceneRect());
318  ThemeRenderer::self()->renderElement(ThemeRenderer::Board, painter, m_boardRect);
319 
320  int width = m_cellSize / 16;
321  QColor color = QColor(20, 30, 20);
322  painter->setPen(QPen(color, width));
323 
324  for (int i = 0; i < m_boardSize; i++) {
325  qreal offset = i * m_cellSize;
326  painter->drawLine(QPointF(m_gridRect.left(), m_gridRect.top() + offset),
327  QPointF(m_gridRect.right(), m_gridRect.top() + offset));
328  painter->drawLine(QPointF(m_gridRect.left() + offset, m_gridRect.top()),
329  QPointF(m_gridRect.left() + offset, m_gridRect.bottom()));
330 
331  if (m_showLabels) {
332  QChar c('A' + i);
333  // GnuGo does not use the 'I' column (for whatever strange reason), we have to skip that too
334  if (i >= 8) {
335  c = QChar('A' + i + 1);
336  }
337 
338  QString n = QString::number(m_boardSize - i);
339  QFont f = painter->font();
340  f.setPointSizeF(m_cellSize / 4);
341  painter->setFont(f);
342  QFontMetrics fm = painter->fontMetrics();
343 
344  // Draw vertical numbers for board coordinates
345  qreal yVert = m_gridRect.top() + offset + fm.descent();
346  painter->drawText(QPointF(m_gridRect.left() - m_cellSize + 2, yVert), n);
347  painter->drawText(QPointF(m_gridRect.right() + m_cellSize - fm.width(n) - 3, yVert), n);
348 
349  // Draw horizontal characters for board coordinates
350  qreal xHor = m_gridRect.left() + offset - fm.width(c) / 2;
351  painter->drawText(QPointF(xHor, m_gridRect.top() - m_cellSize + fm.ascent() + 2), QString(c));
352  painter->drawText(QPointF(xHor, m_gridRect.bottom() + m_cellSize - 3), QString(c));
353  }
354  }
355 
356  // Draw thicker connections on some defined points.
357  // This is extremely helpful to orientate oneself especially on the 19x19 board.
358  int radius = m_cellSize / 10;
359  painter->setBrush(color);
360  painter->setRenderHint(QPainter::Antialiasing);
361 
362  // in order to center properly we need to take line width into account
363  // if the line has an odd width, we shift 1/5 pixel
364  qreal centerOffset = (width % 2) ? 0.5 : 0.0;
365 
366  // only do this for the common board sizes,
367  // other sizes are a bit odd anyway
368  int numDots = 0;
369  const int *dotPositions;
370 
371  if (m_boardSize == 9) {
372  numDots = 5;
373  dotPositions = dotPositions9;
374  } else if (m_boardSize == 13) {
375  numDots = 5;
376  dotPositions = dotPositions13;
377  } else if (m_boardSize == 19) {
378  numDots = 9;
379  dotPositions = dotPositions19;
380  }
381 
382  for (int i = 0; i < numDots; ++i) {
383  painter->drawEllipse(
384  QPointF(m_gridRect.left() + m_cellSize*dotPositions[i*2] + centerOffset,
385  m_gridRect.top() + m_cellSize*dotPositions[i*2+1] + centerOffset),
386  radius, radius);
387  }
388 }
389 
390 } // End of namespace Kigo
391 
392 #include "moc_gamescene.cpp"
QList::clear
void clear()
Kigo::dotPositions19
const int dotPositions19[]
Definition: gamescene.cpp:34
QFontMetrics::ascent
int ascent() const
Kigo::Game::finalStates
QList< Stone > finalStates(FinalState state)
Report fields with a specified final status in a finished game.
Definition: game.cpp:669
QGraphicsScene
QSize::width
int width() const
QGraphicsScene::itemAt
QGraphicsItem * itemAt(const QPointF &position) const
QPainter::setRenderHint
void setRenderHint(RenderHint hint, bool on)
QRectF::x
qreal x() const
QRectF::y
qreal y() const
Kigo::ThemeRenderer::WhiteStoneTransparent
Definition: themerenderer.h:64
QChar
QPainter::font
const QFont & font() const
QFont
Kigo::GameScene::GameScene
GameScene(Game *game, QObject *parent=0)
Definition: gamescene.cpp:36
QGraphicsScene::setSceneRect
void setSceneRect(const QRectF &rect)
QFontMetrics::descent
int descent() const
QRectF::top
qreal top() const
Kigo::Game::FinalBlackTerritory
The field belongs to the black player.
Definition: game.h:73
QGraphicsPixmapItem
QGraphicsSceneMouseEvent::scenePos
QPointF scenePos() const
QFontMetrics
Kigo::GameScene::cursorPixmapChanged
void cursorPixmapChanged(const QPixmap &)
game.h
QPainter::drawLine
void drawLine(const QLineF &line)
QGraphicsScene::height
qreal height() const
QRectF::left
qreal left() const
QGraphicsScene::addPixmap
QGraphicsPixmapItem * addPixmap(const QPixmap &pixmap)
QPointF
Kigo::Game::whitePlayer
Player & whitePlayer()
Definition: game.h:160
QRectF::bottom
qreal bottom() const
Kigo::GameScene::showTerritory
void showTerritory(bool show)
Definition: gamescene.cpp:112
QPainter::setFont
void setFont(const QFont &font)
Kigo::GameScene::showHint
void showHint(bool show)
Definition: gamescene.cpp:85
QString::number
QString number(int n, int base)
QList::append
void append(const T &value)
Kigo::ThemeRenderer::PlacementMarker
Definition: themerenderer.h:69
QGraphicsScene::removeItem
void removeItem(QGraphicsItem *item)
QObject
QPainter::setPen
void setPen(const QColor &color)
QPainter::drawEllipse
void drawEllipse(const QRectF &rectangle)
QGraphicsSceneMouseEvent
Kigo::Game::bestMoves
QList< Stone > bestMoves(const Player &player)
Generate a list of the best moves for a player with weights.
Definition: game.cpp:593
QGraphicsItem::setPos
void setPos(const QPointF &pos)
QPainter
QString::isEmpty
bool isEmpty() const
Kigo::GameScene::resizeScene
void resizeScene(int width, int height)
Definition: gamescene.cpp:53
QPainter::setBrush
void setBrush(const QBrush &brush)
QPainter::drawText
void drawText(const QPointF &position, const QString &text)
Kigo::Game::stones
QList< Stone > stones(const Player &player)
Returns a list of all stones of that player on the board.
Definition: game.cpp:531
QString
themerenderer.h
QtConcurrent::map
QFuture< void > map(Sequence &sequence, MapFunction function)
QColor
gamescene.h
Kigo::Player
The Player class holds all basic attributes of a Go player.
Definition: player.h:36
QPixmap
QRectF::right
qreal right() const
QSize
preferences.h
QFontMetrics::width
int width(const QString &text, int len) const
Kigo::GameScene::showPlacementMarker
void showPlacementMarker(bool show)
Definition: gamescene.cpp:97
Kigo::Game::FinalWhiteTerritory
The field belongs to the white player.
Definition: game.h:72
QFont::setPointSizeF
void setPointSizeF(qreal pointSize)
Kigo::Game::blackPlayer
Player & blackPlayer()
Definition: game.h:162
Kigo::GameScene::showMoveNumbers
void showMoveNumbers(bool show)
Definition: gamescene.cpp:91
Kigo::ThemeRenderer::Board
Definition: themerenderer.h:61
Kigo::ThemeRenderer::WhiteTerritory
Definition: themerenderer.h:65
Kigo::Player::isHuman
bool isHuman() const
Definition: player.h:74
QRectF::width
qreal width() const
Kigo::Game::moves
QList< Move > moves(const Player &player)
Returns a list of all moves by that player.
Definition: game.cpp:558
Kigo::ThemeRenderer::BlackTerritory
Definition: themerenderer.h:68
Kigo::Player::isBlack
bool isBlack() const
Definition: player.h:72
QRectF
Kigo::ThemeRenderer::self
static ThemeRenderer * self()
Only one ThemeRenderer is needed per application, this method returns the singleton self...
Definition: themerenderer.h:78
QPainter::fontMetrics
QFontMetrics fontMetrics() const
Kigo::ThemeRenderer::BlackStone
Definition: themerenderer.h:66
Kigo::Game::currentPlayer
Player & currentPlayer()
Definition: game.h:158
QSize::height
int height() const
QGraphicsPixmapItem::setPixmap
void setPixmap(const QPixmap &pixmap)
QGraphicsScene::invalidate
void invalidate(qreal x, qreal y, qreal w, qreal h, QFlags< QGraphicsScene::SceneLayer > layers)
Kigo::dotPositions9
const int dotPositions9[]
Definition: gamescene.cpp:32
QGraphicsPixmapItem::pixmap
QPixmap pixmap() const
QGraphicsItem::setVisible
void setVisible(bool visible)
QPen
Kigo::ThemeRenderer::WhiteStone
Definition: themerenderer.h:63
QRectF::adjusted
QRectF adjusted(qreal dx1, qreal dy1, qreal dx2, qreal dy2) const
Kigo::dotPositions13
const int dotPositions13[]
Definition: gamescene.cpp:33
QRectF::contains
bool contains(const QPointF &point) const
QRectF::setRect
void setRect(qreal x, qreal y, qreal width, qreal height)
Kigo::Game
The Game class implements the Go game and acts as a wrapper around a remote Go Game game implementing...
Definition: game.h:60
Preferences
Definition: preferences.h:9
Kigo::ThemeRenderer::renderElement
void renderElement(Element element, QPainter *painter, const QRectF &rect) const
Renders a specific element of the current SVG theme.
Definition: themerenderer.cpp:86
QGraphicsScene::addItem
void addItem(QGraphicsItem *item)
QObject::connect
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
Kigo::Player::isWhite
bool isWhite() const
Definition: player.h:71
Kigo::Game::playMove
bool playMove(const Move &move, bool undoable=true)
Definition: game.cpp:275
Kigo::GameScene::showLabels
void showLabels(bool show)
Definition: gamescene.cpp:79
QPixmap::rect
QRect rect() const
QGraphicsItem::setZValue
void setZValue(qreal z)
Kigo::ThemeRenderer::Background
Definition: themerenderer.h:60
Kigo::GameScene::showMessage
void showMessage(const QString &message, int msecs=2000)
Definition: gamescene.cpp:102
QGraphicsScene::width
qreal width() const
Kigo::ThemeRenderer::BlackStoneTransparent
Definition: themerenderer.h:67
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:18:29 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kigo

Skip menu "kigo"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdegames API Reference

Skip menu "kdegames API Reference"
  • granatier
  • kapman
  • kblackbox
  • kgoldrunner
  • kigo
  • kmahjongg
  • KShisen
  • ksquares
  • libkdegames
  •   highscore
  •   libkdegamesprivate
  •     kgame
  • libkmahjongg
  • palapeli
  •   libpala

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal