ArcGIS Runtime SDK for Qt

Change sublayer visibility

Loading

Code

#ifndef CHANGE_SUBLAYER_VISIBILITY_H
#define CHANGE_SUBLAYER_VISIBILITY_H

namespace Esri
{
  namespace ArcGISRuntime
  {
    class Map;
    class MapQuickView;
    class ArcGISMapImageLayer;
  }
}

#include <QAbstractListModel>
#include <QQuickItem>

class ChangeSublayerVisibility : public QQuickItem
{
  Q_OBJECT

  Q_PROPERTY(QAbstractListModel* sublayerModel READ sublayerModel NOTIFY sublayerModelChanged)

public:
  explicit ChangeSublayerVisibility(QQuickItem* parent = nullptr);
  ~ChangeSublayerVisibility();

  void componentComplete() Q_DECL_OVERRIDE;
  static void init();

signals:
  void sublayerModelChanged();

private:
  QAbstractListModel* sublayerModel();

private:
  Esri::ArcGISRuntime::Map* m_map = nullptr;
  Esri::ArcGISRuntime::MapQuickView* m_mapView = nullptr;
  Esri::ArcGISRuntime::ArcGISMapImageLayer* m_mapImageLayer = nullptr;
  QAbstractListModel* m_sublayerModel = nullptr;
};

#endif // CHANGE_SUBLAYER_VISIBILITY_H


In this topic
  1. Code