QXYModelMapper Class

QXYModelMapper クラスは、線分、スプライン、散布図系列のモデルマッパーです。詳細...

ヘッダー #include <QXYModelMapper>
CMake: find_package(Qt6 REQUIRED COMPONENTS Graphs)
target_link_libraries(mytarget PRIVATE Qt6::Graphs)
qmake QT += graphs
QML で XYModelMapper
継承: QObject

プロパティ

パブリック機能

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

シグナル

詳細説明

モデルマッパーは、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 が使用されている場合、モデルの各列はバーセットを定義し、モデルの行はカテゴリを定義します。Orientation が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)

Notifier シグナル:

void xSectionChanged()

QXYModelMapper::orientationも参照してください

ySection : qsizetype

このプロパティは、データ点のy座標を含むモデルのセクションを保持する。

デフォルト値は-1(無効なマッピング)。

アクセス関数:

qsizetype ySection() const
void setYSection(qsizetype ySection)

Notifier シグナル:

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.