• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdelibs API Reference
  • KDE Home
  • Contact Us
 

KIO

Functions
KDesktopFileActions Namespace Reference

Functions

QList< KServiceAction > builtinServices (const KUrl &url)
 
void executeService (const KUrl::List &urls, const KServiceAction &service)
 
bool run (const KUrl &_url, bool _is_local)
 
QList< KServiceAction > userDefinedServices (const QString &path, bool bLocalFiles)
 
QList< KServiceAction > userDefinedServices (const QString &path, const KDesktopFile &desktopFile, bool bLocalFiles, const KUrl::List &file_list=KUrl::List())
 
QList< KServiceAction > userDefinedServices (const KService &service, bool bLocalFiles, const KUrl::List &file_list=KUrl::List())
 

Detailed Description

KDesktopFileActions provides a number of methods related to actions in desktop files.

Function Documentation

QList< KServiceAction > KDesktopFileActions::builtinServices ( const KUrl &  url)

Returns a list of services for the given .desktop file that are handled by kio itself.

Namely mount/unmount for FSDevice files.

Returns
the list of services

Definition at line 156 of file kdesktopfileactions.cpp.

void KDesktopFileActions::executeService ( const KUrl::List &  urls,
const KServiceAction &  service 
)

Execute service on the list of urls.

Parameters
urlsthe list of urls
servicethe service to execute

Definition at line 288 of file kdesktopfileactions.cpp.

bool KDesktopFileActions::run ( const KUrl &  _url,
bool  _is_local 
)

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.

Parameters
_urlthe url to run
_is_localtrue if the URL is local, false otherwise
Returns
true on success and false on failure.
See also
KRun::runUrl

Definition at line 54 of file kdesktopfileactions.cpp.

QList< KServiceAction > KDesktopFileActions::userDefinedServices ( const QString &  path,
bool  bLocalFiles 
)

Returns a list of services defined by the user as possible actions on the given .desktop file.

May include separators (see KServiceAction::isSeparator) which should appear in user-visible representations of those actions, such as separators in a menu.

Parameters
paththe path to the desktop file describing the services
bLocalFilestrue if those services are to be applied to local files only (if false, services that don't have u or U in the Exec line won't be taken into account).
Returns
the list of user defined actions

Definition at line 230 of file kdesktopfileactions.cpp.

QList< KServiceAction > KDesktopFileActions::userDefinedServices ( const QString &  path,
const KDesktopFile &  desktopFile,
bool  bLocalFiles,
const KUrl::List &  file_list = KUrl::List() 
)

Overload of userDefinedServices but also allows you to pass a list of urls for this file.

This allows for the menu to be changed depending on the exact files via the X-KDE-GetActionMenu extension.

Definition at line 236 of file kdesktopfileactions.cpp.

QList< KServiceAction > KDesktopFileActions::userDefinedServices ( const KService &  service,
bool  bLocalFiles,
const KUrl::List &  file_list = KUrl::List() 
)

Returns a list of services defined by the user as possible actions on the given .desktop file represented by the KService instance.

May include separators (see KServiceAction::isSeparator) which should appear in user-visible representations of those actions, such as separators in a menu.

Parameters
paththe path to the desktop file describing the services
bLocalFilestrue if those services are to be applied to local files only (if false, services that don't have u or U in the Exec line won't be taken into account).
file_listlist of urls; this allows for the menu to be changed depending on the exact files via the X-KDE-GetActionMenu extension.
Returns
the list of user defined actions

Definition at line 243 of file kdesktopfileactions.cpp.

This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:50:04 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KIO

Skip menu "KIO"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdelibs API Reference

Skip menu "kdelibs API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  • kjsembed
  •   WTF
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Nepomuk-Core
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal