KParts::OpenUrlArguments Class

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

Public Functions

bool actionRequestedByUser() const
QMap<QString, QString> &metaData()
QString mimeType() const
bool reload() const
void setReload(bool b)
int xOffset() const
int yOffset() const

Detailed Description

@class OpenUrlArguments openurlarguments.h <KParts/OpenUrlArguments>

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

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

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 @since 4.1

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 KIO::TransferJob etc.

QString OpenUrlArguments::mimeType() const

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

bool OpenUrlArguments::reload() const

@return 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::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().

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.

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.