class KRun

Implements a generic runner, i. More...

Definition#include <krun.h>
InheritsQObject (qt)
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 KURL& _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 ()

[const]

By default auto deletion is on.

bool  run ( const KService& _service, const KURL::List& _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, const KURL::List& _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 QString& _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 KURL& _url, const QString& _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: dfaure@faure on Sun Mar 26 14:24:43 2000, using kdoc 2.0a35.