void XYChartCore::paint(QPainter* painter) { painter->setRenderHint(QPainter::Antialiasing, true); painter->setFont(m_labelFont); QPen pen(m_textColor); pen.setWidthF(m_lineWidth); painter->setPen(pen); if (m_gridLines) paintGrid(painter); paintAxis(painter); paintTicks(painter); paintAxisLabels(painter); paintDimensionLabels(painter); }
void drawComplexControl(QStyle::ComplexControl control, const QStyleOptionComplex* option, QPainter* painter, const QWidget* widget) const { if (control == QStyle::CC_CustomBase) { const QRangeSlider* rSlider = static_cast<const QRangeSlider*>(widget); QRect bbox = rSlider->getBBox(); QPair<int, int> range = rSlider->range(); QPair<int, int> cutoffRange = rSlider->cutoffRange(); paintGroove(*painter, bbox); paintFilling(*painter, bbox, range, cutoffRange); paintTicks(*painter, bbox, cutoffRange, rSlider->tickInterval(), rSlider->isLogarithmic()); paintMarker(*painter, bbox, range, cutoffRange, FIRST); paintMarker(*painter, bbox, range, cutoffRange, SECOND); return; } return realStyle_->drawComplexControl(control, option, painter, widget); }