##// END OF EJS Templates
Fix wrong intialization of QPointF with QPoint
Michal Klocek -
r1773:5d5f1f8b87bd
parent child
Show More
@@ -144,10 +144,10 QVariant SplineAnimation::interpolated(const QVariant &start, const QVariant &en
144 144 continue;
145 145 x = startPair.second[i * 2].x() + ((endPair.second[i * 2].x() - startPair.second[i * 2].x()) * progress);
146 146 y = startPair.second[i * 2].y() + ((endPair.second[i * 2].y() - startPair.second[i * 2].y()) * progress);
147 result.second << QPoint(x,y);
147 result.second << QPointF(x,y);
148 148 x = startPair.second[i * 2 + 1].x() + ((endPair.second[i * 2 + 1].x() - startPair.second[i * 2 + 1].x()) * progress);
149 149 y = startPair.second[i * 2 + 1].y() + ((endPair.second[i * 2 + 1].y() - startPair.second[i * 2 + 1].y()) * progress);
150 result.second << QPoint(x,y);
150 result.second << QPointF(x,y);
151 151 }
152 152
153 153 }
@@ -119,7 +119,7 void LegendLayout::setAttachedGeometry(const QRectF& rect)
119 119 QPointF point(0,0);
120 120 foreach (LegendMarker* marker, m_legend->d_ptr->markers()) {
121 121 if (marker->isVisible()) {
122 marker->setGeometry(QRectF(QPoint(0,0),marker->effectiveSizeHint(Qt::PreferredSize)));
122 marker->setGeometry(QRectF(QPointF(0,0),marker->effectiveSizeHint(Qt::PreferredSize)));
123 123 marker->setPos(point.x(),rect.height()/2 - marker->boundingRect().height()/2);
124 124 const QRectF& rect = marker->boundingRect();
125 125 size = size.expandedTo(rect.size());
@@ -143,7 +143,7 void LegendLayout::setAttachedGeometry(const QRectF& rect)
143 143 QPointF point(0,0);
144 144 foreach (LegendMarker* marker, m_legend->d_ptr->markers()) {
145 145 if (marker->isVisible()) {
146 marker->setGeometry(QRectF(QPoint(0,0),marker->effectiveSizeHint(Qt::PreferredSize)));
146 marker->setGeometry(QRectF(QPointF(0,0),marker->effectiveSizeHint(Qt::PreferredSize)));
147 147 marker->setPos(point);
148 148 const QRectF& rect = marker->boundingRect();
149 149 qreal h = rect.height();
@@ -195,7 +195,7 void LegendLayout::setDettachedGeometry(const QRectF& rect)
195 195 for (int i=0; i<markers.count(); i++) {
196 196 LegendMarker *marker = markers.at(i);
197 197 if (marker->isVisible()) {
198 marker->setGeometry(QRectF(QPoint(0,0),marker->effectiveSizeHint(Qt::PreferredSize)));
198 marker->setGeometry(QRectF(QPointF(0,0),marker->effectiveSizeHint(Qt::PreferredSize)));
199 199 marker->setPos(point.x(),point.y());
200 200 const QRectF& boundingRect = marker->boundingRect();
201 201 qreal w = boundingRect.width();
@@ -228,7 +228,7 void LegendLayout::setDettachedGeometry(const QRectF& rect)
228 228 for (int i=0; i<markers.count(); i++) {
229 229 LegendMarker *marker = markers.at(i);
230 230 if (marker->isVisible()) {
231 marker->setGeometry(QRectF(QPoint(0,0),marker->effectiveSizeHint(Qt::PreferredSize)));
231 marker->setGeometry(QRectF(QPointF(0,0),marker->effectiveSizeHint(Qt::PreferredSize)));
232 232 const QRectF& boundingRect = marker->boundingRect();
233 233 qreal w = boundingRect.width();
234 234 qreal h = boundingRect.height();
@@ -262,7 +262,7 void LegendLayout::setDettachedGeometry(const QRectF& rect)
262 262 for (int i=0; i<markers.count(); i++) {
263 263 LegendMarker *marker = markers.at(i);
264 264 if (marker->isVisible()) {
265 marker->setGeometry(QRectF(QPoint(0,0),marker->effectiveSizeHint(Qt::PreferredSize)));
265 marker->setGeometry(QRectF(QPointF(0,0),marker->effectiveSizeHint(Qt::PreferredSize)));
266 266 const QRectF& boundingRect = marker->boundingRect();
267 267 qreal w = boundingRect.width();
268 268 qreal h = boundingRect.height();
@@ -298,7 +298,7 void LegendLayout::setDettachedGeometry(const QRectF& rect)
298 298 for (int i=0; i<markers.count(); i++) {
299 299 LegendMarker *marker = markers.at(i);
300 300 if (marker->isVisible()) {
301 marker->setGeometry(QRectF(QPoint(0,0),marker->effectiveSizeHint(Qt::PreferredSize)));
301 marker->setGeometry(QRectF(QPointF(0,0),marker->effectiveSizeHint(Qt::PreferredSize)));
302 302 const QRectF& boundingRect = marker->boundingRect();
303 303 qreal w = boundingRect.width();
304 304 qreal h = boundingRect.height();
@@ -55,7 +55,7 void Scroller::mousePressEvent(QGraphicsSceneMouseEvent* event)
55 55 case Scroll:
56 56 {
57 57 m_state = Stop;
58 m_speed = QPoint(0, 0);
58 m_speed = QPointF(0, 0);
59 59 m_offset = offset();
60 60 m_press = event->pos();
61 61 event->accept();
General Comments 0
You need to be logged in to leave comments. Login now