OxideQNavigationRequest Class

Request to navigate to a new page More...

Header: #include <oxideqnavigationrequest.h>
Instantiated By: NavigationRequest
Inherits: QObject

Public Types

enum Action { ActionAccept, ActionReject }
enum Disposition { DispositionCurrentTab, DispositionNewForegroundTab, DispositionNewBackgroundTab, DispositionNewPopup, DispositionNewWindow }

Properties

Public Functions

Action action() const
Disposition disposition() const
void setAction(Action action)
QUrl url() const

Signals

void actionChanged()

Additional Inherited Members

Detailed Description

Request to navigate to a new page

OxideQNavigationRequest represents a request to navigate to a new page. It is only used for content-initiated navigations.

Due to a mis-design of this API, it is currently used in more than one context. If disposition is DispositionCurrentTab, then this is a request to navigate the current webview. In this case url will indicate the actual URL that will be committed (redirects have already occurred at this point).

If disposition is not DispositionCurrentTab, then this is actually part of a request to open a new webview, whether this is due to a call to window.open() or the result of a link click with modifier keys pressed. In this case, url will indicate the initial URL that will be loaded in the new view (before any redirects occur).

The application gives its response by setting action appropriately.

Member Type Documentation

enum OxideQNavigationRequest::Action

ConstantValueDescription
OxideQNavigationRequest::ActionAccept0Allow the navigation to proceed
OxideQNavigationRequest::ActionReject0xFFBlock the navigation

enum OxideQNavigationRequest::Disposition

ConstantValueDescription
OxideQNavigationRequest::DispositionCurrentTab0A request to navigate in the current view
OxideQNavigationRequest::DispositionNewForegroundTab1A request to begin a navigation in a new foreground tab
OxideQNavigationRequest::DispositionNewBackgroundTab2A request to begin a navigation in a new background tab
OxideQNavigationRequest::DispositionNewPopup3A request to begin a navigation in a popup
OxideQNavigationRequest::DispositionNewWindow4A request to begin a navigation in a new window

Property Documentation

action : Action

This property stores the application's response. The default is ActionAccept.

Access functions:

Action action() const
void setAction(Action action)

Notifier signal:

void actionChanged()

disposition : const Disposition

Indicates the type of request. If this is DispositionCurrentTab, then it is a request to perform a navigation in the current view. Otherwise it is part of a request to open a new view, with the disposition acting as a hint to the type of view that the application will be asked to present.

Access functions:

Disposition disposition() const

url : const QUrl

The URL of the navigation request. If disposition is DispositionCurrentTab, this is the URL that will be committed (redirects have already occurred), else this will be the initial URL (before any redirects occur).

Access functions:

QUrl url() const