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:
@@ -17,6 +17,12 @@
|
||||
Made wet/dry knob do something. Acts as a nice panning knob when the
|
||||
matrix has the channels swapped.
|
||||
|
||||
* src/tracks/instrument_track.cpp:
|
||||
* src/gui/fx_mixer_view.cpp:
|
||||
* include/fx_mixer_view.h:
|
||||
- Made bank-buttons easier to hit
|
||||
- Double click on fx-channel LCD in ITW to warp to the proper FX-line
|
||||
|
||||
2008-04-20 Tobias Doerffel <tobydox/at/users/dot/sourceforge/dot/net>
|
||||
|
||||
* src/gui/widgets/group_box.cpp:
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
|
||||
|
||||
class QStackedLayout;
|
||||
class QButtonGroup;
|
||||
class fader;
|
||||
class fxLine;
|
||||
class effectRackView;
|
||||
@@ -51,6 +52,7 @@ public:
|
||||
return( m_currentFxLine );
|
||||
}
|
||||
void setCurrentFxLine( fxLine * _line );
|
||||
void setCurrentFxLine( int _line );
|
||||
|
||||
void clear( void );
|
||||
|
||||
@@ -73,6 +75,7 @@ private:
|
||||
|
||||
QStackedLayout * m_fxRacksLayout;
|
||||
QStackedLayout * m_fxLineBanks;
|
||||
QButtonGroup * m_bankButtons;
|
||||
fxLine * m_currentFxLine;
|
||||
|
||||
} ;
|
||||
|
||||
@@ -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 )
|
||||
{
|
||||
|
||||
@@ -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 ;
|
||||
|
||||
@@ -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 );
|
||||
|
||||
Reference in New Issue
Block a user