matrixion/src/ui/ThemeManager.cc

23 lines
311 B
C++
Raw Normal View History

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