lmms
Cross-platform music production software
Toggle main menu visibility
Loading...
Searching...
No Matches
include
TrackGrip.h
Go to the documentation of this file.
1
/*
2
* TrackGrip.h - Grip that can be used to move tracks
3
*
4
* Copyright (c) 2024- Michael Gregorius
5
*
6
* This file is part of LMMS - https://lmms.io
7
*
8
* This program is free software; you can redistribute it and/or
9
* modify it under the terms of the GNU General Public
10
* License as published by the Free Software Foundation; either
11
* version 2 of the License, or (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 GNU
16
* General Public License for more details.
17
*
18
* You should have received a copy of the GNU General Public
19
* License along with this program (see COPYING); if not, write to the
20
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
21
* Boston, MA 02110-1301 USA.
22
*
23
*/
24
25
#ifndef LMMS_GUI_TRACK_GRIP_H
26
#define LMMS_GUI_TRACK_GRIP_H
27
28
#include <QWidget>
29
30
31
class
QPixmap;
32
33
namespace
lmms
34
{
35
36
namespace
gui
37
{
38
39
class
TrackView
;
40
41
class
TrackGrip
:
public
QWidget
42
{
43
Q_OBJECT
44
public
:
45
TrackGrip
(
TrackView
* trackView, QWidget* parent =
nullptr
);
46
~TrackGrip
()
override
=
default
;
47
48
signals:
49
void
grabbed
();
50
void
released
();
51
52
protected
:
53
void
mousePressEvent
(QMouseEvent*)
override
;
54
void
mouseReleaseEvent
(QMouseEvent*)
override
;
55
void
paintEvent
(QPaintEvent*)
override
;
56
57
private
:
58
TrackView
*
m_trackView
=
nullptr
;
59
bool
m_isGrabbed
=
false
;
60
static
QPixmap*
s_grabbedPixmap
;
61
static
QPixmap*
s_releasedPixmap
;
62
};
63
64
}
// namespace gui
65
66
}
// namespace lmms
67
68
#endif
// LMMS_GUI_TRACK_GRIP_H
lmms::gui::TrackGrip::s_releasedPixmap
static QPixmap * s_releasedPixmap
Definition
TrackGrip.h:61
lmms::gui::TrackGrip::m_isGrabbed
bool m_isGrabbed
Definition
TrackGrip.h:59
lmms::gui::TrackGrip::~TrackGrip
~TrackGrip() override=default
lmms::gui::TrackGrip::mouseReleaseEvent
void mouseReleaseEvent(QMouseEvent *) override
Definition
TrackGrip.cpp:97
lmms::gui::TrackGrip::paintEvent
void paintEvent(QPaintEvent *) override
Definition
TrackGrip.cpp:109
lmms::gui::TrackGrip::s_grabbedPixmap
static QPixmap * s_grabbedPixmap
Definition
TrackGrip.h:60
lmms::gui::TrackGrip::mousePressEvent
void mousePressEvent(QMouseEvent *) override
Definition
TrackGrip.cpp:68
lmms::gui::TrackGrip::grabbed
void grabbed()
lmms::gui::TrackGrip::m_trackView
TrackView * m_trackView
Definition
TrackGrip.h:58
lmms::gui::TrackGrip::TrackGrip
TrackGrip(TrackView *trackView, QWidget *parent=nullptr)
Definition
TrackGrip.cpp:47
lmms::gui::TrackGrip::released
void released()
lmms::gui::TrackView
Definition
TrackView.h:60
lmms::gui
Definition
AudioPortAudio.cpp:209
lmms
Definition
RemotePluginBase.cpp:34
Generated on
for lmms by
1.18.0