##// END OF EJS Templates
Theme change now affects also XY series
Tero Ahola -
r615:91322882c9fd
parent child
Show More
@@ -93,31 +93,21 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;
98
99 if (pen == series->pen()){
100 pen.setColor(colorAt(m_seriesGradients.at(index % m_seriesGradients.size()), 1.0));
101 pen.setWidthF(2);
97 pen.setWidthF(2);
102 series->setPen(pen);
98 series->setPen(pen);
103 }
104
99
105 if (brush == series->brush()) {
106 QBrush brush(m_seriesColors.at(index % m_seriesColors.size()));
100 QBrush brush(m_seriesColors.at(index % m_seriesColors.size()));
107 series->setBrush(brush);
101 series->setBrush(brush);
108 }
102 }
109 }
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()){
116 pen.setColor(m_seriesColors.at(index%m_seriesColors.size()));
117 pen.setWidthF(2);
108 pen.setWidthF(2);
118 series->setPen(pen);
109 series->setPen(pen);
119 }
110 }
120 }
121
111
122 void ChartTheme::decorate(QBarSeries* series,int index)
112 void ChartTheme::decorate(QBarSeries* series,int index)
123 {
113 {
@@ -181,21 +171,13 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 {
184
174 QPen pen(colorAt(m_seriesGradients.at(index % m_seriesGradients.size()), 1.0));
185 QPen pen;
186 QBrush brush;
187
188 if (pen == series->pen()) {
189 pen.setColor(colorAt(m_seriesGradients.at(index % m_seriesGradients.size()), 1.0));
190 pen.setWidthF(2);
175 pen.setWidthF(2);
191 series->setPen(pen);
176 series->setPen(pen);
192 }
193
177
194 if (brush == series->brush()) {
195 QBrush brush(m_seriesColors.at(index % m_seriesColors.size()));
178 QBrush brush(m_seriesColors.at(index % m_seriesColors.size()));
196 series->setBrush(brush);
179 series->setBrush(brush);
197 }
180 }
198 }
199
181
200 void ChartTheme::decorate(QPieSeries* series, int index)
182 void ChartTheme::decorate(QPieSeries* series, int index)
201 {
183 {
@@ -211,13 +193,10 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()){
216 pen.setColor(m_seriesColors.at(index%m_seriesColors.size()));
217 pen.setWidthF(2);
197 pen.setWidthF(2);
218 series->setPen(pen);
198 series->setPen(pen);
219 }
199 }
220 }
221
200
222 void ChartTheme::decorate(QChartAxis* axis,bool axisX)
201 void ChartTheme::decorate(QChartAxis* axis,bool axisX)
223 {
202 {
General Comments 0
You need to be logged in to leave comments. Login now