CopperSpice API  1.8.1
QWebPage::ViewportAttributes Class Reference

The ViewportAttributes class describes hints that can be applied to a viewport. More...

Public Methods

 ViewportAttributes ()
 ViewportAttributes (const QWebPage::ViewportAttributes &other)
 ~ViewportAttributes ()
qreal devicePixelRatio () const
qreal initialScaleFactor () const
bool isUserScalable () const
bool isValid () const
qreal maximumScaleFactor () const
qreal minimumScaleFactor () const
QWebPage::ViewportAttributes & operator= (const QWebPage::ViewportAttributes &other)
QSize size () const


class QWebPage

Detailed Description

The ViewportAttributes class describes hints which can be applied to a viewport. ViewportAttributes provides a description of a viewport, such as viewport geometry, initial scale factor with limits, plus information about whether a user should be able to scale the contents in the viewport or not, ie. by zooming.

ViewportAttributes can be set by a web author using the viewport meta tag extension, documented at Safari Reference Library: Using the Viewport Meta Tag.

All values might not be set. Developers need to check whether the values are valid. Negative values denote an invalid qreal value.

Constructor & Destructor Documentation

QWebPage::ViewportAttributes::ViewportAttributes ( )

Constructs an empty QWebPage::ViewportAttributes.

QWebPage::ViewportAttributes::ViewportAttributes ( const QWebPage::ViewportAttributes &  other)

Constructs a QWebPage::ViewportAttributes which is a copy from other .

QWebPage::ViewportAttributes::~ViewportAttributes ( )

Destroys the QWebPage::ViewportAttributes.

Method Documentation

qreal QWebPage::ViewportAttributes::devicePixelRatio ( ) const

Returns the device pixel ratio.

qreal QWebPage::ViewportAttributes::initialScaleFactor ( ) const

Returns the initial scale of the viewport as a multiplier.

bool QWebPage::ViewportAttributes::isUserScalable ( ) const

Returns whether or not the scale can be modified by the user.

bool QWebPage::ViewportAttributes::isValid ( ) const

Returns whether this is a valid ViewportAttributes or not.

An invalid ViewportAttributes will have an empty QSize, negative values for scale factors and true for the boolean isUserScalable.

qreal QWebPage::ViewportAttributes::maximumScaleFactor ( ) const

Returns the maximum scale value of the viewport as a multiplier.

qreal QWebPage::ViewportAttributes::minimumScaleFactor ( ) const

Returns the minimum scale value of the viewport as a multiplier.

QWebPage::ViewportAttributes & QWebPage::ViewportAttributes::operator= ( const QWebPage::ViewportAttributes &  other)

Copy assigns from other and returns a reference to this object.

QSize QWebPage::ViewportAttributes::size ( ) const

Returns the size of the viewport.