C

Q3DSViewerSettings Class

Qt 3D Studio presentation viewer settings. More...

Header: #include <Q3DSViewerSettings>
qmake: QT += 3dstudioruntime2
Since: Qt 3D Studio 2.0
Instantiated By: ViewerSettings
Inherits: QObject

Public Types

enum ScaleMode { ScaleModeFit, ScaleModeFill, ScaleModeCenter }
enum ShadeMode { ShadeModeShaded, ShadeModeShadedWireframe }
enum StereoMode { StereoModeMono, StereoModeTopBottom, StereoModeLeftRight, StereoModeAnaglyphRedCyan, StereoModeAnaglyphGreenMagenta }

Properties

  • 1 property inherited from QObject

Public Functions

Q3DSViewerSettings(QObject *parent = nullptr)
virtual ~Q3DSViewerSettings()
bool isShowingRenderStats() 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
Q3DSViewerSettings::ShadeMode shadeMode() const
float stereoEyeSeparation() const
Q3DSViewerSettings::StereoMode stereoMode() const
  • 31 public functions inherited from QObject

Public Slots

void setMatteColor(const QColor &color)
void setMatteEnabled(bool isEnabled)
void setScaleMode(Q3DSViewerSettings::ScaleMode mode)
void setShadeMode(Q3DSViewerSettings::ShadeMode mode)
void setShowRenderStats(bool show)
void setStereoEyeSeparation(float value)
void setStereoMode(Q3DSViewerSettings::StereoMode mode)
  • 1 public slot inherited from QObject

Signals

Static Public Members

const QMetaObject staticMetaObject
  • 9 static public members inherited from QObject

Protected Functions

Q3DSViewerSettings(Q3DSViewerSettingsPrivate &dd, QObject *parent)
  • 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 and Q3DSWidget create a Q3DSViewerSettings instance implicitly. This can be queried via Q3DSSurfaceViewer::settings() or Q3DSWidget::settings().

Member Type Documentation

enum Q3DSViewerSettings::ScaleMode

This enumeration specifies the possible scaling modes.

ConstantValueDescription
Q3DSViewerSettings::ScaleModeFit0Scales the presentation to fit the output area.
Q3DSViewerSettings::ScaleModeFill1Scales the presentation to completely fill the output area. This is the default.
Q3DSViewerSettings::ScaleModeCenter2Centers the presentation in the output area without scaling it.

enum Q3DSViewerSettings::ShadeMode

This enumeration specifies the possible shading modes.

ConstantValueDescription
Q3DSViewerSettings::ShadeModeShaded0The objects in the presentation are shaded normally.
Q3DSViewerSettings::ShadeModeShadedWireframe1The objects in the presentation are shaded with a super-imposed wireframe on top of the normal shading. Only objects that specify a tesselation mode will display this wireframe.

Note: As of Qt 3D Studio 2.0 the shade mode setting is ignored.

enum Q3DSViewerSettings::StereoMode

This enumeration specifies the possible stereo modes.

ConstantValueDescription
Q3DSViewerSettings::StereoModeMono0Renders the view normally in mono. This is the default.
Q3DSViewerSettings::StereoModeTopBottom1Renders view in 3D top-bottom mode.
Q3DSViewerSettings::StereoModeLeftRight2Renders view in 3D left-right mode.
Q3DSViewerSettings::StereoModeAnaglyphRedCyan3Renders view in 3D anaglyph red-cyan mode.
Q3DSViewerSettings::StereoModeAnaglyphGreenMagenta4Renders view in 3D anaglyph green-magenta mode.

This enum was introduced or modified in Qt 3D Studio 2.3.

Property Documentation

matteColor : QColor

Specifies the matte color.

Access functions:

QColor matteColor() const
void setMatteColor(const QColor &color)

Notifier signal:

void matteColorChanged()

See also matteEnabled.

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 isEnabled)

Notifier signal:

void matteEnabledChanged()

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.

Access functions:

Q3DSViewerSettings::ScaleMode scaleMode() const
void setScaleMode(Q3DSViewerSettings::ScaleMode mode)

Notifier signal:

void scaleModeChanged()

shadeMode : ShadeMode

Note: This property is currently ignored.

Access functions:

Q3DSViewerSettings::ShadeMode shadeMode() const
void setShadeMode(Q3DSViewerSettings::ShadeMode mode)

Notifier signal:

void shadeModeChanged()

showRenderStats : bool

When this property is true, the interactive statistics and 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.

Note: This property has no effect when using View3D items in the Qt Quick scene, because the profile views are managed by Qt Quick, not the 3D engine then. Use Studio3DProfiler in that case.

Access functions:

bool isShowingRenderStats() const
void setShowRenderStats(bool show)

Notifier signal:

void showRenderStatsChanged()

stereoEyeSeparation : float

Specifies the eye (camera) separation of stereo rendering. Value is the amount left and right eye cameras move in x-coordinate away from center. Bigger separation increases the 3D effect. This value should be set to match viewed presentation dimensions.

This has only effect when stereo mode is set to something else than default StereoModeMono.

This property was introduced in Qt 3D Studio 2.3.

Access functions:

float stereoEyeSeparation() const
void setStereoEyeSeparation(float value)

Notifier signal:

void stereoEyeSeparationChanged()

stereoMode : StereoMode

Specifies the stereo mode. The default value is StereoModeMono where the view is rendered normally, as suitable for 2D displays.

Other available modes target different 3D stereo rendering types.

This property was introduced in Qt 3D Studio 2.3.

Access functions:

Q3DSViewerSettings::StereoMode stereoMode() const
void setStereoMode(Q3DSViewerSettings::StereoMode mode)

Notifier signal:

void stereoModeChanged()

Member Function Documentation

Q3DSViewerSettings::Q3DSViewerSettings(QObject *parent = nullptr)

Default constructs an instance of Q3DSViewerSettings.

[protected] Q3DSViewerSettings::Q3DSViewerSettings(Q3DSViewerSettingsPrivate &dd, QObject *parent)

Default constructs an instance of Q3DSViewerSettings.

[virtual] Q3DSViewerSettings::~Q3DSViewerSettings()

Destroys the instance of Q3DSViewerSettings. The destructor is virtual.

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 is not currently implemented.

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 is not currently implemented.

Note: This function can be invoked via the meta-object system and from QML. See Q_INVOKABLE.

Available under certain Qt licenses.
Find out more.