26#ifndef _PATCHES_DIALOG_H
27#define _PATCHES_DIALOG_H
29#include <fluidsynth/types.h>
30#include <QSortFilterProxyModel>
31#include <QStandardItemModel>
34#include "ui_PatchesDialog.h"
46class PatchesDialog :
public QDialog,
private Ui::PatchesDialog
54 void setup(fluid_synth_t* pSynth,
int iChan,
const QString& chanName,
LcdSpinBoxModel* bankModel,
59 void progChanged(
const QModelIndex& cur,
const QModelIndex& prev);
Definition PatchesDialog.h:44
bool m_showingAllBankPatches
Definition PatchesDialog.h:107
void updatePatch(bool updateUi)
Updates the current patch, and updates the UI controls if updateUi is true.
Definition PatchesDialog.cpp:303
int m_dirty
Definition PatchesDialog.h:88
LcdSpinBoxModel * m_progModel
Definition PatchesDialog.h:91
QStandardItem * findProgItem(int iProg)
Finds the program item of given program number id in the source model.
void stabilizeForm()
Stabilize current state form.
PatchesDialog(QWidget *parent=nullptr, Qt::WindowFlags wflags=QFlag{0})
void keyPressEvent(QKeyEvent *event) override
Definition PatchesDialog.cpp:343
QLabel * m_patchLabel
Definition PatchesDialog.h:92
GigInstance * m_pSynth
Definition PatchesDialog.h:82
void setup(GigInstance *pSynth, int iChan, const QString &chanName, LcdSpinBoxModel *bankModel, LcdSpinBoxModel *progModel, QLabel *patchLabel)
Definition PatchesDialog.cpp:111
int m_iChan
Definition PatchesDialog.h:84
LcdSpinBoxModel * m_bankModel
Definition PatchesDialog.h:90
QStandardItemModel m_progListSourceModel
Programs on the selected bank.
Definition PatchesDialog.h:115
void updatePatchList()
May show only the current bank or all of them (depends on what was set via showAllBankPatches()).
Definition PatchesDialog.cpp:402
void updateSearchUi(bool isSearching)
Used for changing things on the UI based on whether the user is searching or not.
Definition PatchesDialog.cpp:382
void progChanged(QTreeWidgetItem *curr, QTreeWidgetItem *prev)
Definition PatchesDialog.cpp:382
void showAllBankPatches(bool value)
Whether to show patches from all banks at once or not. Re-fetches as needed.
Definition PatchesDialog.cpp:394
int m_iProg
Definition PatchesDialog.h:86
QString m_selProgName
Definition PatchesDialog.h:110
int m_iBank
Definition PatchesDialog.h:85
QTreeWidgetItem * findBankItem(int iBank)
Finds the bank item from the sidebar of a given bank number.
~PatchesDialog() override=default
int m_selBank
Definition PatchesDialog.h:109
void setBankProg(int iBank, int iProg)
Realize a bank-program selection.
bool validateForm()
Check whether the dialog fields are valid.
QSortFilterProxyModel m_progListProxyModel
Model to allow searching.
Definition PatchesDialog.h:116
int m_selProg
Definition PatchesDialog.h:108
void diffSelectProgRow(int offset)
Definition PatchesDialog.cpp:365
static PuglViewHint int value
Definition pugl.h:1708
static uintptr_t parent
Definition pugl.h:1644
Definition AudioPortAudio.cpp:209
IntModel LcdSpinBoxModel
Definition LcdSpinBox.h:88