HPieModelMapper QML Type
파이 시리즈용 가로 모델 매퍼. 더 보기...
Import Statement: | import QtCharts 2.8 |
In C++: | QHPieModelMapper |
속성
- columnCount : int
- firstColumn : int
- labelsRow : int
- model : SomeModel
- series : PieSeries
- valuesRow : int
상세 설명
모델 매퍼를 사용하면 QAbstractItemModel 클래스에서 파생된 데이터 모델을 차트의 데이터 소스로 사용할 수 있습니다. 수평 모델 매퍼는 데이터 모델과 PieSeries 사이의 연결을 만드는 데 사용되므로 데이터 모델의 각 열은 파이 슬라이스를 정의하고 각 행은 레이블 또는 파이 슬라이스의 값에 매핑됩니다.
모델 및 파이 계열 속성 모두 데이터를 조작하는 데 사용할 수 있습니다. 모델 매퍼는 파이 시리즈와 데이터 모델을 동기화 상태로 유지합니다.
다음 QML 예제에서는 4개의 슬라이스로 파이 계열을 만듭니다(모델에 열이 5개 이상 있다고 가정). 각 슬라이스는 1행에서 레이블을, 2행에서 값을 가져옵니다.
HPieModelMapper { series: pieSeries model: customModel labelsRow: 1 valuesRow: 2 firstColumn: 1 columnCount: 4 }
속성 문서
columnCount : int |
파이 계열의 데이터로 매핑되는 모델의 열 수입니다. 기본값은 -1입니다(모델의 열 수에 의해 제한되는 숫자).
firstColumn : int |
첫 번째 슬라이스 값을 포함하는 모델의 열입니다. 기본값은 0입니다.
labelsRow : int |
파이 슬라이스의 레이블과 동기화된 상태로 유지되는 모델의 행입니다. 기본값은 -1(잘못된 매핑)입니다.
model : SomeModel |
매퍼에서 사용하는 QAbstractItemModel 기반 모델입니다. 모델을 구현하여 QML에 노출해야 합니다.
참고: 모델은 행 또는 열 추가 및 제거와 셀의 데이터 수정을 지원해야 합니다.
series : PieSeries |
valuesRow : int |
파이의 슬라이스 값과 동기화된 상태로 유지되는 모델의 행입니다. 기본값은 -1(잘못된 매핑)입니다.
© 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.