diff options
Diffstat (limited to 'muse2/awl')
-rw-r--r-- | muse2/awl/drawbar.cpp | 4 | ||||
-rw-r--r-- | muse2/awl/sigspinbox.cpp | 21 |
2 files changed, 20 insertions, 5 deletions
diff --git a/muse2/awl/drawbar.cpp b/muse2/awl/drawbar.cpp index 7352218c..f87dab5e 100644 --- a/muse2/awl/drawbar.cpp +++ b/muse2/awl/drawbar.cpp @@ -26,10 +26,6 @@ namespace Awl { -#if 0 - } -#endif - //--------------------------------------------------------- // Drawbar //--------------------------------------------------------- diff --git a/muse2/awl/sigspinbox.cpp b/muse2/awl/sigspinbox.cpp index 6e38b164..f1399538 100644 --- a/muse2/awl/sigspinbox.cpp +++ b/muse2/awl/sigspinbox.cpp @@ -1,14 +1,33 @@ #include "sigspinbox.h" #include "al/sig.h" #include <QKeyEvent> +#include <QMouseEvent> #include <stdio.h> +#include <QLineEdit> + +class MyLineEdit : public QLineEdit +{ + public: + MyLineEdit() : QLineEdit() {}; + MyLineEdit(QWidget* parent) : QLineEdit(parent) {}; + + protected: + virtual void mousePressEvent (QMouseEvent* e) + { + QLineEdit::mousePressEvent(e); + selectAll(); + } +}; + SigSpinBox::SigSpinBox(QWidget *parent) : QSpinBox(parent) { _denominator=false; + setLineEdit(new MyLineEdit(this)); } -void SigSpinBox::keyPressEvent(QKeyEvent*ev) + +void SigSpinBox::keyPressEvent(QKeyEvent* ev) { switch (ev->key()) { case Qt::Key_Return: |