LMMS
Loading...
Searching...
No Matches
AutomatableSlider.h
Go to the documentation of this file.
1/*
2 * AutomatableSlider.h - class AutomatableSlider, a QSlider with automation
3 *
4 * Copyright (c) 2006-2008 Javier Serrano Polo <jasp00/at/users.sourceforge.net>
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_AUTOMATABLE_SLIDER_H
26#define LMMS_GUI_AUTOMATABLE_SLIDER_H
27
28#include <QSlider>
29
31
32
33namespace lmms::gui
34{
35
36class AutomatableSlider : public QSlider, public IntModelView
37{
38 Q_OBJECT
39public:
40 AutomatableSlider( QWidget * _parent, const QString & _name = QString() );
41 ~AutomatableSlider() override = default;
42
44 {
45 return( m_showStatus );
46 }
47
48
49signals:
50 void logicValueChanged( int _value );
51 void logicSliderMoved( int _value );
52
53
54protected:
55 void contextMenuEvent( QContextMenuEvent * _me ) override;
56 void mousePressEvent( QMouseEvent * _me ) override;
57 void mouseReleaseEvent( QMouseEvent * _me ) override;
58 void wheelEvent( QWheelEvent * _me ) override;
59
60 void modelChanged() override;
61
62
63private:
65
66
67private slots:
68 void changeValue( int _value );
69 void moveSlider( int _value );
70 void updateSlider();
71
72} ;
73
74
76
77} // namespace lmms::gui
78
79#endif // LMMS_GUI_AUTOMATABLE_SLIDER_H
Definition AutomatableModel.h:481
void changeValue(int _value)
Definition AutomatableSlider.cpp:128
void wheelEvent(QWheelEvent *_me) override
Definition AutomatableSlider.cpp:106
void updateSlider()
Definition AutomatableSlider.cpp:146
void logicSliderMoved(int _value)
void contextMenuEvent(QContextMenuEvent *_me) override
Definition AutomatableSlider.cpp:57
bool showStatus()
Definition AutomatableSlider.h:43
bool m_showStatus
Definition AutomatableSlider.h:64
AutomatableSlider(QWidget *_parent, const QString &_name=QString())
Definition AutomatableSlider.cpp:37
void mouseReleaseEvent(QMouseEvent *_me) override
Definition AutomatableSlider.cpp:91
void modelChanged() override
Definition AutomatableSlider.cpp:117
void logicValueChanged(int _value)
void mousePressEvent(QMouseEvent *_me) override
Definition AutomatableSlider.cpp:67
~AutomatableSlider() override=default
void moveSlider(int _value)
Definition AutomatableSlider.cpp:137
Definition AudioPortAudio.cpp:223
TypedModelView< IntModel > IntModelView
Definition AutomatableModelView.h:132
IntModel sliderModel
Definition AutomatableSlider.h:75