1/*
2 * Copyright 2007-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
19#ifndef RENDERER_H
20#define RENDERER_H
21
22#include <KGameRenderer>
23
24class QSize;
25class QString;
26#include <QtCore/Qt>
27class QColor;
28class QPixmap;
29
30
31class Renderer : public KGameRenderer
32{
33public:
34 static Renderer * self();
35 static void deleteSelf();
36
37 qreal aspectRatioOfElement( const QString & elementId );
38 QColor colorOfElement( const QString & elementId );
39
40private:
41 Renderer();
42
43 static Renderer * s_instance;
44
45 QHash<QString,QColor> m_colors;
46 QByteArray m_cachedTheme;
47
48 friend class RendererPrivate;
49};
50
51
52#endif
53