/* Copyright (c) 2007 Paolo Capriotti Copyright (c) 2008 by Petri Damsten This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. */ #ifndef DESKTOPTHEMEDETAILS_H #define DESKTOPTHEMEDETAILS_H #include "ui_DesktopThemeDetails.h" #include class ThemeModel; class DesktopThemeDetails : public QWidget, public Ui::DesktopThemeItems { Q_OBJECT public: DesktopThemeDetails(QWidget* parent); ~DesktopThemeDetails(); void reloadConfig(); public slots: void replacementItemChanged(); void resetThemeDetails(); void toggleAdvancedVisible(); void save(); void removeTheme(); void exportTheme(); void newThemeInfoChanged(); Q_SIGNALS: void changed(); private: void updateReplaceItemList(const int item); void loadThemeItems(); QString displayedItemText(int item); bool isCustomized(const QString &theme); void clearCustomized(const QString &themeRoot); void setDesktopTheme(QString themeRoot); private slots: void cleanup(); void themeSelectionChanged(const QItemSelection newSelection, const QItemSelection oldSelection); private: ThemeModel* m_themeModel; QHash m_items; // theme items QHash m_itemPaths; // theme item paths QHash m_itemIcons; //theme item icons QHash m_themes; // installed themes QHash m_themeRoots; // installed themes root paths QHash m_itemThemeReplacements; // source theme for item replacements QHashm_itemFileReplacements; //non-theme source files for item replacements bool m_themeCustomized; QString m_baseTheme; }; #endif // DESKTOPTHEMEDETAILS_H