lmms
Cross-platform music production software
Toggle main menu visibility
Loading...
Searching...
No Matches
plugins
GigPlayer
PatchesDialog.h
Go to the documentation of this file.
1
/*
2
* PatchesDialog.h - display GIG patches (based on Sf2 patches_dialog.h)
3
*
4
* Copyright (c) 2008 Paul Giblock <drfaygo/at/gmail/dot/com>
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
26
#ifndef PATCHES_DIALOG_H
27
#define PATCHES_DIALOG_H
28
29
#include "ui_PatchesDialog.h"
30
#include "
LcdSpinBox.h
"
31
#include "
GigPlayer.h
"
32
33
#include <QWidget>
34
#include <QLabel>
35
36
//----------------------------------------------------------------------------
37
// qsynthPresetForm -- UI wrapper form.
38
39
namespace
lmms::gui
40
{
41
42
43
class
PatchesDialog
:
public
QDialog,
private
Ui::PatchesDialog
44
{
45
Q_OBJECT
46
47
public
:
48
49
// Constructor.
50
PatchesDialog
(QWidget * pParent = 0, Qt::WindowFlags wflags = QFlag(0));
51
52
// Destructor.
53
~PatchesDialog
()
override
=
default
;
54
55
56
void
setup
(
GigInstance
* pSynth,
int
iChan,
const
QString & chanName,
57
LcdSpinBoxModel
* bankModel,
LcdSpinBoxModel
* progModel, QLabel * patchLabel );
58
59
public
slots:
60
61
void
stabilizeForm
();
62
void
bankChanged
();
63
void
progChanged
( QTreeWidgetItem * curr, QTreeWidgetItem * prev );
64
65
protected
slots:
66
67
void
accept
()
override
;
68
void
reject
()
override
;
69
70
protected
:
71
72
void
setBankProg
(
int
iBank,
int
iProg );
73
74
QTreeWidgetItem *
findBankItem
(
int
iBank );
75
QTreeWidgetItem *
findProgItem
(
int
iProg );
76
77
bool
validateForm
();
78
79
private
:
80
81
// Instance variables.
82
GigInstance
*
m_pSynth
;
83
84
int
m_iChan
;
85
int
m_iBank
;
86
int
m_iProg
;
87
88
int
m_dirty
;
89
90
LcdSpinBoxModel
*
m_bankModel
;
91
LcdSpinBoxModel
*
m_progModel
;
92
QLabel *
m_patchLabel
;
93
};
94
95
96
}
// namespace lmms::gui
97
98
#endif
GigPlayer.h
LcdSpinBox.h
lmms::GigInstance
Definition
GigPlayer.h:74
lmms::gui::PatchesDialog::m_dirty
int m_dirty
Definition
PatchesDialog.h:88
lmms::gui::PatchesDialog::m_progModel
LcdSpinBoxModel * m_progModel
Definition
PatchesDialog.h:91
lmms::gui::PatchesDialog::findProgItem
QTreeWidgetItem * findProgItem(int iProg)
Definition
PatchesDialog.cpp:301
lmms::gui::PatchesDialog::stabilizeForm
void stabilizeForm()
Definition
PatchesDialog.cpp:200
lmms::gui::PatchesDialog::m_patchLabel
QLabel * m_patchLabel
Definition
PatchesDialog.h:92
lmms::gui::PatchesDialog::m_pSynth
GigInstance * m_pSynth
Definition
PatchesDialog.h:82
lmms::gui::PatchesDialog::setup
void setup(GigInstance *pSynth, int iChan, const QString &chanName, LcdSpinBoxModel *bankModel, LcdSpinBoxModel *progModel, QLabel *patchLabel)
Definition
PatchesDialog.cpp:111
lmms::gui::PatchesDialog::m_iChan
int m_iChan
Definition
PatchesDialog.h:84
lmms::gui::PatchesDialog::accept
void accept() override
Definition
PatchesDialog.cpp:235
lmms::gui::PatchesDialog::m_bankModel
LcdSpinBoxModel * m_bankModel
Definition
PatchesDialog.h:90
lmms::gui::PatchesDialog::progChanged
void progChanged(QTreeWidgetItem *curr, QTreeWidgetItem *prev)
Definition
PatchesDialog.cpp:382
lmms::gui::PatchesDialog::m_iProg
int m_iProg
Definition
PatchesDialog.h:86
lmms::gui::PatchesDialog::bankChanged
void bankChanged()
Definition
PatchesDialog.cpp:323
lmms::gui::PatchesDialog::m_iBank
int m_iBank
Definition
PatchesDialog.h:85
lmms::gui::PatchesDialog::findBankItem
QTreeWidgetItem * findBankItem(int iBank)
Definition
PatchesDialog.cpp:279
lmms::gui::PatchesDialog::~PatchesDialog
~PatchesDialog() override=default
lmms::gui::PatchesDialog::PatchesDialog
PatchesDialog(QWidget *pParent=0, Qt::WindowFlags wflags=QFlag(0))
Definition
PatchesDialog.cpp:66
lmms::gui::PatchesDialog::setBankProg
void setBankProg(int iBank, int iProg)
Definition
PatchesDialog.cpp:223
lmms::gui::PatchesDialog::validateForm
bool validateForm()
Definition
PatchesDialog.cpp:209
lmms::gui::PatchesDialog::reject
void reject() override
Definition
PatchesDialog.cpp:263
lmms::gui
Definition
AudioPortAudio.cpp:209
lmms::gui::LcdSpinBoxModel
IntModel LcdSpinBoxModel
Definition
LcdSpinBox.h:88
Generated on
for lmms by
1.18.0