• Skip to content
  • Skip to link menu
KDE 3.5 API Reference
  • KDE API Reference
  • @topname@
  • Sitemap
  • Contact Us
 

kresources

KRES::Factory

KRES::Factory Class Reference

#include <factory.h>

List of all members.


Detailed Description

Class for loading resource plugins.

Use this class if you need resources with special settings, otherwise use KRES::Manager::createResource() to get resources with the default settings.

Example:

 KABC::Factory *factory = KABC::Factory::self( "contact" );

 // to allow a transparent configuration of resources, we have
 // to use a kconfig object.
 KConfig config( "tst" );
 config.writePathEntry( "FileName", "/home/foobar/test.vcf" );// resource dependend
 config.writeEntry( "FileFormat", "vcard" );                  // resource dependend

 KABC::Resource *res = factory->resource( "file", &config );

 // do something with resource

Definition at line 62 of file factory.h.


Public Member Functions

ConfigWidget * configWidget (const QString &type, QWidget *parent=0)
Resource * resource (const QString &type, const KConfig *config)
QStringList typeNames () const
QString typeName (const QString &type) const
QString typeDescription (const QString &type) const

Static Public Member Functions

static Factory * self (const QString &resourceFamily)

Protected Member Functions

 Factory (const QString &resourceFamily)

Member Function Documentation

Factory * Factory::self ( const QString &  resourceFamily  )  [static]

Returns the global resource factory.

Definition at line 40 of file factory.cpp.

ConfigWidget * Factory::configWidget ( const QString &  type,
QWidget *  parent = 0 
)

Returns the config widget for the given resource type, or a null pointer if resource type doesn't exist.

Parameters:
type The type of the resource, returned by typeNames()
parent The parent widget

Definition at line 80 of file factory.cpp.

Resource * Factory::resource ( const QString &  type,
const KConfig *  config 
)

Returns a pointer to a resource object or a null pointer if resource type doesn't exist.

Parameters:
type The type of the resource, returned by typeNames()
config The config object where the resource get it settings from, or 0 if a resource with default values should be created.

Definition at line 128 of file factory.cpp.

QStringList Factory::typeNames (  )  const

Returns a list of all available resource types.

Definition at line 75 of file factory.cpp.

QString Factory::typeName ( const QString &  type  )  const

Returns the name for a special type.

Definition at line 110 of file factory.cpp.

QString Factory::typeDescription ( const QString &  type  )  const

Returns the description for a special type.

Definition at line 119 of file factory.cpp.


The documentation for this class was generated from the following files:
  • factory.h
  • factory.cpp

kresources

Skip menu "kresources"
  • Main Page
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Class Members

@topname@

Skip menu "@topname@"
  •     kdnssd-avahi
  • arts
  • dcop
  • dnssd
  • interfaces
  •     interface
  •     library
  •   kspeech
  •   ktexteditor
  • kabc
  • kate
  • kcmshell
  • kdecore
  • kded
  • kdefx
  • kdeprint
  • kdesu
  • kdeui
  • kdoctools
  • khtml
  • kimgio
  • kinit
  • kio
  •   bookmarks
  •   httpfilter
  •   kfile
  •   kio
  •   kioexec
  •   kpasswdserver
  •   kssl
  • kioslave
  •   http
  • kjs
  • kmdi
  •   kmdi
  • knewstuff
  • kparts
  • kresources
  • kspell2
  • kunittest
  • kutils
  • kwallet
  • libkmid
  • libkscreensaver
Generated for @topname@ by doxygen 1.5.5
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal