Changeset 605
- Timestamp:
- 10/30/08 12:40:42 (5 years ago)
- Location:
- branches/new_fx_rack_and_sample_fun/gui/src
- Files:
-
- 3 added
- 4 modified
-
HydrogenApp.cpp (modified) (7 diffs)
-
HydrogenApp.h (modified) (5 diffs)
-
InstrumentEditor/InstrumentEditor.cpp (modified) (2 diffs)
-
InstrumentEditor/InstrumentEditor.h (modified) (1 diff)
-
SampleEditor/SampleEditor.cpp (added)
-
SampleEditor/SampleEditor.h (added)
-
SampleEditor/SampleEditor_UI.ui (added)
Legend:
- Unmodified
- Added
- Removed
-
branches/new_fx_rack_and_sample_fun/gui/src/HydrogenApp.cpp
r570 r605 38 38 #include "SongEditor/SongEditorPanel.h" 39 39 #include "PlaylistEditor/PlaylistDialog.h" 40 //#include "AudioFileBrowser/AudioFileBrowser.h"40 #include "SampleEditor/SampleEditor.h" 41 41 42 42 #include "Mixer/Mixer.h" … … 66 66 , m_pPlayerControl( NULL ) 67 67 , m_pPlaylistDialog( NULL ) 68 // , m_pAudioFileBrowser( NULL )68 , m_pSampleEditor( NULL ) 69 69 70 70 { … … 100 100 } 101 101 102 m_pPlaylistDialog = new PlaylistDialog( 0 );103 // m_pAudioFileBrowser = new AudioFileBrowser( 0 );102 m_pPlaylistDialog = new PlaylistDialog( 0 ); 103 // m_pSampleEditor = new SampleEditor( 0 ); 104 104 105 105 showInfoSplash(); // First time information … … 117 117 delete m_pMixer; 118 118 delete m_pPlaylistDialog; 119 // delete m_pAudioFileBrowser;119 delete m_pSampleEditor; 120 120 121 121 Hydrogen *engine = Hydrogen::get_instance(); … … 132 132 } 133 133 #endif 134 135 134 136 } 135 137 … … 250 252 } 251 253 254 255 252 256 void HydrogenApp::setSong(Song* song) 253 257 { … … 316 320 } 317 321 318 //void HydrogenApp::showAudioFileBrowser() 319 //{ 320 // m_pAudioFileBrowser->hide(); 321 // m_pAudioFileBrowser->show(); 322 //} 322 323 324 void HydrogenApp::showSampleEditor( QString name ) 325 { 326 if ( m_pSampleEditor ){ 327 if ( m_pSampleEditor->m_pSampleEditorStatus == false ){ 328 m_pSampleEditor->show(); 329 bool close = m_pSampleEditor->getCloseQuestion(); 330 if ( close ){ 331 delete m_pSampleEditor; 332 }else 333 { 334 return; 335 } 336 }else 337 { 338 delete m_pSampleEditor; 339 } 340 } 341 342 m_pSampleEditor = new SampleEditor( 0 ); 343 m_pSampleEditor->show(); 344 m_pSampleEditor->setSampleName( name ); 345 } 346 347 323 348 324 349 void HydrogenApp::showInfoSplash() -
branches/new_fx_rack_and_sample_fun/gui/src/HydrogenApp.h
r570 r605 54 54 class InstrumentRack; 55 55 class PlaylistDialog; 56 //class AudioFileBrowser;56 class SampleEditor; 57 57 58 58 class HydrogenApp : public QObject, public Object … … 73 73 void showAudioEngineInfoForm(); 74 74 void showPlaylistDialog(); 75 // void showAudioFileBrowser();75 void showSampleEditor( QString name ); 76 76 77 77 Mixer* getMixer() { return m_pMixer; } … … 80 80 AudioEngineInfoForm* getAudioEngineInfoForm() { return m_pAudioEngineInfoForm; } 81 81 PlaylistDialog* getPlayListDialog() { return m_pPlaylistDialog; } 82 // AudioFileBrowser* getAudioFileBrowser() { return m_pAudioFileBrowser; }82 SampleEditor* getSampleEditor() { return m_pSampleEditor; } 83 83 SimpleHTMLBrowser* getHelpBrowser() { return m_pHelpBrowser; } 84 84 PatternEditorPanel* getPatternEditorPanel() { return m_pPatternEditorPanel; } … … 108 108 LadspaFXProperties *m_pLadspaFXProperties[MAX_FX]; 109 109 #endif 110 111 110 MainForm *m_pMainForm; 112 111 Mixer *m_pMixer; … … 119 118 PlayerControl *m_pPlayerControl; 120 119 PlaylistDialog *m_pPlaylistDialog; 121 // AudioFileBrowser *m_pAudioFileBrowser;120 SampleEditor *m_pSampleEditor; 122 121 123 122 QTimer *m_pEventQueueTimer; -
branches/new_fx_rack_and_sample_fun/gui/src/InstrumentEditor/InstrumentEditor.cpp
r599 r605 216 216 ); 217 217 218 m_pSamleEditorBtn = new Button( 219 m_pLayerProp, 220 "/instrumentEditor/deleteLayer_on.png", 221 "/instrumentEditor/deleteLayer_off.png", 222 "/instrumentEditor/deleteLayer_over.png", 223 QSize( 60, 13 ) 224 ); 225 226 227 218 228 m_pLoadLayerBtn->move( 48, 267 ); 219 229 m_pRemoveLayerBtn->move( 145, 267 ); 230 m_pSamleEditorBtn->move( 200, 267 ); 220 231 221 232 connect( m_pLoadLayerBtn, SIGNAL( clicked(Button*) ), this, SLOT( buttonClicked(Button*) ) ); 222 233 connect( m_pRemoveLayerBtn, SIGNAL( clicked(Button*) ), this, SLOT( buttonClicked(Button*) ) ); 223 234 connect( m_pSamleEditorBtn, SIGNAL( clicked(Button*) ), this, SLOT( buttonClicked(Button*) ) ); 224 235 // Layer gain 225 236 m_pLayerGainLCD = new LCDDisplay( m_pLayerProp, LCDDigit::SMALL_BLUE, 4 ); … … 476 487 m_pLayerPreview->updateAll(); 477 488 } 489 else if ( pButton == m_pSamleEditorBtn ){ 490 if ( m_pInstrument ) { 491 H2Core::InstrumentLayer *pLayer = m_pInstrument->get_layer( m_nSelectedLayer ); 492 if ( pLayer ) { 493 QString name = pLayer->get_sample()->get_filename(); 494 HydrogenApp::getInstance()->showSampleEditor( name ); 495 } 496 } 497 498 } 478 499 else { 479 500 ERRORLOG( "[buttonClicked] unhandled button" ); -
branches/new_fx_rack_and_sample_fun/gui/src/InstrumentEditor/InstrumentEditor.h
r581 r605 121 121 Button *m_pLoadLayerBtn; 122 122 Button *m_pRemoveLayerBtn; 123 Button *m_pSamleEditorBtn; 123 124 //~ Layer properties 124 125