MCPcopy Create free account
hub / github.com/LMMS/lmms / accept

Method accept

plugins/GigPlayer/PatchesDialog.cpp:244–266  ·  view source on GitHub ↗

Validate form fields and accept it valid.

Source from the content-addressed store, hash-verified

242
243// Validate form fields and accept it valid.
244void PatchesDialog::accept()
245{
246 if( validateForm() )
247 {
248 // Unload from current selected dialog items.
249 int iBank = ( m_bankListView->currentItem() )->text( 0 ).toInt();
250 int iProg = ( m_progListView->currentItem() )->text( 0 ).toInt();
251
252 // And set it right away...
253 setBankProg( iBank, iProg );
254
255 if( m_dirty > 0 )
256 {
257 m_bankModel->setValue( iBank );
258 m_progModel->setValue( iProg );
259 m_patchLabel->setText( m_progListView->
260 currentItem()->text( 1 ) );
261 }
262
263 // We got it.
264 QDialog::accept();
265 }
266}
267
268
269

Callers 5

dropEventMethod · 0.45
dropEventMethod · 0.45
dropEventMethod · 0.45
wheelEventMethod · 0.45
dropEventMethod · 0.45

Calls 2

setValueMethod · 0.45
setTextMethod · 0.45

Tested by

no test coverage detected