QXYModelMapper Class
QXYModelMapper 클래스는 선, 스플라인 및 분산 계열을 위한 모델 매퍼입니다. 더 보기...
Header: | #include <QXYModelMapper> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS Graphs) target_link_libraries(mytarget PRIVATE Qt6::Graphs) |
qmake: | QT += graphs |
QML에서: | XYModelMapper |
상속합니다: | QObject |
- 상속된 멤버를 포함한 모든 멤버 목록
- QXYModelMapper는 Qt Graphs 2D용 C++ 클래스의 일부입니다.
속성
|
공공 기능
qsizetype | count() const |
qsizetype | first() const |
QAbstractItemModel * | model() const |
Qt::Orientation | orientation() const |
QXYSeries * | series() const |
void | setCount(qsizetype count) |
void | setFirst(qsizetype first) |
void | setModel(QAbstractItemModel *model) |
void | setOrientation(Qt::Orientation orientation) |
void | setSeries(QXYSeries *series) |
void | setXSection(qsizetype xSection) |
void | setYSection(qsizetype ySection) |
qsizetype | xSection() const |
qsizetype | ySection() const |
신호
void | countChanged() |
void | firstChanged() |
void | modelChanged() |
void | orientationChanged() |
void | seriesChanged() |
void | xSectionChanged() |
void | ySectionChanged() |
상세 설명
모델 매퍼를 사용하면 QAbstractItemModel 클래스에서 파생된 데이터 모델을 그래프의 데이터 소스로 사용할 수 있습니다. 모델 매퍼는 선, 스플라인 또는 분산형 계열 간의 연결을 만드는 데 사용됩니다. TableModel은 모델에 대한 자연스러운 선택입니다.
모델 및 계열 속성 모두 데이터를 조작하는 데 사용할 수 있습니다. 모델 매퍼는 시리즈와 데이터 모델을 동기화 상태로 유지합니다.
QXYSeries 을참조하세요 .
속성 문서
count : qsizetype
이 속성은 시리즈의 데이터로 매핑되는 모델의 행 수를 보유합니다.
최소값 및 기본값은 -1입니다(모델의 행 수에 따라 제한됨).
함수에 액세스합니다:
qsizetype | count() const |
void | setCount(qsizetype count) |
알림 신호:
void | countChanged() |
QXYModelMapper::orientation 를참조하세요 .
first : qsizetype
이 속성은 계열의 첫 번째 점에 대한 데이터가 포함된 모델의 행을 보유합니다.
최소값 및 기본값은 0입니다.
함수에 액세스합니다:
qsizetype | first() const |
void | setFirst(qsizetype first) |
알림 신호:
void | firstChanged() |
QXYModelMapper::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 : QXYSeries*
이 속성은 매퍼가 사용하는 계열을 보유합니다.
시리즈가 매퍼로 설정되면 시리즈의 모든 데이터가 삭제됩니다. 새 시리즈가 지정되면 이전 시리즈의 연결이 끊어지지만 데이터는 보존됩니다.
기능에 액세스합니다:
QXYSeries * | series() const |
void | setSeries(QXYSeries *series) |
알림 신호:
void | seriesChanged() |
xSection : qsizetype
이 속성은 데이터 요소의 x 좌표가 포함된 모델 섹션을 보유합니다.
기본값은 -1(잘못된 매핑)입니다.
함수에 액세스합니다:
qsizetype | xSection() const |
void | setXSection(qsizetype xSection) |
알림 신호:
void | xSectionChanged() |
QXYModelMapper::orientation 를참조하세요 .
ySection : qsizetype
이 속성은 데이터 요소의 y 좌표가 포함된 모델 섹션을 보유합니다.
기본값은 -1(잘못된 매핑)입니다.
함수에 액세스합니다:
qsizetype | ySection() const |
void | setYSection(qsizetype ySection) |
알림 신호:
void | ySectionChanged() |
QXYModelMapper::orientation 를참조하세요 .
© 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.