Theme3D QML Type
グラフの視覚的スタイル。もっと見る...
| Import Statement: | import QtDataVisualization 1.11 |
| Since: | QtDataVisualization 1.0 |
| In C++: | Q3DTheme |
プロパティ
- ambientLightStrength : real
- backgroundColor : color
- backgroundEnabled : bool
- baseColors : list<ThemeColor>
- baseGradients : list<ColorGradient>
- colorStyle : Theme3D.ColorStyle
- font : font
- gridEnabled : bool
- gridLineColor : color
- highlightLightStrength : real
- labelBackgroundColor : color
- labelBackgroundEnabled : bool
- labelBorderEnabled : bool
- labelTextColor : color
- lightColor : color
- lightStrength : real
- multiHighlightColor : color
- multiHighlightGradient : ColorGradient
- singleHighlightColor : color
- singleHighlightGradient : ColorGradient
- type : Theme3D.Theme
- windowColor : color
詳細説明
この型は、グラフ全体に影響する視覚的なプロパティを指定するために使用される。いくつかの組み込みテーマがあり、そのまま使用することも、自由に変更することもできる。
以下のプロパティは、Abstract3DSeries プロパティを使用してオーバーライドし、シリーズで明示的に設定することができます:baseColors baseGradients およびcolorStyle 。
テーマは、Theme3D.ThemeUserDefined enum値を使ってゼロから作成することができます。
デフォルト・テーマ
以下の表は、テーマによって制御されるプロパティと、Theme3D.ThemeUserDefined のデフォルト値の一覧です。
| プロパティ | デフォルト値 |
|---|---|
| ambientLightStrength | 0.25 |
| backgroundColor | "black"。詳 し く はcolor を参照。 |
| backgroundEnabled | true |
| baseColors | "黒" |
| baseGradients | QLinearGradient.本質的に完全な黒。 |
| colorStyle | カラースタイルユニフォーム |
| font | font |
| gridEnabled | true |
| gridLineColor | "白" . |
| highlightLightStrength | 7.5 |
| labelBackgroundColor | 「グレー |
| labelBackgroundEnabled | true |
| labelBorderEnabled | true |
| labelTextColor | "白" |
| lightColor | 「ホワイト |
| lightStrength | 5.0 |
| multiHighlightColor | 「ブルー |
| multiHighlightGradient | QLinearGradient.基本的に真っ黒。 |
| singleHighlightColor | "赤" |
| singleHighlightGradient | QLinearGradient.基本的に真っ黒。 |
| windowColor | "黒" |
使用例
組み込みのテーマを何も変更せずに使用する:
Scatter3D {
...
theme: Theme3D { type: Theme3D.ThemeRetro }
...
}組み込みテーマを使用し、いくつかのプロパティを変更する:
Bars3D {
...
theme: Theme3D {
type: Theme3D.ThemeRetro
labelBorderEnabled: true
font.pointSize: 35
labelBackgroundEnabled: false
}
...
}ユーザー定義テーマの使用:
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"
}
...
}Theme3D enumについては、Q3DTheme::ColorStyle およびQ3DTheme::Theme を参照。
プロパティのドキュメント
ambientLightStrength : real
グラフ全体の環境光の強さ。この値によって、光の位置に関係なく、グラフ全体の色がどれだけ均等に明るく表示されるかが決まります。値は0.0 から1.0 の間でなければなりません。
backgroundColor : color
グラフの背景色。
backgroundEnabled : bool
backgroundColor の値を用いて背景を描画するかどうかを定義する。
baseColors : list<ThemeColor>
グラフ内のすべてのオブジェクトに使用する基本色のリストを、系列ごとに指定します。系列が色より多い場合、色リストは折り返され、リストの最初の色から再スタートする。colorStyle がTheme3D.ColorStyleUniform でない場合、即座に効果はありません。
これは、Abstract3DSeries.baseColor をシリーズで明示的に設定することで上書きできる。
baseGradients : list<ColorGradient>
グラフ内のすべてのオブジェクトに使用される基本グラデーションのリスト。シリーズがグラデーションより多い場合、グラデーションリストは折り返し、リストの最初のグラデーションから再スタートする。
colorStyle がTheme3D.ColorStyleUniform の場合、即座の効果はありません。
この値は、Abstract3DSeries.baseGradient をシリーズで明示的に設定することで上書きすることができます。
colorStyle : Theme3D.ColorStyle
グラフの色のスタイル。Q3DTheme::ColorStyle enum値の1つ。
この値は、Abstract3DSeries.colorStyle をシリーズで明示的に設定することで上書きすることができます。
Q3DTheme::ColorStyleも参照してください 。
font : font
ラベルに使用するフォントを設定します。
gridEnabled : bool
グリッド線を描画するかどうかを定義する。この値はすべてのグリッド線に影響する。
gridLineColor : color
グリッド線の色。
注意: 透明はサポートされておらず、未定義の動作になります。
highlightLightStrength : real
選択したオブジェクトの鏡面光強度。値は0.0 から10.0 の間でなければなりません。
labelBackgroundColor : color
ラベルの背景色。labelBackgroundEnabled がfalse の場合は影響しません。
labelBackgroundEnabled : bool
ラベルがlabelBackgroundColor (アルファを含む) を使用する背景で描画されるか、または完全に透明な背景で描画されるかを定義します。背景のあるラベルは、最も長いラベルに基づいて軸ごとに同じ大きさに描画され、テキストはその中央に配置されます。背景なしのラベルはそのまま描画され、グラフ内の位置に基づいて左揃えまたは右揃えになります。
labelBorderEnabled : bool
背景を持つラベルにラベルボーダーを描くかどうかを定義する。labelBackgroundEnabled がfalse の場合は影響しません。
labelTextColor : color
ラベルに使用するフォントの色。
lightColor : color
Scene3D で定義された環境光と鏡面光の色。
lightStrength : real
グラフ全体の鏡面光強度。値は0.0 と10.0 の間でなければなりません。
この値はScene3D で指定した光に影響します。
multiHighlightColor : color
選択オブジェクトのハイライト色。selectionMode にAbstractGraph3D.SelectionRow またはAbstractGraph3D.SelectionColumn フラグが設定されている場合に使用されます。
注意: 透過はサポートされておらず、未定義の動作になります。
multiHighlightGradient : ColorGradient
選択オブジェクトのハイライトグラデーション。selectionMode にAbstractGraph3D.SelectionRow またはAbstractGraph3D.SelectionColumn フラグが設定されている場合に使用されます。
注意: 透過はサポートされておらず、未定義の動作になります。
singleHighlightColor : color
選択オブジェクトのハイライト色。selectionMode にAbstractGraph3D.SelectionItem フラグが設定されている場合に使用されます。
注意: 透過はサポートされておらず、未定義の動作になります。
singleHighlightGradient : ColorGradient
選択オブジェクトのハイライトグラデーション。selectionMode にAbstractGraph3D.SelectionItem フラグが設定されている場合に使用されます。
注意: 透明度はサポートされておらず、未定義の動作になります。
type : Theme3D.Theme
テーマのタイプ。タイプが設定されていない場合、タイプはTheme3D.ThemeUserDefined になります。アイテムが構築された後にテーマのタイプを変更すると、テーマの他のすべてのプロパティが、定義済みのテーマが指定するものに変更されます。グラフのアクティブなテーマのテーマ・タイプを変更すると、接続されているすべての系列もリセットされ、新しいテーマが使用されます。
windowColor : color
グラフが描画されるアプリケーションウィンドウの色。
© 2026 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.