Mercurial > hg > svcore
comparison base/View.cpp @ 24:bb9291d84810
* Add ffwd/rewind
* Abstract out MultiSelection
author | Chris Cannam |
---|---|
date | Wed, 08 Feb 2006 17:59:16 +0000 (2006-02-08) |
parents | a1a6acb7cd37 |
children | 7dad8a310963 |
comparison
equal
deleted
inserted
replaced
23:6ace4286ba06 | 24:bb9291d84810 |
---|---|
542 long sf = (f / w) * w - w/8; | 542 long sf = (f / w) * w - w/8; |
543 | 543 |
544 if (m_manager && | 544 if (m_manager && |
545 m_manager->isPlaying() && | 545 m_manager->isPlaying() && |
546 m_manager->getPlaySelectionMode()) { | 546 m_manager->getPlaySelectionMode()) { |
547 ViewManager::SelectionList selections = m_manager->getSelections(); | 547 MultiSelection::SelectionList selections = m_manager->getSelections(); |
548 if (!selections.empty()) { | 548 if (!selections.empty()) { |
549 size_t selectionStart = selections.begin()->getStartFrame(); | 549 size_t selectionStart = selections.begin()->getStartFrame(); |
550 if (sf < long(selectionStart) - w / 10) { | 550 if (sf < long(selectionStart) - w / 10) { |
551 sf = long(selectionStart) - w / 10; | 551 sf = long(selectionStart) - w / 10; |
552 } | 552 } |
1108 } | 1108 } |
1109 | 1109 |
1110 void | 1110 void |
1111 View::drawSelections(QPainter &paint) | 1111 View::drawSelections(QPainter &paint) |
1112 { | 1112 { |
1113 ViewManager::SelectionList selections; | 1113 MultiSelection::SelectionList selections; |
1114 | 1114 |
1115 if (m_manager) { | 1115 if (m_manager) { |
1116 selections = m_manager->getSelections(); | 1116 selections = m_manager->getSelections(); |
1117 if (m_manager->haveInProgressSelection()) { | 1117 if (m_manager->haveInProgressSelection()) { |
1118 bool exclusive; | 1118 bool exclusive; |
1129 | 1129 |
1130 int sampleRate = getModelsSampleRate(); | 1130 int sampleRate = getModelsSampleRate(); |
1131 | 1131 |
1132 const QFontMetrics &metrics = paint.fontMetrics(); | 1132 const QFontMetrics &metrics = paint.fontMetrics(); |
1133 | 1133 |
1134 for (ViewManager::SelectionList::iterator i = selections.begin(); | 1134 for (MultiSelection::SelectionList::iterator i = selections.begin(); |
1135 i != selections.end(); ++i) { | 1135 i != selections.end(); ++i) { |
1136 | 1136 |
1137 int p0 = getXForFrame(i->getStartFrame()); | 1137 int p0 = getXForFrame(i->getStartFrame()); |
1138 int p1 = getXForFrame(i->getEndFrame()); | 1138 int p1 = getXForFrame(i->getEndFrame()); |
1139 | 1139 |