Theme3D QML Type

A visual style for graphs. More...

Import Statement: import QtDataVisualization 1.2
Since: QtDataVisualization 1.0
Instantiates: Q3DTheme

Properties

Detailed Description

This type is used to specify visual properties that affect the whole graph. There are several built-in themes that can be used directly, or be modified freely. User can also create a theme from scratch using Theme3D.ThemeUserDefined.

For a more complete description, see Q3DTheme.

Usage examples

Using a built-in theme without any modifications:

Scatter3D {
    ...
    theme: Theme3D { type: Theme3D.ThemeRetro }
    ...
}

Using a built-in theme and modifying some properties:

Bars3D {
    ...
    theme: Theme3D {
        type: Theme3D.ThemeRetro
        labelBorderEnabled: true
        font.pointSize: 35
        labelBackgroundEnabled: false
    }
    ...
}

Using a user-defined theme:

Surface3D {
    ...
    theme: Theme3D {
        ambientLightStrength: 0.5
        backgroundColor: "red"
        backgroundEnabled: true
        baseColor: "blue"
        colorStyle: Theme3D.ColorStyleUniform
        font.family: "Lucida Handwriting"
        font.pointSize: 35
        gridEnabled: false
        gridLineColor: "black"
        highlightLightStrength: 0.5
        labelBackgroundColor: "black"
        labelBackgroundEnabled: true
        labelBorderEnabled: false
        labelTextColor: "white"
        lightColor: "yellow"
        lightStrength: 0.4
        multiHighlightColor: "green"
        singleHighlightColor: "darkRed"
        windowColor: "white"
    }
    ...
}

For Theme3D enums, see Q3DTheme::ColorStyle and Q3DTheme::Theme.

Property Documentation

ambientLightStrength : real

Ambient light strength for the whole graph. Value must be between 0.0 and 1.0.


backgroundColor : color

Color for the graph background.


backgroundEnabled : bool

Set background enabled or disabled.


baseColors : list<ThemeColor>

List of base colors to be used for all the objects in the graph, series by series. If there are more series than colors, color list wraps and starts again with the first color in the list. Has no immediate effect if colorStyle is not Theme3D.ColorStyleUniform.


baseGradients : list<ColorGradient>

List of base gradients to be used for all the objects in the graph, series by series. If there are more series than gradients, gradient list wraps and starts again with the first gradient in the list Has no immediate effect if colorStyle is Theme3D.ColorStyleUniform.


colorStyle : Theme3D.ColorStyle

The style of the graph colors. One of Theme3D.ColorStyle.


font : font

Set font to be used for labels.


gridEnabled : bool

Set grid lines enabled or disabled.


gridLineColor : color

Color for the grid lines.


highlightLightStrength : real

Specular light strength for highlighted objects. Value must be between 0.0 and 10.0.


labelBackgroundColor : color

Color for the label backgrounds. Has no effect if labelBackgroundEnabled is false.


labelBackgroundEnabled : bool

Set label backgrounds enabled or disabled.


labelBorderEnabled : bool

Set label borders enabled or disabled. Has no effect if labelBackgroundEnabled is false.


labelTextColor : color

Color for the font used for labels.


lightColor : color

Color for the specular light defined in Scene3D.


lightStrength : real

Specular light strength for the whole graph. Value must be between 0.0 and 10.0.


multiHighlightColor : color

Highlight color for highlighted objects. Used if selectionMode has AbstractGraph3D.SelectionRow or AbstractGraph3D.SelectionColumn flag set.


multiHighlightGradient : ColorGradient

Highlight gradient for highlighted objects. Used if selectionMode has AbstractGraph3D.SelectionRow or AbstractGraph3D.SelectionColumn flag set.


singleHighlightColor : color

Highlight color for a highlighted object. Used if selectionMode has AbstractGraph3D.SelectionItem flag set.


singleHighlightGradient : ColorGradient

Highlight gradient for a highlighted object. Used if selectionMode has AbstractGraph3D.SelectionItem flag set.


type : Theme3D.Theme

The type of the theme. If no type is set, the type is Theme3D.ThemeUserDefined. Changing the theme type after the item has been constructed will change all other properties of the theme to what the predefined theme specifies. Changing the theme type of the active theme of the graph will also reset all attached series to use the new theme.


windowColor : color

Color for the application window.


© 2016 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.