24 mCategoryBrush.setStyle( Qt::SolidPattern );
25 mPen.setStyle( Qt::SolidLine );
55 maxValue = qMax( expression->
evaluate( feature ).toDouble(), maxValue );
87 if ( attributes.count() == 0 )
92 double maxValue = attributes[0].toDouble();
94 for (
int i = 0; i < attributes.count(); ++i )
96 maxValue = qMax( attributes[i].toDouble(), maxValue );
103 mScaleFactor = maxValue / s.
size.height();
110 mScaleFactor = maxValue / s.
size.width();
126 QList<double> values;
132 double currentVal = expression->
evaluate( feature ).toDouble();
133 values.push_back( currentVal );
134 maxValue = qMax( currentVal, maxValue );
139 double currentOffset = 0;
142 double baseX = position.x();
143 double baseY = position.y();
149 QList<double>::const_iterator valIt = values.constBegin();
150 QList< QColor >::const_iterator colIt = s.
categoryColors.constBegin();
151 for ( ; valIt != values.constEnd(); ++valIt, ++colIt )
155 mCategoryBrush.setColor( *colIt );
156 p->setBrush( mCategoryBrush );
161 p->drawRect( baseX + currentOffset, baseY, scaledWidth, length * -1 );
165 p->drawRect( baseX + currentOffset, baseY - scaledMaxVal, scaledWidth, length );
169 p->drawRect( baseX, baseY - currentOffset, length, scaledWidth * -1 );
173 p->drawRect( baseX + scaledMaxVal, baseY - currentOffset, 0 - length, scaledWidth * -1 );
177 currentOffset += scaledWidth;