hydrogen 1.2.3
TargetWaveDisplay.h
Go to the documentation of this file.
1/*
2 * Hydrogen
3 * Copyright(c) 2002-2008 by Alex >Comix< Cominu [comix@users.sourceforge.net]
4 * Copyright(c) 2008-2024 The hydrogen development team [hydrogen-devel@lists.sourceforge.net]
5 *
6 * http://www.hydrogen-music.org
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY, without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program. If not, see https://www.gnu.org/licenses
20 *
21 */
22
23#ifndef TARGET_WAVE_DISPLAY
24#define TARGET_WAVE_DISPLAY
25
26#include <QtGui>
27#include <QtWidgets>
28
29#include <core/Object.h>
30#include <core/Basics/Sample.h>
31#include <memory>
32
33class SampleEditor;
34
35namespace H2Core
36{
37 class InstrumentLayer;
38 class EnvelopePoint;
39}
40
42class TargetWaveDisplay : public QWidget, public H2Core::Object<TargetWaveDisplay>
43{
45 Q_OBJECT
46
47 public:
48 explicit TargetWaveDisplay(QWidget* pParent);
50
53 PAN = 1
54 };
55
56 void updateDisplay( std::shared_ptr<H2Core::InstrumentLayer> pLayer );
58 void paintLocatorEventTargetDisplay( int pos, bool last_event);
59 virtual void paintEvent(QPaintEvent *ev) override;
62
63 private:
64 QPixmap m_Background;
65
67 QString m_sInfo;
68
69 int m_nX;
70 int m_nY;
72
75
78
80
81 virtual void mouseMoveEvent(QMouseEvent *ev) override;
82 virtual void mousePressEvent(QMouseEvent *ev) override;
83 virtual void mouseReleaseEvent(QMouseEvent *ev) override;
84
85 virtual void updateMouseSelection(QMouseEvent *ev);
86 virtual void updateEnvelope();
87
90
92};
93
94#endif
#define H2_OBJECT(name)
Definition Object.h:224
std::vector< EnvelopePoint > VelocityEnvelope
define the type used to store velocity envelope points
Definition Sample.h:75
std::vector< EnvelopePoint > PanEnvelope
define the type used to store pan envelope points
Definition Sample.h:73
This dialog is used to preview audiofiles.
virtual void mouseMoveEvent(QMouseEvent *ev) override
virtual void mousePressEvent(QMouseEvent *ev) override
H2Core::Sample::PanEnvelope * get_pan()
EnvelopeEditMode m_EditMode
void updateDisplay(std::shared_ptr< H2Core::InstrumentLayer > pLayer)
virtual void updateMouseSelection(QMouseEvent *ev)
H2Core::Sample::VelocityEnvelope m_VelocityEnvelope
void paintLocatorEventTargetDisplay(int pos, bool last_event)
virtual void mouseReleaseEvent(QMouseEvent *ev) override
H2Core::Sample::PanEnvelope m_PanEnvelope
TargetWaveDisplay(QWidget *pParent)
virtual void updateEnvelope()
virtual void paintEvent(QPaintEvent *ev) override
H2Core::Sample::VelocityEnvelope * get_velocity()