LeechCraft
0.6.70-18450-gabe19ee3b0
Modular cross-platform feature rich live environment.
Toggle main menu visibility
Loading...
Searching...
No Matches
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>
11
#include <
interfaces/core/icolorthememanager.h
>
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
QByteArray& group,
const
QByteArray& color)
const
32
{
33
return
Manager_->
GetQMLColor
(group, color);
34
}
35
}
IColorThemeManager
Proxy class to the color theme management engine.
Definition
icolorthememanager.h:18
IColorThemeManager::GetQObject
virtual QObject * GetQObject()=0
Returns the manager as a QObject.
IColorThemeManager::GetQMLColor
virtual QColor GetQMLColor(const QByteArray §ion, const QByteArray &key)=0
Returns the color for the given QML section and key.
LC::Util::ColorThemeProxy::colorsChanged
void colorsChanged()
Emitted when the color theme changes.
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:15
LC::Util::ColorThemeProxy::setAlpha
QColor setAlpha(QColor color, qreal alpha)
Returns the color with the alpha channel set to the given value.
Definition
colorthemeproxy.cpp:25
colorthemeproxy.h
icolorthememanager.h
LC::Util
Definition
icoreproxy.h:34
src
util
qml
colorthemeproxy.cpp
Generated by
1.17.0