Warning, file /education/khangman/src/khmtheme.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001 /*************************************************************************** 0002 * Copyright (C) 2007-2010 Pino Toscano <pino@kde.org> * 0003 * Updated by Adam Rakowski <foo-script@o2.pl> (GSoC 2010) * 0004 * * 0005 * This program is free software; you can redistribute it and/or modify * 0006 * it under the terms of the GNU General Public License as published by * 0007 * the Free Software Foundation; either version 2 of the License, or * 0008 * (at your option) any later version. * 0009 * * 0010 * This program is distributed in the hope that it will be useful, * 0011 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 0012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 0013 * GNU General Public License for more details. * 0014 * * 0015 * You should have received a copy of the GNU General Public License * 0016 * along with this program; if not, write to the * 0017 * Free Software Foundation, Inc., * 0018 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * 0019 ***************************************************************************/ 0020 0021 #ifndef KHMTHEME_H 0022 #define KHMTHEME_H 0023 0024 #include <QPalette> 0025 0026 class KHMTheme 0027 { 0028 private: 0029 QString KHMname, KHMuiName, KHMsvgFileName, KHMauthor, KHMthemeVersion; 0030 QRect KHMwordRect, KHMhintRect, KHMkRect; 0031 QColor KHMletterColor, KHMguessButtonTextColor, KHMguessButtonColor, KHMguessButtonHoverColor, KHMletterInputTextColor; 0032 QPoint KHMgoodWordPos; 0033 0034 public: 0035 KHMTheme( const QString &name, const QString &uiName, const QString &svgFileName, const QString &author, const QString &themeVersion, 0036 QRect wordRect, QRect hintRect, QRect kRect, 0037 QColor letterColor, QColor guessButtonTextColor, QColor guessButtonColor, QColor guessButtonHoverColor, QColor letterInputTextColor, 0038 QPoint goodWordPos); 0039 0040 ///The name of theme as in the folder 0041 QString name() const { return KHMname; } 0042 ///The name of the theme in the menu 0043 QString uiName() const; 0044 ///Get the svg n22 the theme 0045 QString svgFileName() const { return KHMsvgFileName; } 0046 ///Set the position and size for drawing the word to guess 0047 QRect wordRect(const QSize& windowsize) const; 0048 0049 QRect hintRect(const QSize& windowsize) const; 0050 0051 ///Set the position and size for drawing the hanged K 0052 QRect kRect(const QSize& windowsize) const; 0053 ///Set the color for the word and the missed letters 0054 QColor letterColor() const { return KHMletterColor; } 0055 ///Set the color of the Guess word 0056 QColor guessButtonTextColor() const { return KHMguessButtonTextColor; } 0057 ///Set the color of the Guess button background 0058 QColor guessButtonColor() const { return KHMguessButtonColor; } 0059 ///Set the color of the Guess button background when the mouse is over it 0060 QColor guessButtonHoverColor() const { return KHMguessButtonHoverColor; } 0061 ///Set the color of the input text in the input widget 0062 QColor letterInputTextColor() const { return KHMletterInputTextColor; } 0063 ///Set the already guessed popup position 0064 QPoint goodWordPos(const QSize& windowsize, const QPoint& popupPos) const; 0065 //Find out who's the author 0066 QString getAuthor() const { return KHMauthor; } 0067 //Version is equal to a KHMTheme format version declared in XML file 0068 QString getThemeVersion() const { return KHMthemeVersion; } 0069 }; 0070 0071 #endif 0072 0073 // kate: space-indent on; tab-width 4; indent-width 4; mixed-indent off; replace-tabs on; 0074 // vim: set et sw=4 ts=4 cino=l1,cs,U1: 0075