• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdeplasma-addons API Reference
  • KDE Home
  • Contact Us
 

liblancelot

  • Lancelot
  • Group
Classes | Public Member Functions | List of all members
Lancelot::Group Class Reference

#include <Global.h>

Inheritance diagram for Lancelot::Group:
Inheritance graph
[legend]

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.

Author
Ivan Cukic

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.

Definition at line 63 of file Global.h.

Member Function Documentation

void Lancelot::Group::add ( QObject *  object)

Adds object to the group.

Parameters
objectthe 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
thename 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
objectthe 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
thename 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.

void Lancelot::Group::notifyUpdated ( )
inline

Definition at line 159 of file Global.h.

QVariant Lancelot::Group::property ( const QString &  property) const
Parameters
thename 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
objectthe object that should be removed from the group
setDefaultGroupif 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
propertythe name of the property
valuevalue
persistentwhether 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:
  • Global.h
  • Global.cpp
This file is part of the KDE documentation.
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.

liblancelot

Skip menu "liblancelot"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdeplasma-addons API Reference

Skip menu "kdeplasma-addons API Reference"
  •     GroupingDesktop
  •   liblancelot

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal