| q3dtheme.cpp |
!
\class Q3DTheme
\inmodule QtDataVisualization
\brief Q3DTheme class provides a visual style for graphs.
\since QtDataVisualization 1.0
Specifies visual properties that affect the whole graph. There are several
built-in themes that can be used as is or modified freely.
The following properties can be overridden by using QAbstract3DSeries
properties to set them explicitly in the series: baseColors, baseGradients,
and colorStyle.
Themes can be created from scratch using the ThemeUserDefined enum value.
Creating a theme using the default constructor produces a new user-defined
theme.
\section1 Default Theme
The following table lists the properties controlled by themes and the
default values for ThemeUserDefined.
\table
\header
\li Property
\li Default Value
\row
\li ambientLightStrength
\li 0.25
\row
\li backgroundColor
\li Qt::black
\row
\li backgroundEnabled
\li \c true
\row
\li baseColors
\li Qt::black
\row
\li baseGradients
\li QLinearGradient. Essentially fully black.
\row
\li colorStyle
\li ColorStyleUniform
\row
\li \l font
\li QFont
\row
\li gridEnabled
\li \c true
\row
\li gridLineColor
\li Qt::white
\row
\li highlightLightStrength
\li 7.5
\row
\li labelBackgroundColor
\li Qt::gray
\row
\li labelBackgroundEnabled
\li \c true
\row
\li labelBorderEnabled
\li \c true
\row
\li labelTextColor
\li Qt::white
\row
\li lightColor
\li Qt::white
\row
\li lightStrength
\li 5.0
\row
\li multiHighlightColor
\li Qt::blue
\row
\li multiHighlightGradient
\li QLinearGradient. Essentially fully black.
\row
\li singleHighlightColor
\li Qt::red
\row
\li singleHighlightGradient
\li QLinearGradient. Essentially fully black.
\row
\li windowColor
\li Qt::black
\endtable
\section1 Usage Examples
Creating a built-in theme without any modifications:
\snippet doc_src_q3dtheme.cpp 0
Creating a built-in theme and modifying some properties:
\snippet doc_src_q3dtheme.cpp 1
Creating a user-defined theme:
\snippet doc_src_q3dtheme.cpp 2
Creating a built-in theme and modifying some properties after it has been set:
\snippet doc_src_q3dtheme.cpp 3
|
33754 |
- |
| q3dtheme.h |
|
7157 |
- |
| q3dtheme_p.h |
|
4353 |
- |
| thememanager.cpp |
|
25607 |
- |
| thememanager_p.h |
|
2821 |
- |