LeechCraft  0.6.70-15082-g543737046d
Modular cross-platform feature rich live environment.
colorthemeproxy.cpp
Go to the documentation of this file.
1 /**********************************************************************
2  * LeechCraft - modular cross-platform feature rich internet client.
3  * Copyright (C) 2006-2014 Georg Rudoy
4  *
5  * Distributed under the Boost Software License, Version 1.0.
6  * (See accompanying file LICENSE or copy at https://www.boost.org/LICENSE_1_0.txt)
7  **********************************************************************/
8 
9 #include "colorthemeproxy.h"
10 #include <QtDebug>
12 
13 namespace LC::Util
14 {
15  ColorThemeProxy::ColorThemeProxy (IColorThemeManager *manager, QObject *parent)
16  : QObject (parent)
17  , Manager_ (manager)
18  {
19  connect (manager->GetQObject (),
20  SIGNAL (themeChanged ()),
21  this,
22  SIGNAL (colorsChanged ()));
23  }
24 
25  QColor ColorThemeProxy::setAlpha (QColor color, qreal alpha)
26  {
27  color.setAlphaF (alpha);
28  return color;
29  }
30 
31  QColor ColorThemeProxy::GetColor (const QString& group, const QString& color) const
32  {
33  return Manager_->GetQMLColor (group, color);
34  }
35 }
icolorthememanager.h
LC::Util
Definition: icoreproxy.h:33
IColorThemeManager::GetQObject
virtual QObject * GetQObject()=0
Returns the manager as a QObject.
LC::Util::ColorThemeProxy::ColorThemeProxy
ColorThemeProxy(IColorThemeManager *manager, QObject *parent)
Constructs the color theme proxy with the given color manager and parent object.
Definition: colorthemeproxy.cpp:21
colorthemeproxy.h
IColorThemeManager
Proxy class to the color theme management engine.
Definition: icolorthememanager.h:17