comparison framework/MainWindowBase.cpp @ 351:36efd75d7b7b tonioni

Merge from default branch
author Chris Cannam
date Wed, 14 May 2014 09:58:27 +0100
parents b3609adae921
children 1d8cb0d92f4b
comparison
equal deleted inserted replaced
344:63dec7dc11cc 351:36efd75d7b7b
132 } 132 }
133 #undef Window 133 #undef Window
134 #endif 134 #endif
135 135
136 MainWindowBase::MainWindowBase(bool withAudioOutput, 136 MainWindowBase::MainWindowBase(bool withAudioOutput,
137 bool withOSCSupport,
138 bool withMIDIInput) : 137 bool withMIDIInput) :
139 m_document(0), 138 m_document(0),
140 m_paneStack(0), 139 m_paneStack(0),
141 m_viewManager(0), 140 m_viewManager(0),
142 m_timeRulerLayer(0), 141 m_timeRulerLayer(0),
253 m_labeller->setCounterCycleSize(cycle); 252 m_labeller->setCounterCycleSize(cycle);
254 253
255 if (withMIDIInput) { 254 if (withMIDIInput) {
256 m_midiInput = new MIDIInput(QApplication::applicationName(), this); 255 m_midiInput = new MIDIInput(QApplication::applicationName(), this);
257 } 256 }
258
259 if (withOSCSupport) {
260 m_oscQueueStarter = new OSCQueueStarter(this);
261 connect(m_oscQueueStarter, SIGNAL(finished()), this, SLOT(oscReady()));
262 m_oscQueueStarter->start();
263 }
264 } 257 }
265 258
266 MainWindowBase::~MainWindowBase() 259 MainWindowBase::~MainWindowBase()
267 { 260 {
268 SVDEBUG << "MainWindowBase::~MainWindowBase" << endl; 261 SVDEBUG << "MainWindowBase::~MainWindowBase" << endl;
269 if (m_playTarget) m_playTarget->shutdown(); 262 if (m_playTarget) m_playTarget->shutdown();
270 // delete m_playTarget; 263 // delete m_playTarget;
271 delete m_playSource; 264 delete m_playSource;
272 delete m_viewManager; 265 delete m_viewManager;
273 delete m_oscQueue; 266 delete m_oscQueue;
267 delete m_oscQueueStarter;
274 delete m_midiInput; 268 delete m_midiInput;
275 Profiles::getInstance()->dump(); 269 Profiles::getInstance()->dump();
276 } 270 }
277 271
278 void 272 void
281 QDesktopWidget *desktop = QApplication::desktop(); 275 QDesktopWidget *desktop = QApplication::desktop();
282 QRect available = desktop->availableGeometry(); 276 QRect available = desktop->availableGeometry();
283 QSize actual(std::min(size.width(), available.width()), 277 QSize actual(std::min(size.width(), available.width()),
284 std::min(size.height(), available.height())); 278 std::min(size.height(), available.height()));
285 resize(actual); 279 resize(actual);
280 }
281
282 void
283 MainWindowBase::startOSCQueue()
284 {
285 m_oscQueueStarter = new OSCQueueStarter(this);
286 connect(m_oscQueueStarter, SIGNAL(finished()), this, SLOT(oscReady()));
287 m_oscQueueStarter->start();
286 } 288 }
287 289
288 void 290 void
289 MainWindowBase::oscReady() 291 MainWindowBase::oscReady()
290 { 292 {