10 #ifndef QWT_DIAL_NEEDLE_H
11 #define QWT_DIAL_NEEDLE_H 1
14 #include "qwt_global.h"
46 virtual void draw(QPainter *painter,
const QPoint ¢er,
47 int length,
double direction,
48 QPalette::ColorGroup cg = QPalette::Active)
const = 0;
50 virtual void setPalette(
const QPalette &);
51 const QPalette &palette()
const;
54 static void drawKnob(QPainter *,
const QPoint &pos,
55 int width,
const QBrush &,
bool sunken);
84 const QColor &mid = Qt::gray,
const QColor &base = Qt::darkGray);
86 virtual void draw(QPainter *,
const QPoint &,
int length,
87 double direction, QPalette::ColorGroup = QPalette::Active)
const;
89 static void drawArrowNeedle(QPainter *,
90 const QPalette&, QPalette::ColorGroup,
91 const QPoint &,
int length,
int width,
double direction,
94 static void drawRayNeedle(QPainter *,
95 const QPalette&, QPalette::ColorGroup,
96 const QPoint &,
int length,
int width,
double direction,
99 void setWidth(
int width);
135 const QColor &light = Qt::white,
const QColor &dark = Qt::red);
137 virtual void draw(QPainter *,
const QPoint &,
int length,
138 double direction, QPalette::ColorGroup = QPalette::Active)
const;
140 static void drawTriangleNeedle(QPainter *,
141 const QPalette &, QPalette::ColorGroup,
142 const QPoint &,
int length,
double direction);
144 static void drawThinNeedle(QPainter *,
145 const QPalette &, QPalette::ColorGroup,
146 const QPoint &,
int length,
double direction);
149 static void drawPointer(QPainter *painter,
const QBrush &brush,
150 int colorOffset,
const QPoint ¢er,
151 int length,
int width,
double direction);
181 const QColor &dark = Qt::gray);
183 virtual void draw(QPainter *,
const QPoint &,
int length,
184 double direction, QPalette::ColorGroup = QPalette::Active)
const;
186 static void drawStyle1Needle(QPainter *,
187 const QPalette &, QPalette::ColorGroup,
188 const QPoint &,
int length,
double direction);
190 static void drawStyle2Needle(QPainter *,
191 const QPalette &, QPalette::ColorGroup,
192 const QPoint &,
int length,
double direction);
198 #endif // QWT_DIAL_NEEDLE_H