summaryrefslogtreecommitdiffstats
path: root/doc/src/vbarmodelmapper.qdocinc
blob: b6c4b6dfc8f7dee1f4e0827e3fa1944736297344 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
\inherits BarModelMapper

VBarModelMapper allows you to use your own QAbstractItemModel derived model with data in columns as a data source
for any bar series. It is possible to use both QAbstractItemModel and bar series data API to manipulate data.
VBarModelMapper 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 columns). Each bar set would contain data starting from row 1. The name of a set would be
defined by the horizontal header (of the column).
\code
    BarSeries {
        VBarModelMapper {
            model: myCustomModel // QAbstractItemModel derived implementation
            firstBarSetColumn: 1
            lastBarSetColumn: 3
            firstRow: 1
        }
    }
\endcode