QBarModelMapper Class
QBarModelMapper 클래스는 막대형 시계열을 위한 모델 매퍼입니다. 더 보기...
| 헤더: | #include <QBarModelMapper> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS Graphs) target_link_libraries(mytarget PRIVATE Qt6::Graphs) |
| qmake: | QT += graphs |
| QML에서: | BarModelMapper |
| 상속: | QObject |
- 상속된 멤버를 포함한 모든 멤버 목록
- QBarModelMapper는 2D용Qt Graphs C++ 클래스의 일부입니다.
속성
|
|
공개 함수
| qsizetype | count() const |
| qsizetype | first() const |
| qsizetype | firstBarSetSection() const |
| qsizetype | lastBarSetSection() const |
| QAbstractItemModel * | model() const |
| Qt::Orientation | orientation() const |
| QBarSeries * | series() const |
| void | setCount(qsizetype newCount) |
| void | setFirst(qsizetype newFirst) |
| void | setFirstBarSetSection(qsizetype newFirstBarSetSection) |
| void | setLastBarSetSection(qsizetype newLastBarSetSection) |
| void | setModel(QAbstractItemModel *model) |
| void | setOrientation(Qt::Orientation orientation) |
| void | setSeries(QBarSeries *series) |
신호
| void | countChanged() |
| void | firstBarSetSectionChanged() |
| void | firstChanged() |
| void | lastBarSetSectionChanged() |
| void | modelChanged() |
| void | orientationChanged() |
| void | seriesChanged() |
상세 설명
모델 매퍼를 사용하면 ` QAbstractItemModel ` 클래스에서 파생된 데이터 모델을 그래프의 데이터 소스로 활용할 수 있습니다. 모델 매퍼는 데이터 모델과 ` QBarSeries` 간의 연결을 생성하는 데 사용됩니다.
데이터를 조작하는 데 모델 및 막대 차트 시리즈 속성을 모두 사용할 수 있습니다. 모델 매퍼는 막대 차트 시리즈와 데이터 모델의 동기화를 유지합니다.
모델 매퍼는 막대 시리즈 내의 모든 막대 세트가 동일한 크기를 갖도록 보장합니다. 따라서 막대 세트에 값을 추가하거나 제거하면 막대 시리즈의 모든 막대 세트에 동일한 변경 사항이 반영됩니다.
속성 설명서
count : qsizetype
이 속성은 막대형 시리즈의 데이터로 매핑되는 모델의 행 또는 열 수를 나타냅니다.
기본값은 -1 이며, 이는 최소값이기도 합니다. 개수는 모델의 행/열 수에 의해 제한됩니다.
액세스 함수:
| qsizetype | count() const |
| void | setCount(qsizetype newCount) |
알림 신호:
| void | countChanged() |
QBarModelMapper::orientation도 참조하십시오 .
first : qsizetype
이 속성은 막대 시리즈에 포함된 막대 집합의 첫 번째 값이 들어 있는 모델의 행 또는 열을 나타냅니다.
최소값 및 기본값은 0입니다.
액세스 함수:
| qsizetype | first() const |
| void | setFirst(qsizetype newFirst) |
알림 신호:
| void | firstChanged() |
QBarModelMapper::orientation도 참조하십시오 .
firstBarSetSection : qsizetype
이 속성은 첫 번째 막대 차트 세트의 데이터 소스로 사용되는 모델의 섹션을 저장합니다.
기본값은 -1(유효하지 않은 매핑)입니다.
액세스 함수:
| qsizetype | firstBarSetSection() const |
| void | setFirstBarSetSection(qsizetype newFirstBarSetSection) |
알림 신호:
| void | firstBarSetSectionChanged() |
QBarModelMapper::orientation도 참조하십시오 .
lastBarSetSection : qsizetype
이 속성은 마지막 막대 세트의 데이터 소스로 사용되는 모델의 섹션을 저장합니다.
기본값은 -1(유효하지 않은 매핑)입니다.
액세스 함수:
| qsizetype | lastBarSetSection() const |
| void | setLastBarSetSection(qsizetype newLastBarSetSection) |
알림 신호:
| void | lastBarSetSectionChanged() |
QBarModelMapper::orientation도 참조하십시오 .
model : QAbstractItemModel*
이 속성은 매퍼에서 사용하는 데이터 모델을 포함합니다.
액세스 함수:
| QAbstractItemModel * | model() const |
| void | setModel(QAbstractItemModel *model) |
알림 신호:
| void | modelChanged() |
orientation : Qt::Orientation
모델맵퍼에게 모델의 데이터를 어떻게 매핑할지 지시합니다. ‘ Qt::Vertical ’을 사용할 경우, 모델의 각 열이 막대 세트를 정의하고, 모델의 각 행이 범주를 정의합니다. 방향이 ‘ Qt::Horizontal ’로 설정되면, 모델의 각 행이 막대 세트를 정의하고, 모델의 각 열이 범주를 정의합니다.
기본값은 Qt::Vertical
액세스 함수:
| Qt::Orientation | orientation() const |
| void | setOrientation(Qt::Orientation orientation) |
알림 신호:
| void | orientationChanged() |
series : QBarSeries*
이 속성은 매퍼에서 사용하는 막대형 시리즈를 보관합니다.
이 시리즈가 매퍼에 설정되면 시리즈의 모든 데이터는 삭제됩니다. 새로운 시리즈가 지정되면 기존 시리즈는 연결이 해제되지만, 데이터는 그대로 유지됩니다.
액세스 함수:
| QBarSeries * | series() const |
| void | setSeries(QBarSeries *series) |
알림 신호:
| void | seriesChanged() |
© 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.