Home · Modules · Classes · Namespaces · Functions

QxtWebPageEvent Class Reference
[QxtWeb module]

The QxtWebPageEvent class describes a web page or other content to be sent to a web browser More...

    #include <QxtWebPageEvent>

Inherits QxtWebEvent.

Inherited by QxtWebErrorEvent and QxtWebRedirectEvent.

Public Functions

Public Variables


Detailed Description

The QxtWebPageEvent class describes a web page or other content to be sent to a web browser

The QxtWebPageEvent class contains information about a web page or other similar content that will be sent to a web browser.


Member Function Documentation

QxtWebPageEvent::QxtWebPageEvent ( int sessionID, int requestID, QIODevice * source = 0 )

Constructs a QxtWebPageEvent for the specified sessionID and requestID that will use the data from source as the content to be sent to the web browser.

The requestID is an opaque value generated by the session manager; services will receive this value via QxtWebRequestEvent and must use it in every event that responds to that request.

QxtWeb takes ownership of the source and will delete it when the response is completed.

QxtWebPageEvent::QxtWebPageEvent ( int sessionID, int requestID, QByteArray source )

Constructs a QxtWebPageEvent for the specified sessionID and requestID that will use source as the content to be sent to the web browser.

The requestID is an opaque value generated by the session manager; services will receive this value via QxtWebRequestEvent and must use it in every event that responds to that request.

QxtWebPageEvent::~QxtWebPageEvent ()   [virtual]

Destroys the event and any data source attached to it.


Member Variable Documentation

bool QxtWebPageEvent::chunked

If true, and if the web browser supports "chunked" encoding, the content will be sent using "chunked" encoding. If false, or if the browser does not support this encoding (for instance, HTTP/0.9 and HTTP/1.0 user agents), HTTP keep-alive will be disabled.

The default value is true when using the QIODevice* constructor and false when using the QByteArray constructor.

QByteArray QxtWebPageEvent::contentType

Contains the MIME type of the content being sent to the web browser.

The default value is "text/html".

QPointer<QIODevice> QxtWebPageEvent::dataSource

Data will be read from this device and relayed to the web browser.

QMultiHash<QString, QString> QxtWebPageEvent::headers

Contains custom headers to be sent to the web browser.

It is empty by default.

const int QxtWebPageEvent::requestID

Contains the opaque requestID provided by QxtWebRequestEvent.

int QxtWebPageEvent::status

Contains the HTTP status code that will be sent with the response.

The default value is 200 ("OK").

QByteArray QxtWebPageEvent::statusMessage

Contains the human-readable message associated with the HTTP status code that will be sent with the response.

The default value is "OK".

bool QxtWebPageEvent::streaming

If true, the data source is considered to be a source of streaming data. The QIODevice must emit the readyRead() signal when data is available and must emit aboutToClose() after all data has been transferred. (This can be accomplished by invoking QIODevice::close() on it after all data is determined to have been transferred.)

The default value is true when using the QIODevice* constructor and false when using the QByteArray constructor. If using a QIODevice that does not produce streaming data, such as QFile, this must be set to false to ensure correct behavior.


Copyright © 2007-2011 Qxt Foundation
Qxt 0.6.2