Q3DSViewerSettings Class
Qt 3D Studio presentation viewer settings. More...
Header: | #include <Q3DSViewerSettings> |
Since: | Qt 3D Studio 2.0 |
Instantiated By: | ViewerSettings |
Inherits: | QObject |
Public Types
enum | ScaleMode { ScaleModeFit, ScaleModeFill, ScaleModeCenter } |
enum | ShadeMode { ShadeModeShaded, ShadeModeShadedWireframe } |
Properties
- matteColor : QColor
- matteEnabled : bool
- scaleMode : ScaleMode
- showRenderStats : bool
- 1 property inherited from QObject
Public Functions
bool | isShowRenderStats() const |
void | load(const QString &group, const QString &organization = QString(), const QString &application = QString()) |
QColor | matteColor() const |
bool | matteEnabled() const |
void | save(const QString &group, const QString &organization = QString(), const QString &application = QString()) |
Q3DSViewerSettings::ScaleMode | scaleMode() const |
- 31 public functions inherited from QObject
Public Slots
void | setMatteColor(const QColor &color) |
void | setMatteEnabled(bool enabled) |
void | setScaleMode(Q3DSViewerSettings::ScaleMode mode) |
void | setShowRenderStats(bool show) |
- 1 public slot inherited from QObject
Signals
void | matteColorChanged(const QColor &color) |
void | matteEnabledChanged(bool enabled) |
void | scaleModeChanged(Q3DSViewerSettings::ScaleMode mode) |
void | shadeModeChanged(Q3DSViewerSettings::ShadeMode mode) |
void | showRenderStatsChanged(bool show) |
- 2 signals inherited from QObject
Static Public Members
const QMetaObject | staticMetaObject |
- 9 static public members inherited from QObject
Additional Inherited Members
- 9 protected functions inherited from QObject
Detailed Description
Qt 3D Studio presentation viewer settings.
Q3DSViewerSettings provides properties to define presentation-independent viewer settings.
Note: This class should not be instantiated directly when working with the C++ APIs. Q3DSSurfaceViewer creates a Q3DSViewerSettings instance implicitly. This can be queried via Q3DSSurfaceViewer::settings().
Member Type Documentation
enum Q3DSViewerSettings::ScaleMode
This enumeration specifies the possible scaling modes.
Constant | Value | Description |
---|---|---|
Q3DSViewerSettings::ScaleModeFit | 0 | Scales the presentation to fit the output area. |
Q3DSViewerSettings::ScaleModeFill | 1 | Scales the presentation to completely fill the output area. This is the default. |
Q3DSViewerSettings::ScaleModeCenter | 2 | Centers the presentation in the output area without scaling it. |
enum Q3DSViewerSettings::ShadeMode
Property Documentation
matteColor : QColor
Specifies the matte color.
Access functions:
QColor | matteColor() const |
void | setMatteColor(const QColor &color) |
Notifier signal:
void | matteColorChanged(const QColor &color) |
matteEnabled : bool
Specifies if the empty area around the presentation (applicable when scaleMode is set to ScaleModeCenter or ScaleModeFit) should be filled with a custom color.
The default value is false
.
Access functions:
bool | matteEnabled() const |
void | setMatteEnabled(bool enabled) |
Notifier signal:
void | matteEnabledChanged(bool enabled) |
See also matteColor.
scaleMode : ScaleMode
Specifies the scaling mode. The default value is
ScaleModeFill where the size of the presentation on-screen follows and fills the size of the output area (the window, the screen, or the area occupied by the Studio3D element).
During the design phase it can be valuable to see the presentation with some other scaling approach. For example, the Qt 3D Studio Viewer application uses ScaleModeCenter by default.
Constant | Description |
---|---|
ScaleModeFit | Scales the presentation to fit the output area. |
ScaleModeFill | Scales the presentation to completely fill the output area. |
ScaleModeCenter | Centers the presentation in the output area without scaling it. |
The default value is ScaleModeFill
.
Access functions:
Q3DSViewerSettings::ScaleMode | scaleMode() const |
void | setScaleMode(Q3DSViewerSettings::ScaleMode mode) |
Notifier signal:
void | scaleModeChanged(Q3DSViewerSettings::ScaleMode mode) |
showRenderStats : bool
When this property is true
, the simple profile view is displayed in-scene, on top of the 3D content.
Note: This feature can be disabled at build time, in which case this property has no effect.
Default value is false
.
Access functions:
bool | isShowRenderStats() const |
void | setShowRenderStats(bool show) |
Notifier signal:
void | showRenderStatsChanged(bool show) |
Member Function Documentation
void Q3DSViewerSettings::load(const QString &group, const QString &organization = QString(), const QString &application = QString())
Loads previously saved viewer settings using group, organization and application.
Note: This function can be invoked via the meta-object system and from QML. See Q_INVOKABLE.
void Q3DSViewerSettings::save(const QString &group, const QString &organization = QString(), const QString &application = QString())
Persistently saves the viewer settings using group, organization and application.
Note: This function can be invoked via the meta-object system and from QML. See Q_INVOKABLE.