@@ -48,6 +48,9 Rectangle { | |||||
48 |
|
48 | |||
49 | AreaSeries { |
|
49 | AreaSeries { | |
50 | name: "Russian" |
|
50 | name: "Russian" | |
|
51 | color: "#FFD52B1E" | |||
|
52 | borderColor: "#FF0039A5" | |||
|
53 | borderWidth: 3 | |||
51 | axisX: categoriesAxis |
|
54 | axisX: categoriesAxis | |
52 | upperSeries: LineSeries { |
|
55 | upperSeries: LineSeries { | |
53 | XYPoint { x: 0; y: 1 } |
|
56 | XYPoint { x: 0; y: 1 } | |
@@ -69,6 +72,9 Rectangle { | |||||
69 |
|
72 | |||
70 | AreaSeries { |
|
73 | AreaSeries { | |
71 | name: "Swedish" |
|
74 | name: "Swedish" | |
|
75 | color: "#AF005292" | |||
|
76 | borderColor: "#AFFDCA00" | |||
|
77 | borderWidth: 3 | |||
72 | axisX: categoriesAxis |
|
78 | axisX: categoriesAxis | |
73 | upperSeries: LineSeries { |
|
79 | upperSeries: LineSeries { | |
74 | XYPoint { x: 0; y: 1 } |
|
80 | XYPoint { x: 0; y: 1 } | |
@@ -88,6 +94,9 Rectangle { | |||||
88 |
|
94 | |||
89 | AreaSeries { |
|
95 | AreaSeries { | |
90 | name: "Finnish" |
|
96 | name: "Finnish" | |
|
97 | color: "#00357F" | |||
|
98 | borderColor: "#FEFEFE" | |||
|
99 | borderWidth: 3 | |||
91 | axisX: categoriesAxis |
|
100 | axisX: categoriesAxis | |
92 | upperSeries: LineSeries { |
|
101 | upperSeries: LineSeries { | |
93 | XYPoint { x: 0; y: 0 } |
|
102 | XYPoint { x: 0; y: 0 } | |
@@ -103,10 +112,6 Rectangle { | |||||
103 | XYPoint { x: 10; y: 0 } |
|
112 | XYPoint { x: 10; y: 0 } | |
104 | XYPoint { x: 11; y: 1 } |
|
113 | XYPoint { x: 11; y: 1 } | |
105 | } |
|
114 | } | |
106 | onClicked: { |
|
|||
107 | color = "white"; |
|
|||
108 | borderColor = "blue"; |
|
|||
109 | } |
|
|||
110 | } |
|
115 | } | |
111 | } |
|
116 | } | |
112 | } |
|
117 | } |
@@ -248,8 +248,11 void QAreaSeries::setBrush(const QBrush &brush) | |||||
248 | { |
|
248 | { | |
249 | Q_D(QAreaSeries); |
|
249 | Q_D(QAreaSeries); | |
250 | if (d->m_brush != brush) { |
|
250 | if (d->m_brush != brush) { | |
|
251 | bool emitColorChanged = brush.color() != d->m_brush.color(); | |||
251 | d->m_brush = brush; |
|
252 | d->m_brush = brush; | |
252 | emit d->updated(); |
|
253 | emit d->updated(); | |
|
254 | if (emitColorChanged) | |||
|
255 | emit colorChanged(brush.color()); | |||
253 | } |
|
256 | } | |
254 | } |
|
257 | } | |
255 |
|
258 | |||
@@ -262,11 +265,10 QBrush QAreaSeries::brush() const | |||||
262 | void QAreaSeries::setColor(const QColor &color) |
|
265 | void QAreaSeries::setColor(const QColor &color) | |
263 | { |
|
266 | { | |
264 | QBrush b = brush(); |
|
267 | QBrush b = brush(); | |
265 | if (b.color() != color) { |
|
268 | if (b == QBrush()) | |
266 | b.setColor(color); |
|
269 | b.setStyle(Qt::SolidPattern); | |
267 | setBrush(b); |
|
270 | b.setColor(color); | |
268 | emit colorChanged(color); |
|
271 | setBrush(b); | |
269 | } |
|
|||
270 | } |
|
272 | } | |
271 |
|
273 | |||
272 | QColor QAreaSeries::color() const |
|
274 | QColor QAreaSeries::color() const |
@@ -185,10 +185,10 void QScatterSeries::setBrush(const QBrush &brush) | |||||
185 | void QScatterSeries::setColor(const QColor &color) |
|
185 | void QScatterSeries::setColor(const QColor &color) | |
186 | { |
|
186 | { | |
187 | QBrush b = brush(); |
|
187 | QBrush b = brush(); | |
188 | if (b.color() != color) { |
|
188 | if (b == QBrush()) | |
189 | b.setColor(color); |
|
189 | b.setStyle(Qt::SolidPattern); | |
190 | setBrush(b); |
|
190 | b.setColor(color); | |
191 | } |
|
191 | setBrush(b); | |
192 | } |
|
192 | } | |
193 |
|
193 | |||
194 | QColor QScatterSeries::color() const |
|
194 | QColor QScatterSeries::color() const |
General Comments 0
You need to be logged in to leave comments.
Login now