summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@qt.io>2018-05-30 10:46:15 +0200
committerLaszlo Agocs <laszlo.agocs@qt.io>2018-05-30 15:15:34 +0000
commite1576a57363bfe513d766933b6fc1d6866d578be (patch)
treee3849ec96f6cd9ff86af79a24d22973dc24a5fe6
parent72434a9ec9cdb63dd1dee88e4d7c7ff3987be4f7 (diff)
Update ViewerSettings docs
Change-Id: Idf66c99c7c1efb25d235eadcec6225c2a0179fcc Reviewed-by: Andy Nichols <andy.nichols@qt.io>
-rw-r--r--src/runtime/api/q3dsviewersettings.cpp76
1 files changed, 62 insertions, 14 deletions
diff --git a/src/runtime/api/q3dsviewersettings.cpp b/src/runtime/api/q3dsviewersettings.cpp
index 26844b4..7ea74d9 100644
--- a/src/runtime/api/q3dsviewersettings.cpp
+++ b/src/runtime/api/q3dsviewersettings.cpp
@@ -42,10 +42,6 @@ QT_BEGIN_NAMESPACE
Q3DSViewerSettings provides properties to define presentation independent
viewer settings.
- \note As of Qt 3D Studio 2.0 this class is provided mainly for
- compatibility reasons. Most functions are not applicable or are not
- currently supported and will be silently ignored.
-
\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()
@@ -75,6 +71,8 @@ Q3DSViewerSettings::~Q3DSViewerSettings()
\value ShadeModeShadedWireframe The 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.
*/
/*!
@@ -82,29 +80,35 @@ Q3DSViewerSettings::~Q3DSViewerSettings()
This enumeration specifies the possible scaling modes.
- \value ScaleModeFit Scales the presentation to fit the viewer.
- \value ScaleModeFill Scales the presentation to fill the viewer.
- \value ScaleModeCenter Centers the presentation into the viewer without scaling it.
+ \value ScaleModeFit Scales the presentation to fit the output area.
+ \value ScaleModeFill Scales the presentation to completely fill the output area. This is the default.
+ \value ScaleModeCenter Centers the presentation in the output area without scaling it.
*/
/*!
- \property Q3DSViewerSettings::matteColor
+ \property Q3DSViewerSettings::matteEnabled
- \note This property is currently ignored.
- */
+ Specifies if the empty area around the presentation (applicable when
+ scaleMode is set to ScaleModeCenter or ScaleModeFit) should be filled with
+ a custom color.
-/*!
- \property Q3DSViewerSettings::matteEnabled
+ The default value is \c false.
- \note This property is currently ignored.
+ \sa matteColor
*/
-
bool Q3DSViewerSettings::matteEnabled() const
{
Q_D(const Q3DSViewerSettings);
return d->matteEnabled;
}
+/*!
+ \property Q3DSViewerSettings::matteColor
+
+ Specifies the matte color.
+
+ \sa matteEnabled
+ */
QColor Q3DSViewerSettings::matteColor() const
{
Q_D(const Q3DSViewerSettings);
@@ -141,6 +145,15 @@ Q3DSViewerSettings::ShadeMode Q3DSViewerSettings::shadeMode() const
/*!
\property Q3DSViewerSettings::scaleMode
+
+ Specifies the scaling mode. The default value \c 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 \l 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.
*/
Q3DSViewerSettings::ScaleMode Q3DSViewerSettings::scaleMode() const
{
@@ -251,4 +264,39 @@ void Q3DSViewerSettings::load(const QString &group,
The default value is \c{false}.
*/
+/*!
+ \qmlproperty bool ViewerSettings::matteEnabled
+
+ 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 \c false.
+ */
+
+/*!
+ \qmlproperty QColor ViewerSettings::matteColor
+
+ Specifies the matte color.
+ */
+
+/*!
+ \qmlproperty enumeration ViewerSettings::scaleMode
+
+ Specifies the scaling mode. The default value \c 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.
+
+ \value ScaleModeFit Scales the presentation to fit the output area.
+ \value ScaleModeFill Scales the presentation to completely fill the output area.
+ \value ScaleModeCenter Centers the presentation in the output area without scaling it.
+
+ The default value is \c{ScaleModeFill}.
+*/
+
QT_END_NAMESPACE