KService Class Reference
Represent a service, i.e. More...
#include <kservice.h>
Inheritance diagram for KService:

Public Types | |
typedef KSharedPtr< KService > | Ptr |
typedef QValueList< Ptr > | List |
enum | DCOPServiceType_t { DCOP_None = 0, DCOP_Unique, DCOP_Multi, DCOP_Wait } |
| |
Public Member Functions | |
KService (const QString &_name, const QString &_exec, const QString &_icon) | |
Construct a temporary service with a given name, exec-line and icon. | |
KService (const QString &_fullpath) | |
Construct a service and take all information from a config file. | |
KService (KDesktopFile *config) | |
Construct a service and take all information from a desktop file. | |
KService (QDataStream &_str, int offset) | |
virtual QString | type () const |
virtual QString | name () const |
QString | exec () const |
QString | library () const |
QString | init () const |
QString | icon () const |
QPixmap | pixmap (KIcon::Group _group, int _force_size=0, int _state=0, QString *_path=0L) const |
bool | terminal () const |
QString | terminalOptions () const |
bool | substituteUid () const |
QString | username () const |
QString | desktopEntryPath () const |
QString | desktopEntryName () const |
DCOPServiceType_t | DCOPServiceType () const |
QString | path () const |
QString | comment () const |
QString | genericName () const |
QStringList | keywords () const |
QStringList | categories () const |
QStringList | serviceTypes () const |
bool | hasServiceType (const QString &_service) const |
bool | allowAsDefault () const |
bool | allowMultipleFiles () const |
int | initialPreference () const |
What preference to associate with this service initially (before the user has had any chance to define a profile for it) The bigger the value, the most preferred the service is. | |
void | setInitialPreference (int i) |
bool | noDisplay () const |
Whether the entry should be suppressed in menus. | |
QString | parentApp () const |
Name of the application this service belongs to. | |
virtual QVariant | property (const QString &_name) const |
virtual QStringList | propertyNames () const |
bool | isValid () const |
virtual void | load (QDataStream &) |
virtual void | save (QDataStream &) |
Static Public Member Functions | |
Ptr | serviceByName (const QString &_name) |
Find a service by name, i.e. | |
Ptr | serviceByDesktopPath (const QString &_name) |
Find a service by its relative path to the applnk or services directory, for instance "Internet/konqbrowser.desktop". | |
Ptr | serviceByDesktopName (const QString &_name) |
Find a service by the name of its desktop file, not depending on its actual location (as long as it's under the applnk or service directories). | |
List | allServices () |
List | allInitServices () |
Protected Member Functions | |
void | init (KDesktopFile *config) |
QStringList & | accessServiceTypes () |
virtual void | virtual_hook (int id, void *data) |
Friends | |
class | KBuildSycoca |
Detailed Description
Represent a service, i.e.an application bound to one or several mimetypes (or servicetypes) as written in its desktop entry file.
A service may be a library, too. The starting point you need is often the static methods.
- Author:
- Torben Weis <weis@kde.org>
Definition at line 43 of file kservice.h.
Member Enumeration Documentation
|
The service name is equal to the desktopEntryName.
Definition at line 162 of file kservice.h. Referenced by DCOPServiceType(). |
Constructor & Destructor Documentation
|
Construct a temporary service with a given name, exec-line and icon.
Definition at line 60 of file kservice.cpp. References KSycocaEntry::m_bDeleted. |
|
Construct a service and take all information from a config file.
Definition at line 76 of file kservice.cpp. References init(). |
|
Construct a service and take all information from a desktop file.
Definition at line 84 of file kservice.cpp. References init(). |
Member Function Documentation
|
Definition at line 85 of file kservice.h. |
|
Implements KSycocaEntry. Definition at line 89 of file kservice.h. |
|
Definition at line 93 of file kservice.h. Referenced by KRun::processDesktopExec(). |
|
Definition at line 98 of file kservice.h. |
|
Definition at line 103 of file kservice.h. Referenced by KService(). |
|
Definition at line 108 of file kservice.h. |
|
Definition at line 273 of file kservice.cpp. References KIconLoader::addExtraDesktopThemes(), KIconLoader::extraDesktopThemesAdded(), KGlobal::iconLoader(), QPixmap::isNull(), KIconLoader::loadIcon(), and pixmap(). Referenced by pixmap(). |
|
Definition at line 117 of file kservice.h. Referenced by KRun::processDesktopExec(). |
|
Definition at line 124 of file kservice.h. Referenced by KRun::processDesktopExec(). |
|
Definition at line 541 of file kservice.cpp. References QVariant::isValid(), property(), and QVariant::toBool(). Referenced by KRun::processDesktopExec(). |
|
Definition at line 546 of file kservice.cpp. References QString::isEmpty(), QVariant::isValid(), property(), and QVariant::toString(). Referenced by KRun::processDesktopExec(). |
|
Definition at line 143 of file kservice.h. References KSycocaEntry::entryPath(). Referenced by KRun::run(). |
|
Definition at line 149 of file kservice.h. Referenced by KRun::run(). |
|
Definition at line 167 of file kservice.h. References DCOPServiceType_t. |
|
Definition at line 172 of file kservice.h. |
|
Definition at line 177 of file kservice.h. |
|
Definition at line 183 of file kservice.h. |
|
Definition at line 188 of file kservice.h. |
|
Definition at line 591 of file kservice.cpp. |
|
Definition at line 199 of file kservice.h. |
|
Definition at line 346 of file kservice.cpp. References KServiceType::serviceType(). |
|
Definition at line 215 of file kservice.h. |
|
Definition at line 582 of file kservice.cpp. References QString::find(). |
|
What preference to associate with this service initially (before the user has had any chance to define a profile for it) The bigger the value, the most preferred the service is.
Definition at line 228 of file kservice.h. |
|
Whether the entry should be suppressed in menus.
Definition at line 558 of file kservice.cpp. References QMap< QString, QVariant >::end(), and QMap< QString, QVariant >::find(). Referenced by KServiceGroup::childCount(), and KServiceGroup::entries(). |
|
Name of the application this service belongs to. (Usefull for e.g. plugins)
Definition at line 572 of file kservice.cpp. References QMap< QString, QVariant >::end(), and QMap< QString, QVariant >::find(). |
|
Definition at line 393 of file kservice.cpp. References QMap< QString, QVariant >::end(), KSycocaEntry::entryPath(), QMap< QString, QVariant >::find(), and QString::toInt(). Referenced by substituteUid(), and username(). |
|
Definition at line 484 of file kservice.cpp. References QMap< QString, QVariant >::begin(), and QMap< QString, QVariant >::end(). |
|
Implements KSycocaEntry. Definition at line 267 of file kservice.h. |
|
Find a service by name, i.e. the translated Name field. You should really not use this method, since the name is translated.
Definition at line 518 of file kservice.cpp. References KSycocaEntry::Ptr. |
|
Find a service by its relative path to the applnk or services directory, for instance "Internet/konqbrowser.desktop". Better not use it for menu entries though, since the user can move them. It's ok to use it for services though (e.g. "http_cache_cleaner.desktop")
Definition at line 524 of file kservice.cpp. References KSycocaEntry::Ptr. |
|
Find a service by the name of its desktop file, not depending on its actual location (as long as it's under the applnk or service directories). For instance "konqbrowser" or "kcookiejar". Note that the ".desktop" extension is implicit. This is the recommended method (safe even if the user moves stuff) but note that it assumes that no two entries have the same filename.
Definition at line 530 of file kservice.cpp. References KSycocaEntry::Ptr. Referenced by KRun::foundMimeType(), KURIFilterData::iconName(), and KRun::runCommand(). |
|
Definition at line 513 of file kservice.cpp. |
|
Definition at line 536 of file kservice.cpp. |
The documentation for this class was generated from the following files: