git-svn-id: svn://db.shs.com.ru/libs@513 a8b55f48-bf90-11e4-a774-851b48703e85
This commit is contained in:
@@ -76,6 +76,8 @@ void BlockView::_init() {
|
|||||||
connect(&nav_anim, SIGNAL(finished()), this, SLOT(_navFinished()));
|
connect(&nav_anim, SIGNAL(finished()), this, SLOT(_navFinished()));
|
||||||
connect(scene_, SIGNAL(sceneRectChanged(QRectF)), this, SLOT(adjustThumb()));
|
connect(scene_, SIGNAL(sceneRectChanged(QRectF)), this, SLOT(adjustThumb()));
|
||||||
connect(scene_, SIGNAL(selectionChanged()), this, SLOT(sceneSelectionChanged()));
|
connect(scene_, SIGNAL(selectionChanged()), this, SLOT(sceneSelectionChanged()));
|
||||||
|
connect(horizontalScrollBar(), SIGNAL(valueChanged(int)), this, SLOT(scrolled()));
|
||||||
|
connect(verticalScrollBar(), SIGNAL(valueChanged(int)), this, SLOT(scrolled()));
|
||||||
centerOn(scene_->sceneRect().center());
|
centerOn(scene_->sceneRect().center());
|
||||||
setCacheMode(CacheBackground);
|
setCacheMode(CacheBackground);
|
||||||
setTransformationAnchor(QGraphicsView::AnchorUnderMouse);
|
setTransformationAnchor(QGraphicsView::AnchorUnderMouse);
|
||||||
@@ -697,6 +699,11 @@ void BlockView::updateNavRect() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void BlockView::scrolled() {
|
||||||
|
updateNavRect();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void BlockView::mouseMoveEvent(QMouseEvent * event) {
|
void BlockView::mouseMoveEvent(QMouseEvent * event) {
|
||||||
if (navigation) {
|
if (navigation) {
|
||||||
if (event->buttons().testFlag(Qt::MidButton) || event->buttons().testFlag(Qt::RightButton)) {
|
if (event->buttons().testFlag(Qt::MidButton) || event->buttons().testFlag(Qt::RightButton)) {
|
||||||
|
|||||||
@@ -112,7 +112,6 @@ public:
|
|||||||
protected:
|
protected:
|
||||||
void _init();
|
void _init();
|
||||||
void _updateBack();
|
void _updateBack();
|
||||||
void updateNavRect();
|
|
||||||
bool event(QEvent * e);
|
bool event(QEvent * e);
|
||||||
bool eventFilter(QObject * o, QEvent * e);
|
bool eventFilter(QObject * o, QEvent * e);
|
||||||
void stopTimer(int & tid);
|
void stopTimer(int & tid);
|
||||||
@@ -208,6 +207,8 @@ protected slots:
|
|||||||
void removedBlock(QObject * o);
|
void removedBlock(QObject * o);
|
||||||
void removeJunk();
|
void removeJunk();
|
||||||
void sceneSelectionChanged();
|
void sceneSelectionChanged();
|
||||||
|
void updateNavRect();
|
||||||
|
void scrolled();
|
||||||
void _setThumb(double v);
|
void _setThumb(double v);
|
||||||
void _setNav(QRectF v);
|
void _setNav(QRectF v);
|
||||||
void _navFinished();
|
void _navFinished();
|
||||||
|
|||||||
Reference in New Issue
Block a user