diff options
Diffstat (limited to 'platform/qt/src/qmapboxgl.cpp')
-rw-r--r-- | platform/qt/src/qmapboxgl.cpp | 85 |
1 files changed, 2 insertions, 83 deletions
diff --git a/platform/qt/src/qmapboxgl.cpp b/platform/qt/src/qmapboxgl.cpp index 80b64f05df..c37b2563b5 100644 --- a/platform/qt/src/qmapboxgl.cpp +++ b/platform/qt/src/qmapboxgl.cpp @@ -71,16 +71,6 @@ QThreadStorage<std::shared_ptr<mbgl::util::RunLoop>> loop; // Conversion helper functions. -auto fromQStringList(const QStringList &list) -{ - std::vector<std::string> strings; - strings.reserve(list.size()); - for (const QString &string : list) { - strings.push_back(string.toStdString()); - } - return strings; -} - mbgl::Size sanitizedSize(const QSize& size) { return mbgl::Size { mbgl::util::max(0u, static_cast<uint32_t>(size.width())), @@ -752,69 +742,6 @@ void QMapboxGL::setGestureInProgress(bool progress) } /*! - Adds an \a className to the list of active classes. Layers tagged with a certain class - will only be active when the class is added. - - This was removed from the \l {https://www.mapbox.com/mapbox-gl-style-spec/#layer-paint.*} - {Mapbox style specification} and should no longer be used. - - \deprecated - \sa removeClass() -*/ -void QMapboxGL::addClass(const QString &className) -{ - d_ptr->mapObj->addClass(className.toStdString()); -} - -/*! - Removes a \a className. - - \deprecated - \sa addClass() -*/ -void QMapboxGL::removeClass(const QString &className) -{ - d_ptr->mapObj->removeClass(className.toStdString()); -} - -/*! - Returns true when \a className is active, false otherwise. - - \deprecated - \sa addClass() -*/ -bool QMapboxGL::hasClass(const QString &className) const -{ - return d_ptr->mapObj->hasClass(className.toStdString()); -} - -/*! - Bulk adds a list of \a classNames. - - \deprecated - \sa addClass() -*/ -void QMapboxGL::setClasses(const QStringList &classNames) -{ - d_ptr->mapObj->setClasses(fromQStringList(classNames)); -} - -/*! - Returns a list of active classes. - - \deprecated - \sa setClasses() -*/ -QStringList QMapboxGL::getClasses() const -{ - QStringList classNames; - for (const std::string &mbglClass : d_ptr->mapObj->getClasses()) { - classNames << QString::fromStdString(mbglClass); - } - return classNames; -} - -/*! Sets the \a duration and \a delay of style class transitions. Style property values transition to new values with animation when a new class is set. @@ -958,9 +885,6 @@ void QMapboxGL::setLayoutProperty(const QString& layer, const QString& property, as defined by the \l {https://www.mapbox.com/mapbox-gl-style-spec/} {Mapbox style specification} for paint properties. - The argument \a styleClass is deprecated and is used for defining the style class for the paint - property. - For paint properties that take a color as \a value, such as \c fill-color, a string such as \c blue can be passed or a QColor. @@ -1006,7 +930,7 @@ void QMapboxGL::setLayoutProperty(const QString& layer, const QString& property, map->setPaintProperty("route","line-dasharray", lineDashArray); \endcode */ -void QMapboxGL::setPaintProperty(const QString& layer, const QString& property, const QVariant& value, const QString& styleClass) +void QMapboxGL::setPaintProperty(const QString& layer, const QString& property, const QVariant& value) { using namespace mbgl::style; @@ -1016,12 +940,7 @@ void QMapboxGL::setPaintProperty(const QString& layer, const QString& property, return; } - mbgl::optional<std::string> klass; - if (!styleClass.isEmpty()) { - klass = styleClass.toStdString(); - } - - if (conversion::setPaintProperty(*layer_, property.toStdString(), value, klass)) { + if (conversion::setPaintProperty(*layer_, property.toStdString(), value)) { qWarning() << "Error setting paint property:" << layer << "-" << property; return; } |