From 8a2c2824a59d7644e13bc52c9a0ecbd641f21f95 Mon Sep 17 00:00:00 2001 From: Robert Jonsson Date: Wed, 13 Oct 2010 19:34:22 +0000 Subject: new branch muse2, first checkin --- muse2/muse/widgets/spinbox.h | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 muse2/muse/widgets/spinbox.h (limited to 'muse2/muse/widgets/spinbox.h') 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 +//Added by qt3to4: +#include + +//--------------------------------------------------------- +// 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 + -- cgit v1.2.3