1 /*
2 Copyright 2010-2012 Sergey Levin
3 
4 
5 This file is part of crosti.
6 
7 Crosti is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11 
12 Crosti is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 GNU General Public License for more details.
16 
17 You should have received a copy of the GNU General Public License
18 along with crosti.  If not, see <http://www.gnu.org/licenses/>.
19 */
20 
21 
22 #ifndef THEME_H
23 #define THEME_H
24 
25 #include <QString>
26 
27 class Theme
28 {
29  public:
30    Theme();
31 
name()32    QString name()const{return _name;}
btnStyle()33    QString btnStyle()const{return _btnStyle;}
lineeditStyle()34    QString lineeditStyle()const{return _lineeditStyle;}
progressbarStyle()35    QString progressbarStyle()const{return _progressbarStyle;}
menuStyle()36    QString menuStyle()const{return _menuStyle;}
spinboxStyle()37    QString spinboxStyle()const{return _spinboxStyle;}
groupboxStyle()38    QString groupboxStyle()const{return _groupboxStyle;}
widgetStyle()39    QString widgetStyle()const{return _widgetStyle;}
40 
currentTheme()41    static Theme currentTheme(){
42      return Theme();
43    }
44 
45 
46  private:
47 
48    void load(const QString &name="");
49 
50    QString loadStyle(const QString &name);
51 
52    QString _name;
53    QString _btnStyle,
54            _groupboxStyle,
55            _lineeditStyle,
56            _progressbarStyle,
57            _menuStyle,
58            _spinboxStyle,
59            _widgetStyle;
60 
61 
62  };
63 
64 
65 #endif // THEME_H
66