summaryrefslogtreecommitdiffstats
path: root/khotkeys/kcontrol/gesturedrawer.h
diff options
context:
space:
mode:
Diffstat (limited to 'khotkeys/kcontrol/gesturedrawer.h')
-rw-r--r--khotkeys/kcontrol/gesturedrawer.h50
1 files changed, 50 insertions, 0 deletions
diff --git a/khotkeys/kcontrol/gesturedrawer.h b/khotkeys/kcontrol/gesturedrawer.h
new file mode 100644
index 000000000..bcc8ba7e8
--- /dev/null
+++ b/khotkeys/kcontrol/gesturedrawer.h
@@ -0,0 +1,50 @@
+/****************************************************************************
+
+ KHotKeys
+
+ Copyright (C) 2003 Mike Pilone <[email protected]>
+ Copyright (C) 2003 Lubos Lunak <[email protected]>
+
+ 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