From ae15212f5aa543c14ff4e8bf4137f50b32c6152e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9F=D0=B5=D0=BB=D0=B8=D0=BF=D0=B5=D0=BD=D0=BA=D0=BE=20?= =?UTF-8?q?=D0=98=D0=B2=D0=B0=D0=BD?= Date: Sat, 21 Oct 2017 15:47:41 +0000 Subject: [PATCH] git-svn-id: svn://db.shs.com.ru/libs@300 a8b55f48-bf90-11e4-a774-851b48703e85 --- qad/blockview/blockview.cpp | 24 ++++++++++++++++++++++++ qad/blockview/blockview.h | 5 +++++ 2 files changed, 29 insertions(+) diff --git a/qad/blockview/blockview.cpp b/qad/blockview/blockview.cpp index 4f89b35..62c6d18 100644 --- a/qad/blockview/blockview.cpp +++ b/qad/blockview/blockview.cpp @@ -956,6 +956,30 @@ bool BlockView::connectPins(BlockItemPin * p0, BlockItemPin * p1) { } +void BlockView::setTransform(const QTransform & matrix, bool combine) { + QGraphicsView::setTransform(matrix, combine); + nav_target = _nav(); +} + + +void BlockView::centerOn(const QPointF & pos) { + QGraphicsView::centerOn(pos); + nav_target = _nav(); +} + + +void BlockView::centerOn(qreal x, qreal y) { + QGraphicsView::centerOn(x, y); + nav_target = _nav(); +} + + +void BlockView::centerOn(const QGraphicsItem * item) { + QGraphicsView::centerOn(item); + nav_target = _nav(); +} + + void BlockView::restoreSelState() { foreach (QGraphicsItem * i, sel_items) { i->setPos(i->data(1001).toPointF()); diff --git a/qad/blockview/blockview.h b/qad/blockview/blockview.h index 2f5f996..d6c9c99 100644 --- a/qad/blockview/blockview.h +++ b/qad/blockview/blockview.h @@ -73,6 +73,11 @@ public: QList connectionBuses(BlockItem * b0, BlockItem * b1) const; bool connectPins(BlockItemPin * p0, BlockItemPin * p1); + void setTransform(const QTransform & matrix, bool combine = false); + void centerOn(const QPointF & pos); + void centerOn(qreal x, qreal y); + void centerOn(const QGraphicsItem * item); + protected: void _init(); void _updateBack();