.TH "KServiceType" 3 "28 Jan 2004" "kio Library" \" -*- nroff -*-
.ad l
.nh
.SH NAME
KServiceType \- A service type is the generic notion for a mimetype, a type of service instead of a type of file.  

.PP
.SH SYNOPSIS
.br
.PP
\fC#include <kservicetype.h>\fP
.PP
Inherits \fBKSycocaEntry\fP.
.PP
Inherited by \fBKMimeType\fP.
.PP
.SS "Public Types"

.in +1c
.ti -1c
.RI "typedef \fBKSharedPtr\fP< \fBKServiceType\fP > \fBPtr\fP"
.br
.ti -1c
.RI "typedef \fBQValueList\fP< \fBPtr\fP > \fBList\fP"
.br
.in -1c
.SS "Public Member Functions"

.in +1c
.ti -1c
.RI "\fBKServiceType\fP (const  \fBQString\fP &_fullpath, const  \fBQString\fP &_name, const  \fBQString\fP &_icon, const  \fBQString\fP &_comment)"
.br
.RI "\fIConstructor. \fP"
.ti -1c
.RI "\fBKServiceType\fP (const  \fBQString\fP &_fullpath)"
.br
.RI "\fIConstruct a service type and take all informations from a config file. \fP"
.ti -1c
.RI "\fBKServiceType\fP (\fBKDesktopFile\fP *config)"
.br
.RI "\fIConstruct a service type and take all informations from a deskop file. \fP"
.ti -1c
.RI "\fBKServiceType\fP (\fBQDataStream\fP &_str, int \fBoffset\fP)"
.br
.ti -1c
.RI "\fBQString\fP \fBicon\fP () const "
.br
.ti -1c
.RI "\fBQString\fP \fBcomment\fP () const "
.br
.ti -1c
.RI "\fBQString\fP \fBname\fP () const "
.br
.ti -1c
.RI "\fBQString\fP \fBdesktopEntryPath\fP () const "
.br
.ti -1c
.RI "bool \fBisDerived\fP () const "
.br
.ti -1c
.RI "\fBQString\fP \fBparentServiceType\fP () const "
.br
.RI "\fIIf this service type inherits from another service type, return the name of the parent. \fP"
.ti -1c
.RI "bool \fBinherits\fP (const  \fBQString\fP &servTypeName) const "
.br
.ti -1c
.RI "virtual \fBQVariant\fP \fBproperty\fP (const  \fBQString\fP &_name) const "
.br
.ti -1c
.RI "virtual \fBQStringList\fP \fBpropertyNames\fP () const "
.br
.ti -1c
.RI "bool \fBisValid\fP () const "
.br
.ti -1c
.RI "virtual QVariant::Type \fBpropertyDef\fP (const  \fBQString\fP &_name) const "
.br
.ti -1c
.RI "virtual \fBQStringList\fP \fBpropertyDefNames\fP () const "
.br
.ti -1c
.RI "virtual const  \fBQMap\fP< \fBQString\fP, QVariant::Type > & \fBpropertyDefs\fP () const "
.br
.ti -1c
.RI "virtual void \fBsave\fP (\fBQDataStream\fP &)"
.br
.RI "\fISave ourselves to the data stream. \fP"
.ti -1c
.RI "virtual void \fBload\fP (\fBQDataStream\fP &)"
.br
.RI "\fILoad ourselves from the data stream. \fP"
.in -1c
.SS "Static Public Member Functions"

.in +1c
.ti -1c
.RI "\fBPtr\fP \fBserviceType\fP (const  \fBQString\fP &_name)"
.br
.ti -1c
.RI "\fBKService::List\fP \fBoffers\fP (const  \fBQString\fP &_servicetype)"
.br
.ti -1c
.RI "\fBList\fP \fBallServiceTypes\fP ()"
.br
.in -1c
.SS "Protected Member Functions"

.in +1c
.ti -1c
.RI "void \fBinit\fP (\fBKDesktopFile\fP *config)"
.br
.ti -1c
.RI "virtual void \fBvirtual_hook\fP (int id, void *data)"
.br
.in -1c
.SS "Protected Attributes"

.in +1c
.ti -1c
.RI "\fBQString\fP \fBm_strName\fP"
.br
.ti -1c
.RI "\fBQString\fP \fBm_strIcon\fP"
.br
.ti -1c
.RI "\fBQString\fP \fBm_strComment\fP"
.br
.ti -1c
.RI "\fBQMap\fP< \fBQString\fP, \fBQVariant\fP > \fBm_mapProps\fP"
.br
.ti -1c
.RI "\fBQMap\fP< \fBQString\fP, QVariant::Type > \fBm_mapPropDefs\fP"
.br
.ti -1c
.RI "bool \fBm_bValid\fP:1"
.br
.ti -1c
.RI "bool \fBm_bDerived\fP:1"
.br
.in -1c
.SH "Detailed Description"
.PP 
A service type is the generic notion for a mimetype, a type of service instead of a type of file. 

For instance, KOfficeFilter is a service type. It is associated to services according to the user profile (\fBkuserprofile.h\fP) 
.PP
Definition at line 43 of file kservicetype.h.
.SH "Constructor & Destructor Documentation"
.PP 
.SS "KServiceType::KServiceType (const \fBQString\fP & _fullpath, const \fBQString\fP & _name, const \fBQString\fP & _icon, const \fBQString\fP & _comment)"
.PP
Constructor. You may pass in arguments to create a servicetype with specific properties Definition at line 99 of file kservicetype.cpp.
.PP
References QString::isEmpty().
.SS "KServiceType::KServiceType (const \fBQString\fP & _fullpath)"
.PP
Construct a service type and take all informations from a config file. \fBParameters:\fP
.RS 4
\fI_fullpath\fP set to '' if calling from a inherited constructor. 
.RE
.PP
Definition at line 33 of file kservicetype.cpp.
.SS "KServiceType::KServiceType (\fBKDesktopFile\fP * config)"
.PP
Construct a service type and take all informations from a deskop file. Definition at line 41 of file kservicetype.cpp.
.SH "Member Function Documentation"
.PP 
.SS "\fBQString\fP KServiceType::icon () const\fC [inline]\fP"
.PP
\fBReturns:\fP
.RS 4
the icon associated with this service type. Some derived classes offer special functions which take for example an URL and returns a special icon for this URL. An example is \fBKMimeType\fP, \fBKFolderType\fP and others. 
.RE
.PP
Definition at line 84 of file kservicetype.h.
.PP
Referenced by KDEDesktopMimeType::icon(), KFolderType::icon(), KDEDesktopMimeType::pixmap(), KMimeType::pixmap(), and KFileItem::pixmap().
.SS "\fBQString\fP KServiceType::comment () const\fC [inline]\fP"
.PP
\fBReturns:\fP
.RS 4
the descriptive comment associated, if any. 
.RE
.PP
Reimplemented in \fBKMimeType\fP.
.PP
Definition at line 89 of file kservicetype.h.
.SS "\fBQString\fP KServiceType::name () const\fC [inline, virtual]\fP"
.PP
\fBReturns:\fP
.RS 4
the name of this service type. 
.RE
.PP
Implements \fBKSycocaEntry\fP.
.PP
Definition at line 94 of file kservicetype.h.
.PP
Referenced by inherits().
.SS "\fBQString\fP KServiceType::desktopEntryPath () const\fC [inline]\fP"
.PP
\fBReturns:\fP
.RS 4
the relative path to the desktop entry file responsible for this servicetype. For instance inode/directory.desktop, or kpart.desktop 
.RE
.PP
Definition at line 101 of file kservicetype.h.
.PP
References KSycocaEntry::entryPath().
.SS "bool KServiceType::isDerived () const\fC [inline]\fP"
.PP
\fBReturns:\fP
.RS 4
true if this service type inherits another one 
.RE
.PP
Definition at line 106 of file kservicetype.h.
.SS "\fBQString\fP KServiceType::parentServiceType () const"
.PP
If this service type inherits from another service type, return the name of the parent. Otherwise QString::null. Definition at line 140 of file kservicetype.cpp.
.PP
References QVariant::toString().
.PP
Referenced by inherits().
.SS "bool KServiceType::inherits (const \fBQString\fP & servTypeName) const"
.PP
\fBReturns:\fP
.RS 4
true if this servicetype is or inherits from \fCservTypeName\fP 
.RE
.PP
\fBSince:\fP
.RS 4
3.1 
.RE
.PP
Definition at line 146 of file kservicetype.cpp.
.PP
References QString::isEmpty(), name(), parentServiceType(), and serviceType().
.SS "void KServiceType::save (\fBQDataStream\fP &)\fC [virtual]\fP"
.PP
Save ourselves to the data stream. Reimplemented from \fBKSycocaEntry\fP.
.PP
Reimplemented in \fBKMimeType\fP.
.PP
Definition at line 126 of file kservicetype.cpp.
.PP
References KSycocaEntry::save().
.PP
Referenced by KMimeType::save().
.SS "void KServiceType::load (\fBQDataStream\fP &)\fC [virtual]\fP"
.PP
Load ourselves from the data stream. Implements \fBKSycocaEntry\fP.
.PP
Reimplemented in \fBKMimeType\fP.
.PP
Definition at line 116 of file kservicetype.cpp.
.PP
References QMap< QString, QVariant >::contains().
.PP
Referenced by KMimeType::load().
.SS "\fBKServiceType::Ptr\fP KServiceType::serviceType (const \fBQString\fP & _name)\fC [static]\fP"
.PP
\fBReturns:\fP
.RS 4
a pointer to the servicetype '_name' or 0L if the service type is unknown. VERY IMPORTANT : don't store the result in a KServiceType * ! 
.RE
.PP
Definition at line 219 of file kservicetype.cpp.
.PP
References KSycocaEntry::Ptr.
.PP
Referenced by KService::hasServiceType(), and inherits().
.SS "\fBKService::List\fP KServiceType::offers (const \fBQString\fP & _servicetype)\fC [static]\fP"
.PP
\fBReturns:\fP
.RS 4
all services supporting the given servicetype name This doesn't take care of the user profile. In fact it is used by \fBKServiceTypeProfile\fP, which is used by \fBKTrader\fP, and that's the one you should use. 
.RE
.PP
Definition at line 225 of file kservicetype.cpp.
.PP
References QValueList::begin(), QValueList::end(), KSycocaEntry::isType(), QString::left(), and KSycocaEntry::offset().
.PP
Referenced by KServiceTypeProfile::offers().
.SS "\fBKServiceType::List\fP KServiceType::allServiceTypes ()\fC [static]\fP"
.PP
\fBReturns:\fP
.RS 4
a list of all the supported servicetypes. Useful for showing the list of available servicetypes in a listbox, for example. More memory consuming than the ones above, don't use unless really necessary. 
.RE
.PP
Definition at line 306 of file kservicetype.cpp.

.SH "Author"
.PP 
Generated automatically by Doxygen for kio Library from the source code.
