KDEDesktopMimeType Class Reference
Mimetype for a .desktop file Handles mount/umount icon, and user-defined properties. 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 |
Return the filename of the icon associated with the mimetype. | |
virtual QString | icon (const KURL &_url, bool _is_local) const |
This function differs from the above only in that a KURL may be provided instead of a QString for convenience. | |
virtual QPixmap | pixmap (const KURL &_url, KIcon::Group _group, int _force_size=0, int _state=0, QString *_path=0L) const |
Find the pixmap for a given file of this mimetype. | |
virtual QString | comment (const QString &_url, bool _is_local) const |
The arguments are unused, but provided so that KMimeType derived classes can use them. | |
virtual QString | comment (const KURL &_url, bool _is_local) const |
This function differs from the above only in that a KURL may be provided instead of a QString for convenience. | |
Static Public Member Functions | |
QValueList< Service > | builtinServices (const KURL &_url) |
QValueList< Service > | userDefinedServices (const QString &path, bool bLocalFiles) |
void | executeService (const QString &_path, KDEDesktopMimeType::Service &_service) |
void | executeService (const KURL::List &urls, KDEDesktopMimeType::Service &service) |
Execute service on the list of urls . | |
pid_t | run (const KURL &_url, bool _is_local) |
Invokes the default action for the desktop entry. | |
Protected Member Functions | |
virtual QPixmap | pixmap (KIcon::Group a, int b, int c, QString *d) const |
Use this function only if you don't have a special URL for which you search a pixmap. | |
virtual void | virtual_hook (int id, void *data) |
Static Protected Member Functions | |
pid_t | runFSDevice (const KURL &_url, const KSimpleConfig &cfg) |
pid_t | runApplication (const KURL &_url, const QString &_serviceFile) |
pid_t | runLink (const KURL &_url, const KSimpleConfig &cfg) |
pid_t | runMimeType (const KURL &_url, const KSimpleConfig &cfg) |
Detailed Description
Mimetype for a .desktop file Handles mount/umount icon, and user-defined properties.
Definition at line 339 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 557 of file kmimetype.cpp. References KServiceType::icon(), and QString::isEmpty(). Referenced by icon(). |
|
This function differs from the above only in that a KURL may be provided instead of a QString for convenience.
Reimplemented from KMimeType. Definition at line 566 of file kmimetype.cpp. References KIO::findDeviceMountPoint(), icon(), KServiceType::icon(), QString::isEmpty(), QString::isNull(), KURL::path(), KConfigBase::readEntry(), and KConfigBase::setDesktopGroup(). |
|
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 596 of file kmimetype.cpp. References KServiceType::icon(), KGlobal::iconLoader(), KURL::isLocalFile(), QPixmap::isNull(), and KIconLoader::loadIcon(). |
|
The arguments are unused, but provided so that KMimeType derived classes can use them.
Reimplemented from KMimeType. Definition at line 608 of file kmimetype.cpp. References KMimeType::comment(), and QString::isEmpty(). Referenced by comment(). |
|
This function differs from the above only in that a KURL may be provided instead of a QString for convenience.
Reimplemented from KMimeType. Definition at line 617 of file kmimetype.cpp. References comment(), KMimeType::comment(), QString::isEmpty(), KURL::path(), KConfigBase::readEntry(), and KConfigBase::setDesktopGroup(). |
|
Definition at line 756 of file kmimetype.cpp. References QValueList::append(), KMessageBox::error(), KIO::findDeviceMountPoint(), QString::isEmpty(), KURL::isLocalFile(), KIO::mount(), KURL::path(), KConfigBase::readEntry(), KConfigBase::setDesktopGroup(), and KIO::unmount(). |
|
Definition at line 809 of file kmimetype.cpp. References QValueList::append(), QString::contains(), KStdAccel::end(), KMessageBox::error(), KStandardDirs::findExe(), KConfigBase::hasGroup(), KConfigBase::hasKey(), QString::isEmpty(), KDEDesktopMimeType::Service::m_display, KDEDesktopMimeType::Service::m_strExec, KDEDesktopMimeType::Service::m_strIcon, KDEDesktopMimeType::Service::m_strName, KDEDesktopMimeType::Service::m_type, QString::prepend(), KConfigBase::readBoolEntry(), KConfigBase::readEntry(), KConfigBase::readListEntry(), KConfigBase::readPathEntry(), KConfigBase::setDesktopGroup(), and KConfigBase::setGroup(). |
|
Definition at line 879 of file kmimetype.cpp. References QValueList< KURL >::append(), and KURL::setPath(). |
|
Execute
Definition at line 888 of file kmimetype.cpp. References QValueList< KURL >::count(), KMessageBox::error(), KIO::findDeviceMountPoint(), QValueList< KURL >::first(), QString::isEmpty(), KDEDesktopMimeType::Service::m_strExec, KDEDesktopMimeType::Service::m_strIcon, KDEDesktopMimeType::Service::m_strName, KDEDesktopMimeType::Service::m_type, 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 631 of file kmimetype.cpp. References KMessageBox::error(), QString::isEmpty(), KURL::path(), KConfigBase::readEntry(), KConfigBase::setDesktopGroup(), and KConfigBase::setDollarExpansion(). 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 411 of file kmimetype.h. References KMimeType::pixmap(). |
The documentation for this class was generated from the following files: