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 |
Static Public Members
const QMetaObject | staticMetaObject |
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.
Constant | Value | Description |
---|---|---|
ViewScriptInterface::topUp | 0x0000001 | The top of the device is pointing up. |
ViewScriptInterface::topDown | 0x0000004 | The device is upside down. |
ViewScriptInterface::leftUp | 0x0000002 | The left side of the device is pointing up. |
ViewScriptInterface::rightUp | 0x0000008 | The right side of the device is pointing up. |
Property Documentation
Member Function Documentation
QString ViewScriptInterface::currentDevice() const
Returns the name of the current device.
Note: This function can be invoked via the meta-object system and from QML. See Q_INVOKABLE.
See also setDevice().
QStringList ViewScriptInterface::deviceList() const
Returns a list of all available devices.
Note: This function can be invoked via the meta-object system and from QML. See Q_INVOKABLE.
QString ViewScriptInterface::deviceOrientation() const
Returns the current device orientation.
Note: This function can be invoked via the meta-object system and from QML. See Q_INVOKABLE.
See also setDeviceOrientation().
QVariantList ViewScriptInterface::displayInfo() const
Returns information about the available displays.
Note: This function can be invoked via the meta-object system and from QML. See Q_INVOKABLE.
void ViewScriptInterface::setDevice(const QString &dev)
Sets the current device to be the one identified by dev.
Note: This function can be invoked via the meta-object system and from QML. See Q_INVOKABLE.
See also currentDeviceName().
bool ViewScriptInterface::setDeviceOrientation(QString newOrientation)
Rotates the current device to the orientation specified by newOrientation.
Returns true
on success.
Note: This function can be invoked via the meta-object system and from QML. See Q_INVOKABLE.
See also deviceOrientation().
QStringList ViewScriptInterface::supportedOrientations() const
Returns the list of screen orientations.
Note: This function can be invoked via the meta-object system and from QML. See Q_INVOKABLE.
Member Variable Documentation
Related Non-Members
Macro Documentation
© 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.