diff options
Diffstat (limited to 'src/datavisualization/engine/q3dsurface.cpp')
-rw-r--r-- | src/datavisualization/engine/q3dsurface.cpp | 32 |
1 files changed, 30 insertions, 2 deletions
diff --git a/src/datavisualization/engine/q3dsurface.cpp b/src/datavisualization/engine/q3dsurface.cpp index e066f717..78ec70d4 100644 --- a/src/datavisualization/engine/q3dsurface.cpp +++ b/src/datavisualization/engine/q3dsurface.cpp @@ -198,6 +198,11 @@ QT_DATAVISUALIZATION_BEGIN_NAMESPACE */ /*! + * \qmlproperty var Surface3D::gradient + * The current surface gradient. Setting this property replaces the previous gradient. + */ + +/*! * Constructs a new 3D surface window. */ Q3DSurface::Q3DSurface() @@ -307,17 +312,24 @@ bool Q3DSurface::isBackgroundVisible() const } /*! - * Sets a predefined \a theme from \c QDataVis::ColorTheme. It is preset to \c QDataVis::ThemeQt by + * \property Q3DSurface::theme + * + * A predefined \a theme from \c QDataVis::ColorTheme. It is preset to \c QDataVis::ThemeQt by * default. Theme affects label colors, text color, background color, window color and * grid color. Lighting is also adjusted by themes. * - * \warning This method is subject to change. + * \warning This property is subject to change. */ void Q3DSurface::setTheme(QDataVis::ColorTheme theme) { d_ptr->m_shared->setColorTheme(theme); } +QDataVis::ColorTheme Q3DSurface::theme() const +{ + return d_ptr->m_shared->theme().colorTheme(); +} + /*! * \property Q3DSurface::shadowQuality * @@ -372,6 +384,22 @@ bool Q3DSurface::isSurfaceGridEnabled() const } /*! + * \property Q3DSurface::gradient + * + * The current surface gradient. Setting this property replaces the previous gradient with + * the given \a gradient. + */ +void Q3DSurface::setGradient(const QLinearGradient &gradient) +{ + d_ptr->m_shared->setGradient(gradient); +} + +QLinearGradient Q3DSurface::gradient() const +{ + return d_ptr->m_shared->gradient(); +} + +/*! * \property Q3DSurface::font * * Sets the \a font for labels. It is preset to \c Arial by default. |