Qwt User's Guide 6.2.0

qwt_vectorfield_symbol.h
1 /******************************************************************************
2 * Qwt Widget Library
3 * Copyright (C) 1997 Josef Wilgen
4 * Copyright (C) 2002 Uwe Rathmann
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the Qwt License, Version 1.0
8 *****************************************************************************/
9
10 #ifndef QWT_VECTOR_FIELD_SYMBOL_H
11 #define QWT_VECTOR_FIELD_SYMBOL_H
12
13 #include "qwt_global.h"
14
15 class QPainter;
16 class QPainterPath;
17
32 class QWT_EXPORT QwtVectorFieldSymbol
33 {
34 public:
35 QwtVectorFieldSymbol();
36 virtual ~QwtVectorFieldSymbol();
37
42 virtual void setLength( qreal length ) = 0;
43
48 virtual qreal length() const = 0;
49
51 virtual void paint( QPainter* ) const = 0;
52
53 private:
54 Q_DISABLE_COPY(QwtVectorFieldSymbol)
55 };
56
61 class QWT_EXPORT QwtVectorFieldArrow : public QwtVectorFieldSymbol
62 {
63 public:
64 QwtVectorFieldArrow( qreal headWidth = 6.0, qreal tailWidth = 1.0 );
65 virtual ~QwtVectorFieldArrow() QWT_OVERRIDE;
66
67 virtual void setLength( qreal length ) QWT_OVERRIDE;
68 virtual qreal length() const QWT_OVERRIDE;
69
70 virtual void paint( QPainter* ) const QWT_OVERRIDE;
71
72 private:
73 class PrivateData;
74 PrivateData* m_data;
75 };
76
81 class QWT_EXPORT QwtVectorFieldThinArrow : public QwtVectorFieldSymbol
82 {
83 public:
84 QwtVectorFieldThinArrow( qreal headWidth = 6.0 );
85 virtual ~QwtVectorFieldThinArrow() QWT_OVERRIDE;
86
87 virtual void setLength( qreal length ) QWT_OVERRIDE;
88 virtual qreal length() const QWT_OVERRIDE;
89
90 virtual void paint( QPainter* ) const QWT_OVERRIDE;
91
92 private:
93 class PrivateData;
94 PrivateData* m_data;
95 };
96
97 #endif
QwtVectorFieldArrow
Definition: qwt_vectorfield_symbol.h:62
QwtVectorFieldSymbol
Definition: qwt_vectorfield_symbol.h:33
QwtVectorFieldSymbol::length
virtual qreal length() const =0
QwtVectorFieldSymbol::paint
virtual void paint(QPainter *) const =0
Draw the symbol/arrow.
QwtVectorFieldSymbol::setLength
virtual void setLength(qreal length)=0
QwtVectorFieldThinArrow
Definition: qwt_vectorfield_symbol.h:82