Feature layer selection

Loading

Code

#ifndef FEATURE_LAYER_SELECTION_H
#define FEATURE_LAYER_SELECTION_H

namespace Esri
{
  namespace ArcGISRuntime
  {
    class Map;
    class MapQuickView;
    class FeatureLayer;
    class ServiceFeatureTable;
  }
}

class QString;

#include <QQuickItem>

class FeatureLayerSelection : public QQuickItem
{
  Q_OBJECT

  Q_PROPERTY(QString selectedFeatureText READ selectedFeatureText NOTIFY selectedFeatureTextChanged)

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

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

signals:
  void selectedFeatureTextChanged();

private:
  void connectSignals();
  QString selectedFeatureText() const;

private:
  Esri::ArcGISRuntime::Map* m_map = nullptr;
  Esri::ArcGISRuntime::MapQuickView* m_mapView = nullptr;
  Esri::ArcGISRuntime::FeatureLayer* m_featureLayer = nullptr;
  Esri::ArcGISRuntime::ServiceFeatureTable* m_featureTable = nullptr;
  QString m_selectedFeatureText = "Click or tap to select features.";
};

#endif // FEATURE_LAYER_SELECTION_H


In this topic
  1. Code