MuseScore  3.4
Music composition and notation
playpanel.h
Go to the documentation of this file.
1 //=============================================================================
2 // MuseScore
3 // Linux Music Score Editor
4 //
5 // Copyright (C) 2002-2016 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 __PLAYPANEL_H__
21 #define __PLAYPANEL_H__
22 
23 #include "ui_playpanel.h"
24 #include "enableplayforwidget.h"
25 
26 
27 namespace Ms {
28 
29 class Score;
30 
31 //---------------------------------------------------------
32 // PlayPanel
33 //---------------------------------------------------------
34 
35 class PlayPanel : public QDockWidget, private Ui::PlayPanelBase {
36  Q_OBJECT
41 
43  virtual void closeEvent(QCloseEvent*);
44  virtual void hideEvent (QHideEvent* event);
45  virtual void showEvent(QShowEvent *);
46  virtual bool eventFilter(QObject *, QEvent *);
47  virtual void keyPressEvent(QKeyEvent*) override;
48  void updateTimeLabel(int sec);
49  void updatePosLabel(int utick);
50 
51  private slots:
52  void volumeChanged(double,int);
53  void metronomeGainChanged(double val, int);
54  void relTempoChanged(double,int);
55  void relTempoChanged();
56  void tempoSliderReleased(int);
57  void tempoSliderPressed(int);
58  void volLabel();
59  void volSpinBoxEdited();
60 
61  protected:
62  virtual void changeEvent(QEvent *event);
63  void retranslate() { retranslateUi(this); }
64 
65  signals:
66  void relTempoChanged(double);
67  void metronomeGainChanged(float);
68  void posChange(int);
69  void closed(bool);
70 
71  public slots:
72  void setGain(float);
73  void setPos(int);
74  void heartBeat(int rpos, int apos, int samples);
75 
76  public:
77  PlayPanel(QWidget* parent = 0);
78  ~PlayPanel();
79 
80  void setTempo(double);
81  void setRelTempo(qreal);
82 
83  void setEndpos(int);
84  void setScore(Score* s);
86  };
87 
88 
89 } // namespace Ms
90 #endif
91 
virtual bool eventFilter(QObject *, QEvent *)
Definition: playpanel.cpp:173
PlayPanel(QWidget *parent=0)
Definition: playpanel.cpp:36
Score * cs
Definition: playpanel.h:42
void setGain(float)
Definition: playpanel.cpp:252
virtual void hideEvent(QHideEvent *event)
Definition: playpanel.cpp:151
int cachedTimePosition
Definition: playpanel.h:38
void tempoSliderReleased(int)
Definition: playpanel.cpp:401
virtual void keyPressEvent(QKeyEvent *) override
Definition: playpanel.cpp:180
void volSpinBoxEdited()
Definition: playpanel.cpp:390
void setPos(int)
Definition: playpanel.cpp:283
void volLabel()
Definition: playpanel.cpp:383
Definition: score.h:391
bool isTempoSliderPressed()
Definition: playpanel.h:85
void tempoSliderPressed(int)
Definition: playpanel.cpp:375
EnablePlayForWidget * enablePlay
Definition: playpanel.h:40
void metronomeGainChanged(double val, int)
Definition: playpanel.cpp:274
void setRelTempo(qreal)
Definition: playpanel.cpp:241
void closed(bool)
void setEndpos(int)
Definition: playpanel.cpp:222
void volumeChanged(double, int)
Definition: playpanel.cpp:265
Definition: enableplayforwidget.h:17
Definition: aeolus.cpp:26
virtual void showEvent(QShowEvent *)
Definition: playpanel.cpp:161
virtual void changeEvent(QEvent *event)
Definition: playpanel.cpp:410
void retranslate()
Definition: playpanel.h:63
void updatePosLabel(int utick)
Definition: playpanel.cpp:343
void heartBeat(int rpos, int apos, int samples)
Definition: playpanel.cpp:297
bool tempoSliderIsPressed
Definition: playpanel.h:39
virtual void closeEvent(QCloseEvent *)
Definition: playpanel.cpp:136
void updateTimeLabel(int sec)
Definition: playpanel.cpp:313
void setTempo(double)
Definition: playpanel.cpp:231
int cachedTickPosition
Definition: playpanel.h:37
void setScore(Score *s)
Definition: playpanel.cpp:192
void posChange(int)
~PlayPanel()
Definition: playpanel.cpp:92
void relTempoChanged()
Definition: playpanel.cpp:122
Definition: playpanel.h:35