blob: bcc8ba7e85f855f73ae9f1e4103c38a7f52b79cb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
/****************************************************************************
KHotKeys
Copyright (C) 2003 Mike Pilone <mpilone@slac.com>
Copyright (C) 2003 Lubos Lunak <l.lunak@kde.org>
Distributed under the terms of the GNU General Public License version 2.
****************************************************************************/
#ifndef GESTURE_DRAWER_H
#define GESTURE_DRAWER_H
#include <qframe.h>
#include <qstring.h>
#include <qevent.h>
#include <qpoint.h>
#include <qwidget.h>
#include <qsize.h>
namespace KHotKeys
{
class GestureDrawer : public QFrame
{
Q_OBJECT
public:
GestureDrawer(QWidget *parent, const char *name);
~GestureDrawer();
void setData(const QString &data);
virtual QSize sizeHint() const { return QSize(30, 30); }
protected:
void paintEvent(QPaintEvent *ev);
private:
QPoint lookupCellCoords(Q_UINT32 cell);
void drawArrowHead(QPoint &start, QPoint &end,
QPainter &p);
QString _data;
};
} // namespace KHotKeys
#endif
|