Plasma
desktopthemedetails.h
Go to the documentation of this file.00001 /* 00002 Copyright (c) 2007 Paolo Capriotti <p.capriotti@gmail.com> 00003 Copyright (c) 2008 by Petri Damsten <damu@iki.fi> 00004 00005 This program is free software; you can redistribute it and/or modify 00006 it under the terms of the GNU General Public License as published by 00007 the Free Software Foundation; either version 2 of the License, or 00008 (at your option) any later version. 00009 */ 00010 00011 #ifndef DESKTOPTHEMEDETAILS_H 00012 #define DESKTOPTHEMEDETAILS_H 00013 00014 #include <kcmodule.h> 00015 #include "ui_DesktopThemeDetails.h" 00016 00017 namespace Plasma { 00018 class Containment; 00019 class View; 00020 } 00021 class ThemeModel; 00022 class QStandardItemModel; 00023 00024 class DesktopThemeDetails : public KCModule, public Ui::DesktopThemeItems 00025 { 00026 Q_OBJECT 00027 public: 00028 DesktopThemeDetails(QWidget* parent, const QVariantList &args); 00029 ~DesktopThemeDetails(); 00030 00031 void reloadConfig(); 00032 00033 public slots: 00034 void replacementItemChanged(); 00035 void resetThemeDetails(); 00036 void toggleAdvancedVisible(); 00037 void save(); 00038 void removeTheme(); 00039 void exportTheme(); 00040 00041 private: 00042 void updateReplaceItemList(const QString& item); 00043 void loadThemeItems(); 00044 bool isCustomized(const QString& theme); 00045 void clearCustomized(); 00046 00047 private slots: 00048 void getNewThemes(); 00049 void cleanup(); 00050 00051 private: 00052 ThemeModel* m_themeModel; 00053 QStandardItemModel* m_containmentModel; 00054 Plasma::View* m_view; 00055 Plasma::Containment* m_containment; 00056 QHash<QString, QString> m_themeItems; 00057 QHash<QString, QString> m_themeReplacements; 00058 QHash<QString, QString> m_dropListFiles; 00059 bool m_themeCustomized; 00060 QString m_baseTheme; 00061 }; 00062 00063 #endif // DESKTOPTHEMEDETAILS_H