ArcGIS Runtime SDK for Qt

Feature layer (geodatabase)

Loading

Code

#ifndef FEATURE_LAYER_GEODATABASE_H
#define FEATURE_LAYER_GEODATABASE_H

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

#include <QQuickItem>

#include "Error.h"

class FeatureLayerGeodatabase : public QQuickItem
{
  Q_OBJECT

  Q_PROPERTY(QString errorMessage READ errorMessage NOTIFY errorMessageChanged)

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

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

signals:
  void errorMessageChanged();

private slots:
  void logError(Esri::ArcGISRuntime::Error error);

private:
  QString errorMessage() const;
  void setErrorMessage(const QString& msg);

  Esri::ArcGISRuntime::Map* m_map = nullptr;
  Esri::ArcGISRuntime::MapQuickView* m_mapView = nullptr;
  Esri::ArcGISRuntime::Geodatabase* m_geodatabase = nullptr;
  QString m_dataPath;
  QString m_errorMsg;
};

#endif // FEATURE_LAYER_GEODATABASE_H

Code

#ifndef FEATURELAYERDICTIONARYRENDERER_H
#define FEATURELAYERDICTIONARYRENDERER_H

#include <QQuickItem>

namespace Esri
{
  namespace ArcGISRuntime
  {
    class Geodatabase;
    class MapQuickView;
  }
}

class FeatureLayerDictionaryRenderer : public QQuickItem
{
  Q_OBJECT

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

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

signals:
  void allLayersLoaded();

private:
  QString m_dataPath;
  double m_scaleFactor = 1.0;
  int m_loadedLayerCount = 0;
  Esri::ArcGISRuntime::MapQuickView* m_mapView = nullptr;
  Esri::ArcGISRuntime::Geodatabase* m_geodatabase = nullptr;
};

#endif // FEATURELAYERDICTIONARYRENDERER_H


In this topic
  1. Code
  2. Code