Changeset View
Changeset View
Standalone View
Standalone View
kmplot/kgradientdialog.cpp
Show First 20 Lines • Show All 126 Lines • ▼ Show 20 Line(s) | 108 | { | |||
---|---|---|---|---|---|
127 | painter.setBrush( lg ); | 127 | painter.setBrush( lg ); | ||
128 | painter.setPen( QPen( Qt::black, 1 ) ); | 128 | painter.setPen( QPen( Qt::black, 1 ) ); | ||
129 | painter.drawRect( r ); | 129 | painter.drawRect( r ); | ||
130 | //END draw gradient | 130 | //END draw gradient | ||
131 | 131 | | |||
132 | 132 | | |||
133 | //BEGIN draw arrows | 133 | //BEGIN draw arrows | ||
134 | painter.setRenderHint( QPainter::Antialiasing, true ); | 134 | painter.setRenderHint( QPainter::Antialiasing, true ); | ||
135 | QGradientStops stops = m_gradient.stops(); | 135 | const QGradientStops stops = m_gradient.stops(); | ||
136 | foreach ( const QGradientStop &stop, stops ) | 136 | for ( const QGradientStop &stop : stops ) | ||
137 | drawArrow( & painter, stop ); | 137 | drawArrow( & painter, stop ); | ||
138 | //END draw arrows | 138 | //END draw arrows | ||
139 | } | 139 | } | ||
140 | 140 | | |||
141 | 141 | | |||
142 | void KGradientEditor::drawArrow( QPainter * painter, const QGradientStop & stop ) | 142 | void KGradientEditor::drawArrow( QPainter * painter, const QGradientStop & stop ) | ||
143 | { | 143 | { | ||
144 | QPolygonF arrow(3); | 144 | QPolygonF arrow(3); | ||
▲ Show 20 Lines • Show All 409 Lines • Show Last 20 Lines |