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