@@ -39,12 +39,6 QTCOMMERCIALCHART_BEGIN_NAMESPACE | |||||
39 | Adding/removing value from the BarSet causes the the same change in the rest of the BarSets added to the same series. |
|
39 | Adding/removing value from the BarSet causes the the same change in the rest of the BarSets added to the same series. | |
40 | NOTE: used model has to support adding/removing rows/columns and modifying the data of the cells. |
|
40 | NOTE: used model has to support adding/removing rows/columns and modifying the data of the cells. | |
41 | */ |
|
41 | */ | |
42 | /*! |
|
|||
43 | \qmlclass BarModelMapper |
|
|||
44 | Cannot be created by the user. Base for HBarModelMapper and VBarModelMapper. Model mappers allow you to use |
|
|||
45 | QAbstractItemModel derived models as a data source for a chart series. Adding/removing value from the BarSet causes |
|
|||
46 | the the same change in the rest of the BarSets added to the same series. |
|
|||
47 | */ |
|
|||
48 |
|
42 | |||
49 | /*! |
|
43 | /*! | |
50 | \property QBarModelMapper::series |
|
44 | \property QBarModelMapper::series | |
@@ -52,23 +46,11 QTCOMMERCIALCHART_BEGIN_NAMESPACE | |||||
52 | All the data in the series is discarded when it is set to the mapper. |
|
46 | All the data in the series is discarded when it is set to the mapper. | |
53 | When new series is specified the old series is disconnected (it preserves its data) |
|
47 | When new series is specified the old series is disconnected (it preserves its data) | |
54 | */ |
|
48 | */ | |
55 | /*! |
|
|||
56 | \qmlproperty BarSeries BarModelMapper::series |
|
|||
57 | Defines the BarSeries based object that is used by the mapper. All the data in the series is |
|
|||
58 | discarded when it is set to the mapper. When new series is specified the old series is |
|
|||
59 | disconnected (it preserves its data). |
|
|||
60 | */ |
|
|||
61 |
|
49 | |||
62 | /*! |
|
50 | /*! | |
63 | \property QBarModelMapper::model |
|
51 | \property QBarModelMapper::model | |
64 | \brief Defines the model that is used by the mapper. |
|
52 | \brief Defines the model that is used by the mapper. | |
65 | */ |
|
53 | */ | |
66 | /*! |
|
|||
67 | \qmlproperty Model BarModelMapper::model |
|
|||
68 | The QAbstractItemModel based model that is used by the mapper. You need to implement the model and expose it to |
|
|||
69 | QML as shown in \l {QML Custom Model} demo application. NOTE: the model has to support adding/removing rows/columns |
|
|||
70 | and modifying the data of the cells. |
|
|||
71 | */ |
|
|||
72 |
|
54 | |||
73 | /*! |
|
55 | /*! | |
74 | \fn void QBarModelMapper::seriesReplaced() |
|
56 | \fn void QBarModelMapper::seriesReplaced() |
@@ -34,18 +34,18 QTCOMMERCIALCHART_BEGIN_NAMESPACE | |||||
34 | NOTE: used model has to support adding/removing rows/columns and modifying the data of the cells. |
|
34 | NOTE: used model has to support adding/removing rows/columns and modifying the data of the cells. | |
35 | */ |
|
35 | */ | |
36 | /*! |
|
36 | /*! | |
37 | \qmlclass HBarModelMapper |
|
37 | \qmlclass HBarModelMapper QHBarModelMapper | |
38 | \inherits BarModelMapper |
|
|||
39 | \mainclass |
|
38 | \mainclass | |
40 |
|
39 | |||
41 | HBarModelMapper allows you to use your own QAbstractItemModel derived model with data in rows as a data source |
|
40 | HBarModelMapper allows you to use your own QAbstractItemModel derived model with data in rows as a data source | |
42 | for any bar series. The following QML example would create a bar series with three bar sets (assuming the model has |
|
41 | for any bar series. Adding/removing value from the BarSet causes the the same change in the rest of the BarSets | |
43 | at least four rows). Each bar set would contain data starting from column 1. The name of a set would be defined |
|
42 | added to the same series. The following QML example would create a bar series with three bar sets (assuming the | |
44 | by the vertical header (of the row). |
|
43 | model has at least four rows). Each bar set would contain data starting from column 1. The name of a set would be | |
|
44 | defined by the vertical header (of the row). | |||
45 | \code |
|
45 | \code | |
46 | BarSeries { |
|
46 | BarSeries { | |
47 | HBarModelMapper { |
|
47 | HBarModelMapper { | |
48 | model: myCustomModel |
|
48 | model: myCustomModel // QAbstractItemModel derived implementation | |
49 | firstBarSetRow: 1 |
|
49 | firstBarSetRow: 1 | |
50 | lastBarSetRow: 3 |
|
50 | lastBarSetRow: 3 | |
51 | firstColumn: 1 |
|
51 | firstColumn: 1 | |
@@ -55,18 +55,39 QTCOMMERCIALCHART_BEGIN_NAMESPACE | |||||
55 | */ |
|
55 | */ | |
56 |
|
56 | |||
57 | /*! |
|
57 | /*! | |
|
58 | \qmlproperty BarSeries HBarModelMapper::series | |||
|
59 | Defines the BarSeries based object that is used by the mapper. All the data in the series is discarded when it is | |||
|
60 | set to the mapper. When new series is specified the old series is disconnected (it preserves its data). | |||
|
61 | */ | |||
|
62 | ||||
|
63 | /*! | |||
|
64 | \qmlproperty Model HBarModelMapper::model | |||
|
65 | The QAbstractItemModel based model that is used by the mapper. You need to implement the model and expose it to | |||
|
66 | QML as shown in \l {QML Custom Model} demo application. NOTE: the model has to support adding/removing rows/columns | |||
|
67 | and modifying the data of the cells. | |||
|
68 | */ | |||
|
69 | ||||
|
70 | /*! | |||
58 | \property QHBarModelMapper::firstBarSetRow |
|
71 | \property QHBarModelMapper::firstBarSetRow | |
59 | \brief Defines which column of the model is used as the data source for the first bar set |
|
72 | \brief Defines which column of the model is used as the data source for the first bar set | |
60 |
|
||||
61 | Default value is: -1 (invalid mapping) |
|
73 | Default value is: -1 (invalid mapping) | |
62 | */ |
|
74 | */ | |
|
75 | /*! | |||
|
76 | \qmlproperty int HBarModelMapper::firstBarSetRow | |||
|
77 | Defines which column of the model is used as the data source for the first bar set. The default value is -1 | |||
|
78 | (invalid mapping). | |||
|
79 | */ | |||
63 |
|
80 | |||
64 | /*! |
|
81 | /*! | |
65 | \property QHBarModelMapper::lastBarSetRow |
|
82 | \property QHBarModelMapper::lastBarSetRow | |
66 | \brief Defines which column of the model is used as the data source for the last bar set |
|
83 | \brief Defines which column of the model is used as the data source for the last bar set | |
67 |
|
||||
68 | Default value is: -1 (invalid mapping) |
|
84 | Default value is: -1 (invalid mapping) | |
69 | */ |
|
85 | */ | |
|
86 | /*! | |||
|
87 | \qmlproperty int HBarModelMapper::lastBarSetRow | |||
|
88 | Defines which column of the model is used as the data source for the last bar set. The default value is -1 | |||
|
89 | (invalid mapping). | |||
|
90 | */ | |||
70 |
|
91 | |||
71 | /*! |
|
92 | /*! | |
72 | \property QHBarModelMapper::firstColumn |
|
93 | \property QHBarModelMapper::firstColumn | |
@@ -74,20 +95,20 QTCOMMERCIALCHART_BEGIN_NAMESPACE | |||||
74 | Minimal and default value is: 0 |
|
95 | Minimal and default value is: 0 | |
75 | */ |
|
96 | */ | |
76 | /*! |
|
97 | /*! | |
77 | \qmlproperty int BarModelMapper::firstColumn |
|
98 | \qmlproperty int HBarModelMapper::firstColumn | |
78 | Defines which column of the model contains the first values of the QBarSets in the series. |
|
99 | Defines which column of the model contains the first values of the QBarSets in the series. | |
79 | The default value is 0. |
|
100 | The default value is 0. | |
80 | */ |
|
101 | */ | |
81 |
|
102 | |||
82 | /*! |
|
103 | /*! | |
83 | \property QHBarModelMapper::columnCount |
|
104 | \property QHBarModelMapper::columnCount | |
84 |
\brief Defines the number of |
|
105 | \brief Defines the number of columns of the model that are mapped as the data for QBarSeries | |
85 |
Minimal and default value is: -1 (count limited by the number of |
|
106 | Minimal and default value is: -1 (count limited by the number of columns in the model) | |
86 | */ |
|
107 | */ | |
87 | /*! |
|
108 | /*! | |
88 | \qmlproperty int BarModelMapper::columnCount |
|
109 | \qmlproperty int HBarModelMapper::columnCount | |
89 |
Defines the number of |
|
110 | Defines the number of columns of the model that are mapped as the data for QBarSeries. The default value is | |
90 |
-1 (count limited by the number of |
|
111 | -1 (count limited by the number of columns in the model) | |
91 | */ |
|
112 | */ | |
92 |
|
113 | |||
93 | /*! |
|
114 | /*! |
@@ -35,17 +35,17 QTCOMMERCIALCHART_BEGIN_NAMESPACE | |||||
35 | */ |
|
35 | */ | |
36 | /*! |
|
36 | /*! | |
37 | \qmlclass VBarModelMapper |
|
37 | \qmlclass VBarModelMapper | |
38 | \inherits BarModelMapper |
|
|||
39 | \mainclass |
|
38 | \mainclass | |
40 |
|
39 | |||
41 | VBarModelMapper allows you to use your own QAbstractItemModel derived model with data in columns as a data source |
|
40 | VBarModelMapper allows you to use your own QAbstractItemModel derived model with data in columns as a data source | |
42 | for any bar series. The following QML example would create a bar series with three bar sets (assuming the model has |
|
41 | for any bar series. Adding/removing value from the BarSet causes the the same change in the rest of the BarSets | |
43 | at least four columns). Each bar set would contain data starting from row 1. The name of a set would be defined |
|
42 | added to the same series. The following QML example would create a bar series with three bar sets (assuming the | |
44 | by the horizontal header (of the column). |
|
43 | model has at least four columns). Each bar set would contain data starting from row 1. The name of a set would be | |
|
44 | defined by the horizontal header (of the column). | |||
45 | \code |
|
45 | \code | |
46 | GroupedBarSeries { |
|
46 | GroupedBarSeries { | |
47 | VBarModelMapper { |
|
47 | VBarModelMapper { | |
48 | model: myCustomModel |
|
48 | model: myCustomModel // QAbstractItemModel derived implementation | |
49 | firstBarSetColumn: 1 |
|
49 | firstBarSetColumn: 1 | |
50 | lastBarSetColumn: 3 |
|
50 | lastBarSetColumn: 3 | |
51 | firstRow: 1 |
|
51 | firstRow: 1 | |
@@ -55,6 +55,19 QTCOMMERCIALCHART_BEGIN_NAMESPACE | |||||
55 | */ |
|
55 | */ | |
56 |
|
56 | |||
57 | /*! |
|
57 | /*! | |
|
58 | \qmlproperty BarSeries VBarModelMapper::series | |||
|
59 | Defines the BarSeries based object that is used by the mapper. All the data in the series is discarded when it is | |||
|
60 | set to the mapper. When new series is specified the old series is disconnected (it preserves its data). | |||
|
61 | */ | |||
|
62 | ||||
|
63 | /*! | |||
|
64 | \qmlproperty Model VBarModelMapper::model | |||
|
65 | The QAbstractItemModel based model that is used by the mapper. You need to implement the model and expose it to | |||
|
66 | QML as shown in \l {QML Custom Model} demo application. NOTE: the model has to support adding/removing rows/columns | |||
|
67 | and modifying the data of the cells. | |||
|
68 | */ | |||
|
69 | ||||
|
70 | /*! | |||
58 | \property QVBarModelMapper::firstBarSetColumn |
|
71 | \property QVBarModelMapper::firstBarSetColumn | |
59 | \brief Defines which column of the model is used as the data source for the first bar set |
|
72 | \brief Defines which column of the model is used as the data source for the first bar set | |
60 | Default value is: -1 (invalid mapping) |
|
73 | Default value is: -1 (invalid mapping) | |
@@ -82,7 +95,7 QTCOMMERCIALCHART_BEGIN_NAMESPACE | |||||
82 | Minimal and default value is: 0 |
|
95 | Minimal and default value is: 0 | |
83 | */ |
|
96 | */ | |
84 | /*! |
|
97 | /*! | |
85 | \qmlproperty int BarModelMapper::firstRow |
|
98 | \qmlproperty int VBarModelMapper::firstRow | |
86 | Defines which row of the model contains the first values of the QBarSets in the series. |
|
99 | Defines which row of the model contains the first values of the QBarSets in the series. | |
87 | The default value is 0. |
|
100 | The default value is 0. | |
88 | */ |
|
101 | */ | |
@@ -93,7 +106,7 QTCOMMERCIALCHART_BEGIN_NAMESPACE | |||||
93 | Minimal and default value is: -1 (count limited by the number of rows in the model) |
|
106 | Minimal and default value is: -1 (count limited by the number of rows in the model) | |
94 | */ |
|
107 | */ | |
95 | /*! |
|
108 | /*! | |
96 | \qmlproperty int BarModelMapper::rowCount |
|
109 | \qmlproperty int VBarModelMapper::rowCount | |
97 | Defines the number of rows of the model that are mapped as the data for QBarSeries. The default value is |
|
110 | Defines the number of rows of the model that are mapped as the data for QBarSeries. The default value is | |
98 | -1 (count limited by the number of rows in the model) |
|
111 | -1 (count limited by the number of rows in the model) | |
99 | */ |
|
112 | */ |
General Comments 0
You need to be logged in to leave comments.
Login now