kresources
#include <manager.h>
Classes | |
class | ActiveIterator |
class | Iterator |
Public Member Functions | |
Manager (const QString &family) | |
ActiveIterator | activeBegin () |
ActiveIterator | activeEnd () |
void | add (Resource *resource) |
void | addObserver (ManagerObserver< T > *observer) |
Iterator | begin () |
void | change (T *resource) |
T * | createResource (const QString &type) |
Iterator | end () |
bool | isEmpty () const |
void | readConfig (KConfig *cfg=0) |
void | remove (Resource *resource) |
void | removeObserver (ManagerObserver< T > *observer) |
QStringList | resourceNames () const |
QStringList | resourceTypeDescriptions () const |
QStringList | resourceTypeNames () const |
void | setActive (Resource *resource, bool active) |
void | setStandardResource (T *resource) |
T * | standardResource () |
void | writeConfig (KConfig *cfg=0) |
Detailed Description
template<class T>
class KRES::Manager< T >
This class provides a manager for resources of a specified family.
It takes care of loading and saving resource configurations and provides access to the resources and their attributes. External changes in the resource configuration are notified by the ManagerObserver interface. If your application needs to be notified about resource configuration changes, you have to subclass ManagerObserver and add it to the Manager by addObserver().
Since KDE 3.4 it's required to supply your application with a *.desktop file for each resource family you introduce. The ServiceType should be of KResources/Manager.
Constructor & Destructor Documentation
|
inline |
Member Function Documentation
|
inline |
|
inline |
|
inline |
|
inline |
Add observer for resource changes to manager.
See ManagerObserver. The Manager does not take ownership of the Observer object.
|
inline |
|
inline |
|
inline |
Creates a new resource of type type
with default settings.
The resource is not added to the manager, the application has to do that. Returns a pointer to a resource object or a null pointer if resource type doesn't exist.
- Parameters
-
type The type of the resource, one of those returned by resourceTypeNames()
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Remove Observer for resource changes from manager.
See ManagerObserver. The Observer is not deleted by the Manager after being removed.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
The documentation for this class was generated from the following file:
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:00:19 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.