upgraded buttons and button groups
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@194 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
@@ -101,7 +101,8 @@ tripleOscillator::tripleOscillator( instrumentTrack * _channel_track ) :
|
||||
setErasePixmap( PLUGIN_NAME::getIconPixmap( "artwork" ) );
|
||||
#endif
|
||||
|
||||
pixmapButton * pm_osc1_btn = new pixmapButton( this, eng() );
|
||||
pixmapButton * pm_osc1_btn = new pixmapButton( this, NULL, eng(),
|
||||
NULL );
|
||||
pm_osc1_btn->move( 80, 50 );
|
||||
pm_osc1_btn->setActiveGraphic( PLUGIN_NAME::getIconPixmap(
|
||||
"pm_active" ) );
|
||||
@@ -113,7 +114,8 @@ tripleOscillator::tripleOscillator( instrumentTrack * _channel_track ) :
|
||||
"modulating oscillator 2 with "
|
||||
"oscillator 1" ) );
|
||||
|
||||
pixmapButton * am_osc1_btn = new pixmapButton( this, eng() );
|
||||
pixmapButton * am_osc1_btn = new pixmapButton( this, NULL, eng(),
|
||||
NULL );
|
||||
am_osc1_btn->move( 120, 50 );
|
||||
am_osc1_btn->setActiveGraphic( PLUGIN_NAME::getIconPixmap(
|
||||
"am_active" ) );
|
||||
@@ -125,7 +127,8 @@ tripleOscillator::tripleOscillator( instrumentTrack * _channel_track ) :
|
||||
"modulating oscillator 2 with "
|
||||
"oscillator 1" ) );
|
||||
|
||||
pixmapButton * mix_osc1_btn = new pixmapButton( this, eng() );
|
||||
pixmapButton * mix_osc1_btn = new pixmapButton( this, NULL, eng(),
|
||||
NULL );
|
||||
mix_osc1_btn->move( 160, 50 );
|
||||
mix_osc1_btn->setActiveGraphic( PLUGIN_NAME::getIconPixmap(
|
||||
"mix_active" ) );
|
||||
@@ -135,7 +138,8 @@ tripleOscillator::tripleOscillator( instrumentTrack * _channel_track ) :
|
||||
"btn_mask" ).createHeuristicMask() ) );
|
||||
toolTip::add( mix_osc1_btn, tr( "mix output of oscillator 1 & 2" ) );
|
||||
|
||||
pixmapButton * sync_osc1_btn = new pixmapButton( this, eng() );
|
||||
pixmapButton * sync_osc1_btn = new pixmapButton( this, NULL, eng(),
|
||||
NULL );
|
||||
sync_osc1_btn->move( 200, 50 );
|
||||
sync_osc1_btn->setActiveGraphic( PLUGIN_NAME::getIconPixmap(
|
||||
"sync_active" ) );
|
||||
@@ -146,7 +150,8 @@ tripleOscillator::tripleOscillator( instrumentTrack * _channel_track ) :
|
||||
toolTip::add( sync_osc1_btn, tr( "synchronize oscillator 1 with "
|
||||
"oscillator 2" ) );
|
||||
|
||||
pixmapButton * fm_osc1_btn = new pixmapButton( this, eng() );
|
||||
pixmapButton * fm_osc1_btn = new pixmapButton( this, NULL, eng(),
|
||||
NULL );
|
||||
fm_osc1_btn->move( 330, 50 );
|
||||
fm_osc1_btn->setActiveGraphic( PLUGIN_NAME::getIconPixmap(
|
||||
"fm_active" ) );
|
||||
@@ -158,7 +163,9 @@ tripleOscillator::tripleOscillator( instrumentTrack * _channel_track ) :
|
||||
"modulating oscillator 2 with "
|
||||
"oscillator 1" ) );
|
||||
|
||||
m_mod1BtnGrp = new automatableButtonGroup( this, eng() );
|
||||
m_mod1BtnGrp = new automatableButtonGroup( this,
|
||||
tr( "Modulation type 1" ),
|
||||
eng(), _channel_track );
|
||||
m_mod1BtnGrp->addButton( pm_osc1_btn );
|
||||
m_mod1BtnGrp->addButton( am_osc1_btn );
|
||||
m_mod1BtnGrp->addButton( mix_osc1_btn );
|
||||
@@ -170,7 +177,8 @@ tripleOscillator::tripleOscillator( instrumentTrack * _channel_track ) :
|
||||
this, SLOT( mod1Ch( int ) ) );
|
||||
|
||||
|
||||
pixmapButton * pm_osc2_btn = new pixmapButton( this, eng() );
|
||||
pixmapButton * pm_osc2_btn = new pixmapButton( this, NULL, eng(),
|
||||
NULL );
|
||||
pm_osc2_btn->move( 80, 70 );
|
||||
pm_osc2_btn->setActiveGraphic( PLUGIN_NAME::getIconPixmap(
|
||||
"pm_active" ) );
|
||||
@@ -182,7 +190,8 @@ tripleOscillator::tripleOscillator( instrumentTrack * _channel_track ) :
|
||||
"modulating oscillator 3 with "
|
||||
"oscillator 2" ) );
|
||||
|
||||
pixmapButton * am_osc2_btn = new pixmapButton( this, eng() );
|
||||
pixmapButton * am_osc2_btn = new pixmapButton( this, NULL, eng(),
|
||||
NULL );
|
||||
am_osc2_btn->move( 120, 70 );
|
||||
am_osc2_btn->setActiveGraphic( PLUGIN_NAME::getIconPixmap(
|
||||
"am_active" ) );
|
||||
@@ -194,7 +203,8 @@ tripleOscillator::tripleOscillator( instrumentTrack * _channel_track ) :
|
||||
"modulating oscillator 3 with "
|
||||
"oscillator 2" ) );
|
||||
|
||||
pixmapButton * mix_osc2_btn = new pixmapButton( this, eng() );
|
||||
pixmapButton * mix_osc2_btn = new pixmapButton( this, NULL, eng(),
|
||||
NULL );
|
||||
mix_osc2_btn->move( 160, 70 );
|
||||
mix_osc2_btn->setActiveGraphic( PLUGIN_NAME::getIconPixmap(
|
||||
"mix_active" ) );
|
||||
@@ -204,7 +214,8 @@ tripleOscillator::tripleOscillator( instrumentTrack * _channel_track ) :
|
||||
"btn_mask" ).createHeuristicMask() ) );
|
||||
toolTip::add( mix_osc2_btn, tr("mix output of oscillator 2 & 3" ) );
|
||||
|
||||
pixmapButton * sync_osc2_btn = new pixmapButton( this, eng() );
|
||||
pixmapButton * sync_osc2_btn = new pixmapButton( this, NULL, eng(),
|
||||
NULL );
|
||||
sync_osc2_btn->move( 200, 70 );
|
||||
sync_osc2_btn->setActiveGraphic( PLUGIN_NAME::getIconPixmap(
|
||||
"sync_active" ) );
|
||||
@@ -215,7 +226,8 @@ tripleOscillator::tripleOscillator( instrumentTrack * _channel_track ) :
|
||||
toolTip::add( sync_osc2_btn, tr( "synchronize oscillator 2 with "
|
||||
"oscillator 3" ) );
|
||||
|
||||
pixmapButton * fm_osc2_btn = new pixmapButton( this, eng() );
|
||||
pixmapButton * fm_osc2_btn = new pixmapButton( this, NULL, eng(),
|
||||
NULL );
|
||||
fm_osc2_btn->move( 330, 70 );
|
||||
fm_osc2_btn->setActiveGraphic( PLUGIN_NAME::getIconPixmap(
|
||||
"fm_active" ) );
|
||||
@@ -227,7 +239,9 @@ tripleOscillator::tripleOscillator( instrumentTrack * _channel_track ) :
|
||||
"modulating oscillator 3 with "
|
||||
"oscillator 2" ) );
|
||||
|
||||
m_mod2BtnGrp = new automatableButtonGroup( this, eng() );
|
||||
m_mod2BtnGrp = new automatableButtonGroup( this,
|
||||
tr( "Modulation type 2" ),
|
||||
eng(), _channel_track );
|
||||
m_mod2BtnGrp->addButton( pm_osc2_btn );
|
||||
m_mod2BtnGrp->addButton( am_osc2_btn );
|
||||
m_mod2BtnGrp->addButton( mix_osc2_btn );
|
||||
@@ -451,7 +465,8 @@ tripleOscillator::tripleOscillator( instrumentTrack * _channel_track ) :
|
||||
updatePhaseOffsetLeft( i );
|
||||
updatePhaseOffsetRight( i );
|
||||
|
||||
pixmapButton * sin_wave_btn = new pixmapButton( this, eng() );
|
||||
pixmapButton * sin_wave_btn = new pixmapButton( this, NULL,
|
||||
eng(), NULL );
|
||||
sin_wave_btn->move( 188, 105 + i * 50 );
|
||||
sin_wave_btn->setActiveGraphic( embed::getIconPixmap(
|
||||
"sin_wave_active" ) );
|
||||
@@ -462,7 +477,8 @@ tripleOscillator::tripleOscillator( instrumentTrack * _channel_track ) :
|
||||
tr( "Click here if you want a sine-wave for "
|
||||
"current oscillator." ) );
|
||||
|
||||
pixmapButton * triangle_wave_btn = new pixmapButton( this, eng() );
|
||||
pixmapButton * triangle_wave_btn = new pixmapButton( this, NULL,
|
||||
eng(), NULL );
|
||||
triangle_wave_btn->move( 203, 105 + i * 50 );
|
||||
triangle_wave_btn->setActiveGraphic(
|
||||
embed::getIconPixmap( "triangle_wave_active" ) );
|
||||
@@ -472,7 +488,8 @@ tripleOscillator::tripleOscillator( instrumentTrack * _channel_track ) :
|
||||
tr( "Click here if you want a triangle-wave "
|
||||
"for current oscillator." ) );
|
||||
|
||||
pixmapButton * saw_wave_btn = new pixmapButton( this, eng() );
|
||||
pixmapButton * saw_wave_btn = new pixmapButton( this, NULL,
|
||||
eng(), NULL );
|
||||
saw_wave_btn->move( 218, 105 + i * 50 );
|
||||
saw_wave_btn->setActiveGraphic( embed::getIconPixmap(
|
||||
"saw_wave_active" ) );
|
||||
@@ -482,7 +499,8 @@ tripleOscillator::tripleOscillator( instrumentTrack * _channel_track ) :
|
||||
tr( "Click here if you want a saw-wave for "
|
||||
"current oscillator." ) );
|
||||
|
||||
pixmapButton * sqr_wave_btn = new pixmapButton( this, eng() );
|
||||
pixmapButton * sqr_wave_btn = new pixmapButton( this, NULL,
|
||||
eng(), NULL );
|
||||
sqr_wave_btn->move( 233, 105 + i * 50 );
|
||||
sqr_wave_btn->setActiveGraphic( embed::getIconPixmap(
|
||||
"square_wave_active" ) );
|
||||
@@ -492,7 +510,8 @@ tripleOscillator::tripleOscillator( instrumentTrack * _channel_track ) :
|
||||
tr( "Click here if you want a square-wave for "
|
||||
"current oscillator." ) );
|
||||
|
||||
pixmapButton * moog_saw_wave_btn = new pixmapButton( this, eng() );
|
||||
pixmapButton * moog_saw_wave_btn = new pixmapButton( this, NULL,
|
||||
eng(), NULL );
|
||||
moog_saw_wave_btn->move( 188, 120+i*50 );
|
||||
moog_saw_wave_btn->setActiveGraphic(
|
||||
embed::getIconPixmap( "moog_saw_wave_active" ) );
|
||||
@@ -502,7 +521,8 @@ tripleOscillator::tripleOscillator( instrumentTrack * _channel_track ) :
|
||||
tr( "Click here if you want a moog-saw-wave "
|
||||
"for current oscillator." ) );
|
||||
|
||||
pixmapButton * exp_wave_btn = new pixmapButton( this, eng() );
|
||||
pixmapButton * exp_wave_btn = new pixmapButton( this, NULL,
|
||||
eng(), NULL );
|
||||
exp_wave_btn->move( 203, 120+i*50 );
|
||||
exp_wave_btn->setActiveGraphic( embed::getIconPixmap(
|
||||
"exp_wave_active" ) );
|
||||
@@ -512,7 +532,8 @@ tripleOscillator::tripleOscillator( instrumentTrack * _channel_track ) :
|
||||
tr( "Click here if you want an exponential "
|
||||
"wave for current oscillator." ) );
|
||||
|
||||
pixmapButton * white_noise_btn = new pixmapButton( this, eng() );
|
||||
pixmapButton * white_noise_btn = new pixmapButton( this, NULL,
|
||||
eng(), NULL );
|
||||
white_noise_btn->move( 218, 120+i*50 );
|
||||
white_noise_btn->setActiveGraphic(
|
||||
embed::getIconPixmap( "white_noise_wave_active" ) );
|
||||
@@ -522,7 +543,8 @@ tripleOscillator::tripleOscillator( instrumentTrack * _channel_track ) :
|
||||
tr( "Click here if you want a white-noise for "
|
||||
"current oscillator." ) );
|
||||
|
||||
m_osc[i].usrWaveBtn = new pixmapButton( this, eng() );
|
||||
m_osc[i].usrWaveBtn = new pixmapButton( this, NULL, eng(),
|
||||
NULL );
|
||||
m_osc[i].usrWaveBtn->move( 233, 120+i*50 );
|
||||
m_osc[i].usrWaveBtn->setActiveGraphic( embed::getIconPixmap(
|
||||
"usr_wave_active" ) );
|
||||
@@ -532,7 +554,9 @@ tripleOscillator::tripleOscillator( instrumentTrack * _channel_track ) :
|
||||
tr( "Click here if you want a user-defined "
|
||||
"wave-shape for current oscillator." ) );
|
||||
|
||||
m_osc[i].waveBtnGrp = new automatableButtonGroup( this, eng() );
|
||||
m_osc[i].waveBtnGrp = new automatableButtonGroup( this,
|
||||
tr( "Osc %1 wave shape" ).arg( i + 1 ),
|
||||
eng(), _channel_track );
|
||||
m_osc[i].waveBtnGrp->addButton( sin_wave_btn );
|
||||
m_osc[i].waveBtnGrp->addButton( triangle_wave_btn );
|
||||
m_osc[i].waveBtnGrp->addButton( saw_wave_btn );
|
||||
@@ -591,8 +615,8 @@ tripleOscillator::~tripleOscillator()
|
||||
|
||||
void tripleOscillator::saveSettings( QDomDocument & _doc, QDomElement & _this )
|
||||
{
|
||||
_this.setAttribute( "modalgo1", QString::number( m_modulationAlgo1 ) );
|
||||
_this.setAttribute( "modalgo2", QString::number( m_modulationAlgo2 ) );
|
||||
m_mod1BtnGrp->saveSettings( _doc, _this, "modalgo1" );
|
||||
m_mod2BtnGrp->saveSettings( _doc, _this, "modalgo2" );
|
||||
|
||||
for( int i = 0; i < NUM_OF_OSCILLATORS; ++i )
|
||||
{
|
||||
@@ -606,8 +630,8 @@ void tripleOscillator::saveSettings( QDomDocument & _doc, QDomElement & _this )
|
||||
"phoffset" + is );
|
||||
m_osc[i].stereoPhaseDetuningKnob->saveSettings( _doc, _this,
|
||||
"stphdetun" + is );
|
||||
_this.setAttribute( "wavetype" + is, QString::number(
|
||||
m_osc[i].waveShape ) );
|
||||
m_osc[i].waveBtnGrp->saveSettings( _doc, _this,
|
||||
"wavetype" + is );
|
||||
_this.setAttribute( "userwavefile" + is,
|
||||
m_osc[i].m_sampleBuffer->audioFile() );
|
||||
}
|
||||
@@ -618,13 +642,8 @@ void tripleOscillator::saveSettings( QDomDocument & _doc, QDomElement & _this )
|
||||
|
||||
void tripleOscillator::loadSettings( const QDomElement & _this )
|
||||
{
|
||||
m_modulationAlgo1 = static_cast<oscillator::modulationAlgos>(
|
||||
_this.attribute( "modalgo1" ).toInt() );
|
||||
m_modulationAlgo2 = static_cast<oscillator::modulationAlgos>(
|
||||
_this.attribute( "modalgo2" ).toInt() );
|
||||
|
||||
m_mod1BtnGrp->setInitValue( m_modulationAlgo1 );
|
||||
m_mod2BtnGrp->setInitValue( m_modulationAlgo2 );
|
||||
m_mod1BtnGrp->loadSettings( _this, "modalgo1" );
|
||||
m_mod2BtnGrp->loadSettings( _this, "modalgo2" );
|
||||
|
||||
for( int i = 0; i < NUM_OF_OSCILLATORS; ++i )
|
||||
{
|
||||
@@ -640,8 +659,7 @@ void tripleOscillator::loadSettings( const QDomElement & _this )
|
||||
"stphdetun" + is );
|
||||
m_osc[i].m_sampleBuffer->setAudioFile( _this.attribute(
|
||||
"userwavefile" + is ) );
|
||||
m_osc[i].waveBtnGrp->setValue( _this.attribute( "wavetype" +
|
||||
is ).toInt() );
|
||||
m_osc[i].waveBtnGrp->loadSettings( _this, "wavetype" + is );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -198,7 +198,8 @@ arpAndChordsTabWidget::arpAndChordsTabWidget( instrumentTrack * _instrument_trac
|
||||
QWidget( _instrument_track->tabWidgetParent() ),
|
||||
journallingObject( _instrument_track->eng() )
|
||||
{
|
||||
m_chordsGroupBox = new groupBox( tr( "CHORDS" ), this, eng() );
|
||||
m_chordsGroupBox = new groupBox( tr( "CHORDS" ), this, eng(),
|
||||
_instrument_track );
|
||||
m_chordsGroupBox->setGeometry( CHORDS_GROUPBOX_X, CHORDS_GROUPBOX_Y,
|
||||
CHORDS_GROUPBOX_WIDTH,
|
||||
CHORDS_GROUPBOX_HEIGHT );
|
||||
@@ -237,7 +238,8 @@ arpAndChordsTabWidget::arpAndChordsTabWidget( instrumentTrack * _instrument_trac
|
||||
|
||||
|
||||
|
||||
m_arpGroupBox = new groupBox( tr( "ARPEGGIO" ), this, eng() );
|
||||
m_arpGroupBox = new groupBox( tr( "ARPEGGIO" ), this, eng(),
|
||||
_instrument_track );
|
||||
m_arpGroupBox->setGeometry( ARP_GROUPBOX_X, ARP_GROUPBOX_Y,
|
||||
ARP_GROUPBOX_WIDTH,
|
||||
ARP_GROUPBOX_HEIGHT );
|
||||
@@ -329,7 +331,8 @@ arpAndChordsTabWidget::arpAndChordsTabWidget( instrumentTrack * _instrument_trac
|
||||
|
||||
|
||||
|
||||
pixmapButton * arp_up_btn = new pixmapButton( m_arpGroupBox, eng() );
|
||||
pixmapButton * arp_up_btn = new pixmapButton( m_arpGroupBox, NULL,
|
||||
eng(), NULL );
|
||||
arp_up_btn->move( 10, 74 );
|
||||
arp_up_btn->setActiveGraphic( embed::getIconPixmap( "arp_up_on" ) );
|
||||
arp_up_btn->setInactiveGraphic( embed::getIconPixmap( "arp_up_off" ) );
|
||||
@@ -339,7 +342,8 @@ arpAndChordsTabWidget::arpAndChordsTabWidget( instrumentTrack * _instrument_trac
|
||||
toolTip::add( arp_up_btn, tr( "arpeggio direction = up" ) );
|
||||
|
||||
|
||||
pixmapButton * arp_down_btn = new pixmapButton( m_arpGroupBox, eng() );
|
||||
pixmapButton * arp_down_btn = new pixmapButton( m_arpGroupBox, NULL,
|
||||
eng(), NULL );
|
||||
arp_down_btn->move( 30, 74 );
|
||||
arp_down_btn->setActiveGraphic( embed::getIconPixmap( "arp_down_on" ) );
|
||||
arp_down_btn->setInactiveGraphic( embed::getIconPixmap(
|
||||
@@ -351,7 +355,7 @@ arpAndChordsTabWidget::arpAndChordsTabWidget( instrumentTrack * _instrument_trac
|
||||
|
||||
|
||||
pixmapButton * arp_up_and_down_btn = new pixmapButton( m_arpGroupBox,
|
||||
eng() );
|
||||
NULL, eng(), NULL );
|
||||
arp_up_and_down_btn->move( 50, 74 );
|
||||
arp_up_and_down_btn->setActiveGraphic( embed::getIconPixmap(
|
||||
"arp_up_and_down_on" ) );
|
||||
@@ -364,8 +368,8 @@ arpAndChordsTabWidget::arpAndChordsTabWidget( instrumentTrack * _instrument_trac
|
||||
tr( "arpeggio direction = up and down" ) );
|
||||
|
||||
|
||||
pixmapButton * arp_random_btn = new pixmapButton( m_arpGroupBox,
|
||||
eng() );
|
||||
pixmapButton * arp_random_btn = new pixmapButton( m_arpGroupBox, NULL,
|
||||
eng(), NULL );
|
||||
arp_random_btn->move( 70, 74 );
|
||||
arp_random_btn->setActiveGraphic( embed::getIconPixmap(
|
||||
"arp_random_on" ) );
|
||||
@@ -376,7 +380,9 @@ arpAndChordsTabWidget::arpAndChordsTabWidget( instrumentTrack * _instrument_trac
|
||||
#endif
|
||||
toolTip::add( arp_random_btn, tr( "arpeggio direction = random" ) );
|
||||
|
||||
m_arpDirectionBtnGrp = new automatableButtonGroup( this, eng() );
|
||||
m_arpDirectionBtnGrp = new automatableButtonGroup( this,
|
||||
tr( "Arpeggio direction" ),
|
||||
eng(), _instrument_track );
|
||||
m_arpDirectionBtnGrp->addButton( arp_up_btn );
|
||||
m_arpDirectionBtnGrp->addButton( arp_down_btn );
|
||||
m_arpDirectionBtnGrp->addButton( arp_up_and_down_btn );
|
||||
@@ -660,7 +666,7 @@ void arpAndChordsTabWidget::saveSettings( QDomDocument & _doc,
|
||||
m_arpRangeKnob->saveSettings( _doc, _this, "arprange" );
|
||||
m_arpTimeKnob->saveSettings( _doc, _this, "arptime" );
|
||||
m_arpGateKnob->saveSettings( _doc, _this, "arpgate" );
|
||||
_this.setAttribute( "arpdir", m_arpDirectionBtnGrp->value() + 1 );
|
||||
m_arpDirectionBtnGrp->saveSettings( _doc, _this, "arpdir" );
|
||||
_this.setAttribute( "arpsyncmode",
|
||||
( int ) m_arpTimeKnob->getSyncMode() );
|
||||
|
||||
@@ -680,8 +686,15 @@ void arpAndChordsTabWidget::loadSettings( const QDomElement & _this )
|
||||
m_arpRangeKnob->loadSettings( _this, "arprange" );
|
||||
m_arpTimeKnob->loadSettings( _this, "arptime" );
|
||||
m_arpGateKnob->loadSettings( _this, "arpgate" );
|
||||
m_arpDirectionBtnGrp->setInitValue(
|
||||
if( _this.hasAttribute( "arpdir" ) )
|
||||
{
|
||||
m_arpDirectionBtnGrp->setInitValue(
|
||||
_this.attribute( "arpdir" ).toInt() - 1 );
|
||||
}
|
||||
else
|
||||
{
|
||||
m_arpDirectionBtnGrp->loadSettings( _this, "arpdir" );
|
||||
}
|
||||
m_arpTimeKnob->setSyncMode(
|
||||
( tempoSyncKnob::tempoSyncMode ) _this.attribute(
|
||||
"arpsyncmode" ).toInt() );
|
||||
|
||||
@@ -356,7 +356,8 @@ envelopeAndLFOWidget::envelopeAndLFOWidget( float _value_for_zero_amount,
|
||||
SLOT( updateAfterKnobChange( float ) ) );
|
||||
|
||||
|
||||
pixmapButton * sin_lfo_btn = new pixmapButton( this, eng() );
|
||||
pixmapButton * sin_lfo_btn = new pixmapButton( this, NULL, eng(),
|
||||
NULL );
|
||||
sin_lfo_btn->move( LFO_SHAPES_X, LFO_SHAPES_Y );
|
||||
sin_lfo_btn->setActiveGraphic( embed::getIconPixmap(
|
||||
"sin_wave_active" ) );
|
||||
@@ -370,7 +371,8 @@ envelopeAndLFOWidget::envelopeAndLFOWidget( float _value_for_zero_amount,
|
||||
tr( "Click here if you want a sine-wave for current "
|
||||
"oscillator." ) );
|
||||
|
||||
pixmapButton * triangle_lfo_btn = new pixmapButton( this, eng() );
|
||||
pixmapButton * triangle_lfo_btn = new pixmapButton( this, NULL, eng(),
|
||||
NULL );
|
||||
triangle_lfo_btn->move( LFO_SHAPES_X+15, LFO_SHAPES_Y );
|
||||
triangle_lfo_btn->setActiveGraphic( embed::getIconPixmap(
|
||||
"triangle_wave_active" ) );
|
||||
@@ -384,7 +386,8 @@ envelopeAndLFOWidget::envelopeAndLFOWidget( float _value_for_zero_amount,
|
||||
tr( "Click here if you want a triangle-wave for current "
|
||||
"oscillator." ) );
|
||||
|
||||
pixmapButton * saw_lfo_btn = new pixmapButton( this, eng() );
|
||||
pixmapButton * saw_lfo_btn = new pixmapButton( this, NULL, eng(),
|
||||
NULL );
|
||||
saw_lfo_btn->move( LFO_SHAPES_X+30, LFO_SHAPES_Y );
|
||||
saw_lfo_btn->setActiveGraphic( embed::getIconPixmap(
|
||||
"saw_wave_active" ) );
|
||||
@@ -398,7 +401,8 @@ envelopeAndLFOWidget::envelopeAndLFOWidget( float _value_for_zero_amount,
|
||||
tr( "Click here if you want a saw-wave for current "
|
||||
"oscillator." ) );
|
||||
|
||||
pixmapButton * sqr_lfo_btn = new pixmapButton( this, eng() );
|
||||
pixmapButton * sqr_lfo_btn = new pixmapButton( this, NULL, eng(),
|
||||
NULL );
|
||||
sqr_lfo_btn->move( LFO_SHAPES_X+45, LFO_SHAPES_Y );
|
||||
sqr_lfo_btn->setActiveGraphic( embed::getIconPixmap(
|
||||
"square_wave_active" ) );
|
||||
@@ -412,7 +416,7 @@ envelopeAndLFOWidget::envelopeAndLFOWidget( float _value_for_zero_amount,
|
||||
tr( "Click here if you want a square-wave for current "
|
||||
"oscillator." ) );
|
||||
|
||||
m_userLfoBtn = new pixmapButton( this, eng() );
|
||||
m_userLfoBtn = new pixmapButton( this, NULL, eng(), NULL );
|
||||
m_userLfoBtn->move( LFO_SHAPES_X+60, LFO_SHAPES_Y );
|
||||
m_userLfoBtn->setActiveGraphic( embed::getIconPixmap(
|
||||
"usr_wave_active" ) );
|
||||
@@ -430,7 +434,9 @@ envelopeAndLFOWidget::envelopeAndLFOWidget( float _value_for_zero_amount,
|
||||
connect( m_userLfoBtn, SIGNAL( toggled( bool ) ), this,
|
||||
SLOT( lfoUserWaveCh( bool ) ) );
|
||||
|
||||
m_lfoWaveBtnGrp = new automatableButtonGroup( this, eng() );
|
||||
m_lfoWaveBtnGrp = new automatableButtonGroup( this,
|
||||
tr( "LFO wave shape" ),
|
||||
eng(), _track );
|
||||
m_lfoWaveBtnGrp->addButton( sin_lfo_btn );
|
||||
m_lfoWaveBtnGrp->addButton( triangle_lfo_btn );
|
||||
m_lfoWaveBtnGrp->addButton( saw_lfo_btn );
|
||||
@@ -441,7 +447,8 @@ envelopeAndLFOWidget::envelopeAndLFOWidget( float _value_for_zero_amount,
|
||||
connect( m_lfoWaveBtnGrp, SIGNAL( valueChanged( int ) ),
|
||||
SLOT( lfoWaveCh( int ) ) );
|
||||
|
||||
m_x100Cb = new ledCheckBox( tr( "FREQ x 100" ), this, eng() );
|
||||
m_x100Cb = new ledCheckBox( tr( "FREQ x 100" ), this,
|
||||
tr( "Freq x 100" ), eng(), _track );
|
||||
m_x100Cb->setFont( pointSize<6>( m_x100Cb->font() ) );
|
||||
m_x100Cb->move( LFO_PREDELAY_KNOB_X, LFO_GRAPH_Y + 36 );
|
||||
#ifdef QT4
|
||||
@@ -457,7 +464,8 @@ envelopeAndLFOWidget::envelopeAndLFOWidget( float _value_for_zero_amount,
|
||||
|
||||
|
||||
m_controlEnvAmountCb = new ledCheckBox( tr( "MODULATE ENV-AMOUNT" ),
|
||||
this, eng() );
|
||||
this, tr( "Modulate Env-Amount" ),
|
||||
eng(), _track );
|
||||
m_controlEnvAmountCb->move( LFO_PREDELAY_KNOB_X, LFO_GRAPH_Y + 54 );
|
||||
m_controlEnvAmountCb->setFont( pointSize<6>(
|
||||
m_controlEnvAmountCb->font() ) );
|
||||
@@ -604,13 +612,13 @@ void envelopeAndLFOWidget::saveSettings( QDomDocument & _doc,
|
||||
m_sustainKnob->saveSettings( _doc, _parent, "sus" );
|
||||
m_releaseKnob->saveSettings( _doc, _parent, "rel" );
|
||||
m_amountKnob->saveSettings( _doc, _parent, "amt" );
|
||||
_parent.setAttribute( "lshp", m_lfoShape );
|
||||
m_lfoWaveBtnGrp->saveSettings( _doc, _parent, "lshp" );
|
||||
m_lfoPredelayKnob->saveSettings( _doc, _parent, "lpdel" );
|
||||
m_lfoAttackKnob->saveSettings( _doc, _parent, "latt" );
|
||||
m_lfoSpeedKnob->saveSettings( _doc, _parent, "lspd" );
|
||||
m_lfoAmountKnob->saveSettings( _doc, _parent, "lamt" );
|
||||
_parent.setAttribute( "x100", m_x100Cb->isChecked() );
|
||||
_parent.setAttribute( "ctlenvamt", m_controlEnvAmountCb->isChecked() );
|
||||
m_x100Cb->saveSettings( _doc, _parent, "x100" );
|
||||
m_controlEnvAmountCb->saveSettings( _doc, _parent, "ctlenvamt" );
|
||||
_parent.setAttribute( "lfosyncmode",
|
||||
( int ) m_lfoSpeedKnob->getSyncMode() );
|
||||
_parent.setAttribute( "userwavefile", m_userWave.audioFile() );
|
||||
@@ -630,18 +638,13 @@ void envelopeAndLFOWidget::loadSettings( const QDomElement & _this )
|
||||
m_sustainKnob->loadSettings( _this, "sus" );
|
||||
m_releaseKnob->loadSettings( _this, "rel" );
|
||||
m_amountKnob->loadSettings( _this, "amt" );
|
||||
|
||||
m_lfoShape = static_cast<lfoShapes>( _this.attribute(
|
||||
"lshp" ).toInt() );
|
||||
m_lfoWaveBtnGrp->setValue( m_lfoShape );
|
||||
|
||||
m_lfoWaveBtnGrp->loadSettings( _this, "lshp" );
|
||||
m_lfoPredelayKnob->loadSettings( _this, "lpdel" );
|
||||
m_lfoAttackKnob->loadSettings( _this, "latt" );
|
||||
m_lfoSpeedKnob->loadSettings( _this, "lspd" );
|
||||
m_lfoAmountKnob->loadSettings( _this, "lamt" );
|
||||
m_x100Cb->setChecked( _this.attribute( "x100" ).toInt() );
|
||||
m_controlEnvAmountCb->setChecked( _this.attribute(
|
||||
"ctlenvamt" ).toInt() );
|
||||
m_x100Cb->loadSettings( _this, "x100" );
|
||||
m_controlEnvAmountCb->loadSettings( _this, "ctlenvamt" );
|
||||
m_lfoSpeedKnob->setSyncMode(
|
||||
( tempoSyncKnob::tempoSyncMode ) _this.attribute(
|
||||
"lfosyncmode" ).toInt() );
|
||||
|
||||
Reference in New Issue
Block a user