LMMS
Loading...
Searching...
No Matches
lmms::gui::PatchesDialog Class Reference

#include <PatchesDialog.h>

Inheritance diagram for lmms::gui::PatchesDialog:

Public Slots

void stabilizeForm ()
void bankChanged ()
void progChanged (QTreeWidgetItem *curr, QTreeWidgetItem *prev)
void stabilizeForm ()
 Stabilize current state form.
void progChanged (const QModelIndex &cur, const QModelIndex &prev)

Public Member Functions

 PatchesDialog (QWidget *pParent=0, Qt::WindowFlags wflags=QFlag(0))
 ~PatchesDialog () override=default
void setup (GigInstance *pSynth, int iChan, const QString &chanName, LcdSpinBoxModel *bankModel, LcdSpinBoxModel *progModel, QLabel *patchLabel)
 PatchesDialog (QWidget *parent=nullptr, Qt::WindowFlags wflags=QFlag{0})
 ~PatchesDialog () override=default
void setup (fluid_synth_t *pSynth, int iChan, const QString &chanName, LcdSpinBoxModel *bankModel, LcdSpinBoxModel *progModel, QLabel *patchLabel)

Protected Slots

void accept () override
void reject () override
void accept () override
void reject () override

Protected Member Functions

void setBankProg (int iBank, int iProg)
QTreeWidgetItem * findBankItem (int iBank)
QTreeWidgetItem * findProgItem (int iProg)
bool validateForm ()
void setBankProg (int iBank, int iProg)
 Realize a bank-program selection.
QTreeWidgetItem * findBankItem (int iBank)
 Finds the bank item from the sidebar of a given bank number.
QStandardItem * findProgItem (int iProg)
 Finds the program item of given program number id in the source model.
bool validateForm ()
 Check whether the dialog fields are valid.
void updatePatch (bool updateUi)
 Updates the current patch, and updates the UI controls if updateUi is true.
void diffSelectProgRow (int offset)
void updateSearchUi (bool isSearching)
 Used for changing things on the UI based on whether the user is searching or not.
void showAllBankPatches (bool value)
 Whether to show patches from all banks at once or not. Re-fetches as needed.
void updatePatchList ()
 May show only the current bank or all of them (depends on what was set via showAllBankPatches()).

Private Member Functions

void keyPressEvent (QKeyEvent *event) override

Private Attributes

GigInstancem_pSynth
int m_iChan
int m_iBank
int m_iProg
int m_dirty
LcdSpinBoxModelm_bankModel
LcdSpinBoxModelm_progModel
QLabel * m_patchLabel
fluid_synth_t * m_pSynth
bool m_showingAllBankPatches
int m_selProg
int m_selBank
QString m_selProgName
QStandardItemModel m_progListSourceModel
 Programs on the selected bank.
QSortFilterProxyModel m_progListProxyModel
 Model to allow searching.

Constructor & Destructor Documentation

◆ PatchesDialog() [1/2]

lmms::gui::PatchesDialog::PatchesDialog ( QWidget * pParent = 0,
Qt::WindowFlags wflags = QFlag(0) )

◆ ~PatchesDialog() [1/2]

lmms::gui::PatchesDialog::~PatchesDialog ( )
overridedefault

◆ PatchesDialog() [2/2]

lmms::gui::PatchesDialog::PatchesDialog ( QWidget * parent = nullptr,
Qt::WindowFlags wflags = QFlag{0} )

◆ ~PatchesDialog() [2/2]

lmms::gui::PatchesDialog::~PatchesDialog ( )
overridedefault

Member Function Documentation

◆ accept [1/2]

void lmms::gui::PatchesDialog::accept ( )
overrideprotectedslot

◆ accept [2/2]

void lmms::gui::PatchesDialog::accept ( )
overrideprotectedslot

◆ bankChanged

void lmms::gui::PatchesDialog::bankChanged ( )
slot

◆ diffSelectProgRow()

void lmms::gui::PatchesDialog::diffSelectProgRow ( int offset)
protected

Selects a row in the program selector based off a signed offset from the currently selected row. Also clamps the selection.

◆ findBankItem() [1/2]

QTreeWidgetItem * lmms::gui::PatchesDialog::findBankItem ( int iBank)
protected

◆ findBankItem() [2/2]

QTreeWidgetItem * lmms::gui::PatchesDialog::findBankItem ( int iBank)
protected

Finds the bank item from the sidebar of a given bank number.

◆ findProgItem() [1/2]

QStandardItem * lmms::gui::PatchesDialog::findProgItem ( int iProg)
protected

