automatically enable auto-detect LED when selecting a MIDI device
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@1678 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
@@ -67,6 +67,8 @@ public slots:
|
||||
void midiToggled( void );
|
||||
void userToggled( void );
|
||||
void autoDetectToggled( void );
|
||||
void enableAutoDetect( QAction * _a );
|
||||
|
||||
|
||||
protected slots:
|
||||
void midiValueChanged( void );
|
||||
|
||||
@@ -163,12 +163,13 @@ controllerConnectionDialog::controllerConnectionDialog( QWidget * _parent,
|
||||
if( !engine::getMixer()->getMidiClient()->isRaw() )
|
||||
{
|
||||
m_readablePorts = new midiPortMenu( midiPort::Input );
|
||||
|
||||
connect( m_readablePorts, SIGNAL( triggered( QAction * ) ),
|
||||
this, SLOT( enableAutoDetect( QAction * ) ) );
|
||||
toolButton * rp_btn = new toolButton( m_midiGroupBox );
|
||||
rp_btn->setText( tr( "MIDI-devices to receive "
|
||||
"MIDI-events from" ) );
|
||||
rp_btn->setIcon( embed::getIconPixmap( "midi_in" ) );
|
||||
rp_btn->setGeometry( 140, 24, 32, 32 );
|
||||
rp_btn->setIcon( embed::getIconPixmap( "piano" ) );
|
||||
rp_btn->setGeometry( 160, 24, 32, 32 );
|
||||
rp_btn->setMenu( m_readablePorts );
|
||||
rp_btn->setPopupMode( QToolButton::InstantPopup );
|
||||
}
|
||||
@@ -417,6 +418,15 @@ void controllerConnectionDialog::midiValueChanged( void )
|
||||
|
||||
|
||||
|
||||
void controllerConnectionDialog::enableAutoDetect( QAction * _a )
|
||||
{
|
||||
if( _a->isChecked() )
|
||||
{
|
||||
m_midiAutoDetectCheckBox->model()->setValue( true );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
#include "moc_controller_connection_dialog.cxx"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user