このページでは

QItemModelSurfaceDataProxy Class

Q3DSurfaceWidgetItem を使用して、アイテムモデル内のデータを表示するためのプロキシクラス。詳細...

ヘッダー: #include <QItemModelSurfaceDataProxy>
CMake: find_package(Qt6 REQUIRED COMPONENTS Graphs)
target_link_libraries(mytarget PRIVATE Qt6::Graphs)
qmake: QT += graphs
QML内: ItemModelSurfaceDataProxy
継承元: QSurfaceDataProxy

パブリック型

enum class MultiMatchBehavior { First, Last, Average, CumulativeY }

プロパティ

パブリック関数

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() override
bool autoColumnCategories() const
bool autoRowCategories() const
QStringList columnCategories() const
qsizetype 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
qsizetype 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 から派生したモデルを、Q3DSurfaceWidgetItem のデータソースとして利用できます。このクラスは、定義されたマッピングを使用して、モデルのデータをQ3DSurfaceWidgetItem グラフの行、列、および表面点にマッピングします。

データの解決は、マッピングまたはモデルが変更されるたびに非同期に行われます。データの解決が完了すると、QSurfaceDataProxy::arrayReset() が発火します。ただし、useModelCategories プロパティがtrue に設定されている場合、同じフレーム内にモデル全体の解決を引き起こす変更が含まれていない限り、単一項目の変更は同期的に解決されます。

マッピングは以下の方法で使用できます:

  • useModelCategories プロパティがtrue に設定されている場合、このプロキシはQAbstractItemModel の行と列をQ3DSurfaceWidgetItem の行と列にマッピングし、デフォルトでは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 Graphs の「3D でのデータ処理」も参照してください 。

メンバタイプのドキュメント

enum class QItemModelSurfaceDataProxy::MultiMatchBehavior

QItemModelSurfaceDataProxy::multiMatchBehavior プロパティの挙動タイプ。

定数値説明
QItemModelSurfaceDataProxy::MultiMatchBehavior::First0位置の値は、各行と列の組み合わせに一致するアイテム モデルの最初の項目から取得されます。
QItemModelSurfaceDataProxy::MultiMatchBehavior::Last1位置値は、各行と列の組み合わせに一致するアイテム モデルの最後のアイテムから取得されます。
QItemModelSurfaceDataProxy::MultiMatchBehavior::Average2各行と列の組み合わせに一致するすべての項目からの位置値の平均を算出し、その平均値をサーフェスポイントの位置として使用します。
QItemModelSurfaceDataProxy::MultiMatchBehavior::CumulativeY3X および Z 値については、これは `Average` と同様に動作しますが、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-position」ロールが定義されていない限り、列ロールで指定された値は、モデルデータが解決される際に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 : QItemModelSurfaceDataProxy::MultiMatchBehavior

各行・列の組み合わせに対して複数の一致が検出された場合の処理方法。

デフォルトは「Last」です。

たとえば、不規則な間隔で取得されたタイムスタンプ付きデータを含むアイテムモデルがあり、サーフェスグラフを使って各時間のデータ項目の平均位置を可視化したい場合を考えます。これは、各サーフェスポイントが 1 時間を表すように行と列のカテゴリを指定し、このプロパティを「Average」に設定することで実現できます。

アクセス関数:

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に設定します。

[override virtual noexcept] QItemModelSurfaceDataProxy::~QItemModelSurfaceDataProxy()

QItemModelSurfaceDataProxy を削除します。

[invokable] qsizetype 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] qsizetype 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.