2017-04-06 01:06:42 +02:00
|
|
|
#include <QFontDatabase>
|
|
|
|
|
|
|
|
#include "ThemeManager.h"
|
|
|
|
|
|
|
|
ThemeManager::ThemeManager()
|
|
|
|
{
|
|
|
|
setTheme(new Theme);
|
|
|
|
}
|
|
|
|
|
2017-08-20 12:47:22 +02:00
|
|
|
void
|
|
|
|
ThemeManager::setTheme(Theme *theme)
|
2017-04-06 01:06:42 +02:00
|
|
|
{
|
|
|
|
theme_ = theme;
|
|
|
|
theme_->setParent(this);
|
|
|
|
}
|
|
|
|
|
2017-08-20 12:47:22 +02:00
|
|
|
QColor
|
|
|
|
ThemeManager::themeColor(const QString &key) const
|
2017-04-06 01:06:42 +02:00
|
|
|
{
|
|
|
|
Q_ASSERT(theme_);
|
|
|
|
return theme_->getColor(key);
|
|
|
|
}
|