• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • tderesources
 

tderesources

  • KRES
  • Factory
Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
KRES::Factory Class Reference

#include <factory.h>

Public Member Functions

ConfigWidget * configWidget (const TQString &type, TQWidget *parent=0)
 
Resource * resource (const TQString &type, const TDEConfig *config)
 
TQStringList typeNames () const
 
TQString typeName (const TQString &type) const
 
TQString typeDescription (const TQString &type) const
 

Static Public Member Functions

static Factory * self (const TQString &resourceFamily)
 

Protected Member Functions

 Factory (const TQString &resourceFamily)
 

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:

TDEABC::Factory *factory = TDEABC::Factory::self( "contact" );
// to allow a transparent configuration of resources, we have
// to use a tdeconfig object.
TDEConfig config( "tst" );
config.writePathEntry( "FileName", "/home/foobar/test.vcf" );// resource dependend
config.writeEntry( "FileFormat", "vcard" ); // resource dependend
TDEABC::Resource *res = factory->resource( "file", &config );
// do something with resource

Definition at line 62 of file factory.h.

Constructor & Destructor Documentation

◆ ~Factory()

Factory::~Factory ( )

Definition at line 71 of file factory.cpp.

◆ Factory()

Factory::Factory ( const TQString &  resourceFamily)
protected

Definition at line 58 of file factory.cpp.

Member Function Documentation

◆ configWidget()

ConfigWidget * Factory::configWidget ( const TQString &  type,
TQWidget *  parent = 0 
)

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

Parameters
typeThe type of the resource, returned by typeNames()
parentThe parent widget

Definition at line 80 of file factory.cpp.

◆ resource()

Resource * Factory::resource ( const TQString &  type,
const TDEConfig *  config 
)

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

Parameters
typeThe type of the resource, returned by typeNames()
configThe 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.

◆ self()

Factory * Factory::self ( const TQString &  resourceFamily)
static

Returns the global resource factory.

Definition at line 40 of file factory.cpp.

◆ typeDescription()

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

Returns the description for a special type.

Definition at line 119 of file factory.cpp.

◆ typeName()

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

Returns the name for a special type.

Definition at line 110 of file factory.cpp.

◆ typeNames()

TQStringList Factory::typeNames ( ) const

Returns a list of all available resource types.

Definition at line 75 of file factory.cpp.


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

tderesources

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

tderesources

Skip menu "tderesources"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tderesources by doxygen 1.9.4
This website is maintained by Timothy Pearson.