diff options
author | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2016-06-11 13:48:27 +0300 |
---|---|---|
committer | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2016-06-20 13:01:59 +0300 |
commit | 760a692378a8ae7c9cc87246c10f2fe9a64117bd (patch) | |
tree | 9503c6662a5807390700bb948096e82b544ebf19 /platform/qt/app | |
parent | 2f8fce7bdb0a60a1fb94a3f5bb9f35adf8795094 (diff) | |
download | qtlocation-mapboxgl-760a692378a8ae7c9cc87246c10f2fe9a64117bd.tar.gz |
[Qt] Added QMapbox::TransitionOptions to style class functions
Diffstat (limited to 'platform/qt/app')
-rw-r--r-- | platform/qt/app/mapwindow.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/platform/qt/app/mapwindow.cpp b/platform/qt/app/mapwindow.cpp index 35f56a0bef..da8a9767ce 100644 --- a/platform/qt/app/mapwindow.cpp +++ b/platform/qt/app/mapwindow.cpp @@ -67,6 +67,8 @@ void MapWindow::changeStyle() void MapWindow::keyPressEvent(QKeyEvent *ev) { + static const QMapbox::TransitionOptions transition { 300, {} }; + switch (ev->key()) { case Qt::Key_S: changeStyle(); @@ -74,6 +76,13 @@ void MapWindow::keyPressEvent(QKeyEvent *ev) case Qt::Key_Tab: m_map.cycleDebugOptions(); break; + case Qt::Key_R: + if (m_map.hasClass("night")) { + m_map.removeClass("night", transition); + } else { + m_map.addClass("night", transition); + } + break; default: break; } |