13 #include <qpainterpath.h> 36 path.lineTo( -headWidth, headWidth );
37 path.lineTo( -headWidth, tailWidth );
38 path.lineTo( -
length, tailWidth );
39 path.lineTo( -
length, -tailWidth );
40 path.lineTo( -headWidth, -tailWidth );
41 path.lineTo( -headWidth, -headWidth );
48 length = qMax( l, headWidth );
50 path.setElementPositionAt( 3, -
length, tailWidth );
51 path.setElementPositionAt( 4, -
length, -tailWidth );
74 d_data->setLength( length );
79 return d_data->length;
84 painter->drawPath( d_data->path );
94 path.lineTo( -headWidth, headWidth * 0.6 );
96 path.lineTo( -headWidth, -headWidth * 0.6 );
121 const qreal headWidth = qMin( d_data->headWidth, length / 3.0 );
123 QPainterPath& path = d_data->path;
125 path.setElementPositionAt( 1, -headWidth, headWidth * 0.6 );
126 path.setElementPositionAt( 3, -headWidth, -headWidth * 0.6 );
127 path.setElementPositionAt( 5, -length, 0 );
132 return d_data->length;
137 p->drawPath( d_data->path );
virtual ~QwtVectorFieldArrow() QWT_OVERRIDE
virtual qreal length() const QWT_OVERRIDE
virtual qreal length() const =0
virtual void paint(QPainter *) const QWT_OVERRIDE
PrivateData(qreal headW, qreal tailW)
QwtVectorFieldArrow(qreal headWidth=6.0, qreal tailWidth=1.0)
virtual void setLength(qreal length) QWT_OVERRIDE
virtual qreal length() const QWT_OVERRIDE
virtual ~QwtVectorFieldThinArrow() QWT_OVERRIDE
virtual ~QwtVectorFieldSymbol()
QwtVectorFieldThinArrow(qreal headWidth=6.0)
virtual void setLength(qreal length) QWT_OVERRIDE
virtual void paint(QPainter *) const QWT_OVERRIDE