LeechCraft
0.6.70-15082-g543737046d
Modular cross-platform feature rich live environment.
|
Proxy for QML files to use colors from current color theme. More...
#include "colorthemeproxy.h"
Public Slots | |
QColor | setAlpha (QColor color, qreal alpha) |
Returns the color with the alpha channel set to the given value. More... | |
Signals | |
void | colorsChanged () |
Emitted when the color theme changes. More... | |
Proxy for QML files to use colors from current color theme.
LeechCraft has a concept of color themes which allows to have a consistent look for different plugins and components, both based on good old QWidgets and for new QML ones. This class provides easy access for the current and up-to-date values of colors of the current current color theme via its properties. Property binding in QML allows one to automatically handle color theme changes and updated without recreating the components.
This class should be used as following:
The first two steps are as easy as following:
Here the color theme proxy object is added by the "colorProxy" name.
Using the added object is pretty easy too:
The colors can also be used in the states and dynamic elements, for example:
Good examples of color proxy usage are in LMP and SB2 plugins, for example.
This class uses IColorThemeManager internally. The section and key of IColorThemeManager::GetQMLColor() form the name of the properties in this class in the form of color_section_key.
Definition at line 105 of file colorthemeproxy.h.
LC::Util::ColorThemeProxy::ColorThemeProxy | ( | IColorThemeManager * | manager, |
QObject * | parent | ||
) |
Constructs the color theme proxy with the given color manager and parent object.
[in] | manager | The color manager to use. |
[in] | parent | The parent object of the proxy. |
Definition at line 21 of file colorthemeproxy.cpp.
|
signal |
Emitted when the color theme changes.
This signal can be used to be notified of the properties changes.
|
inline |
Definition at line 193 of file colorthemeproxy.h.
|
inline |
Definition at line 194 of file colorthemeproxy.h.
|
inline |
Definition at line 192 of file colorthemeproxy.h.
|
inline |
Definition at line 176 of file colorthemeproxy.h.
|
inline |
Definition at line 177 of file colorthemeproxy.h.
|
inline |
Definition at line 178 of file colorthemeproxy.h.
|
inline |
Definition at line 170 of file colorthemeproxy.h.
|
inline |
Definition at line 169 of file colorthemeproxy.h.
|
inline |
Definition at line 173 of file colorthemeproxy.h.
|
inline |
Definition at line 172 of file colorthemeproxy.h.
|
inline |
Definition at line 171 of file colorthemeproxy.h.
|
inline |
Definition at line 175 of file colorthemeproxy.h.
|
inline |
Definition at line 174 of file colorthemeproxy.h.
|
inline |
Definition at line 168 of file colorthemeproxy.h.
|
inline |
Definition at line 164 of file colorthemeproxy.h.
|
inline |
Definition at line 165 of file colorthemeproxy.h.
|
inline |
Definition at line 166 of file colorthemeproxy.h.
|
inline |
Definition at line 161 of file colorthemeproxy.h.
|
inline |
Definition at line 163 of file colorthemeproxy.h.
|
inline |
Definition at line 162 of file colorthemeproxy.h.
|
inline |
Definition at line 160 of file colorthemeproxy.h.
|
inline |
Definition at line 182 of file colorthemeproxy.h.
|
inline |
Definition at line 181 of file colorthemeproxy.h.
|
inline |
Definition at line 188 of file colorthemeproxy.h.
|
inline |
Definition at line 187 of file colorthemeproxy.h.
|
inline |
Definition at line 186 of file colorthemeproxy.h.
|
inline |
Definition at line 189 of file colorthemeproxy.h.
|
inline |
Definition at line 185 of file colorthemeproxy.h.
|
inline |
Definition at line 184 of file colorthemeproxy.h.
|
inline |
Definition at line 183 of file colorthemeproxy.h.
|
inline |
Definition at line 190 of file colorthemeproxy.h.
|
inline |
Definition at line 180 of file colorthemeproxy.h.
|
slot |
Returns the color with the alpha channel set to the given value.
[in] | color | The color whose alpha value should be changed. |
[in] | alpha | The new alpha value. 0 is fully transparent, 1 is fully opaque. |
Definition at line 31 of file colorthemeproxy.cpp.
|
read |
Definition at line 193 of file colorthemeproxy.h.
|
read |
Definition at line 194 of file colorthemeproxy.h.
|
read |
Definition at line 192 of file colorthemeproxy.h.
|
read |
Definition at line 176 of file colorthemeproxy.h.
|
read |
Definition at line 177 of file colorthemeproxy.h.
|
read |
Definition at line 178 of file colorthemeproxy.h.
|
read |
Definition at line 170 of file colorthemeproxy.h.
|
read |
Definition at line 169 of file colorthemeproxy.h.
|
read |
Definition at line 173 of file colorthemeproxy.h.
|
read |
Definition at line 172 of file colorthemeproxy.h.
|
read |
Definition at line 171 of file colorthemeproxy.h.
|
read |
Definition at line 175 of file colorthemeproxy.h.
|
read |
Definition at line 174 of file colorthemeproxy.h.
|
read |
Definition at line 168 of file colorthemeproxy.h.
|
read |
Definition at line 164 of file colorthemeproxy.h.
|
read |
Definition at line 165 of file colorthemeproxy.h.
|
read |
Definition at line 166 of file colorthemeproxy.h.
|
read |
Definition at line 161 of file colorthemeproxy.h.
|
read |
Definition at line 163 of file colorthemeproxy.h.
|
read |
Definition at line 162 of file colorthemeproxy.h.
|
read |
Definition at line 160 of file colorthemeproxy.h.
|
read |
Definition at line 182 of file colorthemeproxy.h.
|
read |
Definition at line 181 of file colorthemeproxy.h.
|
read |
Definition at line 188 of file colorthemeproxy.h.
|
read |
Definition at line 187 of file colorthemeproxy.h.
|
read |
Definition at line 186 of file colorthemeproxy.h.
|
read |
Definition at line 189 of file colorthemeproxy.h.
|
read |
Definition at line 185 of file colorthemeproxy.h.
|
read |
Definition at line 184 of file colorthemeproxy.h.
|
read |
Definition at line 183 of file colorthemeproxy.h.
|
read |
Definition at line 190 of file colorthemeproxy.h.
|
read |
Definition at line 180 of file colorthemeproxy.h.