Movatterモバイル変換


[0]ホーム

URL:


We bake cookies in your browser for a better experience. Using this site means that you consent.Read More

Menu

Qt Documentation

ViewportAttributes Class

(QWebPage::ViewportAttributes)

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

Header:#include <ViewportAttributes>
Since: Qt 4.7

Public Functions

ViewportAttributes()
ViewportAttributes(const QWebPage::ViewportAttributes & other)
~ViewportAttributes()
qrealdevicePixelRatio() const
qrealinitialScaleFactor() const
boolisUserScalable() const
boolisValid() const
qrealmaximumScaleFactor() const
qrealminimumScaleFactor() const
QSizesize() const
QWebPage::ViewportAttributes &operator=(const QWebPage::ViewportAttributes & other)

Detailed Description

TheQWebPage::ViewportAttributes class describes hints that can be applied to a viewport.

QWebPage::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 atSafari Reference Library: Using the Viewport Meta Tag.

All values might not be set, as such when dealing with the hints, the developer needs to check whether the values are valid. Negative values denote an invalid qreal value.

Member Function Documentation

ViewportAttributes::ViewportAttributes()

Constructs an emptyQWebPage::ViewportAttributes.

ViewportAttributes::ViewportAttributes(constQWebPage::ViewportAttributes & other)

Constructs aQWebPage::ViewportAttributes which is a copy fromother .

ViewportAttributes::~ViewportAttributes()

Destroys theQWebPage::ViewportAttributes.

qreal ViewportAttributes::devicePixelRatio() const

qreal ViewportAttributes::initialScaleFactor() const

Returns the initial scale of the viewport as a multiplier.

bool ViewportAttributes::isUserScalable() const

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

bool ViewportAttributes::isValid() const

Returns whether this is a validViewportAttributes or not.

An invalidViewportAttributes will have an emptyQSize, negative values for scale factors and true for the booleanisUserScalable.

qreal ViewportAttributes::maximumScaleFactor() const

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

qreal ViewportAttributes::minimumScaleFactor() const

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

QSize ViewportAttributes::size() const

Returns the size of the viewport.

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

Assigns the givenQWebPage::ViewportAttributes to this viewport hints and returns a reference to this.

© 2016 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of theGNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.


[8]ページ先頭

©2009-2025 Movatter.jp