KDecorationFactory Class Reference
Inheritance diagram for KDecorationFactory:

Detailed Description
Definition at line 34 of file kdecorationfactory.h.
Public Member Functions | |
KDecorationFactory () | |
virtual | ~KDecorationFactory () |
virtual KDecoration * | createDecoration (KDecorationBridge *bridge)=0 |
virtual bool | reset (unsigned long changed) |
virtual QValueList< BorderSize > | borderSizes () const |
virtual bool | supports (Ability ability) |
virtual void | checkRequirements (KDecorationProvides *provides) |
const KDecorationOptions * | options () |
bool | exists (const KDecoration *deco) const |
void | addDecoration (KDecoration *) |
void | removeDecoration (KDecoration *) |
Protected Member Functions | |
void | resetDecorations (unsigned long changed) |
NET::WindowType | windowType (unsigned long supported_types, KDecorationBridge *bridge) const |
Constructor & Destructor Documentation
KDecorationFactory::KDecorationFactory | ( | ) |
Constructor.
Called after loading the decoration plugin. All global initialization of the plugin should be done in the factory constructor.
Definition at line 31 of file kdecorationfactory.cpp.
KDecorationFactory::~KDecorationFactory | ( | ) | [virtual] |
Destructor.
Called before unloading the decoration plugin. All global cleanup of the plugin should be done in the factory destructor.
Definition at line 35 of file kdecorationfactory.cpp.
Member Function Documentation
virtual KDecoration* KDecorationFactory::createDecoration | ( | KDecorationBridge * | bridge | ) | [pure virtual] |
This function must be reimplemented to create decoration objects.
The argument should be passed to the KDecoration constructor, the second KDecoration argument should be this factory object.
bool KDecorationFactory::reset | ( | unsigned long | changed | ) | [virtual] |
This function is called when the configuration settings changed.
The argument specifies what has changed, using the SettingXXX masks. It should be determined whether the decorations need to be completely remade, in which case true should be returned, or whether only e.g. a repaint will be sufficient, in which case false should be returned, and resetDecorations() can be called to reset all decoration objects. Note that true should be returned only when really necessary.
Definition at line 40 of file kdecorationfactory.cpp.
QValueList< KDecorationDefines::BorderSize > KDecorationFactory::borderSizes | ( | ) | const [virtual] |
Reimplement this function if your decoration supports more border sizes than the default one (BorderNormal).
The returned list must contain all supported sizes, ordered from the smallest to the largest one. By default, only BorderNormal is returned.
Definition at line 54 of file kdecorationfactory.cpp.
const KDecorationOptions * KDecorationFactory::options | ( | ) | [inline] |
Returns the KDecorationOptions object, which is used to access configuration settings for the decoration.
Definition at line 115 of file kdecorationfactory.h.
bool KDecorationFactory::exists | ( | const KDecoration * | deco | ) | const |
Returns true if the given decoration object still exists.
This is necessary e.g. when calling KDecoration::showWindowMenu(), which may cause the decoration to be destroyed. Note that this function is reliable only if called immediately after such actions.
Definition at line 59 of file kdecorationfactory.cpp.
void KDecorationFactory::resetDecorations | ( | unsigned long | changed | ) | [protected] |
Convenience function that calls KDecoration::reset() for all decoration objects.
Definition at line 74 of file kdecorationfactory.cpp.
NET::WindowType KDecorationFactory::windowType | ( | unsigned long | supported_types, | |
KDecorationBridge * | bridge | |||
) | const [protected] |
This function has the same functionality like KDecoration::windowType().
It can be used in createDecoration() to return different KDecoration inherited classes depending on the window type, as at that time KDecoration::windowType() is not available yet. The additional argument is the one passed to createDecoration().
Definition at line 82 of file kdecorationfactory.cpp.
The documentation for this class was generated from the following files: