From 703f47458a859c9559c13038246dd37529eba6ff Mon Sep 17 00:00:00 2001 From: "Tim E. Real" Date: Thu, 9 Dec 2010 07:41:47 +0000 Subject: Made MusE the owner of transport object. Improved PosEdit class. --- muse2/awl/posedit.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'muse2/awl/posedit.h') diff --git a/muse2/awl/posedit.h b/muse2/awl/posedit.h index 314b2b9d..5b04c640 100644 --- a/muse2/awl/posedit.h +++ b/muse2/awl/posedit.h @@ -41,6 +41,8 @@ class PosEdit : public QAbstractSpinBox Pos _pos; bool initialized; + QIntValidator* validator; + virtual void paintEvent(QPaintEvent* event); virtual void stepBy(int steps); virtual StepEnabled stepEnabled() const; @@ -49,9 +51,16 @@ class PosEdit : public QAbstractSpinBox void updateValue(); int curSegment() const; virtual bool event(QEvent*); + void finishEdit(); signals: void valueChanged(const Pos&); + + // Choose these three carefully, watch out for focusing recursion. + void returnPressed(); + void lostFocus(); + // This is emitted when focus lost or return pressed (same as QAbstractSpinBox). + void editingFinished(); public slots: void setValue(const Pos& time); @@ -66,7 +75,7 @@ class PosEdit : public QAbstractSpinBox Pos pos() const { return _pos; } void setSmpte(bool); bool smpte() const { return _smpte; } - void* operator new(size_t); + // void* operator new(size_t); // What was this for? Tim. }; } -- cgit v1.2.3