[Qt] Do not use non-Qt headers
This commit is contained in:
@@ -1,7 +1,5 @@
|
||||
#include "mapwindow.hpp"
|
||||
|
||||
#include <mbgl/util/default_styles.hpp>
|
||||
|
||||
#include <QApplication>
|
||||
#include <QDebug>
|
||||
#include <QKeyEvent>
|
||||
@@ -54,16 +52,12 @@ void MapWindow::changeStyle()
|
||||
{
|
||||
static uint8_t currentStyleIndex;
|
||||
|
||||
mbgl::util::default_styles::DefaultStyle newStyle =
|
||||
mbgl::util::default_styles::orderedStyles[currentStyleIndex];
|
||||
auto& styles = QMapbox::defaultStyles();
|
||||
|
||||
QString url(newStyle.url);
|
||||
m_map.setStyleURL(url);
|
||||
m_map.setStyleURL(styles[currentStyleIndex].first);
|
||||
setWindowTitle(QString("Mapbox GL: ") + styles[currentStyleIndex].second);
|
||||
|
||||
QString name(newStyle.name);
|
||||
setWindowTitle(QString("Mapbox GL: ") + name);
|
||||
|
||||
if (++currentStyleIndex == mbgl::util::default_styles::numOrderedStyles) {
|
||||
if (++currentStyleIndex == styles.size()) {
|
||||
currentStyleIndex = 0;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user