◆ findProgItem() [2/2]

QStandardItem * lmms::gui::PatchesDialog::findProgItem ( int iProg)
protected

Finds the program item of given program number id in the source model.

◆ keyPressEvent()

void lmms::gui::PatchesDialog::keyPressEvent ( QKeyEvent * event)
overrideprivate

◆ progChanged [1/2]

void lmms::gui::PatchesDialog::progChanged ( const QModelIndex & cur,
const QModelIndex & prev )
slot

◆ progChanged [2/2]

void lmms::gui::PatchesDialog::progChanged ( QTreeWidgetItem * curr,
QTreeWidgetItem * prev )
slot

◆ reject [1/2]

void lmms::gui::PatchesDialog::reject ( )
overrideprotectedslot

◆ reject [2/2]

void lmms::gui::PatchesDialog::reject ( )
overrideprotectedslot

◆ setBankProg() [1/2]

void lmms::gui::PatchesDialog::setBankProg ( int iBank,
int iProg )
protected

◆ setBankProg() [2/2]

void lmms::gui::PatchesDialog::setBankProg ( int iBank,
int iProg )
protected

Realize a bank-program selection.

◆ setup() [1/2]

void lmms::gui::PatchesDialog::setup ( fluid_synth_t * pSynth,
int iChan,
const QString & chanName,
LcdSpinBoxModel * bankModel,
LcdSpinBoxModel * progModel,
QLabel * patchLabel )

◆ setup() [2/2]

void lmms::gui::PatchesDialog::setup ( GigInstance * pSynth,
int iChan,
const QString & chanName,
LcdSpinBoxModel * bankModel,
LcdSpinBoxModel * progModel,
QLabel * patchLabel )

◆ showAllBankPatches()

void lmms::gui::PatchesDialog::showAllBankPatches ( bool value)
protected

Whether to show patches from all banks at once or not. Re-fetches as needed.

◆ stabilizeForm [1/2]

void lmms::gui::PatchesDialog::stabilizeForm ( )
slot

◆ stabilizeForm [2/2]

void lmms::gui::PatchesDialog::stabilizeForm ( )
slot

Stabilize current state form.

◆ updatePatch()

void lmms::gui::PatchesDialog::updatePatch ( bool updateUi)
protected

Updates the current patch, and updates the UI controls if updateUi is true.

◆ updatePatchList()

void lmms::gui::PatchesDialog::updatePatchList ( )
protected

May show only the current bank or all of them (depends on what was set via showAllBankPatches()).

Create a numeric value, allowing numerical sorting.

◆ updateSearchUi()

void lmms::gui::PatchesDialog::updateSearchUi ( bool isSearching)
protected

Used for changing things on the UI based on whether the user is searching or not.

◆ validateForm() [1/2]

bool lmms::gui::PatchesDialog::validateForm ( )
protected

◆ validateForm() [2/2]

bool lmms::gui::PatchesDialog::validateForm ( )
protected

Check whether the dialog fields are valid.

Member Data Documentation

◆ m_bankModel

LcdSpinBoxModel * lmms::gui::PatchesDialog::m_bankModel
private

◆ m_dirty

int lmms::gui::PatchesDialog::m_dirty
private

◆ m_iBank

int lmms::gui::PatchesDialog::m_iBank
private

◆ m_iChan

int lmms::gui::PatchesDialog::m_iChan
private

◆ m_iProg

int lmms::gui::PatchesDialog::m_iProg
private

◆ m_patchLabel

QLabel * lmms::gui::PatchesDialog::m_patchLabel
private

◆ m_progListProxyModel

QSortFilterProxyModel lmms::gui::PatchesDialog::m_progListProxyModel
private

Model to allow searching.

◆ m_progListSourceModel

QStandardItemModel lmms::gui::PatchesDialog::m_progListSourceModel
private

Programs on the selected bank.

◆ m_progModel

LcdSpinBoxModel * lmms::gui::PatchesDialog::m_progModel
private

◆ m_pSynth [1/2]

GigInstance* lmms::gui::PatchesDialog::m_pSynth
private

◆ m_pSynth [2/2]

fluid_synth_t* lmms::gui::PatchesDialog::m_pSynth
private

◆ m_selBank

int lmms::gui::PatchesDialog::m_selBank
private

◆ m_selProg

int lmms::gui::PatchesDialog::m_selProg
private

◆ m_selProgName

QString lmms::gui::PatchesDialog::m_selProgName
private

◆ m_showingAllBankPatches

bool lmms::gui::PatchesDialog::m_showingAllBankPatches
private

The documentation for this class was generated from the following files: