diff options
author | Robert Jonsson <spamatica@gmail.com> | 2010-10-13 19:34:22 +0000 |
---|---|---|
committer | Robert Jonsson <spamatica@gmail.com> | 2010-10-13 19:34:22 +0000 |
commit | 8a2c2824a59d7644e13bc52c9a0ecbd641f21f95 (patch) | |
tree | 064ad3f2bf8daab0ad27b128abd86a9bbdb1e496 /muse2/muse/widgets/spinbox.h | |
parent | a27706d9629e8b592cca4659f865b70adef24e6d (diff) |
new branch muse2, first checkin
Diffstat (limited to 'muse2/muse/widgets/spinbox.h')
-rw-r--r-- | muse2/muse/widgets/spinbox.h | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/muse2/muse/widgets/spinbox.h b/muse2/muse/widgets/spinbox.h new file mode 100644 index 00000000..6eaa2da7 --- /dev/null +++ b/muse2/muse/widgets/spinbox.h @@ -0,0 +1,44 @@ +//========================================================= +// MusE +// Linux Music Editor +// $Id: spinbox.h,v 1.1.2.2 2009/02/02 21:38:01 terminator356 Exp $ +// (C) Copyright 2001 Werner Schweer (ws@seh.de) +//========================================================= + +// SpinBox: +// Click up/down, or mousewheel, or hit enter with un-modified text (which means enter TWICE for modified text), +// and the control will give up focus, thereby allowing you to use global shortcut keys afterwards. +// Up/down keys still keep the focus. +#ifndef __SPINBOX_H__ +#define __SPINBOX_H__ + +#include <qspinbox.h> +//Added by qt3to4: +#include <QEvent> + +//--------------------------------------------------------- +// SpinBox +//--------------------------------------------------------- + +class SpinBox : public QSpinBox { + Q_OBJECT + + bool _clearFocus; + + protected: + bool eventFilter(QObject* obj, QEvent* ev); + + public slots: + virtual void stepUp(); + virtual void stepDown(); + + signals: + void doubleClicked(); + + public: + SpinBox(QWidget* parent=0, const char* name = 0); + SpinBox(int minValue, int maxValue, int step = 1, QWidget* parent=0, const char* name = 0); +}; + +#endif + |