matrixion/src/ui/ThemeManager.cc

23 lines
346 B
C++
Raw Normal View History

2017-04-06 02:06:42 +03:00
#include <QFontDatabase>
#include "ThemeManager.h"
ThemeManager::ThemeManager()
{
2017-09-10 12:59:21 +03:00
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
}