Yes, you have to mark your function of a QObject with QINVOKABLE unless it's a public slot in order to be able to call it from QML. Both QINVOKABLE and the slots keyword register your function with Qt meta-system. The difference is that with QINVOKABLE you can return values. Public Slots: void pause Respond to game pause. Void resume Respond to game resume. Void onPlayLevelRequested Respond to request to play the current level. Void onQuitRequested Respond to quit request. Void onSignedIntoCloudChanged. To achieve this, we carefully examine every casino operator Qinvokable Vs Public Slot we look at and use geotargeting to Qinvokable Vs Public Slot customise our recommendations to you. That way, you can rest assured that the top 10 casino sites in your country are just a click away. Top Casino Sites for Qinvokable Vs Public Slot 2020. Public Slots: void OnAddPlugin (QString plugin) Add a plugin to the window. Void OnLoadConfig (const QString &path) Callback when load configuration is selected. Void OnSaveConfig Callback when 'save configuration' is selected. Void OnSaveConfigAs (const QString &path) Callback when 'save configuration as' is selected. Read Only Properties. Properties can be read-only. Slots or QINVOKABLE functions. Can change state and emit signals. Sometimes it's cleaner to have. Read only properties. QINVOKABLE setter functions 30.
A singleton class that manages the oAuth 2.0 user agent/refresh flow. More..
#include
Public Slots | |
void | onAppStart () |
Signals | |
void | SFOAuthFlowSuccess (SFOAuthInfo *info) |
void | SFOAuthFlowFailure (SFOAuthInfo *info) |
void | SFOAuthFlowCanceled (SFOAuthInfo *info) |
void | SFUserLoggedOut () |
void | SFLoginHostChanged () |
Public Member Functions | |
Q_INVOKABLE void | login () |
Q_INVOKABLE void | logout () |
Q_INVOKABLE bool | isAuthenticating () |
Q_INVOKABLE void | cancelAuthentication () |
QString | loginHost () const |
const SFIdentityData * | getIdData () const |
const SFOAuthCredentials * | getCredentials () const |
Static Public Member Functions | |
static SFAuthenticationManager * | instance () |
static void | setScopes (QList< QString > newScopes) |
Static Protected Attributes | |
static SFAuthenticationManager * | sharedInstance |
Detailed Description
A singleton class that manages the oAuth 2.0 user agent/refresh flow.
This is a singleton class and its instance can be accessed by by SFAuthenticationManager::instance()
Initialization
Before using this class to start the authentication process, the application code needs to specify the required information to connect to salesforce.com:
- consumer key: set this value in your
applicationui
class by defining the SFRemoteAccessConsumerKey variable - redirect url: set this value in your
applicationui
class by defining the SFRemoteAccessConsumerKey variable - scopes: optionally set the scopes you want the access token to be associated with. Set its value by calling
SFAuthenticationManager::setScopes(QList newScopes)
;
Note
The consumer key, redirect url and scopes information is persisted on the device. If you decide to reconfigured these information, the change will take effect only after the app performed a logout or the app is deleted and re-installed. See SFAccountManager
for more details
Usage
To use this class, connect to the desired signals and invoke the desired functions
In order for the SDK to handle the authentication process. It uses a few QML assets to construct the UI needed during authentication They can be found in the assets/salesforce folder
- SFSettings.qml: a screen for user to specify which environment to connect the application to. The application developer is responsible for presenting this screen if a setting screen is required in the application. The SDK will do the necessary clean up tasks and emit a LoginHostChanged signal. The application is responsible for handling this signal (e.g. trigger login again)
- SFOAuthSheet.qml: a sheet that holds the web view for authentication. It is presented and dismissed by SFAuthenticationManager as part of the login process
- SFPasscodeCreation.qml: a sheet that lets user set up device password after authentication. It is presented and dismissed by SFAuthenticationManager
- SFLockScreen.qml: a sheet that locks the screen when the app is inactive for a period of time. It is presented and dismissed by SFAuthenticationManager
- See Also
- SFAuthenticationManager, SFAbstractApplicationUI See Authenticating Remote Access Application OAuth for more details. This SDK supports the oAuth 2.0 user agent flow and refresh token flow.
Definition at line 91 of file SFAuthenticationManager.h.
Member Function Documentation
Q_INVOKABLE void sf::SFAuthenticationManager::cancelAuthentication | ( | ) |
Cancels in progress authentication (stops web view from loading, or aborts refresh token connection) Does not clear existing account data.
const SFOAuthCredentials* sf::SFAuthenticationManager::getCredentials | ( | ) | const |
const SFIdentityData* sf::SFAuthenticationManager::getIdData | ( | ) | const |
- Returns
- the current logged in user's identity data
| static |
Q_INVOKABLE bool sf::SFAuthenticationManager::isAuthenticating | ( | ) |
- Returns
- boolean value indicating whether there is any authentication in progress
Q_INVOKABLE void sf::SFAuthenticationManager::login | ( | ) |
Starts the authentication process and emits either the success or failure signal This function will trigger the user-agent flow if the refresh token is not available otherwise the refresh token flow will be triggered.
QString sf::SFAuthenticationManager::loginHost | ( | ) | const |
Q_INVOKABLE void sf::SFAuthenticationManager::logout | ( | ) |
Cancels any authentication in progress and clears stored account data
| slot |
This slot is connected to the application's fullscreen signal to automatically display either the login screen or lock screen.
| static |
| signal |
Emitted if user went into settings and changed the login host
| signal |
info | a pointer to SFOAuthInfo indicating the type of the oAuth flow (user agent or refresh token) Emitted by cancelAuthentication() |
| signal |
info | a pointer to SFOAuthInfo indicating the type of the oAuth flow (user agent or refresh token) Emitted by login() if failed |
| signal |
info | a pointer to SFOAuthInfo indicating the type of the oAuth flow (user agent or refresh token) Emitted by login() if succeeded. Not recommended to use with queued connection. If you do you are responsible to make sure the pointer is still valid when the signal is processed. |
| signal |
Member Data Documentation
| staticprotected |
Definition at line 169 of file SFAuthenticationManager.h.
(Qt3DRender::QCamera)The QCamera class defines a view point through which the scene will be rendered. More..
Header: | #include |
qmake: | QT += 3drender |
Since: | Qt 5.5 |
Instantiated By: | Camera |
Inherits: | Qt3DCore::QEntity |
Public Types
enum | CameraTranslationOption { TranslateViewCenter, DontTranslateViewCenter } |
Properties
|
|
- 3 properties inherited from Qt3DCore::QNode
- 1 property inherited from QObject
Public Functions
QCamera(Qt3DCore::QNode *parent = nullptr) | |
float | aspectRatio() const |
float | bottom() const |
float | exposure() const |
float | farPlane() const |
float | fieldOfView() const |
float | left() const |
Qt3DRender::QCameraLens * | lens() const |
float | nearPlane() const |
void | pan(float angle) |
void | pan(float angle, const QVector3D &axis) |
void | panAboutViewCenter(float angle) |
void | panAboutViewCenter(float angle, const QVector3D &axis) |
QQuaternion | panRotation(float angle) const |
QVector3D | position() const |
QMatrix4x4 | projectionMatrix() const |
QCameraLens::ProjectionType | projectionType() const |
float | right() const |
void | roll(float angle) |
void | rollAboutViewCenter(float angle) |
QQuaternion | rollRotation(float angle) const |
void | rotate(const QQuaternion &q) |
void | rotateAboutViewCenter(const QQuaternion &q) |
QQuaternion | rotation(float angle, const QVector3D &axis) const |
void | tilt(float angle) |
void | tiltAboutViewCenter(float angle) |
QQuaternion | tiltRotation(float angle) const |
float | top() const |
Qt3DCore::QTransform * | transform() const |
void | translate(const QVector3D &vLocal, Qt3DRender::QCamera::CameraTranslationOption option = TranslateViewCenter) |
void | translateWorld(const QVector3D &vWorld, Qt3DRender::QCamera::CameraTranslationOption option = TranslateViewCenter) |
QVector3D | upVector() const |
QVector3D | viewCenter() const |
QVector3D | viewVector() const |
- 4 public functions inherited from Qt3DCore::QEntity
- 13 public functions inherited from Qt3DCore::QNode
- 34 public functions inherited from QObject
Public Slots
void | setAspectRatio(float aspectRatio) |
void | setBottom(float bottom) |
void | setExposure(float exposure) |
void | setFarPlane(float farPlane) |
void | setFieldOfView(float fieldOfView) |
void | setLeft(float left) |
void | setNearPlane(float nearPlane) |
void | setPosition(const QVector3D &position) |
void | setProjectionMatrix(const QMatrix4x4 &projectionMatrix) |
void | setProjectionType(QCameraLens::ProjectionType type) |
void | setRight(float right) |
void | setTop(float top) |
void | setUpVector(const QVector3D &upVector) |
void | setViewCenter(const QVector3D &viewCenter) |
void | viewAll() |
void | viewEntity(Qt3DCore::QEntity *entity) |
void | viewSphere(const QVector3D ¢er, float radius) |
- 3 public slots inherited from Qt3DCore::QNode
- 1 public slot inherited from QObject
Signals
void | aspectRatioChanged(float aspectRatio) |
void | bottomChanged(float bottom) |
void | exposureChanged(float exposure) |
void | farPlaneChanged(float farPlane) |
void | fieldOfViewChanged(float fieldOfView) |
void | leftChanged(float left) |
void | nearPlaneChanged(float nearPlane) |
void | positionChanged(const QVector3D &position) |
void | projectionMatrixChanged(const QMatrix4x4 &projectionMatrix) |
void | projectionTypeChanged(QCameraLens::ProjectionType projectionType) |
void | rightChanged(float right) |
void | topChanged(float top) |
void | upVectorChanged(const QVector3D &upVector) |
void | viewCenterChanged(const QVector3D &viewCenter) |
void | viewVectorChanged(const QVector3D &viewVector) |
- 4 signals inherited from Qt3DCore::QNode
- 2 signals inherited from QObject
Additional Inherited Members
- 1 public variable inherited from QObject
- 10 static public members inherited from QObject
- 2 protected functions inherited from Qt3DCore::QNode
- 9 protected functions inherited from QObject
- 2 protected variables inherited from QObject
Detailed Description
The QCamera class defines a view point through which the scene will be rendered.
Member Type Documentation
enum QCamera::CameraTranslationOption
This enum specifies how camera view center is translated
Constant | Value | Description |
---|---|---|
Qt3DRender::QCamera::TranslateViewCenter | 0 | Translate the view center causing the view direction to remain the same |
Qt3DRender::QCamera::DontTranslateViewCenter | 1 | Don't translate the view center causing the view direction to change |
Property Documentation
aspectRatio : float
Holds the current aspect ratio.
Access functions:
float | aspectRatio() const |
void | setAspectRatio(float aspectRatio) |
Notifier signal:
bottom : float
Holds the current bottom of the camera.
Access functions:
float | bottom() const |
void | setBottom(float bottom) |
Notifier signal:
exposure : float
Holds the current exposure of the camera.
Access functions:
float | exposure() const |
void | setExposure(float exposure) |
Notifier signal:
farPlane : float
Holds the current camera far plane.
Access functions:
float | farPlane() const |
void | setFarPlane(float farPlane) |
Notifier signal:
fieldOfView : float
Holds the current field of view in degrees.
Access functions:
float | fieldOfView() const |
void | setFieldOfView(float fieldOfView) |
Notifier signal:
left : float
Holds the current left of the camera.
Access functions:
float | left() const |
void | setLeft(float left) |
Notifier signal:
nearPlane : float
Holds the current camera near plane.
Access functions:
float | nearPlane() const |
void | setNearPlane(float nearPlane) |
Notifier signal:
position : QVector3D
Holds the camera's position in coordinates relative to the parent entity.
Access functions:
QVector3D | position() const |
void | setPosition(const QVector3D &position) |
Notifier signal:
projectionMatrix : QMatrix4x4
Holds the current projection matrix of the camera.
Access functions:
QMatrix4x4 | projectionMatrix() const |
void | setProjectionMatrix(const QMatrix4x4 &projectionMatrix) |
Notifier signal:
void | projectionMatrixChanged(const QMatrix4x4 &projectionMatrix) |
projectionType : Qt3DRender::QCameraLens::ProjectionType
Holds the type of the camera projection.
- CameraLens.OrthographicProjection
- CameraLens.PerspectiveProjection
- CameraLens.FrustumProjection
- CameraLens.CustomProjection
Access functions:
QCameraLens::ProjectionType | projectionType() const |
void | setProjectionType(QCameraLens::ProjectionType type) |
Notifier signal:
void | projectionTypeChanged(QCameraLens::ProjectionType projectionType) |
See also Qt3DRender::QCameraLens::ProjectionType.
right : float
Holds the current right of the camera.
Access functions:
Notifier signal:
void | rightChanged(float right) |
top : float
Holds the current top of the camera.
Access functions:
Notifier signal:
void | topChanged(float top) |
upVector : QVector3D
Holds the camera's up vector in coordinates relative to the parent entity.
Access functions:
QVector3D | upVector() const |
void | setUpVector(const QVector3D &upVector) |
Notifier signal:
viewCenter : QVector3D
Holds the camera's view center in coordinates relative to the parent entity.
Access functions:
QVector3D | viewCenter() const |
void | setViewCenter(const QVector3D &viewCenter) |
Notifier signal:
void | viewCenterChanged(const QVector3D &viewCenter) |
viewVector : const QVector3D
Holds the camera's view vector in coordinates relative to the parent entity.
Access functions:
Notifier signal:
void | viewVectorChanged(const QVector3D &viewVector) |
Member Function Documentation
QCamera::QCamera(Qt3DCore::QNode *parent = nullptr)
Creates a new QCamera instance with the specified parent.
Qt3DRender::QCameraLens *QCamera::lens() const
Returns the current lens.
void QCamera::pan(floatangle)
Adjusts the pan angle of the camera by angle in degrees.
Note: This function can be invoked via the meta-object system and from QML. See Q_INVOKABLE.
void QCamera::pan(floatangle, const QVector3D &axis)
Adjusts the pan angle of the camera by angle in degrees on a chosen axis.
Note: This function can be invoked via the meta-object system and from QML. See Q_INVOKABLE.
void QCamera::panAboutViewCenter(floatangle)
Adjusts the camera pan about view center by angle in degrees.
Note: This function can be invoked via the meta-object system and from QML. See Q_INVOKABLE.
void QCamera::panAboutViewCenter(floatangle, const QVector3D &axis)
Adjusts the camera pan about view center by angle in degrees on axis.
Note: This function can be invoked via the meta-object system and from QML. See Q_INVOKABLE.
QQuaternion QCamera::panRotation(floatangle) const
Q_invokable Vs Public Slot
Static Protected Attributes | |
static SFAuthenticationManager * | sharedInstance |
Detailed Description
A singleton class that manages the oAuth 2.0 user agent/refresh flow.
This is a singleton class and its instance can be accessed by by SFAuthenticationManager::instance()
Initialization
Before using this class to start the authentication process, the application code needs to specify the required information to connect to salesforce.com:
- consumer key: set this value in your
applicationui
class by defining the SFRemoteAccessConsumerKey variable - redirect url: set this value in your
applicationui
class by defining the SFRemoteAccessConsumerKey variable - scopes: optionally set the scopes you want the access token to be associated with. Set its value by calling
SFAuthenticationManager::setScopes(QList newScopes)
;
Note
The consumer key, redirect url and scopes information is persisted on the device. If you decide to reconfigured these information, the change will take effect only after the app performed a logout or the app is deleted and re-installed. See SFAccountManager
for more details
Usage
To use this class, connect to the desired signals and invoke the desired functions
In order for the SDK to handle the authentication process. It uses a few QML assets to construct the UI needed during authentication They can be found in the assets/salesforce folder
- SFSettings.qml: a screen for user to specify which environment to connect the application to. The application developer is responsible for presenting this screen if a setting screen is required in the application. The SDK will do the necessary clean up tasks and emit a LoginHostChanged signal. The application is responsible for handling this signal (e.g. trigger login again)
- SFOAuthSheet.qml: a sheet that holds the web view for authentication. It is presented and dismissed by SFAuthenticationManager as part of the login process
- SFPasscodeCreation.qml: a sheet that lets user set up device password after authentication. It is presented and dismissed by SFAuthenticationManager
- SFLockScreen.qml: a sheet that locks the screen when the app is inactive for a period of time. It is presented and dismissed by SFAuthenticationManager
- See Also
- SFAuthenticationManager, SFAbstractApplicationUI See Authenticating Remote Access Application OAuth for more details. This SDK supports the oAuth 2.0 user agent flow and refresh token flow.
Definition at line 91 of file SFAuthenticationManager.h.
Member Function Documentation
Q_INVOKABLE void sf::SFAuthenticationManager::cancelAuthentication | ( | ) |
Cancels in progress authentication (stops web view from loading, or aborts refresh token connection) Does not clear existing account data.
const SFOAuthCredentials* sf::SFAuthenticationManager::getCredentials | ( | ) | const |
const SFIdentityData* sf::SFAuthenticationManager::getIdData | ( | ) | const |
- Returns
- the current logged in user's identity data
| static |
Q_INVOKABLE bool sf::SFAuthenticationManager::isAuthenticating | ( | ) |
- Returns
- boolean value indicating whether there is any authentication in progress
Q_INVOKABLE void sf::SFAuthenticationManager::login | ( | ) |
Starts the authentication process and emits either the success or failure signal This function will trigger the user-agent flow if the refresh token is not available otherwise the refresh token flow will be triggered.
QString sf::SFAuthenticationManager::loginHost | ( | ) | const |
Q_INVOKABLE void sf::SFAuthenticationManager::logout | ( | ) |
Cancels any authentication in progress and clears stored account data
| slot |
This slot is connected to the application's fullscreen signal to automatically display either the login screen or lock screen.
| static |
| signal |
Emitted if user went into settings and changed the login host
| signal |
info | a pointer to SFOAuthInfo indicating the type of the oAuth flow (user agent or refresh token) Emitted by cancelAuthentication() |
| signal |
info | a pointer to SFOAuthInfo indicating the type of the oAuth flow (user agent or refresh token) Emitted by login() if failed |
| signal |
info | a pointer to SFOAuthInfo indicating the type of the oAuth flow (user agent or refresh token) Emitted by login() if succeeded. Not recommended to use with queued connection. If you do you are responsible to make sure the pointer is still valid when the signal is processed. |
| signal |
Member Data Documentation
| staticprotected |
Definition at line 169 of file SFAuthenticationManager.h.
(Qt3DRender::QCamera)The QCamera class defines a view point through which the scene will be rendered. More..
Header: | #include |
qmake: | QT += 3drender |
Since: | Qt 5.5 |
Instantiated By: | Camera |
Inherits: | Qt3DCore::QEntity |
Public Types
enum | CameraTranslationOption { TranslateViewCenter, DontTranslateViewCenter } |
Properties
|
|
- 3 properties inherited from Qt3DCore::QNode
- 1 property inherited from QObject
Public Functions
QCamera(Qt3DCore::QNode *parent = nullptr) | |
float | aspectRatio() const |
float | bottom() const |
float | exposure() const |
float | farPlane() const |
float | fieldOfView() const |
float | left() const |
Qt3DRender::QCameraLens * | lens() const |
float | nearPlane() const |
void | pan(float angle) |
void | pan(float angle, const QVector3D &axis) |
void | panAboutViewCenter(float angle) |
void | panAboutViewCenter(float angle, const QVector3D &axis) |
QQuaternion | panRotation(float angle) const |
QVector3D | position() const |
QMatrix4x4 | projectionMatrix() const |
QCameraLens::ProjectionType | projectionType() const |
float | right() const |
void | roll(float angle) |
void | rollAboutViewCenter(float angle) |
QQuaternion | rollRotation(float angle) const |
void | rotate(const QQuaternion &q) |
void | rotateAboutViewCenter(const QQuaternion &q) |
QQuaternion | rotation(float angle, const QVector3D &axis) const |
void | tilt(float angle) |
void | tiltAboutViewCenter(float angle) |
QQuaternion | tiltRotation(float angle) const |
float | top() const |
Qt3DCore::QTransform * | transform() const |
void | translate(const QVector3D &vLocal, Qt3DRender::QCamera::CameraTranslationOption option = TranslateViewCenter) |
void | translateWorld(const QVector3D &vWorld, Qt3DRender::QCamera::CameraTranslationOption option = TranslateViewCenter) |
QVector3D | upVector() const |
QVector3D | viewCenter() const |
QVector3D | viewVector() const |
- 4 public functions inherited from Qt3DCore::QEntity
- 13 public functions inherited from Qt3DCore::QNode
- 34 public functions inherited from QObject
Public Slots
void | setAspectRatio(float aspectRatio) |
void | setBottom(float bottom) |
void | setExposure(float exposure) |
void | setFarPlane(float farPlane) |
void | setFieldOfView(float fieldOfView) |
void | setLeft(float left) |
void | setNearPlane(float nearPlane) |
void | setPosition(const QVector3D &position) |
void | setProjectionMatrix(const QMatrix4x4 &projectionMatrix) |
void | setProjectionType(QCameraLens::ProjectionType type) |
void | setRight(float right) |
void | setTop(float top) |
void | setUpVector(const QVector3D &upVector) |
void | setViewCenter(const QVector3D &viewCenter) |
void | viewAll() |
void | viewEntity(Qt3DCore::QEntity *entity) |
void | viewSphere(const QVector3D ¢er, float radius) |
- 3 public slots inherited from Qt3DCore::QNode
- 1 public slot inherited from QObject
Signals
void | aspectRatioChanged(float aspectRatio) |
void | bottomChanged(float bottom) |
void | exposureChanged(float exposure) |
void | farPlaneChanged(float farPlane) |
void | fieldOfViewChanged(float fieldOfView) |
void | leftChanged(float left) |
void | nearPlaneChanged(float nearPlane) |
void | positionChanged(const QVector3D &position) |
void | projectionMatrixChanged(const QMatrix4x4 &projectionMatrix) |
void | projectionTypeChanged(QCameraLens::ProjectionType projectionType) |
void | rightChanged(float right) |
void | topChanged(float top) |
void | upVectorChanged(const QVector3D &upVector) |
void | viewCenterChanged(const QVector3D &viewCenter) |
void | viewVectorChanged(const QVector3D &viewVector) |
- 4 signals inherited from Qt3DCore::QNode
- 2 signals inherited from QObject
Additional Inherited Members
- 1 public variable inherited from QObject
- 10 static public members inherited from QObject
- 2 protected functions inherited from Qt3DCore::QNode
- 9 protected functions inherited from QObject
- 2 protected variables inherited from QObject
Detailed Description
The QCamera class defines a view point through which the scene will be rendered.
Member Type Documentation
enum QCamera::CameraTranslationOption
This enum specifies how camera view center is translated
Constant | Value | Description |
---|---|---|
Qt3DRender::QCamera::TranslateViewCenter | 0 | Translate the view center causing the view direction to remain the same |
Qt3DRender::QCamera::DontTranslateViewCenter | 1 | Don't translate the view center causing the view direction to change |
Property Documentation
aspectRatio : float
Holds the current aspect ratio.
Access functions:
float | aspectRatio() const |
void | setAspectRatio(float aspectRatio) |
Notifier signal:
bottom : float
Holds the current bottom of the camera.
Access functions:
float | bottom() const |
void | setBottom(float bottom) |
Notifier signal:
exposure : float
Holds the current exposure of the camera.
Access functions:
float | exposure() const |
void | setExposure(float exposure) |
Notifier signal:
farPlane : float
Holds the current camera far plane.
Access functions:
float | farPlane() const |
void | setFarPlane(float farPlane) |
Notifier signal:
fieldOfView : float
Holds the current field of view in degrees.
Access functions:
float | fieldOfView() const |
void | setFieldOfView(float fieldOfView) |
Notifier signal:
left : float
Holds the current left of the camera.
Access functions:
float | left() const |
void | setLeft(float left) |
Notifier signal:
nearPlane : float
Holds the current camera near plane.
Access functions:
float | nearPlane() const |
void | setNearPlane(float nearPlane) |
Notifier signal:
position : QVector3D
Holds the camera's position in coordinates relative to the parent entity.
Access functions:
QVector3D | position() const |
void | setPosition(const QVector3D &position) |
Notifier signal:
projectionMatrix : QMatrix4x4
Holds the current projection matrix of the camera.
Access functions:
QMatrix4x4 | projectionMatrix() const |
void | setProjectionMatrix(const QMatrix4x4 &projectionMatrix) |
Notifier signal:
void | projectionMatrixChanged(const QMatrix4x4 &projectionMatrix) |
projectionType : Qt3DRender::QCameraLens::ProjectionType
Holds the type of the camera projection.
- CameraLens.OrthographicProjection
- CameraLens.PerspectiveProjection
- CameraLens.FrustumProjection
- CameraLens.CustomProjection
Access functions:
QCameraLens::ProjectionType | projectionType() const |
void | setProjectionType(QCameraLens::ProjectionType type) |
Notifier signal:
void | projectionTypeChanged(QCameraLens::ProjectionType projectionType) |
See also Qt3DRender::QCameraLens::ProjectionType.
right : float
Holds the current right of the camera.
Access functions:
Notifier signal:
void | rightChanged(float right) |
top : float
Holds the current top of the camera.
Access functions:
Notifier signal:
void | topChanged(float top) |
upVector : QVector3D
Holds the camera's up vector in coordinates relative to the parent entity.
Access functions:
QVector3D | upVector() const |
void | setUpVector(const QVector3D &upVector) |
Notifier signal:
viewCenter : QVector3D
Holds the camera's view center in coordinates relative to the parent entity.
Access functions:
QVector3D | viewCenter() const |
void | setViewCenter(const QVector3D &viewCenter) |
Notifier signal:
void | viewCenterChanged(const QVector3D &viewCenter) |
viewVector : const QVector3D
Holds the camera's view vector in coordinates relative to the parent entity.
Access functions:
Notifier signal:
void | viewVectorChanged(const QVector3D &viewVector) |
Member Function Documentation
QCamera::QCamera(Qt3DCore::QNode *parent = nullptr)
Creates a new QCamera instance with the specified parent.
Qt3DRender::QCameraLens *QCamera::lens() const
Returns the current lens.
void QCamera::pan(floatangle)
Adjusts the pan angle of the camera by angle in degrees.
Note: This function can be invoked via the meta-object system and from QML. See Q_INVOKABLE.
void QCamera::pan(floatangle, const QVector3D &axis)
Adjusts the pan angle of the camera by angle in degrees on a chosen axis.
Note: This function can be invoked via the meta-object system and from QML. See Q_INVOKABLE.
void QCamera::panAboutViewCenter(floatangle)
Adjusts the camera pan about view center by angle in degrees.
Note: This function can be invoked via the meta-object system and from QML. See Q_INVOKABLE.
void QCamera::panAboutViewCenter(floatangle, const QVector3D &axis)
Adjusts the camera pan about view center by angle in degrees on axis.
Note: This function can be invoked via the meta-object system and from QML. See Q_INVOKABLE.
QQuaternion QCamera::panRotation(floatangle) const
Q_invokable Vs Public Slot
Returns the calculated pan rotation in relation to the angle in degrees taken in to adjust the camera's pan or left/right rotation on the Y axis.
Note: This function can be invoked via the meta-object system and from QML. See Q_INVOKABLE.
void QCamera::roll(floatangle)
Adjusts the camera roll by angle in degrees.
Note: This function can be invoked via the meta-object system and from QML. See Q_INVOKABLE.
void QCamera::rollAboutViewCenter(floatangle)
Adjusts the camera roll about view center by angle in degrees.
Note: This function can be invoked via the meta-object system and from QML. See Q_INVOKABLE.
QQuaternion QCamera::rollRotation(floatangle) const
Returns the calculated roll rotation in relation to the angle in degrees taken in to adjust the camera's roll or lean left/right rotation on the Z axis.
Note: This function can be invoked via the meta-object system and from QML. See Q_INVOKABLE.
void QCamera::rotate(const QQuaternion &q)
Rotates the camera with the use of a Quaternion in q.
Note: This function can be invoked via the meta-object system and from QML. See Q_INVOKABLE.
void QCamera::rotateAboutViewCenter(const QQuaternion &q)
Rotates the camera about the view center with the use of a Quaternion in q.
Note: This function can be invoked via the meta-object system and from QML. See Q_INVOKABLE.
QQuaternion QCamera::rotation(floatangle, const QVector3D &axis) const
Returns the calculated rotation in relation to the angle in degrees and chosen axis taken in.
Note: This function can be invoked via the meta-object system and from QML. See Q_INVOKABLE.
[slot]
void QCamera::setAspectRatio(floataspectRatio)
Sets the camera's aspect ratio to aspectRatio.
Note: Setter function for property aspectRatio.
See also aspectRatio().
[slot]
void QCamera::setBottom(floatbottom)
Sets the bottom of the camera to bottom.
Note: Setter function for property bottom.
See also bottom().
[slot]
void QCamera::setExposure(floatexposure)
Sets the camera's exposure to exposure.
Note: Setter function for property exposure.
See also exposure().
[slot]
void QCamera::setFarPlane(floatfarPlane)
Sets the camera's far plane to farPlane
Note: Setter function for property farPlane.
See also farPlane().
[slot]
void QCamera::setFieldOfView(floatfieldOfView)
Sets the camera's field of view to fieldOfView in degrees.
Note: Setter function for property fieldOfView.
See also fieldOfView().
[slot]
void QCamera::setLeft(floatleft)
Sets the left of the camera to left.
Note: Setter function for property left.
See also left().
[slot]
void QCamera::setNearPlane(floatnearPlane)
Sets the camera's near plane to nearPlane.
Note: Setter function for property nearPlane.
See also nearPlane().
[slot]
void QCamera::setPosition(const QVector3D &position)
Sets the camera's position in 3D space to position.
Note: Setter function for property position.
See also position().
[slot]
void QCamera::setProjectionMatrix(const QMatrix4x4 &projectionMatrix)
Sets the camera's projection matrix to projectionMatrix.
Note: Setter function for property projectionMatrix.
See also projectionMatrix().
[slot]
void QCamera::setProjectionType(QCameraLens::ProjectionTypetype)
Sets the camera's projection type to type.
Note: Setter function for property projectionType.
See also projectionType().
[slot]
void QCamera::setRight(floatright)
Sets the right of the camera to right.
Note: Setter function for property right.
See also right().
[slot]
void QCamera::setTop(floattop)
Sets the top of the camera to top.
Note: Setter function for property top.
Q Invocable Public Slot Poker
See also top().
[slot]
void QCamera::setUpVector(const QVector3D &upVector)
Sets the camera's up vector to upVector.
Note: Setter function for property upVector.
See also upVector().
[slot]
void QCamera::setViewCenter(const QVector3D &viewCenter)
Sets the camera's view center to viewCenter.
Note: Setter function for property viewCenter.
See also viewCenter().
void QCamera::tilt(floatangle)
Adjusts the tilt angle of the camera by angle in degrees.
Note: This function can be invoked via the meta-object system and from QML. See Q_INVOKABLE.
void QCamera::tiltAboutViewCenter(floatangle)
Adjusts the camera tilt about view center by angle in degrees.
Note: This function can be invoked via the meta-object system and from QML. See Q_INVOKABLE.
QQuaternion QCamera::tiltRotation(floatangle) const
Returns the calculated tilt rotation in relation to the angle in degrees taken in to adjust the camera's tilt or up/down rotation on the X axis.
Note: This function can be invoked via the meta-object system and from QML. See Q_INVOKABLE.
Qt3DCore::QTransform *QCamera::transform() const
Returns the camera's position via transform.
void QCamera::translate(const QVector3D &vLocal, Qt3DRender::QCamera::CameraTranslationOptionoption = TranslateViewCenter)
Translates the camera's position and its view vector by vLocal in local coordinates. The option allows for toggling whether the view center should be translated.
Note: This function can be invoked via the meta-object system and from QML. See Q_INVOKABLE.
Q Invocable Public Slot Machines
void QCamera::translateWorld(const QVector3D &vWorld, Qt3DRender::QCamera::CameraTranslationOptionoption = TranslateViewCenter)
Translates the camera's position and its view vector by vWorld in world coordinates. The option allows for toggling whether the view center should be translated.
Note: This function can be invoked via the meta-object system and from QML. See Q_INVOKABLE.
[slot]
void QCamera::viewAll()
Rotates and moves the camera so that it's viewCenter is the center of the scene's bounding volume and the entire scene fits in the view port.
Note: Only works if the lens is in perspective projection mode.
Q Invocable Public Slot Wins
See also Qt3D.Render::Camera::projectionType.
[slot]
void QCamera::viewEntity(Qt3DCore::QEntity *entity)
Rotates and moves the camera so that it's viewCenter is the center of the entity's bounding volume and the entire entity fits in the view port.
Note: Only works if the lens is in perspective projection mode.
See also Camera.projectionType.
[slot]
void QCamera::viewSphere(const QVector3D ¢er, floatradius)
Rotates and moves the camera so that it's viewCenter is center and a sphere of radius fits in the view port.
Note: Only works if the lens is in perspective projection mode.
See also Qt3D.Render::Camera::projectionType.
© 2020 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.