Changeset View
Changeset View
Standalone View
Standalone View
ui/pageviewannotator.cpp
Show First 20 Lines • Show All 124 Lines • ▼ Show 20 Line(s) | 49 | public: | |||
---|---|---|---|---|---|
125 | { | 125 | { | ||
126 | if ( clicked ) | 126 | if ( clicked ) | ||
127 | { | 127 | { | ||
128 | if ( m_block ) | 128 | if ( m_block ) | ||
129 | { | 129 | { | ||
130 | const QPen origpen = painter->pen(); | 130 | const QPen origpen = painter->pen(); | ||
131 | QPen pen = painter->pen(); | 131 | QPen pen = painter->pen(); | ||
132 | pen.setStyle( Qt::DashLine ); | 132 | pen.setStyle( Qt::DashLine ); | ||
133 | if (m_annotElement.hasAttribute( QStringLiteral("color"))) { | ||||
134 | pen.setColor(m_annotElement.attribute( QStringLiteral("color"))); | ||||
135 | } | ||||
133 | painter->setPen( pen ); | 136 | painter->setPen( pen ); | ||
134 | const Okular::NormalizedRect tmprect( qMin( startpoint.x, point.x ), qMin( startpoint.y, point.y ), qMax( startpoint.x, point.x ), qMax( startpoint.y, point.y ) ); | 137 | const Okular::NormalizedRect tmprect( qMin( startpoint.x, point.x ), qMin( startpoint.y, point.y ), qMax( startpoint.x, point.x ), qMax( startpoint.y, point.y ) ); | ||
135 | const QRect realrect = tmprect.geometry( (int)xScale, (int)yScale ); | 138 | const QRect realrect = tmprect.geometry( (int)xScale, (int)yScale ); | ||
136 | painter->drawRect( realrect ); | 139 | painter->drawRect( realrect ); | ||
137 | painter->setPen( origpen ); | 140 | painter->setPen( origpen ); | ||
138 | } | 141 | } | ||
139 | if ( !pixmap.isNull() ) | 142 | if ( !pixmap.isNull() ) | ||
140 | painter->drawPixmap( QPointF( rect.left * xScale, rect.top * yScale ), pixmap ); | 143 | painter->drawPixmap( QPointF( rect.left * xScale, rect.top * yScale ), pixmap ); | ||
▲ Show 20 Lines • Show All 1139 Lines • Show Last 20 Lines |