~ubuntu-branches/ubuntu/raring/kde-gtk-config/raring

« back to all changes in this revision

Viewing changes to src/appearencegtk.h

  • Committer: Package Import Robot
  • Author(s): Boris Pek
  • Date: 2012-03-13 06:57:17 UTC
  • Revision ID: package-import@ubuntu.com-20120313065717-sewsgl7qiyvx7xg7
Tags: upstream-2.0
Import upstream version 2.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* KDE GTK Configuration Module
 
2
 * 
 
3
 * Copyright 2011 José Antonio Sanchez Reynaga <joanzare@gmail.com>
 
4
 * Copyright 2011 Aleix Pol Gonzalez <aleixpol@blue-systems.com>
 
5
 *
 
6
 * This library is free software; you can redistribute it and/or
 
7
 * modify it under the terms of the GNU Lesser General Public
 
8
 * License as published by the Free Software Foundation; either
 
9
 * version 2.1 of the License, or (at your option) version 3, or any
 
10
 * later version accepted by the membership of KDE e.V. (or its
 
11
 * successor approved by the membership of KDE e.V.), which shall
 
12
 * act as a proxy defined in Section 6 of version 3 of the license.
 
13
 * 
 
14
 * This library is distributed in the hope that it will be useful,
 
15
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
16
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
17
 * Lesser General Public License for more details.
 
18
 * 
 
19
 * You should have received a copy of the GNU Lesser General Public 
 
20
 * License along with this library.  If not, see <http://www.gnu.org/licenses/>.
 
21
 */
 
22
 
 
23
#ifndef APARIENCIAGTK_H
 
24
#define APARIENCIAGTK_H
 
25
 
 
26
#include <QString>
 
27
#include <QMap>
 
28
#include <qvector.h>
 
29
 
 
30
class AbstractAppearance;
 
31
/**
 
32
 * This class is responsible of administrating the GTK themes. It loads the 
 
33
 * configurations from the .gtkrc-2.0 file.
 
34
 */
 
35
class AppearenceGTK
 
36
{
 
37
public:
 
38
    AppearenceGTK();
 
39
 
 
40
    void setTheme(const QString&);
 
41
    void setThemeGtk3(const QString &theme);
 
42
    void setIcon(const QString&);
 
43
    void setIconFallback(const QString&);
 
44
    void setFont(const QString&);
 
45
    
 
46
    void setToolbarStyle(const QString&);
 
47
    void setShowIconsInMenus(const bool& show);
 
48
    void setShowIconsInButtons(const bool& show);
 
49
 
 
50
    QString getTheme() const;
 
51
    QString getThemeGtk3() const;
 
52
   
 
53
    QString getIcon() const;
 
54
    QString getFont() const;
 
55
    QString getIconFallback() const;
 
56
    QString getToolbarStyle() const;
 
57
    bool getShowIconsInMenus() const;
 
58
    bool getShowIconsInButtons() const;
 
59
    
 
60
    bool loadFileConfig();
 
61
    bool saveFileConfig();
 
62
    
 
63
    AbstractAppearance* gtk2Appearance() const { return m_app.first(); }
 
64
    AbstractAppearance* gtk3Appearance() const { return m_app.last(); }
 
65
private:
 
66
    QVector<AbstractAppearance*> m_app;
 
67
};
 
68
 
 
69
#endif // APARIENCIAGTK_H