liblancelot
#include <Global.h>
Classes | |
class | ColorScheme |
Public Member Functions | |
void | add (QObject *object) |
const ColorScheme * | backgroundColor () const |
Plasma::FrameSvg * | backgroundSvg () const |
void | clearProperty (const QString &property) |
bool | contains (QObject *object) |
const ColorScheme * | foregroundColor () const |
bool | hasProperty (const QString &property) const |
void | load (bool full=false) |
QString | name () const |
void | notifyUpdated () |
QVariant | property (const QString &property) const |
void | remove (QObject *object, bool setDefaultGroup=true) |
void | setProperty (const QString &property, const QVariant &value, bool persistent=true) |
Detailed Description
Represents a group of object.
This is not a visual grouping of object. For that, see QGraphicsItem, QGraphicsWidget etc. documentation.
Lancelot::Group provides a mechanism for grouping objects semantically.
For example, if you want to have a couple of buttons that should change their appearances or behaviour simultaneously, you don't need to change the properties for each object, but only to notify the group object.
One of the examples where this is heavily used is the theming support in the Lancelot menu application.
Member Function Documentation
void Lancelot::Group::add | ( | QObject * | object | ) |
Adds object to the group.
- Parameters
-
object the object to add to the group
Definition at line 141 of file Global.cpp.
const Group::ColorScheme * Lancelot::Group::backgroundColor | ( | ) | const |
Background color is one of the common properties, so a direct function that accesses it is provided.
- Returns
- the background color scheme
Definition at line 204 of file Global.cpp.
Plasma::FrameSvg * Lancelot::Group::backgroundSvg | ( | ) | const |
Background SVG image is one of the common properties, so a direct function that accesses it is provided.
- Returns
- the pointer to Plasma::FrameSvg object
Definition at line 199 of file Global.cpp.
void Lancelot::Group::clearProperty | ( | const QString & | property | ) |
Clears the value of the specified property.
- Parameters
-
the name of the property
Definition at line 189 of file Global.cpp.
bool Lancelot::Group::contains | ( | QObject * | object | ) |
- Returns
- whether the groeup contains the specified object
- Parameters
-
object the object
Definition at line 297 of file Global.cpp.
const Group::ColorScheme * Lancelot::Group::foregroundColor | ( | ) | const |
Foreground color is one of the common properties, so a direct function that accesses it is provided.
- Returns
- the background color scheme
Definition at line 213 of file Global.cpp.
bool Lancelot::Group::hasProperty | ( | const QString & | property | ) | const |
- Parameters
-
the name of the property
- Returns
- whether this group has the specified property set
Definition at line 164 of file Global.cpp.
void Lancelot::Group::load | ( | bool | full = false | ) |
Loads the group properties from a configuration file.
if true, the group is reloaded even if it was already loaded before
Definition at line 218 of file Global.cpp.
QString Lancelot::Group::name | ( | ) | const |
- Returns
- the name of the group
Definition at line 194 of file Global.cpp.
QVariant Lancelot::Group::property | ( | const QString & | property | ) | const |
- Parameters
-
the name of the property
- Returns
- the value of the specified property
Definition at line 169 of file Global.cpp.
void Lancelot::Group::remove | ( | QObject * | object, |
bool | setDefaultGroup = true |
||
) |
Removes the object from the group.
- Parameters
-
object the object that should be removed from the group setDefaultGroup if set, the object is moved to the default group. If not, the object will retain the pointer to the old group, but will not receive any updates from it.
Definition at line 156 of file Global.cpp.
void Lancelot::Group::setProperty | ( | const QString & | property, |
const QVariant & | value, | ||
bool | persistent = true |
||
) |
Sets the value of the specified property.
- Parameters
-
property the name of the property value value persistent whether the property should be preserved on group reload
Definition at line 174 of file Global.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2014 The KDE developers.
Generated on Mon Oct 13 2014 22:55:07 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.