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/>.
23 #include "chessboard/chessboard.h"
26 * Symbols class provides chess symbols found in the Unicode character set.
31 /** Symbol of black pawn. */
32 static const QString BlackPawn
;
33 /** Symbol of black rook. */
34 static const QString BlackRook
;
35 /** Symbol of black knight. */
36 static const QString BlackKnight
;
37 /** Symbol of black bishop. */
38 static const QString BlackBishop
;
39 /** Symbol of black queen. */
40 static const QString BlackQueen
;
41 /** Symbol of black king. */
42 static const QString BlackKing
;
44 /** Symbol of white pawn. */
45 static const QString WhitePawn
;
46 /** Symbol of white rook. */
47 static const QString WhiteRook
;
48 /** Symbol of white knight. */
49 static const QString WhiteKnight
;
50 /** Symbol of white bishop. */
51 static const QString WhiteBishop
;
52 /** Symbol of white queen. */
53 static const QString WhiteQueen
;
54 /** Symbol of white king. */
55 static const QString WhiteKing
;
58 * Returns a symbol of given side and piece type.
59 * @param side The side of the wanted symbol.
60 * @param piece The piece type of the wanted symbol.
61 * @return The symbol of the given side and piece type. If the given
62 * values are invalid an empty string is returned.
64 static QString
symbolOf(Chessboard::ChessSide side
, Chessboard::ChessPiece piece
);
67 * Returns a symbol of given side and piece type.
68 * The piece type is given as a single character. The mappings to
78 * Uppercase and lowercase letters give same results.
79 * @param side The side of the wanted symbol.
80 * @param piece The piece type of the wanted symbol (as a single
82 * @return The symbol of the given side and piece type. If the given
83 * values are invalid an empty string is returned.
85 static QString
symbolOf(Chessboard::ChessSide side
, const QChar
& piece
);