remove old files add new sources
[mancala] / src / ThemeManager.cpp
1 /*
2 Mancala - A Historical Board Game
3 Copyright (C) 2009-2010 A.H.M.Mahfuzur Rahman 65mahfuz90@gmail.com
4 Copyright (c) 2010 Reto Zingg g.d0b3rm4n@gmail.com
5
6 This program is free software; you can redistribute it and/or
7 modify it under the terms of the GNU General Public License as
8 published by the Free Software Foundation; either version 2 of
9 the License, or (at your option) any later version.
10
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with this program.  If not, see <http://www.gnu.org/licenses/>.
18 */
19
20 #include "ThemeManager.h"
21
22 // #include "kdebug.h"
23 // #include "kstandarddirs.h"
24
25 ThemeManager::ThemeManager(QString str) : QSvgRenderer(str){
26
27   m_currentTheme = str;
28
29 }
30
31 const QString& ThemeManager::current() const{
32   return m_currentTheme;
33 }
34
35 void ThemeManager::setTheme(QString str){
36     m_currentTheme = QString("/opt/mancala/data/themes/theme_%1.svg").arg(str);
37 }
38
39 void ThemeManager::slotLoadTheme(){
40     load(m_currentTheme);
41
42 }
43
44