Add doubleclick shortcut on ITW's FX LCD.

git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@938 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
Paul Giblock
2008-04-25 07:43:35 +00:00
parent 000ce83d2c
commit fa3105da6a
5 changed files with 39 additions and 4 deletions

View File

@@ -185,17 +185,18 @@ fxMixerView::fxMixerView() :
QVBoxLayout * l = new QVBoxLayout;
l->addSpacing( 10 );
QButtonGroup * g = new QButtonGroup( this );
m_bankButtons = g;
g->setExclusive( TRUE );
for( int j = 0; j < 4; ++j )
{
QToolButton * btn = new QToolButton;
btn->setText( QString( 'A'+j ) );
btn->setCheckable( TRUE );
btn->setSizePolicy( QSizePolicy::Preferred, QSizePolicy::Expanding );
l->addWidget( btn );
g->addButton( btn, j );
btn->setChecked( j == 0);
}
l->addStretch( 1 );
ml->addLayout( l );
connect( g, SIGNAL( buttonClicked( int ) ),
m_fxLineBanks, SLOT( setCurrentIndex( int ) ) );
@@ -248,6 +249,18 @@ void fxMixerView::setCurrentFxLine( fxLine * _line )
void fxMixerView::setCurrentFxLine( int _line )
{
if ( _line >= 0 && _line < NumFxChannels+1 )
{
setCurrentFxLine( m_fxChannelViews[_line].m_fxLine );
m_bankButtons->button( _line / 16 )->click();
}
}
void fxMixerView::clear( void )
{

View File

@@ -1206,7 +1206,7 @@ void pianoRoll::mouseMoveEvent( QMouseEvent * _me )
{
int tmp = abs( pos_ticks - (int)( (*it)->pos() ) );
if( tmp < shortDistance && (*it)->length().getTicks() > 0 )
if( tmp <= shortDistance && (*it)->length().getTicks() > 0 )
{
shortDistance = tmp;
shortNote = *it ;

View File

@@ -52,6 +52,7 @@
#include "effect_rack_view.h"
#include "embed.h"
#include "engine.h"
#include "fx_mixer_view.h"
#include "instrument_sound_shaping.h"
#include "instrument_sound_shaping_view.h"
#include "fade_button.h"
@@ -1014,7 +1015,20 @@ void instrumentTrackView::updateName( void )
class fxLineLcdSpinBox : public lcdSpinBox
{
public:
fxLineLcdSpinBox( int _num_digits, QWidget * _parent,
const QString & _name ) :
lcdSpinBox( _num_digits, _parent, _name ) {}
protected:
virtual void mouseDoubleClickEvent ( QMouseEvent * _me )
{
engine::getFxMixerView()->setCurrentFxLine( value() );
//engine::getFxMixerView()->raise();
}
};
@@ -1069,13 +1083,12 @@ instrumentTrackWindow::instrumentTrackWindow( instrumentTrackView * _itv ) :
// setup spinbox for selecting FX-channel
m_effectChannelNumber = new lcdSpinBox( 2, m_generalSettingsWidget,
m_effectChannelNumber = new fxLineLcdSpinBox( 2, m_generalSettingsWidget,
tr( "FX channel" ) );
m_effectChannelNumber->setLabel( tr( "FX CHNL" ) );
m_effectChannelNumber->move( m_panningKnob->x() +
m_panningKnob->width() + 16, 44 );
m_saveSettingsBtn = new QPushButton( embed::getIconPixmap(
"project_save" ), "",
m_generalSettingsWidget );