git-svn-id: svn://db.shs.com.ru/libs@300 a8b55f48-bf90-11e4-a774-851b48703e85

This commit is contained in:
2017-10-21 15:47:41 +00:00
parent 7a43895b07
commit ae15212f5a
2 changed files with 29 additions and 0 deletions

View File

@@ -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() { void BlockView::restoreSelState() {
foreach (QGraphicsItem * i, sel_items) { foreach (QGraphicsItem * i, sel_items) {
i->setPos(i->data(1001).toPointF()); i->setPos(i->data(1001).toPointF());

View File

@@ -73,6 +73,11 @@ public:
QList<BlockBusItem * > connectionBuses(BlockItem * b0, BlockItem * b1) const; QList<BlockBusItem * > connectionBuses(BlockItem * b0, BlockItem * b1) const;
bool connectPins(BlockItemPin * p0, BlockItemPin * p1); 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: protected:
void _init(); void _init();
void _updateBack(); void _updateBack();