/*************************************************************************** * Copyright (C) 2005 by Tavarez Arnaud Bakoula * * tbakoula@yahoo.fr * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ #ifndef UTILITIES_H #define UTILITIES_H #include #include #include #include #include #include #define MAXCOLORS 8 enum Color { None=-1, ///< The piece is not defined so there's no color. Red=0, ///< The color is set to red Yellow, ///< The color is set to yellow Green, ///< The color is set to green Blue, ///< The color is set to blue Black, ///< The color is set to black Violet, ///< The color is set to violet Grey, ///< The color is set to grey Orange, ///< The color is set to orange Pink, ///< The color is set to pink Shade ///< The color is set to shade }; enum Level { NOVICE = 0, MEDIUM, EXPERT }; enum State { MISPLACED = 0, PLACED, ABSENT }; enum Mode { Standard=0, Cpu, Human }; typedef struct Score { QString value; QString name; QString lvl; QString tries; }; QPixmap colorToPixmap( int color ); QPixmap stateToPixmap( int state ); QString colorToString( Color c ), levelToString( Level l ), stateToString( State l ); extern class KIconLoader* theIconLoader; extern uint icon_res; #endif // UTILITIES_H