class KRun

Implements a generic runner, i. More...

Definition#include <krun.h>
InheritsQObject (kdecore)
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Methods

Signals

Public Static Methods

Protected Methods

Protected Slots

Protected Static Methods

Protected Members


Detailed Description

Implements a generic runner, i.e. the 'exec' functionality of KDE It can execute any desktop entry, as well as any file, using default binding (service) or another bound service.

KRun ( const QString& _url, mode_t _mode = 0, bool _is_local_file = false, bool _auto_delete = true )

Parameters:
_modeis the st_mode field of <tt>struct stat</tt>. If you dont know this set it to 0.
_is_local_file if this * parameter is set to false, then '_url' is examnined to find out * whether it is a local URL or not. This flag is just used to * improve speed, since the function KURL::isLocalFile is a bit slow.

bool autoDelete ()

By default auto deletion is on.

bool run ( const KService& _service, QStringList& _urls )
[static]

Opens a list of URLs with a certain service.

Parameters:
_urlsthe list of URLs, can be empty (app launched without argument)

bool run ( const QString& _exec, QStringList& _urls, const QString& _name = QString::null, const QString& _icon = QString::null, const QString& _mini_icon = QString::null, const QString& _desktop_file = QString::null )
[static]

Opens a list of URLs with.

Parameters:
_execis the name of the executable, for example "/usr/bin/netscape".
_nameis the logical name of the application, for example "Netscape 4.06".
_iconis the icon which should be used by the application.
_miniiconis the icon which should be used by the application.

void foundMimeType ( const char *_type )
[protected virtual]

Called if the mimetype has been detected. The function checks whether the document and appends the gzip protocol to the URL. Otherwise runURL is called to finish the job.

bool m_bScanFile
[protected]

Used to indicate that the next action is to scan the file. This action is invoked from slotTimeout.

bool m_bInit
[protected]

USed to indicate that the next action is to initialize. This action is invoked from slotTimeout

bool runURL ( const char *_url, const char *_mimetype )
[protected static]

Open the given URL. This function is used after the mime type is found out. It will search for all services which can handle the mime type and call run afterwards.

bool run ( const QString& _cmd )
[protected static]

Runs a shell command.

_cmd must be a quoted shell command. You must not append "&" to it, since the function will do that for you. An example is "<tt>greet 'Hello Torben'</tt>".

void shellQuote ( QString &_str )
[protected static]

Quotes a string for the shell


Generated by: root@tantive.terraplex.com on Sun Feb 27 17:39:31 2000, using kdoc 2.0a33.