2 This file is part of SloppyGUI.
4 SloppyGUI is free software: you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation, either version 3 of the License, or
7 (at your option) any later version.
9 SloppyGUI is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with SloppyGUI. If not, see <http://www.gnu.org/licenses/>.
18 #ifndef GRAPHICSCHESSPIECE_H
19 #define GRAPHICSCHESSPIECE_H
21 #include <QGraphicsSvgItem>
22 #include "chessboard/chessboard.h"
24 class GraphicsChessPiece
: public QGraphicsSvgItem
29 GraphicsChessPiece(Chessboard::ChessSide side
,
30 Chessboard::ChessPiece piece
,
31 QGraphicsItem
* parent
= 0);
33 Chessboard::ChessSide
side() const;
34 Chessboard::ChessPiece
piece() const;
36 void setPiece(Chessboard::ChessPiece piece
);
37 void centerOnParent();
40 Chessboard::ChessSide m_side
;
41 Chessboard::ChessPiece m_piece
;
45 #endif // GRAPHICSCHESSPIECE_H