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

Public Types | |
enum | DCOPServiceType_t |
| |
Public Methods | |
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. | |
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. | |
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 |
Static Public Methods | |
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 () |
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 159 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. |
|
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 85 of file kservice.cpp. References init(). |
Member Function Documentation
|
Definition at line 82 of file kservice.h. |
|
Definition at line 86 of file kservice.h. |
|
Definition at line 90 of file kservice.h. Referenced by KRun::processDesktopExec(). |
|
Definition at line 95 of file kservice.h. |
|
Definition at line 100 of file kservice.h. Referenced by KService(). |
|
Definition at line 105 of file kservice.h. |
|
Definition at line 274 of file kservice.cpp. References KIconLoader::addExtraDesktopThemes(), KIconLoader::extraDesktopThemesAdded(), KIcon::Group, KGlobal::iconLoader(), QPixmap::isNull(), KIconLoader::loadIcon(), and pixmap(). Referenced by pixmap(). |
|
Definition at line 114 of file kservice.h. Referenced by KRun::processDesktopExec(). |
|
Definition at line 121 of file kservice.h. Referenced by KRun::processDesktopExec(). |
|
Definition at line 542 of file kservice.cpp. References QVariant::isValid(), property(), and QVariant::toBool(). Referenced by KRun::processDesktopExec(). |
|
Definition at line 547 of file kservice.cpp. References QString::isEmpty(), QVariant::isValid(), property(), and QVariant::toString(). Referenced by KRun::processDesktopExec(). |
|
Definition at line 140 of file kservice.h. References KSycocaEntry::entryPath(). Referenced by KRun::run(). |
|
Definition at line 146 of file kservice.h. Referenced by KRun::run(). |
|
Definition at line 164 of file kservice.h. References DCOPServiceType_t. |
|
Definition at line 169 of file kservice.h. |
|
Definition at line 174 of file kservice.h. |
|
Definition at line 180 of file kservice.h. |
|
Definition at line 185 of file kservice.h. |
|
Definition at line 592 of file kservice.cpp. |
|
Definition at line 196 of file kservice.h. |
|
Definition at line 347 of file kservice.cpp. References KServiceType::serviceType(). |
|
Definition at line 212 of file kservice.h. |
|
Definition at line 583 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 225 of file kservice.h. |
|
Whether the entry should be suppressed in menus.
Definition at line 559 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 573 of file kservice.cpp. References QMap< QString, QVariant >::end(), and QMap< QString, QVariant >::find(). |
|
Definition at line 394 of file kservice.cpp. References QMap< QString, QVariant >::end(), KSycocaEntry::entryPath(), QMap< QString, QVariant >::find(), KConfigBase::readPropertyEntry(), and QString::toInt(). Referenced by substituteUid(), and username(). |
|
Definition at line 485 of file kservice.cpp. References QMap< QString, QVariant >::begin(), and QMap< QString, QVariant >::end(). |
|
Definition at line 264 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 519 of file kservice.cpp. |
|
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 525 of file kservice.cpp. |
|
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 531 of file kservice.cpp. Referenced by KRun::foundMimeType(), and KURIFilterData::iconName(). |
|
Definition at line 514 of file kservice.cpp. |
|
Definition at line 537 of file kservice.cpp. |
The documentation for this class was generated from the following files: