Mercurial > hg > svgui
diff layer/ImageLayer.cpp @ 811:c4ef666721bf
Merge from branch warnfix_no_size_t
author | Chris Cannam |
---|---|
date | Wed, 18 Jun 2014 13:51:27 +0100 |
parents | 4c8ca536b54f |
children | b66fb15de477 |
line wrap: on
line diff
--- a/layer/ImageLayer.cpp Tue Jun 03 11:10:52 2014 +0100 +++ b/layer/ImageLayer.cpp Wed Jun 18 13:51:27 2014 +0100 @@ -78,7 +78,7 @@ } QString -ImageLayer::getPropertyLabel(const PropertyName &name) const +ImageLayer::getPropertyLabel(const PropertyName &) const { return ""; } @@ -116,14 +116,14 @@ } bool -ImageLayer::isLayerScrollable(const View *v) const +ImageLayer::isLayerScrollable(const View *) const { return true; } ImageModel::PointList -ImageLayer::getLocalPoints(View *v, int x, int y) const +ImageLayer::getLocalPoints(View *v, int x, int ) const { if (!m_model) return ImageModel::PointList(); @@ -185,9 +185,9 @@ } } - long useFrame = points.begin()->frame; +// int useFrame = points.begin()->frame; - RealTime rt = RealTime::frame2RealTime(useFrame, m_model->getSampleRate()); +// RealTime rt = RealTime::frame2RealTime(useFrame, m_model->getSampleRate()); QString text; /* @@ -209,7 +209,7 @@ bool ImageLayer::snapToFeatureFrame(View *v, int &frame, - size_t &resolution, + int &resolution, SnapType snap) const { if (!m_model) { @@ -292,8 +292,8 @@ // int x0 = rect.left(), x1 = rect.right(); int x0 = 0, x1 = v->width(); - long frame0 = v->getFrameForX(x0); - long frame1 = v->getFrameForX(x1); + int frame0 = v->getFrameForX(x0); + int frame1 = v->getFrameForX(x1); ImageModel::PointList points(m_model->getPoints(frame0, frame1)); if (points.empty()) return; @@ -519,8 +519,6 @@ QImage ImageLayer::getImage(View *v, QString name, QSize maxSize) const { - bool need = false; - // SVDEBUG << "ImageLayer::getImage(" << v << ", " << name << ", (" // << maxSize.width() << "x" << maxSize.height() << "))" << endl; @@ -565,7 +563,7 @@ return; } - long frame = v->getFrameForX(e->x()); + int frame = v->getFrameForX(e->x()); if (frame < 0) frame = 0; frame = frame / m_model->getResolution() * m_model->getResolution(); @@ -586,7 +584,7 @@ if (!m_model || !m_editing) return; - long frame = v->getFrameForX(e->x()); + int frame = v->getFrameForX(e->x()); if (frame < 0) frame = 0; frame = frame / m_model->getResolution() * m_model->getResolution(); @@ -596,13 +594,11 @@ } void -ImageLayer::drawEnd(View *v, QMouseEvent *) +ImageLayer::drawEnd(View *, QMouseEvent *) { // SVDEBUG << "ImageLayer::drawEnd(" << e->x() << "," << e->y() << ")" << endl; if (!m_model || !m_editing) return; - bool ok = false; - ImageDialog dialog(tr("Select image"), "", ""); if (dialog.exec() == QDialog::Accepted) { @@ -623,7 +619,7 @@ } bool -ImageLayer::addImage(long frame, QString url) +ImageLayer::addImage(int frame, QString url) { QImage image(getLocalFilename(url)); if (image.isNull()) { @@ -668,8 +664,8 @@ { if (!m_model || !m_editing) return; - long frameDiff = v->getFrameForX(e->x()) - v->getFrameForX(m_editOrigin.x()); - long frame = m_originalPoint.frame + frameDiff; + int frameDiff = v->getFrameForX(e->x()) - v->getFrameForX(m_editOrigin.x()); + int frame = m_originalPoint.frame + frameDiff; if (frame < 0) frame = 0; frame = (frame / m_model->getResolution()) * m_model->getResolution(); @@ -727,7 +723,7 @@ } void -ImageLayer::moveSelection(Selection s, size_t newStartFrame) +ImageLayer::moveSelection(Selection s, int newStartFrame) { if (!m_model) return; @@ -823,7 +819,7 @@ } bool -ImageLayer::paste(View *v, const Clipboard &from, int frameOffset, bool /* interactive */) +ImageLayer::paste(View *v, const Clipboard &from, int /* frameOffset */, bool /* interactive */) { if (!m_model) return false; @@ -856,7 +852,7 @@ if (!i->haveFrame()) continue; - size_t frame = 0; + int frame = 0; if (!realign) { @@ -970,7 +966,7 @@ } void -ImageLayer::setProperties(const QXmlAttributes &attributes) +ImageLayer::setProperties(const QXmlAttributes &) { }