• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright Vladimir Prus 2005.
2 // Distributed under the Boost Software License, Version 1.0.
3 // (See accompanying file LICENSE_1_0.txt
4 // or copy at http://www.boost.org/LICENSE_1_0.txt)
5 
6 #include <QtGui/qapplication.h>
7 
8 #include <QtGui/qwidget.h>
9 #include <QtGui/qpainter.h>
10 #include <QtGui/qpainterpath.h>
11 
12 #include <stdlib.h>
13 #include <math.h>
14 
15 class Arrow_widget : public QWidget
16 {
17     Q_OBJECT
18 public:
19     Arrow_widget(QWidget* parent = 0);
20 
21 public slots:
22     void slotChangeColor();
23 
24 private:
25     void draw_arrow(int x1, int y1, int x2, int y2, QPainter& painter);
26     void paintEvent(QPaintEvent*);
27 
28 private:
29     int color_;
30 };
31