~ubuntu-branches/ubuntu/utopic/kde-workspace/utopic-proposed

« back to all changes in this revision

Viewing changes to kcontrol/desktoptheme/desktopthemedetails.h

  • Committer: Bazaar Package Importer
  • Author(s): Michał Zając
  • Date: 2011-07-09 08:31:15 UTC
  • Revision ID: james.westby@ubuntu.com-20110709083115-ohyxn6z93mily9fc
Tags: upstream-4.6.90
Import upstream version 4.6.90

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
  Copyright (c) 2007 Paolo Capriotti <p.capriotti@gmail.com>
 
3
  Copyright (c) 2008 by Petri Damsten <damu@iki.fi>
 
4
 
 
5
  This program is free software; you can redistribute it and/or modify
 
6
  it under the terms of the GNU General Public License as published by
 
7
  the Free Software Foundation; either version 2 of the License, or
 
8
  (at your option) any later version.
 
9
*/
 
10
 
 
11
#ifndef DESKTOPTHEMEDETAILS_H
 
12
#define DESKTOPTHEMEDETAILS_H
 
13
 
 
14
#include "ui_DesktopThemeDetails.h"
 
15
 
 
16
#include <QtGui/QWidget>
 
17
 
 
18
class ThemeModel;
 
19
 
 
20
class DesktopThemeDetails : public QWidget, public Ui::DesktopThemeItems
 
21
{
 
22
    Q_OBJECT
 
23
public:
 
24
    DesktopThemeDetails(QWidget* parent);
 
25
    ~DesktopThemeDetails();
 
26
 
 
27
    void reloadConfig();
 
28
 
 
29
public slots:
 
30
    void replacementItemChanged();
 
31
    void resetThemeDetails();
 
32
    void toggleAdvancedVisible();
 
33
    void save();
 
34
    void removeTheme();
 
35
    void exportTheme();
 
36
    void newThemeInfoChanged();
 
37
 
 
38
Q_SIGNALS:
 
39
    void changed();
 
40
 
 
41
private:
 
42
    void updateReplaceItemList(const int& item);
 
43
    void loadThemeItems();
 
44
    QString displayedItemText(int item);
 
45
    bool isCustomized(const QString& theme);
 
46
    void clearCustomized(const QString& themeRoot);
 
47
    void setDesktopTheme(QString themeRoot);
 
48
 
 
49
private slots:
 
50
    void cleanup();
 
51
    void themeSelectionChanged(const QItemSelection newSelection, const QItemSelection oldSelection);
 
52
 
 
53
private:
 
54
    ThemeModel* m_themeModel;
 
55
 
 
56
    QHash<QString, int> m_items; // theme items
 
57
    QHash<int, QString> m_itemPaths; // theme item paths
 
58
    QHash<int, QString> m_itemIcons; //theme item icons
 
59
    QHash<QString, int> m_themes; // installed themes
 
60
    QHash<int, QString> m_themeRoots; // installed themes root paths
 
61
    QHash<int, int> m_itemThemeReplacements; // source theme for item replacements
 
62
    QHash<int, QString>m_itemFileReplacements; //non-theme source files for item replacements
 
63
 
 
64
    bool m_themeCustomized;
 
65
    QString m_baseTheme;
 
66
};
 
67
 
 
68
#endif // DESKTOPTHEMEDETAILS_H