hydrogen 1.2.6
MainSampleWaveDisplay.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-2025 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 MAIN_SAMPLE_WAVE_DISPLAY
24#define MAIN_SAMPLE_WAVE_DISPLAY
25
26#include <QtGui>
27#include <QtWidgets>
28
29#include <core/Object.h>
30#include "SampleEditor.h"
31class SampleEditor;
32
34class MainSampleWaveDisplay : public QWidget, public H2Core::Object<MainSampleWaveDisplay>
35{
37 Q_OBJECT
38
39 public:
40
47
48 explicit MainSampleWaveDisplay(QWidget* pParent);
50
51 void updateDisplay( const QString& filename );
53
54 void paintLocatorEvent( int pos, bool last_event);
55 virtual void paintEvent(QPaintEvent *ev) override;
56
58
62
66
68
69
70 private:
71 virtual void mouseMoveEvent(QMouseEvent *ev) override;
72 virtual void mousePressEvent(QMouseEvent *ev) override;
73 virtual void mouseReleaseEvent(QMouseEvent *ev) override;
74 void testPosition( QMouseEvent *ev );
75 void chooseSlider( QMouseEvent *ev );
76 void mouseUpdateDone();
77
78 QPixmap m_background;
81
85
86
87};
88
89
90#endif
91
#define H2_OBJECT(name)
Definition Object.h:227
virtual void mouseMoveEvent(QMouseEvent *ev) override
MainSampleWaveDisplay(QWidget *pParent)
void updateDisplay(const QString &filename)
virtual void mousePressEvent(QMouseEvent *ev) override
void chooseSlider(QMouseEvent *ev)
void testPositionFromSampleeditor()
virtual void mouseReleaseEvent(QMouseEvent *ev) override
void testPosition(QMouseEvent *ev)
void paintLocatorEvent(int pos, bool last_event)
virtual void paintEvent(QPaintEvent *ev) override
This dialog is used to preview audiofiles.