comparison view/ViewManager.cpp @ 718:e5f4385615ac tony_integration

Merge from tonioni branch
author Chris Cannam
date Tue, 28 Jan 2014 15:02:09 +0000
parents 084fd76deb89
children f831ca41d4a5
comparison
equal deleted inserted replaced
704:b81f21f2c4c3 718:e5f4385615ac
358 case SelectMode: emit activity(tr("Enter Select mode")); break; 358 case SelectMode: emit activity(tr("Enter Select mode")); break;
359 case EditMode: emit activity(tr("Enter Edit mode")); break; 359 case EditMode: emit activity(tr("Enter Edit mode")); break;
360 case DrawMode: emit activity(tr("Enter Draw mode")); break; 360 case DrawMode: emit activity(tr("Enter Draw mode")); break;
361 case EraseMode: emit activity(tr("Enter Erase mode")); break; 361 case EraseMode: emit activity(tr("Enter Erase mode")); break;
362 case MeasureMode: emit activity(tr("Enter Measure mode")); break; 362 case MeasureMode: emit activity(tr("Enter Measure mode")); break;
363 case NoteEditMode: emit activity(tr("Enter NoteEdit mode")); break; // GF: NoteEditMode activity (I'm not yet certain why we need to emit this.)
363 }; 364 };
365 }
366
367 ViewManager::ToolMode
368 ViewManager::getToolModeFor(const View *v) const
369 {
370 if (m_toolModeOverrides.find(v) == m_toolModeOverrides.end()) {
371 return getToolMode();
372 } else {
373 return m_toolModeOverrides.find(v)->second;
374 }
375 }
376
377 void
378 ViewManager::setToolModeFor(const View *v, ToolMode mode)
379 {
380 m_toolModeOverrides[v] = mode;
381 }
382
383 void
384 ViewManager::clearToolModeOverrides()
385 {
386 m_toolModeOverrides.clear();
364 } 387 }
365 388
366 void 389 void
367 ViewManager::setPlayLoopMode(bool mode) 390 ViewManager::setPlayLoopMode(bool mode)
368 { 391 {