[Qt] Add map pitch support on the example app

This commit is contained in:
Thiago Marcos P. Santos
2016-09-13 14:23:17 -07:00
parent 746bb678c8
commit 8f965b2c25

View File

@@ -160,7 +160,9 @@ void MapWindow::mouseMoveEvent(QMouseEvent *ev)
#endif
if (!delta.isNull()) {
if (ev->buttons() == Qt::LeftButton) {
if (ev->buttons() == Qt::LeftButton && ev->modifiers() & Qt::ShiftModifier) {
m_map.setPitch(m_map.pitch() - delta.y());
} else if (ev->buttons() == Qt::LeftButton) {
m_map.moveBy(delta);
} else if (ev->buttons() == Qt::RightButton) {
#if QT_VERSION < 0x050000