KParts::OpenUrlArguments Class

class KParts::OpenUrlArguments

OpenUrlArguments is the set of arguments that specify how a URL should be opened by KParts::ReadOnlyPart::openUrl(). More...

Header: #include <KParts/OpenUrlArguments>
CMake: find_package(KF6 REQUIRED COMPONENTS Parts)
target_link_libraries(mytarget PRIVATE KF6::Parts)

Public Functions

OpenUrlArguments()
(since 4.1) bool actionRequestedByUser() const
QMap<QString, QString> &metaData()
const QMap<QString, QString> &metaData() const
QString mimeType() const
bool reload() const
void setActionRequestedByUser(bool userRequested)
void setMimeType(const QString &mime)
void setReload(bool b)
void setXOffset(int x)
void setYOffset(int y)
int xOffset() const
int yOffset() const

Detailed Description

For instance reload() indicates that the url should be loaded from the network even if it matches the current url of the part.

All setter methods in this class are for the class that calls openUrl (usually the hosting application), all the getter methods are for the part.

Member Function Documentation

OpenUrlArguments::OpenUrlArguments()

[since 4.1] bool OpenUrlArguments::actionRequestedByUser() const

True if the user requested that the URL be opened. False if the URL should be opened due to an external event, like javascript popups or automatic redirections. This is true by default

This function was introduced in 4.1.

See also setActionRequestedByUser().

QMap<QString, QString> &OpenUrlArguments::metaData()

Meta-data to associate with the KIO operation that will be used to open the URL.

This method can be used to add or retrieve metadata.

See also KIO::TransferJob.

const QMap<QString, QString> &OpenUrlArguments::metaData() const

QString OpenUrlArguments::mimeType() const

The mimetype to use when opening the url, when known by the calling application.

See also setMimeType().

bool OpenUrlArguments::reload() const

Returns true to indicate that the part should reload the URL, i.e. the cache shouldn't be used (forced reload).

See also setReload().

void OpenUrlArguments::setActionRequestedByUser(bool userRequested)

See also actionRequestedByUser().

void OpenUrlArguments::setMimeType(const QString &mime)

See also mimeType().

void OpenUrlArguments::setReload(bool b)

Indicates that the url should be loaded from the network even if it matches the current url of the part.

See also reload().

void OpenUrlArguments::setXOffset(int x)

See also xOffset().

void OpenUrlArguments::setYOffset(int y)

See also yOffset().

int OpenUrlArguments::xOffset() const

xOffset is the horizontal scrolling of the part's widget (in case it's a scrollview). This is saved into the history and restored when going back in the history.

See also setXOffset().

int OpenUrlArguments::yOffset() const

yOffset is the vertical scrolling of the part's widget (in case it's a scrollview). This is saved into the history and restored when going back in the history.

See also setYOffset().