comparison framework/MainWindowBase.cpp @ 459:74d575708e06 alignment-simple

Branch to test simple FFT model code
author Chris Cannam
date Mon, 15 Jun 2015 09:15:55 +0100
parents d9d132c0e240 ea30a8c4cb93
children 51befd6165a3
comparison
equal deleted inserted replaced
450:d9d132c0e240 459:74d575708e06
57 #include "data/fileio/MIDIFileWriter.h" 57 #include "data/fileio/MIDIFileWriter.h"
58 #include "data/fileio/BZipFileDevice.h" 58 #include "data/fileio/BZipFileDevice.h"
59 #include "data/fileio/FileSource.h" 59 #include "data/fileio/FileSource.h"
60 #include "data/fileio/AudioFileReaderFactory.h" 60 #include "data/fileio/AudioFileReaderFactory.h"
61 #include "rdf/RDFImporter.h" 61 #include "rdf/RDFImporter.h"
62
63 #include "data/fft/FFTDataServer.h"
64 62
65 #include "base/RecentFiles.h" 63 #include "base/RecentFiles.h"
66 64
67 #include "base/PlayParameterRepository.h" 65 #include "base/PlayParameterRepository.h"
68 #include "base/XmlExportable.h" 66 #include "base/XmlExportable.h"
163 161
164 #ifdef Q_WS_X11 162 #ifdef Q_WS_X11
165 XSetErrorHandler(handle_x11_error); 163 XSetErrorHandler(handle_x11_error);
166 #endif 164 #endif
167 165
166 connect(this, SIGNAL(hideSplash()), this, SLOT(emitHideSplash()));
167
168 connect(CommandHistory::getInstance(), SIGNAL(commandExecuted()), 168 connect(CommandHistory::getInstance(), SIGNAL(commandExecuted()),
169 this, SLOT(documentModified())); 169 this, SLOT(documentModified()));
170 connect(CommandHistory::getInstance(), SIGNAL(documentRestored()), 170 connect(CommandHistory::getInstance(), SIGNAL(documentRestored()),
171 this, SLOT(documentRestored())); 171 this, SLOT(documentRestored()));
172 172
258 m_labeller->setCounterCycleSize(cycle); 258 m_labeller->setCounterCycleSize(cycle);
259 259
260 if (withMIDIInput) { 260 if (withMIDIInput) {
261 m_midiInput = new MIDIInput(QApplication::applicationName(), this); 261 m_midiInput = new MIDIInput(QApplication::applicationName(), this);
262 } 262 }
263
264 QTimer::singleShot(1500, this, SIGNAL(hideSplash()));
263 } 265 }
264 266
265 MainWindowBase::~MainWindowBase() 267 MainWindowBase::~MainWindowBase()
266 { 268 {
267 SVDEBUG << "MainWindowBase::~MainWindowBase" << endl; 269 SVDEBUG << "MainWindowBase::~MainWindowBase" << endl;
271 delete m_viewManager; 273 delete m_viewManager;
272 delete m_oscQueue; 274 delete m_oscQueue;
273 delete m_oscQueueStarter; 275 delete m_oscQueueStarter;
274 delete m_midiInput; 276 delete m_midiInput;
275 Profiles::getInstance()->dump(); 277 Profiles::getInstance()->dump();
278 }
279
280 void
281 MainWindowBase::emitHideSplash()
282 {
283 emit hideSplash(this);
276 } 284 }
277 285
278 void 286 void
279 MainWindowBase::finaliseMenus() 287 MainWindowBase::finaliseMenus()
280 { 288 {
586 emit canEditLayer(haveCurrentEditableLayer); 594 emit canEditLayer(haveCurrentEditableLayer);
587 emit canEditLayerTabular(haveCurrentEditableLayer || haveTabularLayer); 595 emit canEditLayerTabular(haveCurrentEditableLayer || haveTabularLayer);
588 emit canMeasureLayer(haveCurrentLayer); 596 emit canMeasureLayer(haveCurrentLayer);
589 emit canSelect(haveMainModel && haveCurrentPane); 597 emit canSelect(haveMainModel && haveCurrentPane);
590 emit canPlay(haveMainModel && havePlayTarget); 598 emit canPlay(haveMainModel && havePlayTarget);
591 emit canFfwd(true); 599 emit canFfwd(haveMainModel);
592 emit canRewind(true); 600 emit canRewind(haveMainModel);
593 emit canPaste(haveClipboardContents); 601 emit canPaste(haveClipboardContents);
594 emit canInsertInstant(haveCurrentPane); 602 emit canInsertInstant(haveCurrentPane);
595 emit canInsertInstantsAtBoundaries(haveCurrentPane && haveSelection); 603 emit canInsertInstantsAtBoundaries(haveCurrentPane && haveSelection);
596 emit canInsertItemAtSelection(haveCurrentPane && haveSelection && haveCurrentDurationLayer); 604 emit canInsertItemAtSelection(haveCurrentPane && haveSelection && haveCurrentDurationLayer);
597 emit canRenumberInstants(haveCurrentTimeInstantsLayer && haveSelection); 605 emit canRenumberInstants(haveCurrentTimeInstantsLayer && haveSelection);
3375 // SVDEBUG << "MainWindowBase::modelAboutToBeDeleted(" << model << ")" << endl; 3383 // SVDEBUG << "MainWindowBase::modelAboutToBeDeleted(" << model << ")" << endl;
3376 if (model == m_viewManager->getPlaybackModel()) { 3384 if (model == m_viewManager->getPlaybackModel()) {
3377 m_viewManager->setPlaybackModel(0); 3385 m_viewManager->setPlaybackModel(0);
3378 } 3386 }
3379 m_playSource->removeModel(model); 3387 m_playSource->removeModel(model);
3380 FFTDataServer::modelAboutToBeDeleted(model);
3381 } 3388 }
3382 3389
3383 void 3390 void
3384 MainWindowBase::paneDeleteButtonClicked(Pane *pane) 3391 MainWindowBase::paneDeleteButtonClicked(Pane *pane)
3385 { 3392 {