diff --git a/plugins/wtsynth/WTSynth.cpp b/plugins/wtsynth/WTSynth.cpp index 7b236507f..54e4580f1 100644 --- a/plugins/wtsynth/WTSynth.cpp +++ b/plugins/wtsynth/WTSynth.cpp @@ -838,33 +838,39 @@ WTSynthView::WTSynthView( Instrument * _instrument, // misc pushbuttons // waveform modifications + m_loadButton = new pixmapButton( this, tr( "Load waveform" ) ); + m_loadButton -> move ( 176, 121 ); + m_loadButton -> setActiveGraphic( PLUGIN_NAME::getIconPixmap( "load_active" ) ); + m_loadButton -> setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "load_inactive" ) ); + toolTip::add( m_loadButton, tr( "Click to load a waveform from a sample file" ) ); + m_phaseLeftButton = new pixmapButton( this, tr( "Phase left" ) ); - m_phaseLeftButton -> move ( 200, 121 ); + m_phaseLeftButton -> move ( 196, 121 ); m_phaseLeftButton -> setActiveGraphic( PLUGIN_NAME::getIconPixmap( "phl_active" ) ); m_phaseLeftButton -> setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "phl_inactive" ) ); toolTip::add( m_phaseLeftButton, tr( "Click to shift phase by -15 degrees" ) ); m_phaseRightButton = new pixmapButton( this, tr( "Phase right" ) ); - m_phaseRightButton -> move ( 216, 121 ); + m_phaseRightButton -> move ( 213, 121 ); m_phaseRightButton -> setActiveGraphic( PLUGIN_NAME::getIconPixmap( "phr_active" ) ); m_phaseRightButton -> setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "phr_inactive" ) ); toolTip::add( m_phaseRightButton, tr( "Click to shift phase by +15 degrees" ) ); m_normalizeButton = new pixmapButton( this, tr( "Normalize" ) ); - m_normalizeButton -> move ( 232, 121 ); + m_normalizeButton -> move ( 230, 121 ); m_normalizeButton -> setActiveGraphic( PLUGIN_NAME::getIconPixmap( "norm_active" ) ); m_normalizeButton -> setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "norm_inactive" ) ); toolTip::add( m_normalizeButton, tr( "Click to normalize" ) ); m_invertButton = new pixmapButton( this, tr( "Invert" ) ); - m_invertButton -> move ( 232, 138 ); + m_invertButton -> move ( 230, 138 ); m_invertButton -> setActiveGraphic( PLUGIN_NAME::getIconPixmap( "inv_active" ) ); m_invertButton -> setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "inv_inactive" ) ); toolTip::add( m_invertButton, tr( "Click to invert" ) ); m_smoothButton = new pixmapButton( this, tr( "Smooth" ) ); - m_smoothButton -> move ( 232, 155 ); + m_smoothButton -> move ( 230, 155 ); m_smoothButton -> setActiveGraphic( PLUGIN_NAME::getIconPixmap( "smooth_active" ) ); m_smoothButton -> setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "smooth_inactive" ) ); toolTip::add( m_smoothButton, tr( "Click to smooth" ) ); @@ -872,25 +878,25 @@ WTSynthView::WTSynthView( Instrument * _instrument, // waveforms m_sinWaveButton = new pixmapButton( this, tr( "Sine wave" ) ); - m_sinWaveButton -> move ( 232, 176 ); + m_sinWaveButton -> move ( 230, 176 ); m_sinWaveButton -> setActiveGraphic( PLUGIN_NAME::getIconPixmap( "sin_active" ) ); m_sinWaveButton -> setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "sin_inactive" ) ); toolTip::add( m_sinWaveButton, tr( "Click for sine wave" ) ); m_triWaveButton = new pixmapButton( this, tr( "Triangle wave" ) ); - m_triWaveButton -> move ( 232, 194 ); + m_triWaveButton -> move ( 230, 194 ); m_triWaveButton -> setActiveGraphic( PLUGIN_NAME::getIconPixmap( "tri_active" ) ); m_triWaveButton -> setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "tri_inactive" ) ); toolTip::add( m_triWaveButton, tr( "Click for triangle wave" ) ); m_sawWaveButton = new pixmapButton( this, tr( "Triangle wave" ) ); - m_sawWaveButton -> move ( 232, 212 ); + m_sawWaveButton -> move ( 230, 212 ); m_sawWaveButton -> setActiveGraphic( PLUGIN_NAME::getIconPixmap( "saw_active" ) ); m_sawWaveButton -> setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "saw_inactive" ) ); toolTip::add( m_sawWaveButton, tr( "Click for saw wave" ) ); m_sqrWaveButton = new pixmapButton( this, tr( "Square wave" ) ); - m_sqrWaveButton -> move ( 232, 230 ); + m_sqrWaveButton -> move ( 230, 230 ); m_sqrWaveButton -> setActiveGraphic( PLUGIN_NAME::getIconPixmap( "sqr_active" ) ); m_sqrWaveButton -> setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "sqr_inactive" ) ); toolTip::add( m_sqrWaveButton, tr( "Click for square wave" ) ); @@ -906,6 +912,7 @@ WTSynthView::WTSynthView( Instrument * _instrument, connect( m_smoothButton, SIGNAL( clicked() ), this, SLOT( smoothClicked() ) ); connect( m_phaseLeftButton, SIGNAL( clicked() ), this, SLOT( phaseLeftClicked() ) ); connect( m_phaseRightButton, SIGNAL( clicked() ), this, SLOT( phaseRightClicked() ) ); + connect( m_loadButton, SIGNAL( clicked() ), this, SLOT( loadClicked() ) ); connect( a1_selectButton, SIGNAL( clicked() ), this, SLOT( updateLayout() ) ); connect( a2_selectButton, SIGNAL( clicked() ), this, SLOT( updateLayout() ) ); @@ -1171,6 +1178,31 @@ void WTSynthView::phaseRightClicked() } +void WTSynthView::loadClicked() +{ + QString fileName; + switch( m_selectedGraphGroup->model()->value() ) + { + case A1_OSC: + a1_graph->model()->setWaveToUser(); + engine::getSong()->setModified(); + break; + case A2_OSC: + a2_graph->model()->setWaveToUser(); + engine::getSong()->setModified(); + break; + case B1_OSC: + b1_graph->model()->setWaveToUser(); + engine::getSong()->setModified(); + break; + case B2_OSC: + b2_graph->model()->setWaveToUser(); + engine::getSong()->setModified(); + break; + } +} + + void WTSynthView::modelChanged() { WTSynthInstrument * w = castModel(); diff --git a/plugins/wtsynth/WTSynth.h b/plugins/wtsynth/WTSynth.h index 3a3fe7d0b..df7aa908b 100644 --- a/plugins/wtsynth/WTSynth.h +++ b/plugins/wtsynth/WTSynth.h @@ -244,6 +244,7 @@ protected slots: void invertClicked(); void phaseLeftClicked(); void phaseRightClicked(); + void loadClicked(); private: virtual void modelChanged(); @@ -300,6 +301,7 @@ private: pixmapButton * m_smoothButton; pixmapButton * m_phaseLeftButton; pixmapButton * m_phaseRightButton; + pixmapButton * m_loadButton; }; diff --git a/plugins/wtsynth/inv_active.png b/plugins/wtsynth/inv_active.png index 791133686..31aacc621 100644 Binary files a/plugins/wtsynth/inv_active.png and b/plugins/wtsynth/inv_active.png differ diff --git a/plugins/wtsynth/inv_inactive.png b/plugins/wtsynth/inv_inactive.png index 06089449b..637bf5390 100644 Binary files a/plugins/wtsynth/inv_inactive.png and b/plugins/wtsynth/inv_inactive.png differ diff --git a/plugins/wtsynth/load_active.png b/plugins/wtsynth/load_active.png index a4d2f2d70..e704e1db1 100644 Binary files a/plugins/wtsynth/load_active.png and b/plugins/wtsynth/load_active.png differ diff --git a/plugins/wtsynth/load_inactive.png b/plugins/wtsynth/load_inactive.png index 1a69d8d51..93b1926c7 100644 Binary files a/plugins/wtsynth/load_inactive.png and b/plugins/wtsynth/load_inactive.png differ diff --git a/plugins/wtsynth/norm_active.png b/plugins/wtsynth/norm_active.png index bbf45313a..2795f2785 100644 Binary files a/plugins/wtsynth/norm_active.png and b/plugins/wtsynth/norm_active.png differ diff --git a/plugins/wtsynth/norm_inactive.png b/plugins/wtsynth/norm_inactive.png index 7a0bd937d..1fd29f4b7 100644 Binary files a/plugins/wtsynth/norm_inactive.png and b/plugins/wtsynth/norm_inactive.png differ diff --git a/plugins/wtsynth/phl_active.png b/plugins/wtsynth/phl_active.png index c2d0bede0..b4e34246d 100644 Binary files a/plugins/wtsynth/phl_active.png and b/plugins/wtsynth/phl_active.png differ diff --git a/plugins/wtsynth/phl_inactive.png b/plugins/wtsynth/phl_inactive.png index 1e2109a43..ef55ac066 100644 Binary files a/plugins/wtsynth/phl_inactive.png and b/plugins/wtsynth/phl_inactive.png differ diff --git a/plugins/wtsynth/phr_active.png b/plugins/wtsynth/phr_active.png index b7921ac11..9d22adae7 100644 Binary files a/plugins/wtsynth/phr_active.png and b/plugins/wtsynth/phr_active.png differ diff --git a/plugins/wtsynth/phr_inactive.png b/plugins/wtsynth/phr_inactive.png index 1d44b5b75..2ce5ccf85 100644 Binary files a/plugins/wtsynth/phr_inactive.png and b/plugins/wtsynth/phr_inactive.png differ diff --git a/plugins/wtsynth/saw_active.png b/plugins/wtsynth/saw_active.png index c5fd4dba6..da9dceef3 100644 Binary files a/plugins/wtsynth/saw_active.png and b/plugins/wtsynth/saw_active.png differ diff --git a/plugins/wtsynth/saw_inactive.png b/plugins/wtsynth/saw_inactive.png index 40b4abf5e..570dab73f 100644 Binary files a/plugins/wtsynth/saw_inactive.png and b/plugins/wtsynth/saw_inactive.png differ diff --git a/plugins/wtsynth/sin_active.png b/plugins/wtsynth/sin_active.png index de78b9877..c3cbffc43 100644 Binary files a/plugins/wtsynth/sin_active.png and b/plugins/wtsynth/sin_active.png differ diff --git a/plugins/wtsynth/sin_inactive.png b/plugins/wtsynth/sin_inactive.png index fc13e59aa..afa36345d 100644 Binary files a/plugins/wtsynth/sin_inactive.png and b/plugins/wtsynth/sin_inactive.png differ diff --git a/plugins/wtsynth/smooth_active.png b/plugins/wtsynth/smooth_active.png index 7da2cef11..e23abe245 100644 Binary files a/plugins/wtsynth/smooth_active.png and b/plugins/wtsynth/smooth_active.png differ diff --git a/plugins/wtsynth/smooth_inactive.png b/plugins/wtsynth/smooth_inactive.png index 791f48fed..7f9511427 100644 Binary files a/plugins/wtsynth/smooth_inactive.png and b/plugins/wtsynth/smooth_inactive.png differ diff --git a/plugins/wtsynth/sqr_active.png b/plugins/wtsynth/sqr_active.png index 11ade0c83..444bcead2 100644 Binary files a/plugins/wtsynth/sqr_active.png and b/plugins/wtsynth/sqr_active.png differ diff --git a/plugins/wtsynth/sqr_inactive.png b/plugins/wtsynth/sqr_inactive.png index 395e27608..c61f086a5 100644 Binary files a/plugins/wtsynth/sqr_inactive.png and b/plugins/wtsynth/sqr_inactive.png differ diff --git a/plugins/wtsynth/tri_active.png b/plugins/wtsynth/tri_active.png index c28c75e4a..690d1ebde 100644 Binary files a/plugins/wtsynth/tri_active.png and b/plugins/wtsynth/tri_active.png differ diff --git a/plugins/wtsynth/tri_inactive.png b/plugins/wtsynth/tri_inactive.png index 97814a5f7..1e8f13c5c 100644 Binary files a/plugins/wtsynth/tri_inactive.png and b/plugins/wtsynth/tri_inactive.png differ