org.kde.koala

Class BrowserRun

public class BrowserRun extends KRun

This class extends KRun to provide additional functionality for browsers:

Author: David Faure

UNKNOWN: This class extends KRun to provide additional functionality for browsers:

Constructor Summary
protected BrowserRun(Class dummy)
BrowserRun(KURL url, URLArgs args, ReadOnlyPart part, QWidget window, boolean removeReferrer, boolean trustedSource)
BrowserRun(KURL url, URLArgs args, ReadOnlyPart part, QWidget window, boolean removeReferrer, boolean trustedSource, boolean hideErrorDialog)
Method Summary
static booleanallowExecution(String serviceType, KURL url)
StringclassName()
protected voidhandleError(Job job)
Called when an error happens.
booleanhideErrorDialog()
protected voidinit()
Reimplemented from KRun
static booleanisExecutable(String serviceType)
BIC: Obsoleted by KRun.isExecutable( StringserviceType ); @short BIC: Obsoleted by KRun.isExecutable( StringserviceType );
static booleanisTextExecutable(String serviceType)
QMetaObjectmetaObject()
voidsave(KURL url, String suggestedFilename)
protected voidscanFile()
Reimplemented from KRun
static voidsimpleSave(KURL url, String suggestedFilename, QWidget window)
Similar to askSave() but for the case where the current application is able to embed the url itself (instead of passing it to another app).
static voidsimpleSave(KURL url, String suggestedFilename)
BIC: Combine with the above function for KDE 4.0.
protected voidslotBrowserMimetype(Job job, String type)
protected voidslotBrowserScanFinished(Job job)
Helper for foundMimeType: call this if the mimetype couldn't be embedded
protected voidslotCopyToTempFileResult(Job job)
protected voidslotStatResult(Job job)
StringsuggestedFilename()
KURLurl()

Constructor Detail

BrowserRun

protected BrowserRun(Class dummy)

BrowserRun

public BrowserRun(KURL url, URLArgs args, ReadOnlyPart part, QWidget window, boolean removeReferrer, boolean trustedSource)

Parameters: url the URL we're probing args URL args - includes data for a HTTP POST, etc. part the part going to open this URL - can be null if not created yet window the mainwindow - passed to KIO.Job.setWindow() removeReferrer if true, the "referrer" metadata from args isn't passed on trustedSource if false, a warning will be shown before launching an executable Always pass false for trustedSource, except for local directory views.

UNKNOWN:

BrowserRun

public BrowserRun(KURL url, URLArgs args, ReadOnlyPart part, QWidget window, boolean removeReferrer, boolean trustedSource, boolean hideErrorDialog)

Parameters: url the URL we're probing args URL args - includes data for a HTTP POST, etc. part the part going to open this URL - can be null if not created yet window the mainwindow - passed to KIO.Job.setWindow() removeReferrer if true, the "referrer" metadata from args isn't passed on trustedSource if false, a warning will be shown before launching an executable hideErrorDialog if true, no dialog will be shown in case of errors. Always pass false for trustedSource, except for local directory views.

UNKNOWN:

Method Detail

allowExecution

public static boolean allowExecution(String serviceType, KURL url)

className

public String className()

handleError

protected void handleError(Job job)
Called when an error happens. NOTE: job could be null, if you passed hideErrorDialog=true. The default implementation shows a message box, but only when job != 0 .... It is strongly recommended to reimplement this method if you passed hideErrorDialog=true.

UNKNOWN: Called when an error happens.

hideErrorDialog

public boolean hideErrorDialog()

Returns: true if no dialog will be shown in case of errors

UNKNOWN:

init

protected void init()
Reimplemented from KRun

UNKNOWN: Reimplemented from KRun

isExecutable

public static boolean isExecutable(String serviceType)
BIC: Obsoleted by KRun.isExecutable( StringserviceType ); @short BIC: Obsoleted by KRun.isExecutable( StringserviceType );

isTextExecutable

public static boolean isTextExecutable(String serviceType)

metaObject

public QMetaObject metaObject()

save

public void save(KURL url, String suggestedFilename)

scanFile

protected void scanFile()
Reimplemented from KRun

UNKNOWN: Reimplemented from KRun

simpleSave

public static void simpleSave(KURL url, String suggestedFilename, QWidget window)
Similar to askSave() but for the case where the current application is able to embed the url itself (instead of passing it to another app).

Parameters: url the URL in question mimeType the mimetype of the URL suggestedFilename optional filename suggested by the server flags reserved for later use

Returns: Save, Open or Cancel.

UNKNOWN: Similar to askSave() but for the case where the current application is able to embed the url itself (instead of passing it to another app).

simpleSave

public static void simpleSave(KURL url, String suggestedFilename)
BIC: Combine with the above function for KDE 4.0. @short BIC: Combine with the above function for KDE 4.

slotBrowserMimetype

protected void slotBrowserMimetype(Job job, String type)

slotBrowserScanFinished

protected void slotBrowserScanFinished(Job job)
Helper for foundMimeType: call this if the mimetype couldn't be embedded

UNKNOWN: Helper for foundMimeType: call this if the mimetype couldn't be embedded

slotCopyToTempFileResult

protected void slotCopyToTempFileResult(Job job)

slotStatResult

protected void slotStatResult(Job job)

suggestedFilename

public String suggestedFilename()

Returns: Suggested filename given by the server (e.g. HTTP content-disposition)

UNKNOWN:

url

public KURL url()

Returns: the URL we're probing

UNKNOWN: