MuseScore  3.4
Music composition and notation
waveview.h
Go to the documentation of this file.
1 //=============================================================================
2 // MuseScore
3 // Music Composition & Notation
4 //
5 // Copyright (C) 2011 Werner Schweer
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 // as published by the Free Software Foundation and appearing in
10 // the file LICENCE.GPL
11 //=============================================================================
12 
13 #ifndef __WAVEVIEW_H__
14 #define __WAVEVIEW_H__
15 
16 #include "libmscore/pos.h"
17 
18 namespace Ms {
19 
20 class Audio;
21 class Score;
22 
23 //---------------------------------------------------------
24 // WaveView
25 //---------------------------------------------------------
26 
27 class WaveView : public QWidget
28  {
29  Q_OBJECT
33  QByteArray waves;
34 
36  int magStep;
37  double _xmag;
38  int _xpos;
39 
40  int pos2pix(const Pos& p) const;
41  Pos pix2pos(int x) const;
42  virtual void paintEvent(QPaintEvent*);
43  virtual QSize sizeHint() const { return QSize(50, 50); }
44  int pegel(int frame1, int frame2);
45 
46  public slots:
47  void setMag(double,double);
48  void moveLocator(int);
49 
50  public:
51  WaveView(QWidget* parent = 0);
52  void setAudio(Audio*);
53  void setXpos(int);
54  void setScore(Score* s, Pos* lc);
55  };
56 }
57 
58 #endif
59 
double _xmag
Definition: waveview.h:37
void setAudio(Audio *)
Definition: waveview.cpp:112
WaveView(QWidget *parent=0)
Definition: waveview.cpp:97
Score * _score
Definition: waveview.h:32
QByteArray waves
Definition: waveview.h:33
void moveLocator(int)
Definition: waveview.cpp:205
virtual void paintEvent(QPaintEvent *)
Definition: waveview.cpp:253
Definition: score.h:391
Pos pix2pos(int x) const
Definition: waveview.cpp:241
int pos2pix(const Pos &p) const
Definition: waveview.cpp:231
Definition: aeolus.cpp:26
int _xpos
Definition: waveview.h:38
Pos * _locator
Definition: waveview.h:31
void setXpos(int)
Definition: waveview.cpp:183
int pegel(int frame1, int frame2)
Definition: waveview.cpp:162
virtual QSize sizeHint() const
Definition: waveview.h:43
int magStep
Definition: waveview.h:36
void setMag(double, double)
Definition: waveview.cpp:193
TType _timeType
Definition: waveview.h:35
Pos _cursor
Definition: waveview.h:30
TType
Definition: pos.h:32
Definition: audio.h:25
void setScore(Score *s, Pos *lc)
Definition: waveview.cpp:218
Definition: pos.h:42
Definition: waveview.h:27