@@ -35,13 +35,14 QTCOMMERCIALCHART_BEGIN_NAMESPACE | |||||
35 | */ |
|
35 | */ | |
36 | /*! |
|
36 | /*! | |
37 | \qmlclass HBarModelMapper QHBarModelMapper |
|
37 | \qmlclass HBarModelMapper QHBarModelMapper | |
38 | \mainclass |
|
|||
39 |
|
38 | |||
40 | HBarModelMapper allows you to use your own QAbstractItemModel derived model with data in rows as a data source |
|
39 | HBarModelMapper allows you to use your own QAbstractItemModel derived model with data in rows as a data source | |
41 | for any bar series. Adding/removing value from the BarSet causes the the same change in the rest of the BarSets |
|
40 | for any bar series. It is possible to use both QAbstractItemModel and bar series data API to manipulate data. | |
42 | added to the same series. The following QML example would create a bar series with three bar sets (assuming the |
|
41 | HBarModelMapper keeps the series and the model in sync. | |
43 | model has at least four rows). Each bar set would contain data starting from column 1. The name of a set would be |
|
42 | ||
44 | defined by the vertical header (of the row). |
|
43 | The following QML example would create a bar series with three bar sets (assuming the model has | |
|
44 | at least four rows). Each bar set would contain data starting from column 1. The name of a set would be defined by | |||
|
45 | the vertical header (of the row). | |||
45 | \code |
|
46 | \code | |
46 | BarSeries { |
|
47 | BarSeries { | |
47 | HBarModelMapper { |
|
48 | HBarModelMapper { | |
@@ -72,7 +73,7 QTCOMMERCIALCHART_BEGIN_NAMESPACE | |||||
72 | \brief Defines the model that is used by the mapper. |
|
73 | \brief Defines the model that is used by the mapper. | |
73 | */ |
|
74 | */ | |
74 | /*! |
|
75 | /*! | |
75 | \qmlproperty Model HBarModelMapper::model |
|
76 | \qmlproperty SomeModel HBarModelMapper::model | |
76 | The QAbstractItemModel based model that is used by the mapper. You need to implement the model and expose it to |
|
77 | The QAbstractItemModel based model that is used by the mapper. You need to implement the model and expose it to | |
77 | QML as shown in \l {QML Custom Model} demo application. NOTE: the model has to support adding/removing rows/columns |
|
78 | QML as shown in \l {QML Custom Model} demo application. NOTE: the model has to support adding/removing rows/columns | |
78 | and modifying the data of the cells. |
|
79 | and modifying the data of the cells. |
@@ -38,8 +38,10 QTCOMMERCIALCHART_BEGIN_NAMESPACE | |||||
38 | \mainclass |
|
38 | \mainclass | |
39 |
|
39 | |||
40 | 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 | |
41 | for any bar series. Adding/removing value from the BarSet causes the the same change in the rest of the BarSets |
|
41 | for any bar series. It is possible to use both QAbstractItemModel and bar series data API to manipulate data. | |
42 | added to the same series. The following QML example would create a bar series with three bar sets (assuming the |
|
42 | VBarModelMapper keeps the series and the model in sync. | |
|
43 | ||||
|
44 | The following QML example would create a bar series with three bar sets (assuming the | |||
43 | model has at least four columns). Each bar set would contain data starting from row 1. The name of a set would be |
|
45 | 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). |
|
46 | defined by the horizontal header (of the column). | |
45 | \code |
|
47 | \code | |
@@ -72,7 +74,7 QTCOMMERCIALCHART_BEGIN_NAMESPACE | |||||
72 | \brief Defines the model that is used by the mapper. |
|
74 | \brief Defines the model that is used by the mapper. | |
73 | */ |
|
75 | */ | |
74 | /*! |
|
76 | /*! | |
75 | \qmlproperty Model VBarModelMapper::model |
|
77 | \qmlproperty SomeModel VBarModelMapper::model | |
76 | The QAbstractItemModel based model that is used by the mapper. You need to implement the model and expose it to |
|
78 | The QAbstractItemModel based model that is used by the mapper. You need to implement the model and expose it to | |
77 | QML as shown in \l {QML Custom Model} demo application. NOTE: the model has to support adding/removing rows/columns |
|
79 | QML as shown in \l {QML Custom Model} demo application. NOTE: the model has to support adding/removing rows/columns | |
78 | and modifying the data of the cells. |
|
80 | and modifying the data of the cells. |
@@ -31,6 +31,26 QTCOMMERCIALCHART_BEGIN_NAMESPACE | |||||
31 | It is possible to use both QAbstractItemModel and QPieSeries model API. QHPieModelMapper makes sure that Pie and the model are kept in sync. |
|
31 | It is possible to use both QAbstractItemModel and QPieSeries model API. QHPieModelMapper makes sure that Pie and the model are kept in sync. | |
32 | NOTE: used model has to support adding/removing rows/columns and modifying the data of the cells. |
|
32 | NOTE: used model has to support adding/removing rows/columns and modifying the data of the cells. | |
33 | */ |
|
33 | */ | |
|
34 | /*! | |||
|
35 | \qmlclass HPieModelMapper QHPieModelMapper | |||
|
36 | ||||
|
37 | HPieModelMapper allows you to use your own QAbstractItemModel derived model with data in rows as a data source | |||
|
38 | for a pie series. It is possible to use both QAbstractItemModel and PieSeries data API to manipulate data. | |||
|
39 | HPieModelMapper keeps the Pie and the model in sync. | |||
|
40 | ||||
|
41 | The following QML example would create a pie series with four slices (assuming the model has | |||
|
42 | at least five columns). Each slice would contain a label from row 1 and a value from row 2. | |||
|
43 | \code | |||
|
44 | HPieModelMapper { | |||
|
45 | series: pieSeries | |||
|
46 | model: customModel | |||
|
47 | labelsRow: 1 | |||
|
48 | valuesRow: 2 | |||
|
49 | firstColumn: 1 | |||
|
50 | columnCount: 4 | |||
|
51 | } | |||
|
52 | \endcode | |||
|
53 | */ | |||
34 |
|
54 | |||
35 | /*! |
|
55 | /*! | |
36 | \property QHPieModelMapper::series |
|
56 | \property QHPieModelMapper::series | |
@@ -39,23 +59,43 QTCOMMERCIALCHART_BEGIN_NAMESPACE | |||||
39 | All the data in the series is discarded when it is set to the mapper. |
|
59 | All the data in the series is discarded when it is set to the mapper. | |
40 | When new series is specified the old series is disconnected (it preserves its data) |
|
60 | When new series is specified the old series is disconnected (it preserves its data) | |
41 | */ |
|
61 | */ | |
|
62 | /*! | |||
|
63 | \qmlproperty PieSeries HPieModelMapper::series | |||
|
64 | Defines the PieSeries object that is used by the mapper. If you define the mapper element as a child for a | |||
|
65 | PieSeries, leave this property undefined. All the data in the series is discarded when it is set to the mapper. | |||
|
66 | When new series is specified the old series is disconnected (it preserves its data). | |||
|
67 | */ | |||
42 |
|
68 | |||
43 | /*! |
|
69 | /*! | |
44 | \property QHPieModelMapper::model |
|
70 | \property QHPieModelMapper::model | |
45 | \brief Defines the model that is used by the mapper. |
|
71 | \brief Defines the model that is used by the mapper. | |
46 | */ |
|
72 | */ | |
|
73 | /*! | |||
|
74 | \qmlproperty SomeModel HPieModelMapper::model | |||
|
75 | The QAbstractItemModel based model that is used by the mapper. You need to implement the model and expose it to | |||
|
76 | QML as shown in \l {QML Custom Model} demo application. NOTE: the model has to support adding/removing rows/columns | |||
|
77 | and modifying the data of the cells. | |||
|
78 | */ | |||
47 |
|
79 | |||
48 | /*! |
|
80 | /*! | |
49 | \property QHPieModelMapper::valuesRow |
|
81 | \property QHPieModelMapper::valuesRow | |
50 | \brief Defines which row of the model is kept in sync with the values of the pie's slices |
|
82 | \brief Defines which row of the model is kept in sync with the values of the pie's slices | |
51 |
|
||||
52 | Default value is: -1 (invalid mapping) |
|
83 | Default value is: -1 (invalid mapping) | |
53 | */ |
|
84 | */ | |
|
85 | /*! | |||
|
86 | \qmlproperty int HPieModelMapper::valuesRow | |||
|
87 | Defines which row of the model is kept in sync with the values of the pie's slices. Default value is: -1 (invalid | |||
|
88 | mapping). | |||
|
89 | */ | |||
54 |
|
90 | |||
55 | /*! |
|
91 | /*! | |
56 | \property QHPieModelMapper::labelsRow |
|
92 | \property QHPieModelMapper::labelsRow | |
57 | \brief Defines which row of the model is kept in sync with the labels of the pie's slices |
|
93 | \brief Defines which row of the model is kept in sync with the labels of the pie's slices | |
58 |
|
94 | Default value is: -1 (invalid mapping) | ||
|
95 | */ | |||
|
96 | /*! | |||
|
97 | \qmlproperty int HPieModelMapper::labelsRow | |||
|
98 | Defines which row of the model is kept in sync with the labels of the pie's slices | |||
59 | Default value is: -1 (invalid mapping) |
|
99 | Default value is: -1 (invalid mapping) | |
60 | */ |
|
100 | */ | |
61 |
|
101 | |||
@@ -65,7 +105,7 QTCOMMERCIALCHART_BEGIN_NAMESPACE | |||||
65 | Minimal and default value is: 0 |
|
105 | Minimal and default value is: 0 | |
66 | */ |
|
106 | */ | |
67 | /*! |
|
107 | /*! | |
68 |
\qmlproperty int |
|
108 | \qmlproperty int HPieModelMapper::firstColumn | |
69 | Defines which column of the model contains the first slice value. |
|
109 | Defines which column of the model contains the first slice value. | |
70 | The default value is 0. |
|
110 | The default value is 0. | |
71 | */ |
|
111 | */ | |
@@ -76,32 +116,28 QTCOMMERCIALCHART_BEGIN_NAMESPACE | |||||
76 | Minimal and default value is: -1 (count limited by the number of columns in the model) |
|
116 | Minimal and default value is: -1 (count limited by the number of columns in the model) | |
77 | */ |
|
117 | */ | |
78 | /*! |
|
118 | /*! | |
79 |
\qmlproperty int |
|
119 | \qmlproperty int HPieModelMapper::columnCount | |
80 | Defines the number of columns of the model that are mapped as the data for QPieSeries. The default value is |
|
120 | Defines the number of columns of the model that are mapped as the data for QPieSeries. The default value is | |
81 | -1 (count limited by the number of columns in the model) |
|
121 | -1 (count limited by the number of columns in the model) | |
82 | */ |
|
122 | */ | |
83 |
|
123 | |||
84 | /*! |
|
124 | /*! | |
85 | \fn void QHPieModelMapper::seriesReplaced() |
|
125 | \fn void QHPieModelMapper::seriesReplaced() | |
86 |
|
||||
87 | Emitted when the series to which mapper is connected to has changed. |
|
126 | Emitted when the series to which mapper is connected to has changed. | |
88 | */ |
|
127 | */ | |
89 |
|
128 | |||
90 | /*! |
|
129 | /*! | |
91 | \fn void QHPieModelMapper::modelReplaced() |
|
130 | \fn void QHPieModelMapper::modelReplaced() | |
92 |
|
||||
93 | Emitted when the model to which mapper is connected to has changed. |
|
131 | Emitted when the model to which mapper is connected to has changed. | |
94 | */ |
|
132 | */ | |
95 |
|
133 | |||
96 | /*! |
|
134 | /*! | |
97 | \fn void QHPieModelMapper::valuesRowChanged() |
|
135 | \fn void QHPieModelMapper::valuesRowChanged() | |
98 |
|
||||
99 | Emitted when the valuesRow has changed. |
|
136 | Emitted when the valuesRow has changed. | |
100 | */ |
|
137 | */ | |
101 |
|
138 | |||
102 | /*! |
|
139 | /*! | |
103 | \fn void QHPieModelMapper::labelsRowChanged() |
|
140 | \fn void QHPieModelMapper::labelsRowChanged() | |
104 |
|
||||
105 | Emitted when the labelsRow has changed. |
|
141 | Emitted when the labelsRow has changed. | |
106 | */ |
|
142 | */ | |
107 |
|
143 |
@@ -31,33 +31,72 QTCOMMERCIALCHART_BEGIN_NAMESPACE | |||||
31 | It is possible to use both QAbstractItemModel and QPieSeries model API. QVPieModelMapper makes sure that Pie and the model are kept in sync. |
|
31 | It is possible to use both QAbstractItemModel and QPieSeries model API. QVPieModelMapper makes sure that Pie and the model are kept in sync. | |
32 | NOTE: used model has to support adding/removing rows/columns and modifying the data of the cells. |
|
32 | NOTE: used model has to support adding/removing rows/columns and modifying the data of the cells. | |
33 | */ |
|
33 | */ | |
|
34 | /*! | |||
|
35 | \qmlclass VPieModelMapper QVPieModelMapper | |||
|
36 | ||||
|
37 | VPieModelMapper allows you to use your own QAbstractItemModel derived model with data in columns as a data source | |||
|
38 | for a pie series. It is possible to use both QAbstractItemModel and PieSeries data API to manipulate data. | |||
|
39 | VPieModelMapper keeps the Pie and the model in sync. | |||
|
40 | ||||
|
41 | The following QML example would create a pie series with four slices (assuming the model has at least five rows). | |||
|
42 | Each slice would contain a label from column 1 and a value from column 2. | |||
|
43 | \code | |||
|
44 | VPieModelMapper { | |||
|
45 | series: pieSeries | |||
|
46 | model: customModel | |||
|
47 | labelsColumn: 1 | |||
|
48 | valuesColumn: 2 | |||
|
49 | firstRow: 1 | |||
|
50 | rowCount: 4 | |||
|
51 | } | |||
|
52 | \endcode | |||
|
53 | */ | |||
34 |
|
54 | |||
35 | /*! |
|
55 | /*! | |
36 | \property QVPieModelMapper::series |
|
56 | \property QVPieModelMapper::series | |
37 | \brief Defines the QPieSeries object that is used by the mapper. |
|
57 | \brief Defines the QPieSeries object that is used by the mapper. | |
38 |
|
||||
39 | All the data in the series is discarded when it is set to the mapper. |
|
58 | All the data in the series is discarded when it is set to the mapper. | |
40 | When new series is specified the old series is disconnected (it preserves its data) |
|
59 | When new series is specified the old series is disconnected (it preserves its data) | |
41 | */ |
|
60 | */ | |
|
61 | /*! | |||
|
62 | \qmlproperty PieSeries VPieModelMapper::series | |||
|
63 | Defines the PieSeries object that is used by the mapper. If you define the mapper element as a child for a | |||
|
64 | PieSeries, leave this property undefined. All the data in the series is discarded when it is set to the mapper. | |||
|
65 | When new series is specified the old series is disconnected (it preserves its data). | |||
|
66 | */ | |||
42 |
|
67 | |||
43 | /*! |
|
68 | /*! | |
44 | \property QVPieModelMapper::model |
|
69 | \property QVPieModelMapper::model | |
45 | \brief Defines the model that is used by the mapper. |
|
70 | \brief Defines the model that is used by the mapper. | |
46 | */ |
|
71 | */ | |
|
72 | /*! | |||
|
73 | \qmlproperty SomeModel VPieModelMapper::model | |||
|
74 | The QAbstractItemModel based model that is used by the mapper. You need to implement the model and expose it to | |||
|
75 | QML as shown in \l {QML Custom Model} demo application. NOTE: the model has to support adding/removing rows/columns | |||
|
76 | and modifying the data of the cells. | |||
|
77 | */ | |||
47 |
|
78 | |||
48 | /*! |
|
79 | /*! | |
49 | \property QVPieModelMapper::valuesColumn |
|
80 | \property QVPieModelMapper::valuesColumn | |
50 | \brief Defines which column of the model is kept in sync with the values of the pie's slices |
|
81 | \brief Defines which column of the model is kept in sync with the values of the pie's slices | |
51 |
|
||||
52 | Default value is: -1 (invalid mapping) |
|
82 | Default value is: -1 (invalid mapping) | |
53 | */ |
|
83 | */ | |
|
84 | /*! | |||
|
85 | \qmlproperty int VPieModelMapper::valuesColumn | |||
|
86 | Defines which column of the model is kept in sync with the values of the pie's slices. Default value is -1 (invalid | |||
|
87 | mapping). | |||
|
88 | */ | |||
54 |
|
89 | |||
55 | /*! |
|
90 | /*! | |
56 | \property QVPieModelMapper::labelsColumn |
|
91 | \property QVPieModelMapper::labelsColumn | |
57 | \brief Defines which column of the model is kept in sync with the labels of the pie's slices |
|
92 | \brief Defines which column of the model is kept in sync with the labels of the pie's slices | |
58 |
|
||||
59 | Default value is: -1 (invalid mapping) |
|
93 | Default value is: -1 (invalid mapping) | |
60 | */ |
|
94 | */ | |
|
95 | /*! | |||
|
96 | \qmlproperty int VPieModelMapper::labelsColumn | |||
|
97 | Defines which column of the model is kept in sync with the labels of the pie's slices. Default value is -1 (invalid | |||
|
98 | mapping). | |||
|
99 | */ | |||
61 |
|
100 | |||
62 | /*! |
|
101 | /*! | |
63 | \property QVPieModelMapper::firstRow |
|
102 | \property QVPieModelMapper::firstRow | |
@@ -65,7 +104,7 QTCOMMERCIALCHART_BEGIN_NAMESPACE | |||||
65 | Minimal and default value is: 0 |
|
104 | Minimal and default value is: 0 | |
66 | */ |
|
105 | */ | |
67 | /*! |
|
106 | /*! | |
68 |
\qmlproperty int |
|
107 | \qmlproperty int VPieModelMapper::firstRow | |
69 | Defines which row of the model contains the first slice value. |
|
108 | Defines which row of the model contains the first slice value. | |
70 | The default value is 0. |
|
109 | The default value is 0. | |
71 | */ |
|
110 | */ | |
@@ -76,7 +115,7 QTCOMMERCIALCHART_BEGIN_NAMESPACE | |||||
76 | Minimal and default value is: -1 (count limited by the number of rows in the model) |
|
115 | Minimal and default value is: -1 (count limited by the number of rows in the model) | |
77 | */ |
|
116 | */ | |
78 | /*! |
|
117 | /*! | |
79 |
\qmlproperty int |
|
118 | \qmlproperty int VPieModelMapper::columnCount | |
80 | Defines the number of rows of the model that are mapped as the data for QPieSeries. The default value is |
|
119 | Defines the number of rows of the model that are mapped as the data for QPieSeries. The default value is | |
81 | -1 (count limited by the number of rows in the model) |
|
120 | -1 (count limited by the number of rows in the model) | |
82 | */ |
|
121 | */ |
@@ -31,32 +31,58 QTCOMMERCIALCHART_BEGIN_NAMESPACE | |||||
31 | It is possible to use both QAbstractItemModel and QXYSeries model API. QXYModelMapper makes sure that QXYSeries and the model are kept in sync. |
|
31 | It is possible to use both QAbstractItemModel and QXYSeries model API. QXYModelMapper makes sure that QXYSeries and the model are kept in sync. | |
32 | NOTE: used model has to support adding/removing rows/columns and modifying the data of the cells. |
|
32 | NOTE: used model has to support adding/removing rows/columns and modifying the data of the cells. | |
33 | */ |
|
33 | */ | |
|
34 | /*! | |||
|
35 | \qmlclass HXYModelMapper QHXYModelMapper | |||
|
36 | ||||
|
37 | HXYModelMapper allows you to use your own QAbstractItemModel derived model with data in rows as a data source | |||
|
38 | for XYSeries based series. It is possible to use both QAbstractItemModel and XYSeries data API to manipulate data. | |||
|
39 | HXYModelMapper keeps the series and the model in sync. | |||
|
40 | */ | |||
34 |
|
41 | |||
35 | /*! |
|
42 | /*! | |
36 | \property QHXYModelMapper::series |
|
43 | \property QHXYModelMapper::series | |
37 | \brief Defines the QXYSeries object that is used by the mapper. |
|
44 | \brief Defines the QXYSeries object that is used by the mapper. | |
38 |
|
||||
39 | All the data in the series is discarded when it is set to the mapper. |
|
45 | All the data in the series is discarded when it is set to the mapper. | |
40 | When new series is specified the old series is disconnected (it preserves its data) |
|
46 | When new series is specified the old series is disconnected (it preserves its data) | |
41 | */ |
|
47 | */ | |
|
48 | /*! | |||
|
49 | \qmlproperty XYSeries HXYModelMapper::series | |||
|
50 | Defines the QXYSeries object that is used by the mapper. All the data in the series is discarded when it is set to | |||
|
51 | the mapper. When new series is specified the old series is disconnected (it preserves its data). | |||
|
52 | */ | |||
42 |
|
53 | |||
43 | /*! |
|
54 | /*! | |
44 | \property QHXYModelMapper::model |
|
55 | \property QHXYModelMapper::model | |
45 | \brief Defines the model that is used by the mapper. |
|
56 | \brief Defines the model that is used by the mapper. | |
46 | */ |
|
57 | */ | |
|
58 | /*! | |||
|
59 | \qmlproperty SomeModel HXYModelMapper::model | |||
|
60 | The QAbstractItemModel based model that is used by the mapper. You need to implement the model and expose it to | |||
|
61 | QML as shown in \l {QML Custom Model} demo application. NOTE: the model has to support adding/removing rows/columns | |||
|
62 | and modifying the data of the cells. | |||
|
63 | */ | |||
47 |
|
64 | |||
48 | /*! |
|
65 | /*! | |
49 | \property QHXYModelMapper::xRow |
|
66 | \property QHXYModelMapper::xRow | |
50 | \brief Defines which row of the model is kept in sync with the x values of the QXYSeries |
|
67 | \brief Defines which row of the model is kept in sync with the x values of the QXYSeries | |
51 | Default value is: -1 (invalid mapping) |
|
68 | Default value is: -1 (invalid mapping) | |
52 | */ |
|
69 | */ | |
|
70 | /*! | |||
|
71 | \qmlproperty int HXYModelMapper::xRow | |||
|
72 | Defines which row of the model is kept in sync with the x values of the QXYSeries. Default value is -1 (invalid | |||
|
73 | mapping). | |||
|
74 | */ | |||
53 |
|
75 | |||
54 | /*! |
|
76 | /*! | |
55 | \property QHXYModelMapper::yRow |
|
77 | \property QHXYModelMapper::yRow | |
56 | \brief Defines which row of the model is kept in sync with the y values of the QXYSeries |
|
78 | \brief Defines which row of the model is kept in sync with the y values of the QXYSeries | |
57 |
|
||||
58 | Default value is: -1 (invalid mapping) |
|
79 | Default value is: -1 (invalid mapping) | |
59 | */ |
|
80 | */ | |
|
81 | /*! | |||
|
82 | \qmlproperty int HXYModelMapper::yRow | |||
|
83 | Defines which row of the model is kept in sync with the y values of the QXYSeries. Default value is -1 | |||
|
84 | (invalid mapping). | |||
|
85 | */ | |||
60 |
|
86 | |||
61 | /*! |
|
87 | /*! | |
62 | \property QHXYModelMapper::firstColumn |
|
88 | \property QHXYModelMapper::firstColumn | |
@@ -64,7 +90,7 QTCOMMERCIALCHART_BEGIN_NAMESPACE | |||||
64 | Minimal and default value is: 0 |
|
90 | Minimal and default value is: 0 | |
65 | */ |
|
91 | */ | |
66 | /*! |
|
92 | /*! | |
67 |
\qmlproperty int |
|
93 | \qmlproperty int HXYModelMapper::firstColumn | |
68 | Defines which column of the model contains the data for the first point of the series. |
|
94 | Defines which column of the model contains the data for the first point of the series. | |
69 | The default value is 0. |
|
95 | The default value is 0. | |
70 | */ |
|
96 | */ | |
@@ -75,7 +101,7 QTCOMMERCIALCHART_BEGIN_NAMESPACE | |||||
75 | Minimal and default value is: -1 (count limited by the number of columns in the model) |
|
101 | Minimal and default value is: -1 (count limited by the number of columns in the model) | |
76 | */ |
|
102 | */ | |
77 | /*! |
|
103 | /*! | |
78 |
\qmlproperty int |
|
104 | \qmlproperty int HXYModelMapper::columnCount | |
79 | Defines the number of columns of the model that are mapped as the data for series. The default value is |
|
105 | Defines the number of columns of the model that are mapped as the data for series. The default value is | |
80 | -1 (count limited by the number of columns in the model) |
|
106 | -1 (count limited by the number of columns in the model) | |
81 | */ |
|
107 | */ |
@@ -31,33 +31,58 QTCOMMERCIALCHART_BEGIN_NAMESPACE | |||||
31 | It is possible to use both QAbstractItemModel and QXYSeries model API. QXYModelMapper makes sure that QXYSeries and the model are kept in sync. |
|
31 | It is possible to use both QAbstractItemModel and QXYSeries model API. QXYModelMapper makes sure that QXYSeries and the model are kept in sync. | |
32 | NOTE: used model has to support adding/removing rows/columns and modifying the data of the cells. |
|
32 | NOTE: used model has to support adding/removing rows/columns and modifying the data of the cells. | |
33 | */ |
|
33 | */ | |
|
34 | /*! | |||
|
35 | \qmlclass VXYModelMapper QHXYModelMapper | |||
|
36 | ||||
|
37 | VXYModelMapper allows you to use your own QAbstractItemModel derived model with data in columns as a data source | |||
|
38 | for XYSeries based series. It is possible to use both QAbstractItemModel and XYSeries data API to manipulate data. | |||
|
39 | VYModelMapper keeps the series and the model in sync. | |||
|
40 | */ | |||
34 |
|
41 | |||
35 | /*! |
|
42 | /*! | |
36 | \property QVXYModelMapper::series |
|
43 | \property QVXYModelMapper::series | |
37 | \brief Defines the QXYSeries object that is used by the mapper. |
|
44 | \brief Defines the QXYSeries object that is used by the mapper. | |
38 |
|
||||
39 | All the data in the series is discarded when it is set to the mapper. |
|
45 | All the data in the series is discarded when it is set to the mapper. | |
40 | When new series is specified the old series is disconnected (it preserves its data) |
|
46 | When new series is specified the old series is disconnected (it preserves its data) | |
41 | */ |
|
47 | */ | |
|
48 | /*! | |||
|
49 | \qmlproperty XYSeries VXYModelMapper::series | |||
|
50 | Defines the QXYSeries object that is used by the mapper. All the data in the series is discarded when it is set to | |||
|
51 | the mapper. When new series is specified the old series is disconnected (it preserves its data). | |||
|
52 | */ | |||
42 |
|
53 | |||
43 | /*! |
|
54 | /*! | |
44 | \property QVXYModelMapper::model |
|
55 | \property QVXYModelMapper::model | |
45 | \brief Defines the model that is used by the mapper. |
|
56 | \brief Defines the model that is used by the mapper. | |
46 | */ |
|
57 | */ | |
|
58 | /*! | |||
|
59 | \qmlproperty SomeModel VXYModelMapper::model | |||
|
60 | The QAbstractItemModel based model that is used by the mapper. You need to implement the model and expose it to | |||
|
61 | QML as shown in \l {QML Custom Model} demo application. NOTE: the model has to support adding/removing rows/columns | |||
|
62 | and modifying the data of the cells. | |||
|
63 | */ | |||
47 |
|
64 | |||
48 | /*! |
|
65 | /*! | |
49 | \property QVXYModelMapper::xColumn |
|
66 | \property QVXYModelMapper::xColumn | |
50 | \brief Defines which column of the model is kept in sync with the x values of QXYSeries |
|
67 | \brief Defines which column of the model is kept in sync with the x values of QXYSeries | |
51 |
|
||||
52 | Default value is: -1 (invalid mapping) |
|
68 | Default value is: -1 (invalid mapping) | |
53 | */ |
|
69 | */ | |
|
70 | /*! | |||
|
71 | \qmlproperty int VXYModelMapper::xColumn | |||
|
72 | Defines which column of the model is kept in sync with the x values of XYSeries. Default value is -1 (invalid | |||
|
73 | mapping). | |||
|
74 | */ | |||
54 |
|
75 | |||
55 | /*! |
|
76 | /*! | |
56 | \property QVXYModelMapper::yColumn |
|
77 | \property QVXYModelMapper::yColumn | |
57 | \brief Defines which column of the model is kept in sync with the y values of QXYSeries |
|
78 | \brief Defines which column of the model is kept in sync with the y values of QXYSeries | |
58 |
|
||||
59 | Default value is: -1 (invalid mapping) |
|
79 | Default value is: -1 (invalid mapping) | |
60 | */ |
|
80 | */ | |
|
81 | /*! | |||
|
82 | \qmlproperty int VXYModelMapper::yColumn | |||
|
83 | Defines which column of the model is kept in sync with the y values of QXYSeries. Default value is -1 (invalid | |||
|
84 | mapping). | |||
|
85 | */ | |||
61 |
|
86 | |||
62 | /*! |
|
87 | /*! | |
63 | \property QVXYModelMapper::firstRow |
|
88 | \property QVXYModelMapper::firstRow | |
@@ -65,7 +90,7 QTCOMMERCIALCHART_BEGIN_NAMESPACE | |||||
65 | Minimal and default value is: 0 |
|
90 | Minimal and default value is: 0 | |
66 | */ |
|
91 | */ | |
67 | /*! |
|
92 | /*! | |
68 |
\qmlproperty int |
|
93 | \qmlproperty int VXYModelMapper::firstRow | |
69 | Defines which row of the model contains the data for the first point of the series. |
|
94 | Defines which row of the model contains the data for the first point of the series. | |
70 | The default value is 0. |
|
95 | The default value is 0. | |
71 | */ |
|
96 | */ | |
@@ -76,9 +101,9 QTCOMMERCIALCHART_BEGIN_NAMESPACE | |||||
76 | Minimal and default value is: -1 (count limited by the number of rows in the model) |
|
101 | Minimal and default value is: -1 (count limited by the number of rows in the model) | |
77 | */ |
|
102 | */ | |
78 | /*! |
|
103 | /*! | |
79 |
\qmlproperty int |
|
104 | \qmlproperty int VXYModelMapper::columnCount | |
80 | Defines the number of rows of the model that are mapped as the data for series. The default value is |
|
105 | Defines the number of rows of the model that are mapped as the data for series. The default value is | |
81 | -1 (count limited by the number of rows in the model) |
|
106 | -1 (count limited by the number of rows in the model). | |
82 | */ |
|
107 | */ | |
83 |
|
108 | |||
84 | /*! |
|
109 | /*! |
General Comments 0
You need to be logged in to leave comments.
Login now