BrowserArguments Class Reference
from PyKDE4.kparts import *
Namespace: KParts
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).
Attributes | |
QStringList | docState |
QString | frameName |
QByteArray | postData |
bool | softReload |
bool | trustedSource |
Methods | |
__init__ (self) | |
__init__ (self, KParts.BrowserArguments args) | |
QString | contentType (self) |
bool | doPost (self) |
bool | forcesNewWindow (self) |
bool | lockHistory (self) |
bool | newTab (self) |
bool | redirectedRequest (self) |
setContentType (self, QString contentType) | |
setDoPost (self, bool enable) | |
setForcesNewWindow (self, bool forcesNewWindow) | |
setLockHistory (self, bool lock) | |
setNewTab (self, bool newTab) | |
setRedirectedRequest (self, bool redirected) |
Method Documentation
__init__ | ( | self ) |
__init__ | ( | self, | ||
KParts.BrowserArguments | args | |||
) |
QString contentType | ( | self ) |
KHTML-specific field, header defining the type of the POST data.
bool doPost | ( | self ) |
KHTML-specific field, whether to do a POST instead of a GET, for the next openURL.
bool forcesNewWindow | ( | self ) |
Whether the URL specifies to be opened in a new window
bool lockHistory | ( | self ) |
bool newTab | ( | self ) |
bool redirectedRequest | ( | self ) |
setContentType | ( | self, | ||
QString | contentType | |||
) |
setDoPost | ( | self, | ||
bool | enable | |||
) |
KHTML-specific field, whether to do a POST instead of a GET, for the next openURL.
setForcesNewWindow | ( | self, | ||
bool | forcesNewWindow | |||
) |
Set whether the URL specifies to be opened in a new window
setLockHistory | ( | self, | ||
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.
setNewTab | ( | self, | ||
bool | newTab | |||
) |
Whether the URL should be opened in a new tab instead in a new window.
setRedirectedRequest | ( | self, | ||
bool | redirected | |||
) |
Set the redirect flag to indicate URL is a result of either a META redirect or HTTP redirect.
- Parameters:
-
redirected
Attribute Documentation
QStringList docState |
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.
QString frameName |
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.
QByteArray postData |
KHTML-specific field, header defining the type of the POST data.
bool softReload |
KHTML-specific field, contents of the HTTP POST data.
bool trustedSource |
- Returns:
- true if the request was a result of a META refresh/redirect request or HTTP redirect.