00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #ifndef GESTURE_DRAWER_H
00013 #define GESTURE_DRAWER_H
00014
00015 #include <tqframe.h>
00016 #include <tqstring.h>
00017 #include <tqevent.h>
00018 #include <tqpoint.h>
00019 #include <tqwidget.h>
00020 #include <tqsize.h>
00021
00022 namespace KHotKeys
00023 {
00024
00025 class GestureDrawer : public QFrame
00026 {
00027 Q_OBJECT
00028 public:
00029 GestureDrawer(TQWidget *parent, const char *name);
00030 ~GestureDrawer();
00031
00032 void setData(const TQString &data);
00033
00034 virtual TQSize sizeHint() const { return TQSize(30, 30); }
00035
00036 protected:
00037 void paintEvent(TQPaintEvent *ev);
00038
00039 private:
00040 TQPoint lookupCellCoords(Q_UINT32 cell);
00041 void drawArrowHead(TQPoint &start, TQPoint &end,
00042 TQPainter &p);
00043
00044
00045 TQString _data;
00046 };
00047
00048 }
00049
00050 #endif