diff options
author | Miikka Heikkinen <miikka.heikkinen@digia.com> | 2013-12-20 10:56:59 +0200 |
---|---|---|
committer | Miikka Heikkinen <miikka.heikkinen@digia.com> | 2014-01-07 08:10:13 +0200 |
commit | aa842c39480aa5b95f704c97b8b3acc821144883 (patch) | |
tree | 8a1e90e1fe1d6d85054286e655cb2e1722d758eb /src/datavisualization/theme/q3dtheme.cpp | |
parent | 91a94a743b4cfd30ef77aa73837050d44620469b (diff) |
Fix theme ownership
Theme ownership now uses similar model as axis and inputhandler
ownership: Graph can own multiple themes, but only one is active
at the time.
Task-number: QTRD-2623
Change-Id: I7134384df6f8cc465cc28fbebb454b7d2e254f83
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Diffstat (limited to 'src/datavisualization/theme/q3dtheme.cpp')
-rw-r--r-- | src/datavisualization/theme/q3dtheme.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/datavisualization/theme/q3dtheme.cpp b/src/datavisualization/theme/q3dtheme.cpp index 3d85b9fa..11773940 100644 --- a/src/datavisualization/theme/q3dtheme.cpp +++ b/src/datavisualization/theme/q3dtheme.cpp @@ -377,6 +377,10 @@ QT_DATAVISUALIZATION_BEGIN_NAMESPACE * \qmlproperty Theme3D.Theme Theme3D::type * * The type of the theme. If no type is set, the type is \c Theme3D.ThemeUserDefined. + * \note Changing the type to one of the predefined types doesn't reset the properties + * that have been explicitly set since the last render cycle. This is done to allow + * customization of predefined types also from QML. It is not recommended + * changing the type of an existing Theme3D item via this property. */ /*! @@ -862,8 +866,11 @@ Q3DTheme::ColorStyle Q3DTheme::colorStyle() const /*! * \property Q3DTheme::type * - * The type of the theme. Type is automatically set when constructing a theme. User should not - * need to use this when using C++ API. + * The type of the theme. Type is automatically set when constructing a theme. + * \note Changing the type to one of the predefined types doesn't reset the properties + * that have been explicitly set since the last render cycle. This is done to allow + * customization of predefined types also from QML. It is not recommended + * changing the type of an existing Q3DTheme object via this property. */ void Q3DTheme::setType(Theme themeType) { @@ -907,6 +914,7 @@ Q3DThemePrivate::Q3DThemePrivate(Q3DTheme *q, Q3DTheme::Theme theme_id) m_backgoundEnabled(true), m_gridEnabled(true), m_labelBackground(true), + m_isDefaultTheme(false), q_ptr(q) { m_baseColors.append(QColor(Qt::black)); |