Mercurial > hg > easyhg
comparison panned.cpp @ 131:2550aaa09240
* Add connecting line to uncommitted item; turn Revert icon blue; cut down menus to things that actually work (well, mostly)
author | Chris Cannam |
---|---|
date | Tue, 30 Nov 2010 11:17:30 +0000 |
parents | b0a90ac84b8b |
children | 16ceeee30e2a |
comparison
equal
deleted
inserted
replaced
130:9ae4cc0055e8 | 131:2550aaa09240 |
---|---|
14 License, or (at your option) any later version. See the file | 14 License, or (at your option) any later version. See the file |
15 COPYING included with this distribution for more information. | 15 COPYING included with this distribution for more information. |
16 */ | 16 */ |
17 | 17 |
18 #include "panned.h" | 18 #include "panned.h" |
19 #include "debug.h" | |
19 | 20 |
20 #include <QScrollBar> | 21 #include <QScrollBar> |
21 #include <QWheelEvent> | 22 #include <QWheelEvent> |
22 | 23 |
23 #include <iostream> | 24 #include <iostream> |
29 } | 30 } |
30 | 31 |
31 void | 32 void |
32 Panned::resizeEvent(QResizeEvent *ev) | 33 Panned::resizeEvent(QResizeEvent *ev) |
33 { | 34 { |
35 DEBUG << "Panned::resizeEvent()" << endl; | |
36 | |
34 QPointF nearpt = mapToScene(0, 0); | 37 QPointF nearpt = mapToScene(0, 0); |
35 QPointF farpt = mapToScene(width(), height()); | 38 QPointF farpt = mapToScene(width(), height()); |
36 QSizeF sz(farpt.x()-nearpt.x(), farpt.y()-nearpt.y()); | 39 QSizeF sz(farpt.x()-nearpt.x(), farpt.y()-nearpt.y()); |
37 QRectF pr(nearpt, sz); | 40 QRectF pr(nearpt, sz); |
38 | 41 |