# class BrowserArguments

###

Module | kparts
Namespace | KParts
Class | BrowserArguments
Inherits |

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).

### methods

- BrowserArguments ( )

  returns ctor

- BrowserArguments (args)

  returns ctor

  Argument | Type | Default
  --- | --- | ---
  args | KParts.BrowserArguments |

- contentType ( )

  returns QString

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

- doPost ( )

  returns bool

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

- forcesNewWindow ( )

  returns bool

  Whether the URL specifies to be opened in a new window

- lockHistory ( )

  returns bool

- newTab ( )

  returns bool

- redirectedRequest ( )

  returns bool

- setContentType (contentType)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  contentType | QString |

- setDoPost (enable)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  enable | bool |

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

- setForcesNewWindow (forcesNewWindow)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  forcesNewWindow | bool |

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

- setLockHistory (lock)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  lock | bool |

  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 (newTab)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  newTab | bool |

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

- setRedirectedRequest (redirected)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  redirected | bool |

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

  redirected -

### variables

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.