many changes :P

This commit is contained in:
kazu
2016-06-06 22:08:53 +02:00
parent db6b479d86
commit 6243165084
56 changed files with 4399 additions and 245 deletions

View File

@@ -87,7 +87,10 @@ public:
bbox.add(Point2(mx2, my2));
float opacity = p.p->opacity();
p.p->setOpacity(0.65f);
p.p->drawImage(QRectF(sx1, sy1-sh, sw, sh), img, QRectF(0,0,img.width(),img.height()));
p.p->setOpacity(opacity);
// selected endpoint(s)?
if (hasFocus()) {
@@ -125,9 +128,19 @@ public:
}
virtual bool keyPressEvent(MapView2D* v, QKeyEvent *e) override {
(void) v;
(void) e;
const float s = (e->modifiers() & Qt::ShiftModifier) ? (1.0f) : (0.1f);
if (e->key() == Qt::Key_Up) {underlay->anchor += Point2(0, +s); return true;}
if (e->key() == Qt::Key_Down) {underlay->anchor += Point2(0, -s); return true;}
if (e->key() == Qt::Key_Left) {underlay->anchor += Point2(-s, 0); return true;}
if (e->key() == Qt::Key_Right) {underlay->anchor += Point2(+s, 0); return true;}
return false;
}