diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-02-24 02:19:41 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-02-24 02:19:41 +0000 |
commit | d728c2086bb8bb99df2828948644c14194a91681 (patch) | |
tree | 3f62305a8afc7dbb36d90ab5fc6fc0538972b71e /src/VButton.h | |
download | kvkbd-d728c2086bb8bb99df2828948644c14194a91681.tar.gz kvkbd-d728c2086bb8bb99df2828948644c14194a91681.zip |
Added KDE3 version of kvkbd
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kvkbd@1095344 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/VButton.h')
-rw-r--r-- | src/VButton.h | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/src/VButton.h b/src/VButton.h new file mode 100644 index 0000000..1c82877 --- /dev/null +++ b/src/VButton.h @@ -0,0 +1,49 @@ +#ifndef VBUTTON_H +#define VBUTTON_H + +#include <qpushbutton.h> +#include <qevent.h> + +class VButton : public QPushButton +{ +Q_OBJECT +public: + VButton(QWidget *parent=0, const char *name=0); + ~VButton(); + void setKeyCode(unsigned int keycode); + unsigned int getKeyCode(); + void setText(const QString& text); + void setShiftText(const QString& text); + void capsPressed(bool press); + + + void reposition(int width, int height); + void res(); + static double pw; + static double ph; + +private: + bool press; + bool inrpt; + +protected: + unsigned int keycode; + QString u; + QString l; + QRect orig_size; + void timerEvent ( QTimerEvent * ); + +public slots: + void sendKey(); + void shiftPressed(bool press); + +protected slots: + void mousePressEvent(QMouseEvent *e); + void mouseReleaseEvent(QMouseEvent *e); + +signals: + void keyClick(unsigned int keycode); + +}; + +#endif |