MuseScore  3.4
Music composition and notation
pitchedit.h
Go to the documentation of this file.
1 //=============================================================================
2 // Awl
3 // Audio Widget Library
4 //
5 // Copyright (C) 2002-2006 by Werner Schweer and others
6 //
7 // This program is free software; you can redistribute it and/or modify
8 // it under the terms of the GNU General Public License version 2.
9 //
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
14 //
15 // You should have received a copy of the GNU General Public License
16 // along with this program; if not, write to the Free Software
17 // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18 //=============================================================================
19 
20 #ifndef __AWLPITCHEDIT_H__
21 #define __AWLPITCHEDIT_H__
22 
23 namespace Awl {
24 
25 //---------------------------------------------------------
26 // PitchEdit
27 //---------------------------------------------------------
28 
29 class PitchEdit : public QSpinBox {
30  Q_OBJECT
31 
32  bool deltaMode;
33 
34  protected:
35  virtual QString textFromValue(int v) const;
36  virtual int valueFromText(const QString& text) const;
37  virtual void keyPressEvent(QKeyEvent*);
38 
39  signals:
40  void returnPressed();
41  void escapePressed();
42 
43  public:
44  PitchEdit(QWidget* parent = 0);
45  void setDeltaMode(bool);
46  };
47 }
48 
49 #endif
virtual QString textFromValue(int v) const
Definition: pitchedit.cpp:52
PitchEdit(QWidget *parent=0)
Definition: pitchedit.cpp:29
Definition: pitchedit.h:29
void escapePressed()
bool deltaMode
Definition: pitchedit.h:32
virtual void keyPressEvent(QKeyEvent *)
Definition: pitchedit.cpp:40
Definition: aslider.cpp:23
void returnPressed()
virtual int valueFromText(const QString &text) const
Definition: pitchedit.cpp:64
void setDeltaMode(bool)
Definition: pitchedit.cpp:74