kblackbox
kbbthememanager.h
Go to the documentation of this file.00001 // 00002 // KBlackBox 00003 // 00004 // A simple game inspired by an emacs module 00005 // 00006 /*************************************************************************** 00007 * Copyright (c) 2007, Nicolas Roffet * 00008 * nicolas-kde@roffet.com * 00009 * * 00010 * * 00011 * This program is free software; you can redistribute it and/or modify * 00012 * it under the terms of the GNU General Public License as published by * 00013 * the Free Software Foundation; either version 2 of the License, or * 00014 * (at your option) any later version. * 00015 * * 00016 * This program is distributed in the hope that it will be useful, * 00017 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 00018 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 00019 * GNU General Public License for more details. * 00020 * * 00021 * You should have received a copy of the GNU General Public License * 00022 * along with this program; if not, write to the * 00023 * Free Software Foundation, Inc., * 00024 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA * 00025 ***************************************************************************/ 00026 00027 00028 00029 #ifndef KBBTHEMEMANAGER_H 00030 #define KBBTHEMEMANAGER_H 00031 00032 00033 #include <QDomElement> 00034 class QString; 00035 00036 00037 #include <ksvgrenderer.h> 00038 00039 00040 #include "kbbscalablegraphicwidget.h" 00041 00042 00043 00051 class KBBThemeManager 00052 { 00053 public: 00060 KBBThemeManager(const QString &svgzFileName); 00061 00062 00069 QColor color(const KBBScalableGraphicWidget::itemType itemType); 00070 00080 QString elementId(const KBBScalableGraphicWidget::itemType itemType); 00081 00088 Qt::PenStyle style(const KBBScalableGraphicWidget::itemType itemType); 00089 00095 KSvgRenderer* svgRenderer(); 00096 00103 qreal width(const KBBScalableGraphicWidget::itemType itemType); 00104 00113 int zValue(const KBBScalableGraphicWidget::itemType itemType); 00114 00115 00116 private: 00133 QString value(const KBBScalableGraphicWidget::itemType itemType, const QString &styleElement); 00134 00138 QDomElement m_root; 00139 00145 KSvgRenderer m_svgRenderer; 00146 }; 00147 00148 #endif // KBBTHEMEMANAGER_H
KDE 4.0 API Reference