[yast-commit] r55434 - in /trunk/qt-graph/src: QY2Graph.cc QY2Graph.h
Author: aschnell Date: Wed Feb 11 16:23:12 2009 New Revision: 55434 URL: http://svn.opensuse.org/viewcvs/yast?rev=55434&view=rev Log: - save rect instead of size Modified: trunk/qt-graph/src/QY2Graph.cc trunk/qt-graph/src/QY2Graph.h Modified: trunk/qt-graph/src/QY2Graph.cc URL: http://svn.opensuse.org/viewcvs/yast/trunk/qt-graph/src/QY2Graph.cc?rev=55434&r1=55433&r2=55434&view=diff ============================================================================== --- trunk/qt-graph/src/QY2Graph.cc (original) +++ trunk/qt-graph/src/QY2Graph.cc Wed Feb 11 16:23:12 2009 @@ -111,7 +111,7 @@ QY2Graph::gToQ(const point& p, bool upside_down) const { QPointF tmp(p.x, p.y); - return upside_down ? QPointF(tmp.x(), size.height() - tmp.y()) : QPointF(tmp.x(), -tmp.y()); + return upside_down ? QPointF(tmp.x(), rect.height() - tmp.y()) : QPointF(tmp.x(), -tmp.y()); } @@ -119,7 +119,7 @@ QY2Graph::gToQ(const pointf& p, bool upside_down) const { QPointF tmp(p.x, p.y); - return upside_down ? QPointF(tmp.x(), size.height() - tmp.y()) : QPointF(tmp.x(), -tmp.y()); + return upside_down ? QPointF(tmp.x(), rect.height() - tmp.y()) : QPointF(tmp.x(), -tmp.y()); } @@ -327,9 +327,8 @@ } // don't use gToQ here since it adjusts the values - QRectF rect(GD_bb(graph).LL.x, GD_bb(graph).LL.y, GD_bb(graph).UR.x, GD_bb(graph).UR.y); + rect = QRectF(GD_bb(graph).LL.x, GD_bb(graph).LL.y, GD_bb(graph).UR.x, GD_bb(graph).UR.y); scene->setSceneRect(rect.adjusted(-5, -5, +5, +5)); - size = rect.size(); scene->setBackgroundBrush(aggetToQColor(graph, "bgcolor", Qt::white)); Modified: trunk/qt-graph/src/QY2Graph.h URL: http://svn.opensuse.org/viewcvs/yast/trunk/qt-graph/src/QY2Graph.h?rev=55434&r1=55433&r2=55434&view=diff ============================================================================== --- trunk/qt-graph/src/QY2Graph.h (original) +++ trunk/qt-graph/src/QY2Graph.h Wed Feb 11 16:23:12 2009 @@ -68,7 +68,7 @@ QGraphicsScene* scene; QSignalMapper* signalMapper; - QSizeF size; + QRectF rect; QPointF gToQ(const point& p, bool upside_down = true) const; QPointF gToQ(const pointf& p, bool upside_down = true) const; -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org
participants (1)
-
aschnell@svn.opensuse.org