QItemModelSurfaceDataProxy Class
를 사용하여 항목 모델에 데이터를 표시하는 프록시 클래스 Q3DSurface. 더 보기...
헤더: | #include <QItemModelSurfaceDataProxy> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS DataVisualization) target_link_libraries(mytarget PRIVATE Qt6::DataVisualization) |
qmake: | QT += datavisualization |
이후: | QtDataVisualization 1.0 |
QML에서: | ItemModelSurfaceDataProxy |
상속합니다: | QSurfaceDataProxy |
공용 유형
enum | MultiMatchBehavior { MMBFirst, MMBLast, MMBAverage, MMBCumulativeY } |
속성
|
|
공공 기능
QItemModelSurfaceDataProxy(QObject *parent = nullptr) | |
QItemModelSurfaceDataProxy(QAbstractItemModel *itemModel, QObject *parent = nullptr) | |
QItemModelSurfaceDataProxy(QAbstractItemModel *itemModel, const QString &yPosRole, QObject *parent = nullptr) | |
QItemModelSurfaceDataProxy(QAbstractItemModel *itemModel, const QString &rowRole, const QString &columnRole, const QString &yPosRole, QObject *parent = nullptr) | |
QItemModelSurfaceDataProxy(QAbstractItemModel *itemModel, const QString &rowRole, const QString &columnRole, const QString &xPosRole, const QString &yPosRole, const QString &zPosRole, QObject *parent = nullptr) | |
QItemModelSurfaceDataProxy(QAbstractItemModel *itemModel, const QString &rowRole, const QString &columnRole, const QString &yPosRole, const QStringList &rowCategories, const QStringList &columnCategories, QObject *parent = nullptr) | |
QItemModelSurfaceDataProxy(QAbstractItemModel *itemModel, const QString &rowRole, const QString &columnRole, const QString &xPosRole, const QString &yPosRole, const QString &zPosRole, const QStringList &rowCategories, const QStringList &columnCategories, QObject *parent = nullptr) | |
virtual | ~QItemModelSurfaceDataProxy() |
bool | autoColumnCategories() const |
bool | autoRowCategories() const |
QStringList | columnCategories() const |
int | columnCategoryIndex(const QString &category) |
QString | columnRole() const |
QRegularExpression | columnRolePattern() const |
QString | columnRoleReplace() const |
QAbstractItemModel * | itemModel() const |
QItemModelSurfaceDataProxy::MultiMatchBehavior | multiMatchBehavior() const |
void | remap(const QString &rowRole, const QString &columnRole, const QString &xPosRole, const QString &yPosRole, const QString &zPosRole, const QStringList &rowCategories, const QStringList &columnCategories) |
QStringList | rowCategories() const |
int | rowCategoryIndex(const QString &category) |
QString | rowRole() const |
QRegularExpression | rowRolePattern() const |
QString | rowRoleReplace() const |
void | setAutoColumnCategories(bool enable) |
void | setAutoRowCategories(bool enable) |
void | setColumnCategories(const QStringList &categories) |
void | setColumnRole(const QString &role) |
void | setColumnRolePattern(const QRegularExpression &pattern) |
void | setColumnRoleReplace(const QString &replace) |
void | setItemModel(QAbstractItemModel *itemModel) |
void | setMultiMatchBehavior(QItemModelSurfaceDataProxy::MultiMatchBehavior behavior) |
void | setRowCategories(const QStringList &categories) |
void | setRowRole(const QString &role) |
void | setRowRolePattern(const QRegularExpression &pattern) |
void | setRowRoleReplace(const QString &replace) |
void | setUseModelCategories(bool enable) |
void | setXPosRole(const QString &role) |
void | setXPosRolePattern(const QRegularExpression &pattern) |
void | setXPosRoleReplace(const QString &replace) |
void | setYPosRole(const QString &role) |
void | setYPosRolePattern(const QRegularExpression &pattern) |
void | setYPosRoleReplace(const QString &replace) |
void | setZPosRole(const QString &role) |
void | setZPosRolePattern(const QRegularExpression &pattern) |
void | setZPosRoleReplace(const QString &replace) |
bool | useModelCategories() const |
QString | xPosRole() const |
QRegularExpression | xPosRolePattern() const |
QString | xPosRoleReplace() const |
QString | yPosRole() const |
QRegularExpression | yPosRolePattern() const |
QString | yPosRoleReplace() const |
QString | zPosRole() const |
QRegularExpression | zPosRolePattern() const |
QString | zPosRoleReplace() const |
신호
void | autoColumnCategoriesChanged(bool enable) |
void | autoRowCategoriesChanged(bool enable) |
void | columnCategoriesChanged() |
void | columnRoleChanged(const QString &role) |
void | columnRolePatternChanged(const QRegularExpression &pattern) |
void | columnRoleReplaceChanged(const QString &replace) |
void | itemModelChanged(const QAbstractItemModel *itemModel) |
void | multiMatchBehaviorChanged(QItemModelSurfaceDataProxy::MultiMatchBehavior behavior) |
void | rowCategoriesChanged() |
void | rowRoleChanged(const QString &role) |
void | rowRolePatternChanged(const QRegularExpression &pattern) |
void | rowRoleReplaceChanged(const QString &replace) |
void | useModelCategoriesChanged(bool enable) |
void | xPosRoleChanged(const QString &role) |
void | xPosRolePatternChanged(const QRegularExpression &pattern) |
void | xPosRoleReplaceChanged(const QString &replace) |
void | yPosRoleChanged(const QString &role) |
void | yPosRolePatternChanged(const QRegularExpression &pattern) |
void | yPosRoleReplaceChanged(const QString &replace) |
void | zPosRoleChanged(const QString &role) |
void | zPosRolePatternChanged(const QRegularExpression &pattern) |
void | zPosRoleReplaceChanged(const QString &replace) |
상세 설명
QItemModelSurfaceDataProxy를 사용하면 QAbstractItemModel 파생 모델을 Q3DSurface 의 데이터 소스로 사용할 수 있습니다. 정의된 매핑을 사용하여 모델의 데이터를 Q3DSurface 그래프의 행, 열 및 표면 점으로 매핑합니다.
데이터는 매핑 또는 모델이 변경될 때마다 비동기적으로 확인됩니다. QSurfaceDataProxy::arrayReset()는 데이터가 해결될 때 발생합니다. 그러나 useModelCategories 속성이 true
으로 설정된 경우 동일한 프레임에 전체 모델을 확인해야 하는 변경 사항이 포함되지 않는 한 단일 항목 변경 사항은 동기적으로 확인됩니다.
매핑은 다음과 같은 방법으로 사용할 수 있습니다:
- useModelCategories 속성이
true
으로 설정된 경우 이 프록시는 QAbstractItemModel 의 행과 열을 Q3DSurface 의 행과 열에 매핑하고 기본적으로 Qt::DisplayRole 에 대해 반환된 값을 Y-위치로 사용합니다. 행 및 열 머리글은 기본적으로 부동 소수점으로 변환할 수 있는 경우 Z 위치 및 X 위치에 사용됩니다. 그렇지 않으면 행 및 열 인덱스가 사용됩니다. Qt::DisplayRole 이 적합하지 않은 경우 사용할 Y 위치 역할을 재정의할 수 있습니다. 헤더 또는 인덱스가 적합하지 않은 경우 사용할 Z 위치 및 X 위치 역할을 다시 정의할 수 있습니다. - QAbstractListModel 기반 모델처럼 데이터가 이미 행과 열로 깔끔하게 정렬되지 않은 모델의 경우 모델에서 행, 열 및 Y 위치 각각에 대해 매핑할 역할을 정의할 수 있습니다.
- 모델에 포함된 모든 데이터를 포함하지 않으려 하거나 자동 생성된 행과 열이 원하는 대로 정렬되지 않은 경우에는 행과 열 중 하나 또는 둘 모두에 대한 명시적인 카테고리 목록을 정의하여 어떤 행과 열을 어떤 순서로 포함할지 지정할 수 있습니다.
예를 들어 표면 지형 데이터를 저장하는 사용자 지정 QAbstractItemModel 이 있다고 가정해 보겠습니다. 모델의 각 항목에는 "경도", "위도" 및 "높이" 역할이 있습니다. 항목 모델에는 이미 경도와 위도가 올바른 순서로 먼저 나타나도록 데이터가 올바르게 정렬되어 있으므로 행 및 열 범주 자동 생성을 활용할 수 있습니다. 데이터를 표면 그래프에 표시하려면 다음과 같이 할 수 있습니다:
QItemModelSurfaceDataProxy *proxy = new QItemModelSurfaceDataProxy(customModel, QStringLiteral("longitude"), // Row role QStringLiteral("latitude"), // Column role QStringLiteral("height")); // Y-position role
모델의 필드에 필요한 정확한 형식의 데이터가 포함되어 있지 않은 경우 각 역할에 대해 검색 패턴 정규식과 바꾸기 규칙을 지정하여 필요한 형식의 값을 가져올 수 있습니다. 정규식을 사용한 바꾸기의 작동 방식에 대한 자세한 내용은 QString::replace(const QRegularExpression &rx, const QString &after) 함수 설명서를 참조하세요. 정규식을 사용하면 성능에 영향을 미치므로 원하는 값을 얻기 위해 검색 및 바꾸기를 수행할 필요가 없는 항목 모델을 활용하는 것이 더 효율적이라는 점에 유의하세요.
역할과 함께 검색 패턴을 사용하는 방법에 대한 예는 간단한 막대 그래프 예제에서 ItemModelBarDataProxy 사용법을 참조하세요.
Qt Data Visualization 데이터 처리도참조하세요 .
멤버 유형 문서
enum QItemModelSurfaceDataProxy::MultiMatchBehavior
QItemModelSurfaceDataProxy::multiMatchBehavior 속성에 대한 동작 유형입니다.
Constant | 값 | 설명 |
---|---|---|
QItemModelSurfaceDataProxy::MMBFirst | 0 | 위치 값은 항목 모델에서 각 행/열 조합과 일치하는 첫 번째 항목에서 가져옵니다. |
QItemModelSurfaceDataProxy::MMBLast | 1 | 위치 값은 각 행/열 조합과 일치하는 항목 모델의 마지막 항목에서 가져옵니다. |
QItemModelSurfaceDataProxy::MMBAverage | 2 | 각 행/열 조합과 일치하는 모든 항목의 위치 값은 함께 평균화되고 이 평균이 서페이스 포인트 위치로 사용됩니다. |
QItemModelSurfaceDataProxy::MMBCumulativeY | 3 | X 및 Z 값의 경우 MMBAverage 와 동일하게 작동하지만 Y 값은 평균을 내는 대신 합산하고 그 합계를 서페이스 포인트 Y 위치로 사용합니다. |
속성 문서
autoColumnCategories : bool
이 속성은 열 범주를 자동으로 생성할지 여부를 보유합니다.
true
로 설정하면 매핑은 명시적으로 설정된 열 범주를 무시하고 모델에서 데이터가 확인될 때마다 자동으로 생성된 범주로 덮어씁니다. 기본값은 true
입니다.
액세스 기능:
bool | autoColumnCategories() const |
void | setAutoColumnCategories(bool enable) |
알림 신호:
void | autoColumnCategoriesChanged(bool enable) |
autoRowCategories : bool
이 속성은 행 범주를 자동으로 생성할지 여부를 보유합니다.
true
으로 설정하면 매핑은 명시적으로 설정된 행 범주를 무시하고 모델에서 데이터가 확인될 때마다 자동으로 생성된 범주로 덮어씁니다. 기본값은 true
입니다.
액세스 기능:
bool | autoRowCategories() const |
void | setAutoRowCategories(bool enable) |
알림 신호:
void | autoRowCategoriesChanged(bool enable) |
columnCategories : QStringList
이 속성에는 매핑을 위한 열 카테고리가 저장됩니다.
액세스 함수:
QStringList | columnCategories() const |
void | setColumnCategories(const QStringList &categories) |
알림 신호:
void | columnCategoriesChanged() |
columnRole : QString
이 속성은 열 범주에 매핑할 항목 모델 역할을 보유합니다.
데이터가 속한 열을 정의하는 것 외에도 열 역할이 나타내는 값은 별도의 x 위치 역할도 정의하지 않는 한 모델 데이터가 확인될 때 QSurfaceDataItem 의 x 좌표 값으로 설정됩니다.
액세스 기능:
QString | columnRole() const |
void | setColumnRole(const QString &role) |
알림 신호:
void | columnRoleChanged(const QString &role) |
columnRolePattern : QRegularExpression
이 속성은 열 역할에 의해 매핑된 값이 열 범주로 사용되기 전에 검색 및 바꾸기가 수행되는지 여부를 보유합니다.
이 속성은 매핑된 값에서 바꿀 부분을 찾기 위한 정규식을 지정하며 columnRoleReplace 속성은 바꾸기 문자열을 포함합니다.
함수 액세스:
QRegularExpression | columnRolePattern() const |
void | setColumnRolePattern(const QRegularExpression &pattern) |
알림 신호:
void | columnRolePatternChanged(const QRegularExpression &pattern) |
columnRole 및 columnRoleReplace 을참조하세요 .
columnRoleReplace : QString
이 속성에는 열 역할 패턴과 함께 사용할 바꾸기 콘텐츠가 저장됩니다.
기본값은 빈 문자열입니다. 정규식을 사용한 검색 및 바꾸기 작동 방식에 대한 자세한 내용은 QString::replace(const QRegularExpression &rx, const QString &after) 함수 설명서를 참조하세요.
액세스 함수
QString | columnRoleReplace() const |
void | setColumnRoleReplace(const QString &replace) |
알림 신호:
void | columnRoleReplaceChanged(const QString &replace) |
columnRole 및 columnRolePattern 을참조하세요 .
itemModel : QAbstractItemModel*
이 프로퍼티에는 3D 서페이스의 데이터 소스로 사용되는 아이템 모델이 저장됩니다.
함수에 액세스합니다:
QAbstractItemModel * | itemModel() const |
void | setItemModel(QAbstractItemModel *itemModel) |
알림 신호:
void | itemModelChanged(const QAbstractItemModel *itemModel) |
multiMatchBehavior : MultiMatchBehavior
각 행/열 조합에 대한 다중 일치가 처리되는 방식입니다.
기본값은 MMBLast 입니다.
예를 들어, 불규칙한 간격으로 타임스탬프가 찍힌 데이터가 있는 항목 모델이 있고 각 시간에 대한 데이터 항목의 평균 위치를 표면 그래프로 시각화하려고 할 수 있습니다. 각 서페이스 포인트가 한 시간을 나타내도록 행 및 열 범주를 지정하고 이 속성을 MMBAverage 으로 설정하면 됩니다.
기능에 액세스합니다:
QItemModelSurfaceDataProxy::MultiMatchBehavior | multiMatchBehavior() const |
void | setMultiMatchBehavior(QItemModelSurfaceDataProxy::MultiMatchBehavior behavior) |
알림 신호:
void | multiMatchBehaviorChanged(QItemModelSurfaceDataProxy::MultiMatchBehavior behavior) |
rowCategories : QStringList
이 속성에는 매핑을 위한 행 카테고리가 저장됩니다.
액세스 함수:
QStringList | rowCategories() const |
void | setRowCategories(const QStringList &categories) |
알림 신호:
void | rowCategoriesChanged() |
rowRole : QString
이 속성에는 행 범주에 매핑할 항목 모델 역할이 저장됩니다.
데이터가 속한 행을 정의하는 것 외에도 행 역할이 나타내는 값은 별도의 z 위치 역할도 정의하지 않는 한 모델 데이터가 확인될 때 QSurfaceDataItem 의 Z 좌표 값으로 설정됩니다.
액세스 기능:
QString | rowRole() const |
void | setRowRole(const QString &role) |
알림 신호:
void | rowRoleChanged(const QString &role) |
rowRolePattern : QRegularExpression
이 속성은 행 역할에 의해 매핑된 값이 행 범주로 사용되기 전에 검색 및 바꾸기가 수행되는지 여부를 보유합니다.
이 속성은 매핑된 값에서 바꿀 부분을 찾기 위한 정규식을 지정하며 rowRoleReplace 속성은 바꾸기 문자열을 포함합니다.
함수에 액세스합니다:
QRegularExpression | rowRolePattern() const |
void | setRowRolePattern(const QRegularExpression &pattern) |
알림 신호:
void | rowRolePatternChanged(const QRegularExpression &pattern) |
rowRole 및 rowRoleReplace 을참조하세요 .
rowRoleReplace : QString
이 속성에는 행 역할 패턴과 함께 사용할 바꾸기 콘텐츠가 저장됩니다.
기본값은 빈 문자열입니다. 정규식을 사용한 검색 및 바꾸기 작동 방식에 대한 자세한 내용은 QString::replace(const QRegularExpression &rx, const QString &after) 함수 설명서를 참조하세요.
액세스 함수
QString | rowRoleReplace() const |
void | setRowRoleReplace(const QString &replace) |
알림 신호:
void | rowRoleReplaceChanged(const QString &replace) |
rowRole 및 rowRolePattern 을참조하세요 .
useModelCategories : bool
이 속성은 매핑에 행과 열 역할 및 카테고리를 사용할지 여부를 나타냅니다.
true
으로 설정하면 매핑에서 행 및 열 역할과 카테고리를 무시하고 대신 모델의 행과 열을 사용합니다. 기본값은 false
입니다.
액세스 기능:
bool | useModelCategories() const |
void | setUseModelCategories(bool enable) |
알림 신호:
void | useModelCategoriesChanged(bool enable) |
xPosRole : QString
이 속성은 X 위치에 매핑할 항목 모델 역할을 보유합니다.
이 역할이 정의되지 않은 경우 columnRole 을 사용하여 확인된 QSurfaceDataItem 객체의 X 좌표 값을 결정합니다.
기능에 액세스합니다:
QString | xPosRole() const |
void | setXPosRole(const QString &role) |
알림 신호:
void | xPosRoleChanged(const QString &role) |
xPosRolePattern : QRegularExpression
이 속성은 항목 위치 값으로 사용되기 전에 x 위치 역할에 매핑된 값에 대해 검색 및 바꾸기 작업을 수행할지 여부를 보유합니다.
이 속성은 매핑된 값에서 바꿀 부분을 찾기 위한 정규식을 지정하며 xPosRoleReplace 속성은 바꾸기 문자열을 포함합니다.
함수 액세스:
QRegularExpression | xPosRolePattern() const |
void | setXPosRolePattern(const QRegularExpression &pattern) |
알림 신호:
void | xPosRolePatternChanged(const QRegularExpression &pattern) |
xPosRole 및 xPosRoleReplace 을참조하세요 .
xPosRoleReplace : QString
이 속성은 x 위치 역할 패턴과 함께 사용할 바꾸기 콘텐츠를 보유합니다.
기본값은 빈 문자열입니다. 정규식을 사용한 검색 및 바꾸기 작동 방식에 대한 자세한 내용은 QString::replace(const QRegularExpression &rx, const QString &after) 함수 설명서를 참조하세요.
액세스 함수
QString | xPosRoleReplace() const |
void | setXPosRoleReplace(const QString &replace) |
알림 신호:
void | xPosRoleReplaceChanged(const QString &replace) |
xPosRole 및 xPosRolePattern 을참조하세요 .
yPosRole : QString
이 속성은 Y 위치에 매핑할 항목 모델 역할을 보유합니다.
함수에 액세스합니다:
QString | yPosRole() const |
void | setYPosRole(const QString &role) |
알림 신호:
void | yPosRoleChanged(const QString &role) |
yPosRolePattern : QRegularExpression
이 속성은 항목 위치 값으로 사용되기 전에 y 위치 역할에 매핑된 값에 대해 검색 및 바꾸기 작업을 수행할지 여부를 보유합니다.
이 속성은 매핑된 값에서 바꿀 부분을 찾기 위한 정규식을 지정하며 yPosRoleReplace 속성은 바꾸기 문자열을 포함합니다.
함수에 액세스합니다:
QRegularExpression | yPosRolePattern() const |
void | setYPosRolePattern(const QRegularExpression &pattern) |
알림 신호:
void | yPosRolePatternChanged(const QRegularExpression &pattern) |
yPosRole 및 yPosRoleReplace 을참조하세요 .
yPosRoleReplace : QString
이 속성은 y 위치 역할 패턴과 함께 사용할 바꾸기 콘텐츠를 보유합니다.
기본값은 빈 문자열입니다. 정규식을 사용한 검색 및 바꾸기 작동 방식에 대한 자세한 내용은 QString::replace(const QRegularExpression &rx, const QString &after) 함수 설명서를 참조하세요.
액세스 함수
QString | yPosRoleReplace() const |
void | setYPosRoleReplace(const QString &replace) |
알림 신호:
void | yPosRoleReplaceChanged(const QString &replace) |
yPosRole 및 yPosRolePattern 을참조하세요 .
zPosRole : QString
이 속성은 Z 위치에 매핑할 항목 모델 역할을 보유합니다.
이 역할이 정의되어 있지 않으면 rowRole 을 사용하여 확인된 QSurfaceDataItem 객체의 Z 좌표 값을 결정합니다.
액세스 기능:
QString | zPosRole() const |
void | setZPosRole(const QString &role) |
알림 신호:
void | zPosRoleChanged(const QString &role) |
zPosRolePattern : QRegularExpression
이 속성은 항목 위치 값으로 사용되기 전에 z 위치 역할에 매핑된 값에 대해 검색 및 바꾸기를 수행할지 여부를 보유합니다.
이 속성은 매핑된 값에서 바꿀 부분을 찾기 위한 정규식을 지정하며 zPosRoleReplace 속성은 바꾸기 문자열을 포함합니다.
함수에 액세스합니다:
QRegularExpression | zPosRolePattern() const |
void | setZPosRolePattern(const QRegularExpression &pattern) |
알림 신호:
void | zPosRolePatternChanged(const QRegularExpression &pattern) |
zPosRole 및 zPosRoleReplace 을참조하세요 .
zPosRoleReplace : QString
이 속성에는 z 위치 역할 패턴과 함께 사용할 바꾸기 콘텐츠가 저장됩니다.
기본값은 빈 문자열입니다. 정규식을 사용한 검색 및 바꾸기 작동 방식에 대한 자세한 내용은 QString::replace(const QRegularExpression &rx, const QString &after) 함수 설명서를 참조하세요.
액세스 함수
QString | zPosRoleReplace() const |
void | setZPosRoleReplace(const QString &replace) |
알림 신호:
void | zPosRoleReplaceChanged(const QString &replace) |
zPosRole 및 zPosRolePattern 을참조하세요 .
멤버 함수 문서
[explicit]
QItemModelSurfaceDataProxy::QItemModelSurfaceDataProxy(QObject *parent = nullptr)
선택 사항 parent 을 사용하여 QItemModelSurfaceDataProxy 를 구축합니다.
[explicit]
QItemModelSurfaceDataProxy::QItemModelSurfaceDataProxy(QAbstractItemModel *itemModel, QObject *parent = nullptr)
itemModel 및 선택 사항인 parent 을 사용하여 QItemModelSurfaceDataProxy를 구성합니다. 일반적으로 아이템 모델은 다른 컨트롤이 소유하므로 프록시는 itemModel 의 소유권을 갖지 않습니다.
[explicit]
QItemModelSurfaceDataProxy::QItemModelSurfaceDataProxy(QAbstractItemModel *itemModel, const QString &yPosRole, QObject *parent = nullptr)
itemModel 및 선택 사항인 parent 을 사용하여 QItemModelSurfaceDataProxy를 구성합니다. 일반적으로 항목 모델은 다른 컨트롤이 소유하므로 프록시는 itemModel 의 소유권을 갖지 않습니다. yPosRole 역할은 yPosRole 으로 설정됩니다. 이 생성자는 데이터가 이미 행과 열에 적절하게 정렬된 모델과 함께 사용하도록 되어 있으므로 useModelCategories 속성도 true
으로 설정됩니다.
[explicit]
QItemModelSurfaceDataProxy::QItemModelSurfaceDataProxy(QAbstractItemModel *itemModel, const QString &rowRole, const QString &columnRole, const QString &yPosRole, QObject *parent = nullptr)
itemModel 및 선택 사항인 parent 을 사용하여 QItemModelSurfaceDataProxy를 구성합니다. 일반적으로 항목 모델은 다른 컨트롤이 소유하므로 프록시는 itemModel 에 대한 소유권을 갖지 않습니다. 역할 매핑은 rowRole, columnRole, yPosRole 로 설정됩니다. zPosRole 및 xPosRole 은 각각 rowRole 및 columnRole 으로 설정됩니다.
[explicit]
QItemModelSurfaceDataProxy::QItemModelSurfaceDataProxy(QAbstractItemModel *itemModel, const QString &rowRole, const QString &columnRole, const QString &xPosRole, const QString &yPosRole, const QString &zPosRole, QObject *parent = nullptr)
itemModel 및 선택 사항인 parent 을 사용하여 QItemModelSurfaceDataProxy를 구성합니다. 일반적으로 항목 모델은 다른 컨트롤이 소유하므로 프록시는 itemModel 에 대한 소유권을 갖지 않습니다. 역할 매핑은 rowRole, columnRole, xPosRole, yPosRole, zPosRole 로 설정됩니다.
[explicit]
QItemModelSurfaceDataProxy::QItemModelSurfaceDataProxy(QAbstractItemModel *itemModel, const QString &rowRole, const QString &columnRole, const QString &yPosRole, const QStringList &rowCategories, const QStringList &columnCategories, QObject *parent = nullptr)
itemModel 및 선택 사항인 parent 을 사용하여 QItemModelSurfaceDataProxy를 구성합니다. 일반적으로 항목 모델은 다른 컨트롤이 소유하므로 프록시는 itemModel 에 대한 소유권을 갖지 않습니다. 역할 매핑은 rowRole, columnRole, yPosRole 로 설정됩니다. zPosRole 및 xPosRole 은 각각 rowRole 및 columnRole 으로 설정됩니다. 행 및 열 카테고리는 rowCategories 및 columnCategories 으로 설정됩니다. 이 생성자는 autoRowCategories 및 autoColumnCategories 도 false로 설정합니다.
[explicit]
QItemModelSurfaceDataProxy::QItemModelSurfaceDataProxy(QAbstractItemModel *itemModel, const QString &rowRole, const QString &columnRole, const QString &xPosRole, const QString &yPosRole, const QString &zPosRole, const QStringList &rowCategories, const QStringList &columnCategories, QObject *parent = nullptr)
itemModel 및 선택 사항인 parent 을 사용하여 QItemModelSurfaceDataProxy를 구성합니다. 일반적으로 항목 모델은 다른 컨트롤이 소유하므로 프록시는 itemModel 에 대한 소유권을 갖지 않습니다. 역할 매핑은 rowRole, columnRole, xPosRole, yPosRole, zPosRole 로 설정됩니다. 행 및 열 카테고리는 rowCategories 및 columnCategories 으로 설정됩니다. 이 생성자는 autoRowCategories 및 autoColumnCategories 도 false로 설정합니다.
[virtual noexcept]
QItemModelSurfaceDataProxy::~QItemModelSurfaceDataProxy()
QItemModelSurfaceDataProxy 을 파괴합니다.
[invokable]
int QItemModelSurfaceDataProxy::columnCategoryIndex(const QString &category)
열 카테고리 목록에서 지정된 category 의 인덱스를 반환합니다. 카테고리를 찾을 수 없으면 -1이 반환됩니다.
참고: 자동 열 범주 생성을 사용 중인 경우 이 메서드는 모델의 데이터가 처음 확인되기 전에는 유효한 인덱스를 반환하지 않습니다.
참고: 이 함수는 메타 객체 시스템과 QML을 통해 호출할 수 있습니다. Q_INVOKABLE 을 참조하세요.
void QItemModelSurfaceDataProxy::remap(const QString &rowRole, const QString &columnRole, const QString &xPosRole, const QString &yPosRole, const QString &zPosRole, const QStringList &rowCategories, const QStringList &columnCategories)
rowRole, columnRole, xPosRole, yPosRole, zPosRole, rowCategories 및 columnCategories 을 매핑으로 변경합니다.
[invokable]
int QItemModelSurfaceDataProxy::rowCategoryIndex(const QString &category)
행 카테고리 목록에서 지정된 category 의 인덱스를 반환합니다. 행 카테고리 목록이 비어 있으면 -1이 반환됩니다.
참고: 자동 행 카테고리 생성을 사용 중인 경우 이 메서드는 모델의 데이터가 처음으로 확인되기 전에는 유효한 인덱스를 반환하지 않습니다.
참고: 이 함수는 메타 객체 시스템과 QML을 통해 호출할 수 있습니다. Q_INVOKABLE 을 참조하세요.
void QItemModelSurfaceDataProxy::setItemModel(QAbstractItemModel *itemModel)
항목 모델을 itemModel 로 설정합니다. 모델의 소유권을 가지지는 않지만 모델에 연결하여 변경 사항을 수신합니다.
참고: 속성에 대한 설정자 함수 itemModel.
itemModel()도 참조하세요 .
© 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.