diff options
author | Robert Jonsson <spamatica@gmail.com> | 2011-10-02 18:54:37 +0000 |
---|---|---|
committer | Robert Jonsson <spamatica@gmail.com> | 2011-10-02 18:54:37 +0000 |
commit | 9200bb81f55b0d33e0a61af0112f1ca294375554 (patch) | |
tree | 02fadcb2723605bb514e4a25d66e1c1451edb000 /muse2/awl/sigedit.h | |
parent | 7616dd54d964e86393cdfa6cc3e5c2df811a0437 (diff) |
some rework on SigEdit
Diffstat (limited to 'muse2/awl/sigedit.h')
-rw-r--r-- | muse2/awl/sigedit.h | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/muse2/awl/sigedit.h b/muse2/awl/sigedit.h index 259812dd..acb0b9d8 100644 --- a/muse2/awl/sigedit.h +++ b/muse2/awl/sigedit.h @@ -26,7 +26,10 @@ #include "al/sig.h" //#include "sig.h" -#include <QAbstractSpinBox> +#include <QWidget> +#include <QSpinBox> +#include <QHBoxLayout> +#include <QLabel> namespace AL { class TimeSignature; @@ -38,29 +41,29 @@ namespace Awl { // SigEdit //--------------------------------------------------------- -class SigEdit : public QAbstractSpinBox +class SigEdit : public QWidget { Q_OBJECT AL::TimeSignature _sig; bool initialized; + QLabel *slash; + QSpinBox *zSpin; + QSpinBox *nSpin; + QHBoxLayout *layout; virtual void paintEvent(QPaintEvent* event); - virtual void stepBy(int steps); - virtual StepEnabled stepEnabled() const; - virtual void fixup(QString& input) const; - virtual QValidator::State validate(QString&, int&) const; void updateValue(); - int curSegment() const; - virtual bool event(QEvent*); signals: void valueChanged(const AL::TimeSignature&); - void returnPressed(); + + private slots: + void setN(const int n); + void setZ(const int z); public slots: void setValue(const AL::TimeSignature&); - void setValue(const QString& s); public: SigEdit(QWidget* parent = 0); |