##// END OF EJS Templates
Theme change now affects also XY series
Tero Ahola -
r615:91322882c9fd
parent child
Show More
@@ -93,30 +93,20 void ChartTheme::decorate(QLegend* legend)
93
93
94 void ChartTheme::decorate(QAreaSeries* series, int index)
94 void ChartTheme::decorate(QAreaSeries* series, int index)
95 {
95 {
96 QPen pen;
96 QPen pen(colorAt(m_seriesGradients.at(index % m_seriesGradients.size()), 1.0));
97 QBrush brush;
97 pen.setWidthF(2);
98 series->setPen(pen);
98
99
99 if (pen == series->pen()){
100 QBrush brush(m_seriesColors.at(index % m_seriesColors.size()));
100 pen.setColor(colorAt(m_seriesGradients.at(index % m_seriesGradients.size()), 1.0));
101 series->setBrush(brush);
101 pen.setWidthF(2);
102 series->setPen(pen);
103 }
104
105 if (brush == series->brush()) {
106 QBrush brush(m_seriesColors.at(index % m_seriesColors.size()));
107 series->setBrush(brush);
108 }
109 }
102 }
110
103
111
104
112 void ChartTheme::decorate(QLineSeries* series,int index)
105 void ChartTheme::decorate(QLineSeries* series,int index)
113 {
106 {
114 QPen pen;
107 QPen pen(m_seriesColors.at(index%m_seriesColors.size()));
115 if(pen == series->pen()){
108 pen.setWidthF(2);
116 pen.setColor(m_seriesColors.at(index%m_seriesColors.size()));
109 series->setPen(pen);
117 pen.setWidthF(2);
118 series->setPen(pen);
119 }
120 }
110 }
121
111
122 void ChartTheme::decorate(QBarSeries* series,int index)
112 void ChartTheme::decorate(QBarSeries* series,int index)
@@ -181,20 +171,12 void ChartTheme::decorate(QPercentBarSeries* series,int index)
181
171
182 void ChartTheme::decorate(QScatterSeries* series, int index)
172 void ChartTheme::decorate(QScatterSeries* series, int index)
183 {
173 {
174 QPen pen(colorAt(m_seriesGradients.at(index % m_seriesGradients.size()), 1.0));
175 pen.setWidthF(2);
176 series->setPen(pen);
184
177
185 QPen pen;
178 QBrush brush(m_seriesColors.at(index % m_seriesColors.size()));
186 QBrush brush;
179 series->setBrush(brush);
187
188 if (pen == series->pen()) {
189 pen.setColor(colorAt(m_seriesGradients.at(index % m_seriesGradients.size()), 1.0));
190 pen.setWidthF(2);
191 series->setPen(pen);
192 }
193
194 if (brush == series->brush()) {
195 QBrush brush(m_seriesColors.at(index % m_seriesColors.size()));
196 series->setBrush(brush);
197 }
198 }
180 }
199
181
200 void ChartTheme::decorate(QPieSeries* series, int index)
182 void ChartTheme::decorate(QPieSeries* series, int index)
@@ -211,12 +193,9 void ChartTheme::decorate(QPieSeries* series, int index)
211
193
212 void ChartTheme::decorate(QSplineSeries* series, int index)
194 void ChartTheme::decorate(QSplineSeries* series, int index)
213 {
195 {
214 QPen pen;
196 QPen pen(m_seriesColors.at(index%m_seriesColors.size()));
215 if(pen == series->pen()){
197 pen.setWidthF(2);
216 pen.setColor(m_seriesColors.at(index%m_seriesColors.size()));
198 series->setPen(pen);
217 pen.setWidthF(2);
218 series->setPen(pen);
219 }
220 }
199 }
221
200
222 void ChartTheme::decorate(QChartAxis* axis,bool axisX)
201 void ChartTheme::decorate(QChartAxis* axis,bool axisX)
General Comments 0
You need to be logged in to leave comments. Login now