• Skip to content
  • Skip to link menu
KDE 3.5 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

KParts

KParts::URLArgs

KParts::URLArgs Struct Reference

URLArgs is a set of arguments bundled into a structure, to allow specifying how a URL should be opened by openURL(). More...

#include <browserextension.h>

List of all members.


Public Member Functions

QString contentType () const
bool doPost () const
bool forcesNewWindow () const
bool lockHistory () const
QMap< QString, QString > & metaData ()
bool newTab () const
URLArgs & operator= (const URLArgs &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)
 URLArgs (bool reload, int xOffset, int yOffset, const QString &serviceType=QString::null)
 URLArgs (const URLArgs &args)
 URLArgs ()
virtual ~URLArgs ()

Public Attributes

URLArgsPrivate * d
QStringList docState
QString frameName
QByteArray postData
bool reload
QString serviceType
bool trustedSource
int xOffset
int yOffset

Detailed Description

URLArgs is a set of arguments bundled into a structure, to allow specifying how a URL should be opened by openURL().

In other words, this is like arguments to openURL(), but without have to change the signature of openURL() (since openURL is a generic KParts method). 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 57 of file browserextension.h.


Constructor & Destructor Documentation

URLArgs::URLArgs (  ) 

Definition at line 87 of file browserextension.cpp.

URLArgs::URLArgs ( const URLArgs &  args  ) 

Definition at line 106 of file browserextension.cpp.

URLArgs::URLArgs ( bool  reload,
int  xOffset,
int  yOffset,
const QString &  serviceType = QString::null 
)

Definition at line 97 of file browserextension.cpp.

URLArgs::~URLArgs (  )  [virtual]

Definition at line 133 of file browserextension.cpp.


Member Function Documentation

QString URLArgs::contentType (  )  const

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

Definition at line 158 of file browserextension.cpp.

bool URLArgs::doPost (  )  const

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

Definition at line 177 of file browserextension.cpp.

bool URLArgs::forcesNewWindow (  )  const

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

Since:
3.4

Definition at line 213 of file browserextension.cpp.

bool URLArgs::lockHistory (  )  const

Definition at line 189 of file browserextension.cpp.

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

Meta-data to associate with the next KIO operation.

See also:
KIO::TransferJob etc.

Definition at line 163 of file browserextension.cpp.

bool URLArgs::newTab (  )  const

Definition at line 201 of file browserextension.cpp.

URLArgs & URLArgs::operator= ( const URLArgs &  args  ) 

Definition at line 112 of file browserextension.cpp.

bool URLArgs::redirectedRequest (  )  const

Returns:
true if the request was a result of a META refresh/redirect request or HTTP redirect.

Definition at line 153 of file browserextension.cpp.

void URLArgs::setContentType ( const QString &  contentType  ) 

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

Definition at line 139 of file browserextension.cpp.

void URLArgs::setDoPost ( bool  enable  ) 

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

Definition at line 170 of file browserextension.cpp.

void URLArgs::setForcesNewWindow ( bool  forcesNewWindow  ) 

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

Since:
3.4

Definition at line 206 of file browserextension.cpp.

void URLArgs::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 182 of file browserextension.cpp.

void URLArgs::setNewTab ( bool  newTab  ) 

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

Definition at line 194 of file browserextension.cpp.

void URLArgs::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 146 of file browserextension.cpp.


Member Data Documentation

URLArgsPrivate* KParts::URLArgs::d

Definition at line 174 of file browserextension.h.

QStringList KParts::URLArgs::docState

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

See KHTMLPart for instance.

Definition at line 70 of file browserextension.h.

QString KParts::URLArgs::frameName

The frame in which to open the URL.

KHTML/Konqueror-specific.

Definition at line 139 of file browserextension.h.

QByteArray KParts::URLArgs::postData

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

Definition at line 94 of file browserextension.h.

bool KParts::URLArgs::reload

reload is set when the cache shouldn't be used (forced reload).

Definition at line 75 of file browserextension.h.

QString KParts::URLArgs::serviceType

The servicetype (usually mimetype) to use when opening the next URL.

Definition at line 89 of file browserextension.h.

bool KParts::URLArgs::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 146 of file browserextension.h.

int KParts::URLArgs::xOffset

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.

Definition at line 81 of file browserextension.h.

int KParts::URLArgs::yOffset

yOffset vertical scrolling position, xOffset.

Definition at line 85 of file browserextension.h.


The documentation for this struct was generated from the following files:
  • browserextension.h
  • browserextension.cpp

KParts

Skip menu "KParts"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

API Reference

Skip menu "API Reference"
  • dcop
  • DNSSD
  • interfaces
  • Kate
  • kconf_update
  • KDECore
  • KDED
  • kdefx
  • KDEsu
  • kdeui
  • KDocTools
  • KHTML
  • KImgIO
  • KInit
  • kio
  • kioslave
  • KJS
  • KNewStuff
  • KParts
  • KUtils
Generated for API Reference by doxygen 1.5.9
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal