svgui  1.9
ViewManager.cpp
Go to the documentation of this file.
1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
2 
3 /*
4  Sonic Visualiser
5  An audio file viewer and annotation editor.
6  Centre for Digital Music, Queen Mary, University of London.
7  This file copyright 2006 Chris Cannam and QMUL.
8 
9  This program is free software; you can redistribute it and/or
10  modify it under the terms of the GNU General Public License as
11  published by the Free Software Foundation; either version 2 of the
12  License, or (at your option) any later version. See the file
13  COPYING included with this distribution for more information.
14 */
15 
16 #include "ViewManager.h"
17 #include "base/AudioPlaySource.h"
18 #include "base/RealTime.h"
19 #include "data/model/Model.h"
20 #include "widgets/CommandHistory.h"
21 #include "View.h"
22 #include "Overview.h"
23 
24 #include <QSettings>
25 #include <QApplication>
26 
27 #include <iostream>
28 
29 //#define DEBUG_VIEW_MANAGER 1
30 
32  m_playSource(0),
33  m_globalCentreFrame(0),
34  m_globalZoom(1024),
35  m_playbackFrame(0),
36  m_playbackModel(0),
37  m_mainModelSampleRate(0),
38  m_lastLeft(0),
39  m_lastRight(0),
40  m_inProgressExclusive(true),
41  m_toolMode(NavigateMode),
42  m_playLoopMode(false),
43  m_playSelectionMode(false),
44  m_playSoloMode(false),
45  m_alignMode(false),
46  m_overlayMode(StandardOverlays),
47  m_zoomWheelsEnabled(true),
48  m_showCentreLine(true),
49  m_illuminateLocalFeatures(true),
50  m_showWorkTitle(false),
51  m_showDuration(true),
52  m_lightPalette(QApplication::palette()),
53  m_darkPalette(QApplication::palette())
54 {
55  QSettings settings;
56  settings.beginGroup("MainWindow");
58  (settings.value("overlay-mode", int(m_overlayMode)).toInt());
59 
60  if (m_overlayMode != NoOverlays &&
64  }
65 
67  settings.value("zoom-wheels-enabled", m_zoomWheelsEnabled).toBool();
69  settings.value("show-centre-line", m_showCentreLine).toBool();
70  settings.endGroup();
71 
73 /*
74  cerr << "dark palette:" << endl;
75  cerr << "window = " << QApplication::palette().color(QPalette::Window).name() << endl;
76  cerr << "windowtext = " << QApplication::palette().color(QPalette::WindowText).name() << endl;
77  cerr << "base = " << QApplication::palette().color(QPalette::Base).name() << endl;
78  cerr << "alternatebase = " << QApplication::palette().color(QPalette::AlternateBase).name() << endl;
79  cerr << "text = " << QApplication::palette().color(QPalette::Text).name() << endl;
80  cerr << "button = " << QApplication::palette().color(QPalette::Button).name() << endl;
81  cerr << "buttontext = " << QApplication::palette().color(QPalette::ButtonText).name() << endl;
82  cerr << "brighttext = " << QApplication::palette().color(QPalette::BrightText).name() << endl;
83  cerr << "light = " << QApplication::palette().color(QPalette::Light).name() << endl;
84  cerr << "dark = " << QApplication::palette().color(QPalette::Dark).name() << endl;
85  cerr << "mid = " << QApplication::palette().color(QPalette::Mid).name() << endl;
86 */
87  m_lightPalette = QPalette(QColor("#000000"), // WindowText
88  QColor("#dddfe4"), // Button
89  QColor("#ffffff"), // Light
90  QColor("#555555"), // Dark
91  QColor("#c7c7c7"), // Mid
92  QColor("#000000"), // Text
93  QColor("#ffffff"), // BrightText
94  QColor("#ffffff"), // Base
95  QColor("#efefef")); // Window
96 
97 
98  } else {
99 /*
100  cerr << "light palette:" << endl;
101  cerr << "window = " << QApplication::palette().color(QPalette::Window).name() << endl;
102  cerr << "windowtext = " << QApplication::palette().color(QPalette::WindowText).name() << endl;
103  cerr << "base = " << QApplication::palette().color(QPalette::Base).name() << endl;
104  cerr << "alternatebase = " << QApplication::palette().color(QPalette::AlternateBase).name() << endl;
105  cerr << "text = " << QApplication::palette().color(QPalette::Text).name() << endl;
106  cerr << "button = " << QApplication::palette().color(QPalette::Button).name() << endl;
107  cerr << "buttontext = " << QApplication::palette().color(QPalette::ButtonText).name() << endl;
108  cerr << "brighttext = " << QApplication::palette().color(QPalette::BrightText).name() << endl;
109  cerr << "light = " << QApplication::palette().color(QPalette::Light).name() << endl;
110  cerr << "dark = " << QApplication::palette().color(QPalette::Dark).name() << endl;
111  cerr << "mid = " << QApplication::palette().color(QPalette::Mid).name() << endl;
112 */
113  m_darkPalette = QPalette(QColor("#ffffff"), // WindowText
114  QColor("#3e3e3e"), // Button
115  QColor("#808080"), // Light
116  QColor("#1e1e1e"), // Dark
117  QColor("#404040"), // Mid
118  QColor("#ffffff"), // Text
119  QColor("#ffffff"), // BrightText
120  QColor("#000000"), // Base
121  QColor("#202020")); // Window
122  }
123 }
124 
126 {
127 }
128 
129 int
131 {
132 #ifdef DEBUG_VIEW_MANAGER
133  cerr << "ViewManager::getGlobalCentreFrame: returning " << m_globalCentreFrame << endl;
134 #endif
135  return m_globalCentreFrame;
136 }
137 
138 void
140 {
141 #ifdef DEBUG_VIEW_MANAGER
142  cerr << "ViewManager::setGlobalCentreFrame to " << f << endl;
143 #endif
145  emit globalCentreFrameChanged(f);
146 }
147 
148 int
150 {
151 #ifdef DEBUG_VIEW_MANAGER
152  cerr << "ViewManager::getGlobalZoom: returning " << m_globalZoom << endl;
153 #endif
154  return m_globalZoom;
155 }
156 
157 int
159 {
160  if (m_playSource && m_playSource->isPlaying()) {
161  m_playbackFrame = m_playSource->getCurrentPlayingFrame();
162  }
163  return m_playbackFrame;
164 }
165 
166 void
168 {
169  if (m_playbackFrame != f) {
170  m_playbackFrame = f;
171  emit playbackFrameChanged(f);
172  if (m_playSource && m_playSource->isPlaying()) {
173  m_playSource->play(f);
174  }
175  }
176 }
177 
178 Model *
180 {
181  return m_playbackModel;
182 }
183 
184 void
186 {
187  m_playbackModel = model;
188 }
189 
190 int
192 {
193 #ifdef DEBUG_VIEW_MANAGER
194  cerr << "ViewManager::alignPlaybackFrameToReference(" << frame << "): playback model is " << m_playbackModel << endl;
195 #endif
196  if (!m_playbackModel) {
197  return frame;
198  } else {
199  int f = m_playbackModel->alignToReference(frame);
200 #ifdef DEBUG_VIEW_MANAGER
201  cerr << "aligned frame = " << f << endl;
202 #endif
203  return f;
204  }
205 }
206 
207 int
209 {
210 #ifdef DEBUG_VIEW_MANAGER
211  cerr << "ViewManager::alignReferenceToPlaybackFrame(" << frame << "): playback model is " << m_playbackModel << endl;
212 #endif
213  if (!m_playbackModel) {
214  return frame;
215  } else {
216  int f = m_playbackModel->alignFromReference(frame);
217 #ifdef DEBUG_VIEW_MANAGER
218  cerr << "aligned frame = " << f << endl;
219 #endif
220  return f;
221  }
222 }
223 
224 bool
226 {
227  return !m_inProgressSelection.isEmpty();
228 }
229 
230 const Selection &
232 {
233  exclusive = m_inProgressExclusive;
234  return m_inProgressSelection;
235 }
236 
237 void
238 ViewManager::setInProgressSelection(const Selection &selection, bool exclusive)
239 {
240  m_inProgressExclusive = exclusive;
241  m_inProgressSelection = selection;
242  if (exclusive) clearSelections();
244 }
245 
246 void
248 {
249  m_inProgressSelection = Selection();
251 }
252 
253 const MultiSelection &
255 {
256  return m_selections;
257 }
258 
259 const MultiSelection::SelectionList &
261 {
262  return m_selections.getSelections();
263 }
264 
265 void
266 ViewManager::setSelection(const Selection &selection)
267 {
268  MultiSelection ms(m_selections);
269  ms.setSelection(selection);
270  setSelections(ms);
271 }
272 
273 void
274 ViewManager::addSelection(const Selection &selection)
275 {
276  MultiSelection ms(m_selections);
277  ms.addSelection(selection);
278  setSelections(ms);
279 }
280 
281 void
282 ViewManager::addSelectionQuietly(const Selection &selection)
283 {
284  MultiSelection ms(m_selections);
285  ms.addSelection(selection);
286  setSelections(ms, true);
287 }
288 
289 void
290 ViewManager::removeSelection(const Selection &selection)
291 {
292  MultiSelection ms(m_selections);
293  ms.removeSelection(selection);
294  setSelections(ms);
295 }
296 
297 void
299 {
300  MultiSelection ms(m_selections);
301  ms.clearSelections();
302  setSelections(ms);
303 }
304 
305 void
306 ViewManager::setSelections(const MultiSelection &ms, bool quietly)
307 {
308  if (m_selections.getSelections() == ms.getSelections()) return;
309  SetSelectionCommand *command = new SetSelectionCommand(this, ms);
311  if (!quietly) {
312  emit selectionChangedByUser();
313  }
314 }
315 
316 int
318 {
319  MultiSelection::SelectionList sl = getSelections();
320  if (sl.empty()) return frame;
321 
322  for (MultiSelection::SelectionList::const_iterator i = sl.begin();
323  i != sl.end(); ++i) {
324 
325  if (frame < i->getEndFrame()) {
326  if (frame < i->getStartFrame()) {
327  return i->getStartFrame();
328  } else {
329  return frame;
330  }
331  }
332  }
333 
334  return sl.begin()->getStartFrame();
335 }
336 
337 void
339 {
340  emit selectionChanged();
341 }
342 
344  const MultiSelection &ms) :
345  m_vm(vm),
346  m_oldSelection(vm->m_selections),
347  m_newSelection(ms)
348 {
349 }
350 
352 
353 void
355 {
356  m_vm->m_selections = m_newSelection;
357  m_vm->signalSelectionChange();
358 }
359 
360 void
362 {
363  m_vm->m_selections = m_oldSelection;
364  m_vm->signalSelectionChange();
365 }
366 
367 QString
369 {
370  if (m_newSelection.getSelections().empty()) return tr("Clear Selection");
371  if (m_newSelection.getSelections().size() > 1) return tr("Select Multiple Regions");
372  else return tr("Select Region");
373 }
374 
375 Selection
376 ViewManager::getContainingSelection(int frame, bool defaultToFollowing) const
377 {
378  return m_selections.getContainingSelection(frame, defaultToFollowing);
379 }
380 
381 void
383 {
384  m_toolMode = mode;
385 
386  emit toolModeChanged();
387 
388  switch (mode) {
389  case NavigateMode: emit activity(tr("Enter Navigate mode")); break;
390  case SelectMode: emit activity(tr("Enter Select mode")); break;
391  case EditMode: emit activity(tr("Enter Edit mode")); break;
392  case DrawMode: emit activity(tr("Enter Draw mode")); break;
393  case EraseMode: emit activity(tr("Enter Erase mode")); break;
394  case MeasureMode: emit activity(tr("Enter Measure mode")); break;
395  case NoteEditMode: emit activity(tr("Enter NoteEdit mode")); break; // GF: NoteEditMode activity (I'm not yet certain why we need to emit this.)
396  };
397 }
398 
401 {
402  if (m_toolModeOverrides.find(v) == m_toolModeOverrides.end()) {
403  return getToolMode();
404  } else {
405  return m_toolModeOverrides.find(v)->second;
406  }
407 }
408 
409 void
411 {
412  m_toolModeOverrides[v] = mode;
413 }
414 
415 void
417 {
418  m_toolModeOverrides.clear();
419 }
420 
421 void
423 {
424  if (m_playLoopMode != mode) {
425 
426  m_playLoopMode = mode;
427 
428  emit playLoopModeChanged();
429  emit playLoopModeChanged(mode);
430 
431  if (mode) emit activity(tr("Switch on Loop mode"));
432  else emit activity(tr("Switch off Loop mode"));
433  }
434 }
435 
436 void
438 {
439  if (m_playSelectionMode != mode) {
440 
441  m_playSelectionMode = mode;
442 
444  emit playSelectionModeChanged(mode);
445 
446  if (mode) emit activity(tr("Switch on Play Selection mode"));
447  else emit activity(tr("Switch off Play Selection mode"));
448  }
449 }
450 
451 void
453 {
454  if (m_playSoloMode != mode) {
455 
456  m_playSoloMode = mode;
457 
458  emit playSoloModeChanged();
459  emit playSoloModeChanged(mode);
460 
461  if (mode) emit activity(tr("Switch on Play Solo mode"));
462  else emit activity(tr("Switch off Play Solo mode"));
463  }
464 }
465 
466 void
468 {
469  if (m_alignMode != mode) {
470 
471  m_alignMode = mode;
472 
473  emit alignModeChanged();
474  emit alignModeChanged(mode);
475 
476  if (mode) emit activity(tr("Switch on Alignment mode"));
477  else emit activity(tr("Switch off Alignment mode"));
478  }
479 }
480 
481 int
483 {
484  if (m_playSource) {
485  return m_playSource->getSourceSampleRate();
486  }
487  return 0;
488 }
489 
490 int
492 {
493  if (m_playSource) {
494  return m_playSource->getTargetSampleRate();
495  }
496  return 0;
497 }
498 
499 void
500 ViewManager::setAudioPlaySource(AudioPlaySource *source)
501 {
502  if (!m_playSource) {
503  QTimer::singleShot(100, this, SLOT(checkPlayStatus()));
504  }
505  m_playSource = source;
506 }
507 
508 void
510 {
511 #ifdef DEBUG_VIEW_MANAGER
512  cerr << "ViewManager::playStatusChanged" << endl;
513 #endif
514  checkPlayStatus();
515 }
516 
517 void
519 {
520  if (m_playSource && m_playSource->isPlaying()) {
521 
522  float left = 0, right = 0;
523  if (m_playSource->getOutputLevels(left, right)) {
524  if (left != m_lastLeft || right != m_lastRight) {
525  emit outputLevelsChanged(left, right);
526  m_lastLeft = left;
527  m_lastRight = right;
528  }
529  }
530 
531  m_playbackFrame = m_playSource->getCurrentPlayingFrame();
532 
533 #ifdef DEBUG_VIEW_MANAGER
534  cerr << "ViewManager::checkPlayStatus: Playing, frame " << m_playbackFrame << ", levels " << m_lastLeft << "," << m_lastRight << endl;
535 #endif
536 
538 
539  QTimer::singleShot(20, this, SLOT(checkPlayStatus()));
540 
541  } else {
542 
543  if (m_lastLeft != 0.0 || m_lastRight != 0.0) {
544  emit outputLevelsChanged(0.0, 0.0);
545  m_lastLeft = 0.0;
546  m_lastRight = 0.0;
547  }
548 
549 #ifdef DEBUG_VIEW_MANAGER
550  cerr << "ViewManager::checkPlayStatus: Not playing" << endl;
551 #endif
552  }
553 }
554 
555 bool
557 {
558  return m_playSource && m_playSource->isPlaying();
559 }
560 
561 void
563  PlaybackFollowMode mode)
564 {
565  View *v = dynamic_cast<View *>(sender());
566 
567 #ifdef DEBUG_VIEW_MANAGER
568  cerr << "ViewManager::viewCentreFrameChanged(" << f << ", " << locked << ", " << mode << "), view is " << v << endl;
569 #endif
570 
571  if (locked) {
573  emit globalCentreFrameChanged(f);
574  } else {
575  if (v) emit viewCentreFrameChanged(v, f);
576  }
577 
578  if (!dynamic_cast<Overview *>(v) || (mode != PlaybackIgnore)) {
579  if (m_mainModelSampleRate != 0) {
580  emit activity(tr("Scroll to %1")
581  .arg(RealTime::frame2RealTime
582  (f, m_mainModelSampleRate).toText().c_str()));
583  }
584  }
585 
586  if (mode == PlaybackScrollPageWithCentre ||
587  mode == PlaybackScrollContinuous) {
588  seek(f);
589  }
590 }
591 
592 void
594 {
595 #ifdef DEBUG_VIEW_MANAGER
596  cerr << "ViewManager::seek(" << f << ")" << endl;
597 #endif
598 
599  if (m_playSource && m_playSource->isPlaying()) {
600  int playFrame = m_playSource->getCurrentPlayingFrame();
601  int diff = std::max(f, playFrame) - std::min(f, playFrame);
602  if (diff > 20000) {
603  m_playbackFrame = f;
604  m_playSource->play(f);
605 #ifdef DEBUG_VIEW_MANAGER
606  cerr << "ViewManager::considerSeek: reseeking from " << playFrame << " to " << f << endl;
607 #endif
608  emit playbackFrameChanged(f);
609  }
610  } else {
611  if (m_playbackFrame != f) {
612  m_playbackFrame = f;
613  emit playbackFrameChanged(f);
614  }
615  }
616 }
617 
618 void
620 {
621  View *v = dynamic_cast<View *>(sender());
622 
623  if (!v) {
624  SVDEBUG << "ViewManager::viewZoomLevelChanged: WARNING: sender is not a view" << endl;
625  return;
626  }
627 
629 
630  if (locked) {
631  m_globalZoom = z;
632  }
633 
634 #ifdef DEBUG_VIEW_MANAGER
635  cerr << "ViewManager::viewZoomLevelChanged(" << v << ", " << z << ", " << locked << ")" << endl;
636 #endif
637 
638  emit viewZoomLevelChanged(v, z, locked);
639 
640  if (!dynamic_cast<Overview *>(v)) {
641  emit activity(tr("Zoom to %n sample(s) per pixel", "", z));
642  }
643 }
644 
645 void
647 {
648  if (m_overlayMode != mode) {
649  m_overlayMode = mode;
650  emit overlayModeChanged();
651  emit activity(tr("Change overlay level"));
652  }
653 
654  QSettings settings;
655  settings.beginGroup("MainWindow");
656  settings.setValue("overlay-mode", int(m_overlayMode));
657  settings.endGroup();
658 }
659 
660 void
662 {
663  if (m_zoomWheelsEnabled != enabled) {
664  m_zoomWheelsEnabled = enabled;
666  if (enabled) emit activity("Show zoom wheels");
667  else emit activity("Hide zoom wheels");
668  }
669 
670  QSettings settings;
671  settings.beginGroup("MainWindow");
672  settings.setValue("zoom-wheels-enabled", m_zoomWheelsEnabled);
673  settings.endGroup();
674 }
675 
676 void
678 {
679  if (m_showCentreLine != show) {
680  m_showCentreLine = show;
681  emit showCentreLineChanged();
682  if (show) emit activity("Show centre line");
683  else emit activity("Hide centre line");
684  }
685 
686  QSettings settings;
687  settings.beginGroup("MainWindow");
688  settings.setValue("show-centre-line", int(m_showCentreLine));
689  settings.endGroup();
690 }
691 
692 void
694 {
695  // also save the current palette, in case the user has changed it
696  // since construction
697  if (getGlobalDarkBackground()) {
698  m_darkPalette = QApplication::palette();
699  } else {
700  m_lightPalette = QApplication::palette();
701  }
702 
703 #ifndef Q_OS_MAC
704  if (dark) {
705  QApplication::setPalette(m_darkPalette);
706  } else {
707  QApplication::setPalette(m_lightPalette);
708  }
709 #endif
710 }
711 
712 bool
714 {
715  bool dark = false;
716  QColor windowBg = QApplication::palette().color(QPalette::Window);
717  if (windowBg.red() + windowBg.green() + windowBg.blue() < 384) {
718  dark = true;
719  }
720  return dark;
721 }
722 
void zoomWheelsEnabledChanged()
Emitted when the zoom wheels have been toggled.
void selectionChangedByUser()
Emitted when the selection has been changed through an explicit selection-editing action.
void playSelectionModeChanged()
Emitted when the play selection mode has been changed.
void setSelections(const MultiSelection &ms, bool quietly=false)
int getPlaybackFrame() const
int alignReferenceToPlaybackFrame(int) const
void viewCentreFrameChanged(View *v, int frame)
Emitted when user scrolls a view, but doesn't affect global centre.
ToolMode getToolModeFor(const View *v) const
Return override mode if it exists for this view or global mode otherwise.
ToolMode m_toolMode
Definition: ViewManager.h:323
View scrolls continuously during playback, keeping the playback position at the centre.
Definition: ViewManager.h:39
void viewZoomLevelChanged(View *v, int zoom, bool locked)
Emitted when a view zooms.
void checkPlayStatus()
void toolModeChanged()
Emitted when the tool mode has been changed.
SetSelectionCommand(ViewManager *vm, const MultiSelection &ms)
void showCentreLineChanged()
Emitted when the centre line visibility has been changed.
int getGlobalZoom() const
bool haveInProgressSelection() const
void setGlobalDarkBackground(bool dark)
bool m_alignMode
Definition: ViewManager.h:329
ToolMode getToolMode() const
Definition: ViewManager.h:137
Model * getPlaybackModel() const
Model * m_playbackModel
Definition: ViewManager.h:311
void addCommand(Command *command)
Add a command to the command history.
int alignPlaybackFrameToReference(int) const
void outputLevelsChanged(float left, float right)
Emitted when the output levels change.
void playStatusChanged(bool playing)
void inProgressSelectionChanged()
Emitted when the in-progress (rubberbanding) selection has changed.
bool isPlaying() const
void removeSelection(const Selection &selection)
void addSelection(const Selection &selection)
void clearSelections()
void seek(int)
void signalSelectionChange()
void setPlaySelectionMode(bool on)
virtual QString getName() const
Selection m_inProgressSelection
Definition: ViewManager.h:318
int m_globalCentreFrame
Definition: ViewManager.h:308
View follows playback page-by-page, but dragging the view relocates playback to the centre frame.
Definition: ViewManager.h:46
void overlayModeChanged()
Emitted when the overlay mode has been changed.
void setPlaybackFrame(int)
void globalCentreFrameChanged(int frame)
Emitted when user causes the global centre frame to change.
const Selection & getInProgressSelection(bool &exclusive) const
void setInProgressSelection(const Selection &selection, bool exclusive)
void setAudioPlaySource(AudioPlaySource *source)
void setPlaySoloMode(bool on)
void selectionChanged()
Emitted whenever the selection has changed.
void setOverlayMode(OverlayMode mode)
PlaybackFollowMode
Definition: ViewManager.h:33
View is detached from playback.
Definition: ViewManager.h:59
void addSelectionQuietly(const Selection &selection)
Adding a selection normally emits the selectionChangedByUser signal.
bool m_inProgressExclusive
Definition: ViewManager.h:319
void playbackFrameChanged(int frame)
Emitted when the playback frame changes.
void setZoomWheelsEnabled(bool enable)
void alignModeChanged()
Emitted when the alignment mode has been changed.
static CommandHistory * getInstance()
int getOutputSampleRate() const
The sample rate of the audio output device.
QPalette m_lightPalette
Definition: ViewManager.h:356
void setShowCentreLine(bool show)
MultiSelection m_selections
Definition: ViewManager.h:317
void playSoloModeChanged()
Emitted when the play solo mode has been changed.
OverlayMode m_overlayMode
Definition: ViewManager.h:349
AudioPlaySource * m_playSource
!! void considerZoomChange(void *, int, bool);
Definition: ViewManager.h:307
void setGlobalCentreFrame(int)
void clearInProgressSelection()
int constrainFrameToSelection(int frame) const
int m_playbackFrame
Definition: ViewManager.h:310
void setSelection(const Selection &selection)
View is the base class of widgets that display one or more overlaid views of data against a horizonta...
Definition: View.h:50
void setToolModeFor(const View *v, ToolMode mode)
Override the tool mode for a specific view.
int getPlaybackSampleRate() const
The sample rate that is used for playback.
float m_lastRight
Definition: ViewManager.h:315
The ViewManager manages properties that may need to be synchronised between separate Views.
Definition: ViewManager.h:73
bool m_playSelectionMode
Definition: ViewManager.h:327
QPalette m_darkPalette
Definition: ViewManager.h:357
int getGlobalCentreFrame() const
const MultiSelection::SelectionList & getSelections() const
void setPlayLoopMode(bool on)
bool m_showCentreLine
Definition: ViewManager.h:351
bool m_playLoopMode
Definition: ViewManager.h:326
int m_mainModelSampleRate
!!
Definition: ViewManager.h:312
void setAlignMode(bool on)
void activity(QString)
Emitted when any loggable activity has occurred.
void playLoopModeChanged()
Emitted when the play loop mode has been changed.
Selection getContainingSelection(int frame, bool defaultToFollowing) const
Return the selection that contains a given frame.
virtual ~ViewManager()
int m_globalZoom
Definition: ViewManager.h:309
void setPlaybackModel(Model *)
void clearToolModeOverrides()
Clear all current view-specific overrides.
bool m_playSoloMode
Definition: ViewManager.h:328
float m_lastLeft
Definition: ViewManager.h:314
const MultiSelection & getSelection() const
bool m_zoomWheelsEnabled
Definition: ViewManager.h:350
std::map< const View *, ToolMode > m_toolModeOverrides
Definition: ViewManager.h:324
void setToolMode(ToolMode mode)
bool getGlobalDarkBackground() const