KDEDesktopMimeType Class Reference
Mime type for desktop files. Mimetype for a .desktop file. More...
#include <kmimetype.h>
Inheritance diagram for KDEDesktopMimeType:

Public Types | |
enum | ServiceType { ST_MOUNT, ST_UNMOUNT, ST_USER_DEFINED } |
Public Member Functions | |
KDEDesktopMimeType (KDesktopFile *config) | |
KDEDesktopMimeType (QDataStream &_str, int offset) | |
virtual QString | icon (const QString &_url, bool _is_local) const |
virtual QString | icon (const KURL &_url, bool _is_local) const |
virtual QPixmap | pixmap (const KURL &_url, KIcon::Group _group, int _force_size=0, int _state=0, QString *_path=0L) const |
virtual QString | comment (const QString &_url, bool _is_local) const |
virtual QString | comment (const KURL &_url, bool _is_local) const |
Static Public Member Functions | |
static QValueList< Service > | builtinServices (const KURL &_url) |
static QValueList< Service > | userDefinedServices (const QString &path, bool bLocalFiles) |
static QValueList< Service > | userDefinedServices (const QString &path, KConfig &config, bool bLocalFiles) |
static void | executeService (const QString &_path, KDEDesktopMimeType::Service &_service) KDE_DEPRECATED |
static void | executeService (const KURL::List &urls, KDEDesktopMimeType::Service &service) |
static pid_t | run (const KURL &_url, bool _is_local) |
Protected Member Functions | |
virtual QPixmap | pixmap (KIcon::Group a, int b, int c, QString *d) const |
virtual void | virtual_hook (int id, void *data) |
Static Protected Member Functions | |
static pid_t | runFSDevice (const KURL &_url, const KSimpleConfig &cfg) |
static pid_t | runApplication (const KURL &_url, const QString &_serviceFile) |
static pid_t | runLink (const KURL &_url, const KSimpleConfig &cfg) |
static pid_t | runMimeType (const KURL &_url, const KSimpleConfig &cfg) |
Classes | |
struct | Service |
Structure representing a service, in the list of services returned by builtinServices and userDefinedServices. More... |
Detailed Description
Mime type for desktop files. Mimetype for a .desktop file.Handles mount/umount icon, and user-defined properties.
Definition at line 506 of file kmimetype.h.
Constructor & Destructor Documentation
|
Construct a desktop mimetype and take all information from a desktop file.
Definition at line 534 of file kmimetype.h. |
Member Function Documentation
|
Return the filename of the icon associated with the mimetype. The arguments are unused, but provided so that KMimeType-derived classes can use them (e.g. KFolderType uses the URL to return one out of 2 icons)
Reimplemented from KMimeType. Definition at line 688 of file kmimetype.cpp. References KServiceType::icon(). Referenced by icon(). |
|
Return the filename of the icon associated with the mimetype. The arguments are unused, but provided so that KMimeType-derived classes can use them (e.g. KFolderType uses the URL to return one out of 2 icons)
Reimplemented from KMimeType. Definition at line 697 of file kmimetype.cpp. References KIO::findDeviceMountPoint(), icon(), KServiceType::icon(), KURL::protocol(), KConfigBase::readBoolEntry(), and KConfigBase::setGroup(). |
|
Find the pixmap for a given file of this mimetype. Convenience method that uses icon(), but also locates and load the pixmap.
Reimplemented from KMimeType. Definition at line 742 of file kmimetype.cpp. References KServiceType::icon(), KGlobal::iconLoader(), and KIconLoader::loadIcon(). |
|
Returns the descriptive comment associated with the MIME type. The arguments are unused, but provided so that KMimeType derived classes can use them.
Reimplemented from KMimeType. Definition at line 754 of file kmimetype.cpp. References KMimeType::comment(). Referenced by comment(). |
|
Returns the descriptive comment associated with the MIME type. The arguments are unused, but provided so that KMimeType derived classes can use them.
Reimplemented from KMimeType. Definition at line 763 of file kmimetype.cpp. References comment(), and KMimeType::comment(). |
|
Returns a list of services for the given .desktop file that are handled by kio itself. Namely mount/unmount for FSDevice files.
Definition at line 907 of file kmimetype.cpp. References KIO::findDeviceMountPoint(), KDEDesktopMimeType::Service::m_strName, and KDEDesktopMimeType::Service::m_type. |
|
Returns a list of services defined by the user as possible actions on the given .desktop file. May include empty actions which represent where visual separators should appear in user-visible representations of those actions, such as separators in a menu.
Definition at line 960 of file kmimetype.cpp. |
|
Overload of userDefinedServices for speed purposes: it takes a KConfig* so that the caller can check things in the file without having it parsed twice.
Definition at line 966 of file kmimetype.cpp. References KStandardDirs::findExe(), KDEDesktopMimeType::Service::m_display, KDEDesktopMimeType::Service::m_strExec, KDEDesktopMimeType::Service::m_strIcon, KDEDesktopMimeType::Service::m_strName, and KDEDesktopMimeType::Service::m_type. |
|
Definition at line 1042 of file kmimetype.cpp. References KURL::setPath(). |
|
Execute
Definition at line 1051 of file kmimetype.cpp. References endl(), KIO::findDeviceMountPoint(), kdDebug(), KConfigBase::readBoolEntry(), KConfigBase::readEntry(), KRun::run(), and KConfigBase::setDesktopGroup(). |
|
Invokes the default action for the desktop entry. If the desktop entry is not local, then only false is returned. Otherwise we would create a security problem. Only types Link and Mimetype could be followed.
Definition at line 777 of file kmimetype.cpp. Referenced by KRun::runURL(). |
|
Use this function only if you don't have a special URL for which you search a pixmap. This function is useful to find out, which icon is usually chosen for a certain mime type. Since no URL is passed, it is impossible to obey icon hints in desktop entries for example.
Reimplemented from KMimeType. Definition at line 598 of file kmimetype.h. References KMimeType::pixmap(). |
The documentation for this class was generated from the following files: