]> git.sur5r.net Git - minitube/blob - src/thlibrary/thpainter.h
Initial import
[minitube] / src / thlibrary / thpainter.h
1 #ifndef _THPAINTER_H_
2 #define _THPAINTER_H_
3
4 #include <QPainter>
5
6 class THPainter : public QPainter {
7         public:
8                 THPainter();
9                 THPainter(QPaintDevice *device);
10                 ~THPainter();
11
12                 // STATIC Methods
13                 static QPainterPath roundRectangle (const QRectF& rect, qreal radius);
14                 static QPainterPath roundRectangle (const QRectF& rect, 
15                                                                                         qreal leftRadius,
16                                                                                         qreal rightRadius);
17                 static QPainterPath roundRectangle (const QRectF& rect, 
18                                                                                         qreal leftTopRadius,
19                                                                                         qreal leftBottomRadius,
20                                                                                         qreal rightTopRadius,
21                                                                                         qreal rightBottomRadius);
22
23                 // Methods
24                 void drawShadowText (   qreal x, qreal y,
25                                                                 const QString& text,
26                                                                 const QColor& shadowColor,
27                                                                 const QPointF& offset,
28                                                                 qreal radius);
29
30                 void drawRoundRect (const QRectF& rect,
31                                                         qreal radius);
32                 void drawRoundRect (const QRectF& rect,
33                                                         qreal leftRadius,
34                                                         qreal rightRadius);
35                 void drawRoundRect (const QRectF& rect,
36                                                         qreal leftTopRadius,
37                                                         qreal leftBottomRadius,
38                                                         qreal rightTopRadius,
39                                                         qreal rightBottomRadius);
40
41                 void fillRoundRect (const QRectF& rect,
42                                                         qreal radius,
43                                                         const QBrush& brush);
44                 void fillRoundRect (const QRectF& rect,
45                                                         qreal leftRadius,
46                                                         qreal rightRadius,
47                                                         const QBrush& brush);
48                 void fillRoundRect (const QRectF& rect,
49                                                         qreal leftTopRadius,
50                                                         qreal leftBottomRadius,
51                                                         qreal rightTopRadius,
52                                                         qreal rightBottomRadius,
53                                                         const QBrush& brush);
54 };
55
56 #endif /* !_THPAINTER_H_ */
57