GraphsTheme QML Type
그래프를 위한 시각적 스타일입니다. 더 보기...
Import Statement: | import QtGraphs |
In C++: | QGraphsTheme |
- 상속된 멤버를 포함한 모든 멤버 목록
- 그래프 테마는 Qt Graphs QML 공통 유형의 일부입니다.
속성
- GraphsLine.labelTextColor : color
- GraphsLine.mainColor : color
- GraphsLine.mainWidth : real
- GraphsLine.subColor : color
- GraphsLine.subWidth : real
- axisX : GraphsLine
- axisXLabelFont : font
- axisY : GraphsLine
- axisYLabelFont : font
- axisZ : GraphsLine
- axisZLabelFont : font
- backgroundColor : color
- backgroundVisible : bool
- baseColors : list<Color>
- baseGradients : list<Gradient>
- borderColors : list<color>
- colorScheme : QGraphsTheme::ColorScheme
- colorStyle : GraphsTheme.ColorStyle
- grid : GraphsLine
- gridVisible : bool
- labelBackgroundColor : color
- labelBackgroundVisible : bool
- labelBorderVisible : bool
- labelFont : font
- labelTextColor : color
- labelsVisible : bool
- multiHighlightColor : color
- multiHighlightGradient : Gradient
- plotAreaBackgroundColor : color
- plotAreaBackgroundVisible : bool
- seriesColors : list<color>
- singleHighlightColor : color
- singleHighlightGradient : Gradient
- theme : GraphsTheme.Theme
상세 설명
이 유형은 전체 그래프에 영향을 주는 시각적 속성을 지정하는 데 사용됩니다. 여러 가지 기본 제공 테마를 그대로 사용하거나 자유롭게 수정할 수 있습니다.
테마는 GraphsTheme.Theme.UserDefined 열거형 값을 사용하여 처음부터 새로 만들 수 있습니다.
테마 커스터마이징하기
기본 테마는 QtGreen이지만 각 속성을 사용자 정의할 수 있습니다.
다음 표에는 테마로 제어되는 속성과 QGraphsTheme.Theme.UserDefined 의 기본값이 나열되어 있습니다.
속성 | 기본값 |
---|---|
backgroundVisible | true |
seriesColors | Qt::black |
baseGradients | QLinearGradient. 기본적으로 완전히 검은색입니다. |
colorStyle | Uniform |
labelFont | QFont |
gridVisible | true |
labelBackgroundVisible | true |
labelBorderVisible | true |
labelsVisible | true |
사용 예
기본 제공 테마를 수정하지 않고 사용:
Scatter3D { theme: GraphsTheme { theme: GraphsTheme.Theme.YellowSeries } ...
기본 제공 테마를 사용하고 일부 속성을 수정합니다:
Bars3D { theme: GraphsTheme { theme: GraphsTheme.Theme.QtGreenNeon labelBorderVisible: true labelFont.pointSize: 35 labelBackgroundVisible: false } ...
사용자 정의 테마 사용:
Surface3D { theme: GraphsTheme { theme: GraphsTheme.Theme.UserDefined backgroundColor: "red" backgroundVisible: true seriesColors: ["blue"] colorStyle: GraphsTheme.ColorStyle.Uniform labelFont.family: "Lucida Handwriting" labelFont.pointSize: 35 gridVisible: false grid.mainColor: "red" grid.subColor: "blue" labelBackgroundColor: "black" labelBackgroundVisible: true labelBorderVisible: false labelTextColor: "white" multiHighlightColor: "green" singleHighlightColor: "darkRed" } ...
그래프 테마 열거형은 GraphsTheme::colorStyle 및 GraphsTheme::theme 을 참조하세요.
속성 문서
GraphsLine.labelTextColor : color |
레이블에 사용되는 텍스트의 색상입니다. 기본값은 colorScheme 에 따라 달라집니다.
GraphsLine.mainColor : color |
주 선의 색상입니다. 기본값은 colorScheme 에 따라 달라집니다.
GraphsLine.mainWidth : real |
주 줄의 너비입니다. 기본값은 2.0
입니다.
격자선에 대해 설정된 경우 GraphsItem3D::gridLineType 인 경우에만 적용됩니다. Graphs3D.GridLineType.Shader
Graphs3D.GridLineType 를참조하십시오 .
GraphsLine.subColor : color |
보조 선의 색상입니다. 기본값은 colorScheme 에 따라 달라집니다.
GraphsLine.subWidth : real |
하위 선의 너비입니다. 기본값은 1.0
입니다.
격자선에 대해 설정된 경우 GraphsItem3D::gridLineType 인 경우에만 적용됩니다. Graphs3D.GridLineType.Shader
Graphs3D.GridLineType 를참조하십시오 .
axisX : GraphsLine |
X축의 GraphsLine 을 유지합니다.
GraphsLine.mainColor, GraphsLine.subColor, GraphsLine.mainWidth, GraphsLine.subWidth, GraphsLine.labelTextColor도 참조하십시오 .
axisY : GraphsLine |
Y 축의 GraphsLine 을 보유합니다.
GraphsLine.mainColor, GraphsLine.subColor, GraphsLine.mainWidth, GraphsLine.subWidth, GraphsLine.labelTextColor도 참조하십시오 .
axisZ : GraphsLine |
Z 축의 GraphsLine 을 유지합니다.
GraphsLine.mainColor, GraphsLine.subColor, GraphsLine.mainWidth, GraphsLine.subWidth, GraphsLine.labelTextColor도 참조하십시오 .
backgroundColor : color |
그래프가 그려지는 보기의 색상입니다. 기본값은 colorScheme 에 따라 달라집니다.
backgroundVisible : bool |
값을 사용하여 뷰 배경을 그릴지 여부를 정의합니다. backgroundColor 기본값은 true
입니다.
baseColors : list<Color> |
그래프의 모든 개체에 사용할 색상 유형의 기본 색 목록(계열별)입니다. 색상보다 계열이 많은 경우 색상 목록이 래핑되고 목록의 첫 번째 색상으로 다시 시작됩니다. colorStyle 이 GraphsTheme.ColorStyle.Uniform
이 아닌 경우 즉시 적용되지 않습니다.
사용 예시:
baseColors: [ Color { color: "red" } ]
계열에 Abstract3DSeries.baseColor 을 명시적으로 설정하여 재정의할 수 있습니다.
그래프의 모든 개체에 사용할 기본 그라디언트 목록을 계열별로 나열합니다. 그라데이션보다 많은 계열이 있는 경우 그라데이션 목록이 래핑되고 목록의 첫 번째 그라데이션부터 다시 시작됩니다.
colorStyle 가 GraphsTheme.ColorStyle.Uniform 인 경우 즉시 적용되지 않습니다.
사용 예시:
baseGradients: [ Gradient { GradientStop { position: 1.0; color: "#DBEB00" } GradientStop { position: 0.0; color: "#373F26" } } ]
계열에 Abstract3DSeries.baseGradient 을 명시적으로 설정하여 이 값을 재정의할 수 있습니다.
그래프의 모든 개체에 사용할 테두리 색상을 계열별로 나열한 목록입니다.
계열이 색상보다 많으면 색상 목록이 래핑되고 목록의 첫 번째 색상으로 다시 시작됩니다.
colorStyle 이 균일하지 않은 경우 즉시 적용되지 않습니다.
colorScheme : QGraphsTheme::ColorScheme |
사용 중인 그래프의 색 구성표입니다.
QGraphsTheme::ColorScheme 를참조하십시오 .
colorStyle : GraphsTheme.ColorStyle |
그래프 색의 스타일입니다. QGraphsTheme::ColorStyle 열거형 값 중 하나입니다.
이 값은 시리즈에서 Abstract3DSeries.colorStyle 을 명시적으로 설정하여 재정의할 수 있습니다.
참고: 이 속성은 2D용 Qt Graphs 에는 영향을 미치지 않습니다.
QGraphsTheme::ColorStyle 를참조하세요 .
grid : GraphsLine |
테마의 GraphsLine 를 보유합니다.
GraphsLine.mainColor, GraphsLine.subColor, GraphsLine.mainWidth, GraphsLine.subWidth, GraphsLine.labelTextColor도 참조 하세요.
gridVisible : bool |
격자선 그리기 여부를 정의합니다. 이 값은 모든 격자선에 영향을 줍니다. 기본값은 true
입니다.
labelBackgroundColor : color |
레이블 배경의 색상입니다. labelBackgroundVisible 이 false
인 경우 영향을 미치지 않습니다. 기본값은 colorScheme 에 따라 달라집니다.
labelBackgroundVisible : bool |
레이블이 labelBackgroundColor (알파 포함)를 사용하는 배경으로 그려질지, 아니면 완전히 투명한 배경으로 그려질지를 정의합니다. 배경이 있는 레이블은 가장 긴 레이블을 기준으로 축마다 같은 크기로 그려지며 텍스트가 가운데에 배치됩니다. 배경이 없는 레이블은 그대로 그려지며 그래프에서의 위치에 따라 왼쪽 또는 오른쪽으로 정렬됩니다. 기본값은 true
입니다.
labelBorderVisible : bool |
배경이 있는 레이블에 레이블 테두리를 그릴지 여부를 정의합니다. labelBackgroundVisible 가 false
인 경우 영향을 주지 않습니다. 기본값은 true
입니다.
labelFont : font |
레이블에 사용할 글꼴을 설정합니다.
labelTextColor : color |
labelsVisible : bool |
레이블을 그릴지 여부를 정의합니다. false
인 경우 다른 모든 레이블 속성은 영향을 받지 않습니다. 기본값은 true
입니다.
multiHighlightColor : color |
선택한 객체의 강조 표시 색상입니다. selectionMode 에 Graphs3D.SelectionFlag.Row
또는 Graphs3D.SelectionFlag.Column
플래그가 설정되어 있는 경우 사용됩니다. 기본값은 colorScheme 에 따라 달라집니다.
Graphs3D.SelectionFlag 를참조하십시오 .
multiHighlightGradient : Gradient |
선택된 객체의 강조 그라데이션입니다. selectionMode 에 Graphs3D.SelectionFlag.Row
또는 Graphs3D.SelectionFlag.Column
플래그가 설정된 경우 사용됩니다. 기본값은 colorScheme 에 따라 달라집니다.
Graphs3D.SelectionFlag도 참조하십시오 .
plotAreaBackgroundColor : color |
그래프 플롯 영역 배경의 색상입니다. 기본값은 colorScheme 에 따라 달라집니다.
plotAreaBackgroundVisible : bool |
plotAreaBackgroundColor 값을 사용하여 플롯 영역 배경을 그릴지 여부를 정의합니다. 기본값은 true
입니다.
그래프의 모든 개체에 사용할 색상을 계열별로 나열합니다. 색상보다 시리즈가 많으면 색상 목록이 래핑되고 목록의 첫 번째 색상부터 다시 시작됩니다. colorStyle 가 GraphsTheme.ColorStyle.Uniform
이 아닌 경우 즉시 적용되지 않습니다.
사용 예시:
seriesColors: [ "red" ]
계열에 Abstract3DSeries.baseColor 을 명시적으로 설정하여 재정의할 수 있습니다.
singleHighlightColor : color |
선택한 객체의 강조 표시 색상입니다. selectionMode 에 Graphs3D.SelectionFlag.Item
플래그가 설정되어 있는 경우 사용됩니다. 기본값은 colorScheme 에 따라 달라집니다.
Graphs3D.SelectionFlag 를참조하세요 .
singleHighlightGradient : Gradient |
선택한 객체의 강조 그라데이션입니다. selectionMode 에 Graphs3D.SelectionFlag.Item
플래그가 설정된 경우 사용됩니다. 기본값은 colorScheme 에 따라 달라집니다.
Graphs3D.SelectionFlag도 참조하세요 .
theme : GraphsTheme.Theme |
테마의 유형입니다. 유형이 설정되지 않은 경우 유형은 GraphsTheme.Theme.QtGreen 입니다. 항목이 구성된 후 테마 유형을 변경하면 테마의 다른 모든 속성이 미리 정의된 테마가 지정한 대로 변경됩니다. 그래프의 활성 테마의 테마 유형을 변경하면 첨부된 모든 시리즈도 새 테마를 사용하도록 재설정됩니다.
© 2025 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.