Mercurial > hg > svgui
comparison layer/TimeValueLayer.cpp @ 805:1d526ba11a24 warnfix_no_size_t
Remove size_t's and fix warnings in layer/
author | Chris Cannam |
---|---|
date | Tue, 17 Jun 2014 15:18:06 +0100 |
parents | b6dc57688c72 |
children | cf23656a8ca6 |
comparison
equal
deleted
inserted
replaced
782:ddae586bc47b | 805:1d526ba11a24 |
---|---|
572 | 572 |
573 return usePoints; | 573 return usePoints; |
574 } | 574 } |
575 | 575 |
576 QString | 576 QString |
577 TimeValueLayer::getLabelPreceding(size_t frame) const | 577 TimeValueLayer::getLabelPreceding(int frame) const |
578 { | 578 { |
579 if (!m_model) return ""; | 579 if (!m_model) return ""; |
580 SparseTimeValueModel::PointList points = m_model->getPreviousPoints(frame); | 580 SparseTimeValueModel::PointList points = m_model->getPreviousPoints(frame); |
581 for (SparseTimeValueModel::PointList::const_iterator i = points.begin(); | 581 for (SparseTimeValueModel::PointList::const_iterator i = points.begin(); |
582 i != points.end(); ++i) { | 582 i != points.end(); ++i) { |
628 return text; | 628 return text; |
629 } | 629 } |
630 | 630 |
631 bool | 631 bool |
632 TimeValueLayer::snapToFeatureFrame(View *v, int &frame, | 632 TimeValueLayer::snapToFeatureFrame(View *v, int &frame, |
633 size_t &resolution, | 633 int &resolution, |
634 SnapType snap) const | 634 SnapType snap) const |
635 { | 635 { |
636 if (!m_model) { | 636 if (!m_model) { |
637 return Layer::snapToFeatureFrame(v, frame, resolution, snap); | 637 return Layer::snapToFeatureFrame(v, frame, resolution, snap); |
638 } | 638 } |
700 return found; | 700 return found; |
701 } | 701 } |
702 | 702 |
703 bool | 703 bool |
704 TimeValueLayer::snapToSimilarFeature(View *v, int &frame, | 704 TimeValueLayer::snapToSimilarFeature(View *v, int &frame, |
705 size_t &resolution, | 705 int &resolution, |
706 SnapType snap) const | 706 SnapType snap) const |
707 { | 707 { |
708 if (!m_model) { | 708 if (!m_model) { |
709 return Layer::snapToSimilarFeature(v, frame, resolution, snap); | 709 return Layer::snapToSimilarFeature(v, frame, resolution, snap); |
710 } | 710 } |
1433 | 1433 |
1434 m_editing = true; | 1434 m_editing = true; |
1435 } | 1435 } |
1436 | 1436 |
1437 void | 1437 void |
1438 TimeValueLayer::eraseDrag(View *v, QMouseEvent *e) | 1438 TimeValueLayer::eraseDrag(View *, QMouseEvent *) |
1439 { | 1439 { |
1440 } | 1440 } |
1441 | 1441 |
1442 void | 1442 void |
1443 TimeValueLayer::eraseEnd(View *v, QMouseEvent *e) | 1443 TimeValueLayer::eraseEnd(View *v, QMouseEvent *e) |
1578 delete dialog; | 1578 delete dialog; |
1579 return true; | 1579 return true; |
1580 } | 1580 } |
1581 | 1581 |
1582 void | 1582 void |
1583 TimeValueLayer::moveSelection(Selection s, size_t newStartFrame) | 1583 TimeValueLayer::moveSelection(Selection s, int newStartFrame) |
1584 { | 1584 { |
1585 if (!m_model) return; | 1585 if (!m_model) return; |
1586 | 1586 |
1587 SparseTimeValueModel::EditCommand *command = | 1587 SparseTimeValueModel::EditCommand *command = |
1588 new SparseTimeValueModel::EditCommand(m_model, | 1588 new SparseTimeValueModel::EditCommand(m_model, |
1680 } | 1680 } |
1681 } | 1681 } |
1682 } | 1682 } |
1683 | 1683 |
1684 bool | 1684 bool |
1685 TimeValueLayer::paste(View *v, const Clipboard &from, int frameOffset, | 1685 TimeValueLayer::paste(View *v, const Clipboard &from, int /* frameOffset */, |
1686 bool interactive) | 1686 bool interactive) |
1687 { | 1687 { |
1688 if (!m_model) return false; | 1688 if (!m_model) return false; |
1689 | 1689 |
1690 const Clipboard::PointList &points = from.getPoints(); | 1690 const Clipboard::PointList &points = from.getPoints(); |
1719 }; | 1719 }; |
1720 | 1720 |
1721 Labeller::ValueType generation = Labeller::ValueNone; | 1721 Labeller::ValueType generation = Labeller::ValueNone; |
1722 | 1722 |
1723 bool haveUsableLabels = false; | 1723 bool haveUsableLabels = false; |
1724 bool haveExistingItems = !(m_model->isEmpty()); | |
1725 Labeller labeller; | 1724 Labeller labeller; |
1726 labeller.setSampleRate(m_model->getSampleRate()); | 1725 labeller.setSampleRate(m_model->getSampleRate()); |
1727 | 1726 |
1728 if (interactive) { | 1727 if (interactive) { |
1729 | 1728 |
1821 for (Clipboard::PointList::const_iterator i = points.begin(); | 1820 for (Clipboard::PointList::const_iterator i = points.begin(); |
1822 i != points.end(); ++i) { | 1821 i != points.end(); ++i) { |
1823 | 1822 |
1824 if (!i->haveFrame()) continue; | 1823 if (!i->haveFrame()) continue; |
1825 | 1824 |
1826 size_t frame = 0; | 1825 int frame = 0; |
1827 | 1826 |
1828 if (!realign) { | 1827 if (!realign) { |
1829 | 1828 |
1830 frame = i->getFrame(); | 1829 frame = i->getFrame(); |
1831 | 1830 |