ItemModelBarDataProxy QML Type

를 사용하여 항목 모델에 데이터를 표시하는 프록시 클래스 Bars3D. 더 보기...

Import Statement: import QtDataVisualization 1.8
Since: QtDataVisualization 1.0
In C++: QItemModelBarDataProxy
Inherits:

BarDataProxy

속성

상세 설명

이 유형을 사용하면 AbstractItemModel 파생 모델을 Bars3D 의 데이터 소스로 사용할 수 있습니다.

데이터는 매핑 또는 모델이 변경될 때마다 비동기적으로 확인됩니다. QBarDataProxy::arrayReset()는 데이터가 해결될 때 발생합니다.

ItemModelBarDataProxy 열거형에 대해서는 QItemModelBarDataProxy::MultiMatchBehavior 을 참조하세요.

자세한 내용은 QItemModelBarDataProxy 문서를 참조하세요.

사용 예시:

ItemModelBarDataProxy {
    itemModel: model // E.g. a list model defined elsewhere containing yearly expenses data.
    // Mapping model roles to bar series rows, columns, and values.
    rowRole: "year"
    columnRole: "city"
    valueRole: "expenses"
    rowCategories: ["2010", "2011", "2012", "2013"]
    columnCategories: ["Oulu", "Rauma", "Helsinki", "Tampere"]
}

BarDataProxyQt Data Visualization 데이터 처리도참조하세요 .

속성 문서

autoColumnCategories : bool

true 로 설정하면 매핑은 명시적으로 설정된 열 범주를 무시하고 모델에서 데이터가 확인될 때마다 자동으로 생성된 범주로 덮어씁니다. 기본값은 true 입니다.


autoRowCategories : bool

true 으로 설정하면 매핑은 명시적으로 설정된 모든 행 범주를 무시하고 모델의 데이터가 확인될 때마다 자동으로 생성된 범주로 덮어씁니다. 기본값은 true 입니다.


columnCategories : list<String>

매핑의 열 범주입니다. 이 목록에 있는 열 역할 값을 가진 항목만 데이터가 확인될 때 포함됩니다. 열은 이 목록에 있는 것과 동일한 순서로 정렬됩니다.


columnRole : string

열 범주에 매핑할 항목 모델 역할입니다.


columnRolePattern : regExp

설정하면 열 범주로 사용되기 전에 열 역할에 매핑된 값에 대해 검색 및 바꾸기가 수행됩니다. 이 속성은 매핑된 값에서 바꿀 부분을 찾기 위한 정규식을 지정하며 columnRoleReplace 속성에는 바꾸기 문자열이 포함됩니다. 이 속성은 항목 모델의 단일 타임스탬프 필드에서 행 및 열 카테고리를 구문 분석할 때 유용합니다.

columnRolecolumnRoleReplace참조하세요 .


columnRoleReplace : string

이 속성은 columnRolePattern 와 함께 사용할 바꾸기 콘텐츠를 정의합니다. 기본값은 빈 문자열입니다. 정규식을 사용한 검색 및 바꾸기 작동 방식에 대한 자세한 내용은 QString::replace(const QRegularExpression &rx, const QString &after) 함수 설명서를 참조하세요.

columnRolecolumnRolePattern도 참조하세요 .


itemModel : model

항목 모델.


multiMatchBehavior : ItemModelBarDataProxy.MultiMatchBehavior

각 행/열 조합에 대한 여러 개의 일치 항목이 처리되는 방식을 정의합니다. 기본값은 ItemModelBarDataProxy.MMBLast 입니다. 선택한 동작은 막대 값과 회전 모두에 영향을 줍니다.

예를 들어, 불규칙한 간격으로 타임스탬프가 찍힌 데이터가 있는 항목 모델이 있고 각 날짜의 데이터 항목의 총 값을 막대 그래프로 시각화하고자 할 수 있습니다. 각 막대가 하루를 나타내도록 행 및 열 범주를 지정하고 multiMatchBehavior를 ItemModelBarDataProxy.MMBCumulative 로 설정하면 됩니다.


rotationRole : string

막대 회전 각도에 매핑할 항목 모델 역할입니다.


rotationRolePattern : regExp

설정하면 회전 역할에 매핑된 값에 대해 검색 및 바꾸기가 수행된 후 막대 회전 각도로 사용됩니다. 이 속성은 매핑된 값에서 바꿀 부분을 찾기 위한 정규식을 지정하며 rotationRoleReplace 속성에는 바꾸기 문자열이 포함됩니다.

rotationRolerotationRoleReplace참조하세요 .


rotationRoleReplace : string

이 속성은 rotationRolePattern 와 함께 사용할 바꾸기 콘텐츠를 정의합니다. 기본값은 빈 문자열입니다. 정규식을 사용한 검색 및 바꾸기 작동 방식에 대한 자세한 내용은 QString::replace(const QRegularExpression &rx, const QString &after) 함수 설명서를 참조하세요.

rotationRolerotationRolePattern도 참조하세요 .


rowCategories : list<String>

매핑의 행 카테고리. 이 목록에 있는 행 역할 값을 가진 항목만 데이터가 확인될 때 포함됩니다. 행은 이 목록에 있는 것과 같은 순서로 정렬됩니다.


rowRole : string

행 범주에 매핑할 항목 모델 역할입니다.


rowRolePattern : regExp

설정하면 행 역할로 매핑된 값에 대해 검색 및 바꾸기가 수행된 후 행 카테고리로 사용됩니다. 이 속성은 매핑된 값에서 바꿀 부분을 찾기 위한 정규식을 지정하며 rowRoleReplace 속성에는 바꾸기 문자열이 포함됩니다. 이 속성은 항목 모델의 단일 타임스탬프 필드에서 행 및 열 카테고리를 구문 분석할 때 유용합니다.

rowRolerowRoleReplace참조하세요 .


rowRoleReplace : string

이 속성은 rowRolePattern 와 함께 사용할 바꾸기 콘텐츠를 정의합니다. 기본값은 빈 문자열입니다. 정규식을 사용한 검색 및 바꾸기 작동 방식에 대한 자세한 내용은 QString::replace(const QRegularExpression &rx, const QString &after) 함수 설명서를 참조하세요.

rowRolerowRolePattern도 참조하세요 .


useModelCategories : bool

true 로 설정하면 매핑은 행과 열의 역할 및 카테고리를 무시하고 대신 모델의 행과 열을 사용합니다. 행 및 열 머리글은 행 및 열 레이블에 사용됩니다. 기본값은 false 입니다.


valueRole : string

막대 값에 매핑할 항목 모델 역할입니다.


valueRolePattern : regExp

설정하면 값 역할에 의해 매핑된 값에 대해 검색 및 바꾸기가 수행된 후 막대 값으로 사용됩니다. 이 속성은 매핑된 값에서 바꿀 부분을 찾기 위한 정규식을 지정하며 valueRoleReplace 속성에는 바꾸기 문자열이 포함됩니다.

valueRolevalueRoleReplace참조하세요 .


valueRoleReplace : string

이 속성은 valueRolePattern 와 함께 사용할 바꾸기 콘텐츠를 정의합니다. 기본값은 빈 문자열입니다. 정규식을 사용한 검색 및 바꾸기 작동 방식에 대한 자세한 내용은 QString::replace(const QRegularExpression &rx, const QString &after) 함수 설명서를 참조하세요.

valueRolevalueRolePattern도 참조하세요 .


© 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.