KServiceType
#include <KServiceType>

Public Types | |
typedef QList< Ptr > | List |
typedef QExplicitlySharedDataPointer< KServiceType > | Ptr |
![]() | |
typedef QList< Ptr > | List |
typedef QExplicitlySharedDataPointer< KSycocaEntry > | Ptr |
Public Member Functions | |
KServiceType (KDesktopFile *config) | |
QString | comment () const |
bool | inherits (const QString &servTypeName) const |
bool | isDerived () const |
QString | parentServiceType () const |
Ptr | parentType () |
QVariant::Type | propertyDef (const QString &_name) const |
QStringList | propertyDefNames () const |
QMap< QString, QVariant::Type > | propertyDefs () const |
int | serviceOffersOffset () const |
void | setServiceOffersOffset (int offset) |
![]() | |
QString | entryPath () const |
bool | isDeleted () const |
bool | isSeparator () const |
bool | isType (KSycocaType t) const |
bool | isValid () const |
QString | name () const |
QVariant | property (const QString &name) const |
QStringList | propertyNames () const |
void | setDeleted (bool deleted) |
QString | storageId () const |
KSycocaType | sycocaType () const |
![]() | |
QSharedData (const QSharedData &) | |
Static Public Member Functions | |
static List | allServiceTypes () |
static Ptr | serviceType (const QString &_name) |
Additional Inherited Members | |
![]() | |
KSERVICE_NO_EXPORT | KSycocaEntry (KSycocaEntryPrivate &d) |
![]() | |
const std::unique_ptr< KSycocaEntryPrivate > | d_ptr |
![]() | |
enum | KSycocaType |
Detailed Description
A service type is, well, a type of service, where a service is an application or plugin. For instance, "KOfficeFilter", which is the type of all koffice filters, is a service type. In order to discover services of a given type, using KServiceTypeTrader. Service types are stored as desktop files in $KDEDIR/share/servicetypes.
- See also
- KService, KServiceTypeTrader
- Deprecated:
- Since 5.90, this class is an implementation detail of KService. Use KService or KApplicationTrader instead.
Definition at line 35 of file kservicetype.h.
Member Typedef Documentation
◆ List
typedef QList<Ptr> KServiceType::List |
A list of shared data pointers for KServiceType.
Definition at line 45 of file kservicetype.h.
◆ Ptr
A shared data pointer for KServiceType.
Definition at line 41 of file kservicetype.h.
Constructor & Destructor Documentation
◆ KServiceType()
|
explicit |
Construct a service type and take all information from a desktop file.
- Parameters
-
config the configuration file
- Deprecated:
- Since 5.90, see class API docs
Definition at line 27 of file kservicetype.cpp.
Member Function Documentation
◆ allServiceTypes()
|
static |
Returns 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.
- Returns
- the list of all services
Definition at line 172 of file kservicetype.cpp.
◆ comment()
QString KServiceType::comment | ( | ) | const |
Returns the descriptive comment associated, if any.
- Returns
- the comment, or QString()
Definition at line 213 of file kservicetype.cpp.
◆ inherits()
bool KServiceType::inherits | ( | const QString & | servTypeName | ) | const |
Checks whether this service type is or inherits from servTypeName
.
- Returns
- true if this servicetype is or inherits from
servTypeName
Definition at line 112 of file kservicetype.cpp.
◆ isDerived()
bool KServiceType::isDerived | ( | ) | const |
Checks whether this service type inherits another one.
- Returns
- true if this service type inherits another one
- See also
- parentServiceType()
Definition at line 219 of file kservicetype.cpp.
◆ parentServiceType()
QString KServiceType::parentServiceType | ( | ) | const |
If this service type inherits from another service type, return the name of the parent.
- Returns
- the parent service type, or QString:: null if not set
- See also
- isDerived()
Definition at line 106 of file kservicetype.cpp.
◆ parentType()
KServiceType::Ptr KServiceType::parentType | ( | ) |
Pointer to parent service type
Definition at line 178 of file kservicetype.cpp.
◆ propertyDef()
QVariant::Type KServiceType::propertyDef | ( | const QString & | _name | ) | const |
Returns the type of the property definition with the given _name
.
- Parameters
-
_name the name of the property
- Returns
- the property type, or null if not found
- See also
- propertyDefNames
Definition at line 154 of file kservicetype.cpp.
◆ propertyDefNames()
QStringList KServiceType::propertyDefNames | ( | ) | const |
Returns the list of all property definitions for this servicetype.
Those are properties of the services implementing this servicetype. For instance,
means that all kdevelop plugins have in their .desktop file a line like
Definition at line 160 of file kservicetype.cpp.
◆ propertyDefs()
QMap< QString, QVariant::Type > KServiceType::propertyDefs | ( | ) | const |
(for KBuildServiceTypeFactory)
Definition at line 225 of file kservicetype.cpp.
◆ serviceOffersOffset()
int KServiceType::serviceOffersOffset | ( | ) | const |
Definition at line 207 of file kservicetype.cpp.
◆ serviceType()
|
static |
Returns a pointer to the servicetype '_name' or nullptr
if the service type is unknown.
VERY IMPORTANT : don't store the result in a KServiceType * !
- Parameters
-
_name the name of the service type to search
- Returns
- the pointer to the service type, or
nullptr
Definition at line 166 of file kservicetype.cpp.
◆ setServiceOffersOffset()
void KServiceType::setServiceOffersOffset | ( | int | offset | ) |
only used by kbuildsycoca Register offset into offers list
Definition at line 200 of file kservicetype.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2023 The KDE developers.
Generated on Sat Dec 9 2023 03:50:05 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.