HPieModelMapper QML Type
パイシリーズの水平モデルマッパー。詳細...
Import Statement: | import QtCharts 2.8 |
In C++: | QHPieModelMapper |
プロパティ
- columnCount : int
- firstColumn : int
- labelsRow : int
- model : SomeModel
- series : PieSeries
- valuesRow : int
詳細説明
モデルマッパーは、QAbstractItemModel クラスから派生したデータモデルをチャートのデータソースとして使用できるようにします。水平モデルマッパーは、データモデルとPieSeries 、データモデルの各列がパイスライスを定義し、各行がパイスライスのラベルまたは値に対応するように、データモデル間の接続を作成するために使用されます。
モデルとパイ・シリーズの両方のプロパティを使用して、データを操作することができます。モデルマッパーはパイシリーズとデータモデルの同期を保ちます。
以下のQMLの例では、4つのスライスを持つパイ系列を作成しています(モデルには少なくとも5つの列があると仮定しています)。各スライスは1行目からラベルを、2行目から値を取得します。
HPieModelMapper { series: pieSeries model: customModel labelsRow: 1 valuesRow: 2 firstColumn: 1 columnCount: 4 }
プロパティの説明
columnCount : int |
円列のデータとしてマッピングされるモデルの列数。デフォルト値は-1(モデルの列数によって制限される数)。
firstColumn : int |
最初のスライス値を含むモデルの列。デフォルト値は 0。
labelsRow : int |
パイのスライスのラベルと同期を保つモデルの行。デフォルト値は-1(無効なマッピング)。
model : SomeModel |
マッパーが使用するQAbstractItemModel ベースのモデル。モデルを実装し、QMLに公開する必要があります。
注意: モデルは行や列の追加や削除、セル内のデータの変更をサポートする必要があります。
series : PieSeries |
valuesRow : int |
パイのスライスの値と同期を保つモデルの行。デフォルト値は-1(無効なマッピング)。
© 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.