comparison layer/Layer.cpp @ 806:4c8ca536b54f warnfix_no_size_t

Some more unsigned/long removal
author Chris Cannam
date Tue, 17 Jun 2014 15:36:56 +0100
parents 1d526ba11a24
children e0f08e108064
comparison
equal deleted inserted replaced
805:1d526ba11a24 806:4c8ca536b54f
49 Layer::connectSignals(const Model *model) 49 Layer::connectSignals(const Model *model)
50 { 50 {
51 connect(model, SIGNAL(modelChanged()), 51 connect(model, SIGNAL(modelChanged()),
52 this, SIGNAL(modelChanged())); 52 this, SIGNAL(modelChanged()));
53 53
54 connect(model, SIGNAL(modelChanged(int, int)), 54 connect(model, SIGNAL(modelChangedWithin(int, int)),
55 this, SIGNAL(modelChanged(int, int))); 55 this, SIGNAL(modelChangedWithin(int, int)));
56 56
57 connect(model, SIGNAL(completionChanged()), 57 connect(model, SIGNAL(completionChanged()),
58 this, SIGNAL(modelCompletionChanged())); 58 this, SIGNAL(modelCompletionChanged()));
59 59
60 connect(model, SIGNAL(alignmentCompletionChanged()), 60 connect(model, SIGNAL(alignmentCompletionChanged()),
248 // What if the clipboard point has no reference frame? Then 248 // What if the clipboard point has no reference frame? Then
249 // we have to treat it as having its own frame as the 249 // we have to treat it as having its own frame as the
250 // reference (i.e. having been copied from the reference 250 // reference (i.e. having been copied from the reference
251 // model). 251 // model).
252 252
253 long sourceFrame = i->getFrame(); 253 int sourceFrame = i->getFrame();
254 long referenceFrame = sourceFrame; 254 int referenceFrame = sourceFrame;
255 if (i->haveReferenceFrame()) { 255 if (i->haveReferenceFrame()) {
256 referenceFrame = i->getReferenceFrame(); 256 referenceFrame = i->getReferenceFrame();
257 } 257 }
258 long myMappedFrame = alignToReference(v, sourceFrame); 258 int myMappedFrame = alignToReference(v, sourceFrame);
259 259
260 // cerr << "sourceFrame = " << sourceFrame << ", referenceFrame = " << referenceFrame << " (have = " << i->haveReferenceFrame() << "), myMappedFrame = " << myMappedFrame << endl; 260 // cerr << "sourceFrame = " << sourceFrame << ", referenceFrame = " << referenceFrame << " (have = " << i->haveReferenceFrame() << "), myMappedFrame = " << myMappedFrame << endl;
261 261
262 if (myMappedFrame != referenceFrame) return true; 262 if (myMappedFrame != referenceFrame) return true;
263 } 263 }
318 { 318 {
319 MeasureRect rect; 319 MeasureRect rect;
320 QString fs = attributes.value("startFrame"); 320 QString fs = attributes.value("startFrame");
321 int x0 = 0, x1 = 0; 321 int x0 = 0, x1 = 0;
322 if (fs != "") { 322 if (fs != "") {
323 rect.startFrame = fs.toLong(); 323 rect.startFrame = fs.toInt();
324 rect.endFrame = attributes.value("endFrame").toLong(); 324 rect.endFrame = attributes.value("endFrame").toInt();
325 rect.haveFrames = true; 325 rect.haveFrames = true;
326 } else { 326 } else {
327 x0 = attributes.value("startX").toInt(); 327 x0 = attributes.value("startX").toInt();
328 x1 = attributes.value("endX").toInt(); 328 x1 = attributes.value("endX").toInt();
329 rect.haveFrames = false; 329 rect.haveFrames = false;
468 } 468 }
469 469
470 void 470 void
471 Layer::updateMeasurePixrects(View *v) const 471 Layer::updateMeasurePixrects(View *v) const
472 { 472 {
473 long sf = v->getStartFrame(); 473 int sf = v->getStartFrame();
474 long ef = v->getEndFrame(); 474 int ef = v->getEndFrame();
475 475
476 for (MeasureRectSet::const_iterator i = m_measureRects.begin(); 476 for (MeasureRectSet::const_iterator i = m_measureRects.begin();
477 i != m_measureRects.end(); ++i) { 477 i != m_measureRects.end(); ++i) {
478 478
479 // This logic depends on the fact that if one measure rect in 479 // This logic depends on the fact that if one measure rect in
493 493
494 if (i->haveFrames) { 494 if (i->haveFrames) {
495 if (i->startFrame >= v->getStartFrame()) { 495 if (i->startFrame >= v->getStartFrame()) {
496 x0 = v->getXForFrame(i->startFrame); 496 x0 = v->getXForFrame(i->startFrame);
497 } 497 }
498 if (i->endFrame <= long(v->getEndFrame())) { 498 if (i->endFrame <= int(v->getEndFrame())) {
499 x1 = v->getXForFrame(i->endFrame); 499 x1 = v->getXForFrame(i->endFrame);
500 } 500 }
501 } 501 }
502 502
503 i->pixrect = QRect(x0, i->pixrect.y(), x1 - x0, i->pixrect.height()); 503 i->pixrect = QRect(x0, i->pixrect.y(), x1 - x0, i->pixrect.height());
575 int x1 = v->width() + 1; 575 int x1 = v->width() + 1;
576 576
577 if (r.startFrame >= v->getStartFrame()) { 577 if (r.startFrame >= v->getStartFrame()) {
578 x0 = v->getXForFrame(r.startFrame); 578 x0 = v->getXForFrame(r.startFrame);
579 } 579 }
580 if (r.endFrame <= long(v->getEndFrame())) { 580 if (r.endFrame <= v->getEndFrame()) {
581 x1 = v->getXForFrame(r.endFrame); 581 x1 = v->getXForFrame(r.endFrame);
582 } 582 }
583 583
584 QRect pr = QRect(x0, r.pixrect.y(), x1 - x0, r.pixrect.height()); 584 QRect pr = QRect(x0, r.pixrect.y(), x1 - x0, r.pixrect.height());
585 r.pixrect = pr; 585 r.pixrect = pr;