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-position으로 사용합니다. 행 및 열 헤더는 float으로 변환 가능한 경우 기본적으로 Z-position 및 X-position으로 사용됩니다. 그렇지 않은 경우 행 및 열 인덱스가 사용됩니다. Qt::DisplayRole 가 적합하지 않은 경우, 사용될 Y-position 역할을 재정의할 수 있습니다. 헤더나 인덱스가 적합하지 않은 경우, 사용될 Z-position 및 X-position 역할을 재정의할 수 있습니다. - 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 의 ‘Simple Bar Graph’ 예제를 참조하십시오.
Qt Data Visualization 데이터 처리항목도 참조하십시오 .
멤버 유형 문서
enum QItemModelSurfaceDataProxy::MultiMatchBehavior
QItemModelSurfaceDataProxy::multiMatchBehavior 속성의 동작 유형.
| 상수 | 값 | 설명 |
|---|---|---|
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()도 참조하십시오 .
© 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.