summaryrefslogtreecommitdiffstats
path: root/doc/src/hbarmodelmapper.qdocinc
blob: f4e7dcb66f0000cc24c25d2df05b05ac386ff0c2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
HBarModelMapper allows you to use your own QAbstractItemModel derived model with data in rows as a data source
for any bar series. It is possible to use both QAbstractItemModel and bar series data API to manipulate data.
HBarModelMapper keeps the series and the model in sync.

The following QML example would create a bar series with three bar sets (assuming the model has
at least four rows). Each bar set would contain data starting from column 1. The name of a set would be defined by
the vertical header (of the row).
\code
    BarSeries {
        HBarModelMapper {
            model: myCustomModel // QAbstractItemModel derived implementation
            firstBarSetRow: 1
            lastBarSetRow: 3
            firstColumn: 1
        }
    }
\endcode