lmms
Cross-platform music production software
Toggle main menu visibility
Loading...
Searching...
No Matches
plugins
Vibed
NineButtonSelector.h
Go to the documentation of this file.
1
/*
2
* NineButtonSelector.h
3
*
4
* Copyright (c) 2006-2007 Danny McRae <khjklujn/at/yahoo/com>
5
* Copyright (c) 2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
6
*
7
* This file is part of LMMS - https://lmms.io
8
*
9
* This program is free software; you can redistribute it and/or
10
* modify it under the terms of the GNU General Public
11
* License as published by the Free Software Foundation; either
12
* version 2 of the License, or (at your option) any later version.
13
*
14
* This program is distributed in the hope that it will be useful,
15
* but WITHOUT ANY WARRANTY; without even the implied warranty of
16
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17
* General Public License for more details.
18
*
19
* You should have received a copy of the GNU General Public
20
* License along with this program (see COPYING); if not, write to the
21
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
22
* Boston, MA 02110-1301 USA.
23
*
24
*/
25
26
#ifndef LMMS_GUI_NINE_BUTTON_SELECTOR_H
27
#define LMMS_GUI_NINE_BUTTON_SELECTOR_H
28
29
#include <array>
30
#include <QWidget>
31
32
#include "
AutomatableModelView.h
"
33
34
namespace
lmms
35
{
36
37
38
namespace
gui
39
{
40
41
class
PixmapButton
;
42
43
44
class
NineButtonSelector
:
public
QWidget,
public
IntModelView
45
{
46
Q_OBJECT
47
public
:
48
NineButtonSelector
(
const
std::array<QPixmap, 18>& onOffIcons,
int
defaultButton,
int
x,
int
y, QWidget* parent);
49
~NineButtonSelector
()
override
=
default
;
50
51
protected
:
52
void
setSelected
(
int
newButton);
53
54
public
slots:
55
void
buttonClicked
(
int
id
);
56
void
contextMenuEvent
(QContextMenuEvent*)
override
;
57
58
signals:
59
void
NineButtonSelection
(
int
);
60
61
private
:
62
void
modelChanged
()
override
;
63
void
updateButton
(
int
);
64
65
std::array<PixmapButton*, 9>
m_buttons
;
66
PixmapButton
*
m_lastBtn
;
67
};
68
69
70
}
// namespace gui
71
72
using
NineButtonSelectorModel
=
IntModel
;
73
74
75
}
// namespace lmms
76
77
#endif
// LMMS_GUI_NINE_BUTTON_SELECTOR_H
AutomatableModelView.h
lmms::IntModel
Definition
AutomatableModel.h:486
lmms::gui::NineButtonSelector::m_lastBtn
PixmapButton * m_lastBtn
Definition
NineButtonSelector.h:66
lmms::gui::NineButtonSelector::buttonClicked
void buttonClicked(int id)
Definition
NineButtonSelector.cpp:58
lmms::gui::NineButtonSelector::modelChanged
void modelChanged() override
Definition
NineButtonSelector.cpp:63
lmms::gui::NineButtonSelector::contextMenuEvent
void contextMenuEvent(QContextMenuEvent *) override
Definition
NineButtonSelector.cpp:86
lmms::gui::NineButtonSelector::setSelected
void setSelected(int newButton)
Definition
NineButtonSelector.cpp:68
lmms::gui::NineButtonSelector::~NineButtonSelector
~NineButtonSelector() override=default
lmms::gui::NineButtonSelector::NineButtonSelector
NineButtonSelector(const std::array< QPixmap, 18 > &onOffIcons, int defaultButton, int x, int y, QWidget *parent)
Definition
NineButtonSelector.cpp:35
lmms::gui::NineButtonSelector::m_buttons
std::array< PixmapButton *, 9 > m_buttons
Definition
NineButtonSelector.h:65
lmms::gui::NineButtonSelector::NineButtonSelection
void NineButtonSelection(int)
lmms::gui::NineButtonSelector::updateButton
void updateButton(int)
Definition
NineButtonSelector.cpp:74
lmms::gui::PixmapButton
Definition
PixmapButton.h:37
lmms::gui
Definition
AudioPortAudio.cpp:209
lmms::gui::IntModelView
TypedModelView< IntModel > IntModelView
Definition
AutomatableModelView.h:132
lmms
Definition
RemotePluginBase.cpp:34
lmms::NineButtonSelectorModel
IntModel NineButtonSelectorModel
Definition
NineButtonSelector.h:72
Generated on
for lmms by
1.18.0