Mercurial > hg > svgui
comparison layer/NoteLayer.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 | 137d3ff48f73 |
children | 4c8ca536b54f |
comparison
equal
deleted
inserted
replaced
782:ddae586bc47b | 805:1d526ba11a24 |
---|---|
542 return text; | 542 return text; |
543 } | 543 } |
544 | 544 |
545 bool | 545 bool |
546 NoteLayer::snapToFeatureFrame(View *v, int &frame, | 546 NoteLayer::snapToFeatureFrame(View *v, int &frame, |
547 size_t &resolution, | 547 int &resolution, |
548 SnapType snap) const | 548 SnapType snap) const |
549 { | 549 { |
550 if (!m_model) { | 550 if (!m_model) { |
551 return Layer::snapToFeatureFrame(v, frame, resolution, snap); | 551 return Layer::snapToFeatureFrame(v, frame, resolution, snap); |
552 } | 552 } |
954 | 954 |
955 m_editing = true; | 955 m_editing = true; |
956 } | 956 } |
957 | 957 |
958 void | 958 void |
959 NoteLayer::eraseDrag(View *v, QMouseEvent *e) | 959 NoteLayer::eraseDrag(View *, QMouseEvent *) |
960 { | 960 { |
961 } | 961 } |
962 | 962 |
963 void | 963 void |
964 NoteLayer::eraseEnd(View *v, QMouseEvent *e) | 964 NoteLayer::eraseEnd(View *v, QMouseEvent *e) |
1101 delete dialog; | 1101 delete dialog; |
1102 return true; | 1102 return true; |
1103 } | 1103 } |
1104 | 1104 |
1105 void | 1105 void |
1106 NoteLayer::moveSelection(Selection s, size_t newStartFrame) | 1106 NoteLayer::moveSelection(Selection s, int newStartFrame) |
1107 { | 1107 { |
1108 if (!m_model) return; | 1108 if (!m_model) return; |
1109 | 1109 |
1110 NoteModel::EditCommand *command = | 1110 NoteModel::EditCommand *command = |
1111 new NoteModel::EditCommand(m_model, tr("Drag Selection")); | 1111 new NoteModel::EditCommand(m_model, tr("Drag Selection")); |
1205 } | 1205 } |
1206 } | 1206 } |
1207 } | 1207 } |
1208 | 1208 |
1209 bool | 1209 bool |
1210 NoteLayer::paste(View *v, const Clipboard &from, int frameOffset, bool /* interactive */) | 1210 NoteLayer::paste(View *v, const Clipboard &from, int /* frameOffset */, bool /* interactive */) |
1211 { | 1211 { |
1212 if (!m_model) return false; | 1212 if (!m_model) return false; |
1213 | 1213 |
1214 const Clipboard::PointList &points = from.getPoints(); | 1214 const Clipboard::PointList &points = from.getPoints(); |
1215 | 1215 |
1237 | 1237 |
1238 for (Clipboard::PointList::const_iterator i = points.begin(); | 1238 for (Clipboard::PointList::const_iterator i = points.begin(); |
1239 i != points.end(); ++i) { | 1239 i != points.end(); ++i) { |
1240 | 1240 |
1241 if (!i->haveFrame()) continue; | 1241 if (!i->haveFrame()) continue; |
1242 size_t frame = 0; | 1242 int frame = 0; |
1243 | 1243 |
1244 if (!realign) { | 1244 if (!realign) { |
1245 | 1245 |
1246 frame = i->getFrame(); | 1246 frame = i->getFrame(); |
1247 | 1247 |
1262 else newPoint.value = (m_model->getValueMinimum() + | 1262 else newPoint.value = (m_model->getValueMinimum() + |
1263 m_model->getValueMaximum()) / 2; | 1263 m_model->getValueMaximum()) / 2; |
1264 if (i->haveLevel()) newPoint.level = i->getLevel(); | 1264 if (i->haveLevel()) newPoint.level = i->getLevel(); |
1265 if (i->haveDuration()) newPoint.duration = i->getDuration(); | 1265 if (i->haveDuration()) newPoint.duration = i->getDuration(); |
1266 else { | 1266 else { |
1267 size_t nextFrame = frame; | 1267 int nextFrame = frame; |
1268 Clipboard::PointList::const_iterator j = i; | 1268 Clipboard::PointList::const_iterator j = i; |
1269 for (; j != points.end(); ++j) { | 1269 for (; j != points.end(); ++j) { |
1270 if (!j->haveFrame()) continue; | 1270 if (!j->haveFrame()) continue; |
1271 if (j != i) break; | 1271 if (j != i) break; |
1272 } | 1272 } |