00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef PICKBOARDPICKS_H
00021 #define PICKBOARDPICKS_H
00022
00023 #include <qframe.h>
00024 #include <qlist.h>
00025
00026
00027
00028 class PickboardConfig;
00029
00030 class PickboardPicks : public QFrame {
00031 Q_OBJECT
00032 public:
00033 PickboardPicks(QWidget* parent=0, const char* name=0, WFlags f=0);
00034 ~PickboardPicks();
00035 QSize sizeHint() const;
00036 void initialise();
00037 void setMode(int);
00038 int currentMode() const { return mode; }
00039
00040 void mousePressEvent(QMouseEvent*);
00041
00042 void emitKey( ushort scan, ushort uni, ushort mod, bool press, bool repeat )
00043 { key(scan,uni,mod,press, repeat); }
00044 void resetState();
00045
00046 signals:
00047 void key( ushort scan, ushort uni, ushort mod, bool, bool );
00048
00049 public slots:
00050 void doMenu();
00051
00052 protected:
00053 void drawContents( QPainter * );
00054 void mouseDoubleClickEvent(QMouseEvent*);
00055 void mouseReleaseEvent(QMouseEvent*);
00056
00057 protected:
00058 int mode;
00059 QList<PickboardConfig> configs;
00060
00061 private:
00062 PickboardConfig* config() { return configs.at(mode); }
00063 };
00064
00065
00066 #endif