blob: c3476348ebac0f39be29b6b51e8949c10179dd5e (
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 <tqframe.h>
#include <tqstring.h>
#include <tqevent.h>
#include <tqpoint.h>
#include <tqwidget.h>
#include <tqsize.h>
namespace KHotKeys
{
class GestureDrawer : public TQFrame
{
TQ_OBJECT
public:
GestureDrawer(TQWidget *parent, const char *name);
~GestureDrawer();
void setData(const TQString &data);
virtual TQSize sizeHint() const { return TQSize(30, 30); }
protected:
void paintEvent(TQPaintEvent *ev);
private:
TQPoint lookupCellCoords(TQ_UINT32 cell);
void drawArrowHead(TQPoint &start, TQPoint &end,
TQPainter &p);
TQString _data;
};
} // namespace KHotKeys
#endif
|