LeechCraft  0.6.70-16373-g319c272718
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 {
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 QByteArray& group, const QByteArray& color) const
32  {
33  return Manager_->GetQMLColor (group, color);
34  }
35 }
virtual QObject * GetQObject()=0
Returns the manager as a QObject.
QColor setAlpha(QColor color, qreal alpha)
Returns the color with the alpha channel set to the given value.
void colorsChanged()
Emitted when the color theme changes.
Proxy class to the color theme management engine.
ColorThemeProxy(IColorThemeManager *manager, QObject *parent)
Constructs the color theme proxy with the given color manager and parent object.
virtual QColor GetQMLColor(const QByteArray &section, const QByteArray &key)=0
Returns the color for the given QML section and key.