ViewScriptInterface Class

The ViewScriptInterface class enables you to manage generic device and display properties. More...

Header: #include <ViewScriptInterface>

Public Types

enum Orientation { topUp, topDown, leftUp, rightUp }

Public Functions

QString currentDevice() const
QStringList deviceList() const
QString deviceOrientation() const
QVariantList displayInfo() const
void setDevice(const QString &dev)
bool setDeviceOrientation(QString newOrientation)
QStringList supportedOrientations() const

Detailed Description

The ViewScriptInterface class enables you to manage generic device and display properties.

Some devices are predefined for the emulator. The device determines the screen size, default orientation, and resolution of the screen.

The ViewScriptInterface class is exposed as emulator.

Member Type Documentation

enum ViewScriptInterface::Orientation

This enum type holds the orientation of the device.

ConstantValueDescription
ViewScriptInterface::topUp0x0000001The top of the device is pointing up.
ViewScriptInterface::topDown0x0000004The device is upside down.
ViewScriptInterface::leftUp0x0000002The left side of the device is pointing up.
ViewScriptInterface::rightUp0x0000008The right side of the device is pointing up.

Member Function Documentation

QString ViewScriptInterface::currentDevice() const

Returns the name of the current device.

See also setDevice().

QStringList ViewScriptInterface::deviceList() const

Returns a list of all available devices.

QString ViewScriptInterface::deviceOrientation() const

Returns the current device orientation.

See also setDeviceOrientation().

QVariantList ViewScriptInterface::displayInfo() const

Returns information about the available displays.

void ViewScriptInterface::setDevice(const QString &dev)

Sets the current device to be the one identified by dev.

See also currentDeviceName().

bool ViewScriptInterface::setDeviceOrientation(QString newOrientation)

Rotates the current device to the orientation specified by newOrientation.

Returns true on success.

See also deviceOrientation().

QStringList ViewScriptInterface::supportedOrientations() const

Returns the list of screen orientations.

© 2018 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 the GNU 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.