1 /* 2 * Copyright (C) 2010 Parker Coates <coates@kde.org> 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) any later version. 8 * 9 * This program 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. 13 * 14 * You should have received a copy of the GNU General Public License 15 * along with this program. If not, see <http://www.gnu.org/licenses/>. 16 */ 17 18 #ifndef MESSAGEBOX_H 19 #define MESSAGEBOX_H 20 21 // KDEGames 22 #include <KGameRenderedItem> 23 // Qt 24 #include <QFont> 25 26 27 class MessageBox : public KGameRenderedItem 28 { 29 public: 30 MessageBox(); 31 32 void setMessage( const QString & message ); 33 QString message() const; 34 35 void setSize( const QSize & size ); 36 QSize size() const; 37 38 void paint( QPainter * painter, const QStyleOptionGraphicsItem * option, QWidget * widget ) override; 39 40 private: 41 QString m_message; 42 QFont m_font; 43 bool m_fontCached; 44 }; 45 46 #endif 47