KParts

KParts::BrowserArguments Struct Reference

#include <KParts/BrowserArguments>

Public Member Functions

 BrowserArguments (const BrowserArguments &args)
 
QString contentType () const
 
bool doPost () const
 
bool forcesNewWindow () const
 
bool lockHistory () const
 
bool newTab () const
 
BrowserArgumentsoperator= (const BrowserArguments &args)
 
bool redirectedRequest () const
 
void setContentType (const QString &contentType)
 
void setDoPost (bool enable)
 
void setForcesNewWindow (bool forcesNewWindow)
 
void setLockHistory (bool lock)
 
void setNewTab (bool newTab)
 
void setRedirectedRequest (bool redirected)
 

Public Attributes

QStringList docState
 
QString frameName
 
QByteArray postData
 
bool softReload
 
bool trustedSource
 

Detailed Description

BrowserArguments is a set of web-browsing-specific arguments, which allow specifying how a URL should be opened by openUrl() (as a complement to KParts::OpenUrlArguments which are the non-web-specific arguments)

The arguments remain stored in the browser extension after that, and can be used for instance to jump to the xOffset/yOffset position once the url has finished loading.

The parts (with a browser extension) who care about urlargs will use those arguments, others will ignore them.

This can also be used the other way round, when a part asks for a URL to be opened (with openUrlRequest or createNewWindow).

Definition at line 41 of file browserarguments.h.

Member Function Documentation

QString BrowserArguments::contentType ( ) const

KHTML-specific field, header defining the type of the POST data.

Definition at line 88 of file browserarguments.cpp.

bool BrowserArguments::doPost ( ) const

KHTML-specific field, whether to do a POST instead of a GET, for the next openURL.

Definition at line 101 of file browserarguments.cpp.

bool BrowserArguments::forcesNewWindow ( ) const

Whether the URL specifies to be opened in a new window.

Definition at line 140 of file browserarguments.cpp.

bool BrowserArguments::redirectedRequest ( ) const
Returns
true if the request was a result of a META refresh/redirect request or HTTP redirect.

Definition at line 83 of file browserarguments.cpp.

void BrowserArguments::setContentType ( const QString contentType)

KHTML-specific field, header defining the type of the POST data.

Definition at line 67 of file browserarguments.cpp.

void BrowserArguments::setDoPost ( bool  enable)

KHTML-specific field, whether to do a POST instead of a GET, for the next openURL.

Definition at line 93 of file browserarguments.cpp.

void BrowserArguments::setForcesNewWindow ( bool  forcesNewWindow)

Set whether the URL specifies to be opened in a new window.

When openUrlRequest is emitted:

  • normally the url would be opened in the current view.
  • setForcesNewWindow(true) specifies that a new window or tab should be used: setNewTab(true) requests a tab specifically, otherwise the user-preference is followed. This is typically used for target="_blank" in web browsers.

When createNewWindow is emitted:

  • if setNewTab(true) was called, a tab is created.
  • otherwise, if setForcesNewWindow(true) was called, a window is created.
  • otherwise the user preference is followed.

Definition at line 132 of file browserarguments.cpp.

void BrowserArguments::setLockHistory ( bool  lock)

Whether to lock the history when opening the next URL.

This is used during e.g. a redirection, to avoid a new entry in the history.

Definition at line 106 of file browserarguments.cpp.

void BrowserArguments::setNewTab ( bool  newTab)

Whether the URL should be opened in a new tab instead in a new window.

Definition at line 119 of file browserarguments.cpp.

void BrowserArguments::setRedirectedRequest ( bool  redirected)

Set the redirect flag to indicate URL is a result of either a META redirect or HTTP redirect.

Parameters
redirected

Definition at line 75 of file browserarguments.cpp.

Member Data Documentation

QStringList KParts::BrowserArguments::docState

This buffer can be used by the part to save and restore its contents.

See KHTMLPart for instance.

Definition at line 52 of file browserarguments.h.

QString KParts::BrowserArguments::frameName

The frame in which to open the URL.

KHTML/Konqueror-specific.

Definition at line 104 of file browserarguments.h.

QByteArray KParts::BrowserArguments::postData

KHTML-specific field, contents of the HTTP POST data.

Definition at line 65 of file browserarguments.h.

bool KParts::BrowserArguments::softReload

softReload is set when user just hits reload button.

It's used currently for two different frameset reload strategies. In case of soft reload individual frames are reloaded instead of reloading whole frameset.

Definition at line 60 of file browserarguments.h.

bool KParts::BrowserArguments::trustedSource

If true, the part who asks for a URL to be opened can be 'trusted' to execute applications.

For instance, the directory views can be 'trusted' whereas HTML pages are not trusted in that respect.

Definition at line 111 of file browserarguments.h.


The documentation for this struct was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Fri Oct 15 2021 22:56:42 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.