2011-09-11 19:15:06 +02:00
|
|
|
#ifndef THEMEMANAGER_H
|
|
|
|
#define THEMEMANAGER_H
|
|
|
|
|
|
|
|
#include <QWidget>
|
|
|
|
#include <QSettings>
|
|
|
|
#include <QDir>
|
|
|
|
#include <QListWidgetItem>
|
|
|
|
#include <QHash>
|
2011-09-18 15:35:44 +02:00
|
|
|
#include <QTextBrowser>
|
2011-09-11 19:15:06 +02:00
|
|
|
|
|
|
|
namespace Ui {
|
|
|
|
class ThemeManager;
|
|
|
|
}
|
|
|
|
|
|
|
|
class ThemeManager : public QWidget
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
explicit ThemeManager(QWidget* parent);
|
|
|
|
~ThemeManager();
|
|
|
|
|
|
|
|
void save();
|
|
|
|
|
|
|
|
private slots:
|
|
|
|
void currentChanged();
|
2011-09-18 15:35:44 +02:00
|
|
|
void showLicense();
|
2011-09-11 19:15:06 +02:00
|
|
|
|
|
|
|
private:
|
|
|
|
struct Theme {
|
|
|
|
bool isValid;
|
|
|
|
QIcon icon;
|
|
|
|
QString name;
|
|
|
|
QString author;
|
|
|
|
QString shortDescription;
|
|
|
|
QString longDescription;
|
2011-09-18 15:35:44 +02:00
|
|
|
QString license;
|
2011-09-11 19:15:06 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
Theme parseTheme(const QString &name);
|
|
|
|
|
|
|
|
Ui::ThemeManager *ui;
|
|
|
|
QString m_activeTheme;
|
|
|
|
QHash<QString, Theme> m_themeHash;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // THEMEMANAGER_H
|