ArcGIS Runtime SDK for Qt

Update attributes (feature service)

Loading

Code

#ifndef UPDATE_ATTRIBUTES_FEATURE_SERVICE_H
#define UPDATE_ATTRIBUTES_FEATURE_SERVICE_H

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

class QString;

#include <QQuickItem>

class UpdateAttributesFeatureService : public QQuickItem
{
  Q_OBJECT

  Q_PROPERTY(Esri::ArcGISRuntime::CalloutData* calloutData READ calloutData NOTIFY calloutDataChanged)
  Q_PROPERTY(QString featureType READ featureType NOTIFY featureTypeChanged)

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

  void componentComplete() override;
  static void init();
  Q_INVOKABLE void updateSelectedFeature(QString fieldVal);

signals:
  void calloutDataChanged();
  void featureSelected();
  void featureTypeChanged();
  void hideWindow();

private:
  void connectSignals();
  Esri::ArcGISRuntime::CalloutData* calloutData() const;
  QString featureType() 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;
  Esri::ArcGISRuntime::ArcGISFeature* m_selectedFeature = nullptr;
  QString m_featureType;
  QMetaObject::Connection m_featureLoadStatusChangedConnection;
};

#endif // UPDATE_ATTRIBUTES_FEATURE_SERVICE_H


In this topic
  1. Code