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位置として使用します。行および列ヘッダーは、float型に変換可能な場合、デフォルトで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(constQRegularExpression &rx, constQString &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 (constQRegularExpression &rx, constQString &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 です。
たとえば、不規則な間隔で取得されたタイムスタンプ付きデータを含むアイテムモデルがあり、サーフェスグラフを使用して各時間のデータ項目の平均位置を可視化したい場合を考えます。これは、各サーフェスポイントが1時間を表すように行および列のカテゴリを指定し、このプロパティを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(constQRegularExpression &rx, constQString &after) 関数のドキュメントを参照してください。
アクセス関数:
| QString | rowRoleReplace() const |
| void | setRowRoleReplace(const QString &replace) |
Notifierシグナル:
| 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座標にマッピングするためのアイテムモデルの役割を持ちます。
このロールが定義されていない場合、解決されたQSurfaceDataItem オブジェクトのX座標値の決定には、columnRole が使用されます。
アクセス関数:
| 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 (constQRegularExpression &rx, constQString &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(constQRegularExpression &rx, constQString &after) 関数のドキュメントを参照してください。
アクセス関数:
| QString | yPosRoleReplace() const |
| void | setYPosRoleReplace(const QString &replace) |
通知シグナル:
| void | yPosRoleReplaceChanged(const QString &replace) |
yPosRole およびyPosRolePatternも参照してください 。
zPosRole : QString
このプロパティは、Z位置にマッピングするためのアイテムモデルの役割を保持します。
このロールが定義されていない場合、解決されたQSurfaceDataItem オブジェクトのZ座標値は、rowRole を使用して決定されます。
アクセス関数:
| 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-positionロールパターンと組み合わせて使用する置換内容が格納されます。
デフォルトは空の文字列です。正規表現を使用した検索と置換の仕組みの詳細については、QString::replace(constQRegularExpression &rx, constQString &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.