I managed to get ENC layers working by starting from the default new C++ project and modifying as below. It works, which is great! However, as soon as the layers load, scrolling becomes impossible. I can't tell if it's slowing to a crawl or there's something about the layer interfering with the scroll but it kind of looks like it's a CPU issue. I'm using a 2018 Macbook Air, so machine performance should not be the bottleneck.
The SENC files seem to already be generated, and the data set is a rather small view of Providence and/or Boston harbor.
What's going on here and how do we fix it?
==========================
P.S. If anyone else is trying to get ENC working, here are the full working code sets.
C++ file:
<SPAN class="comment token">// Copyright 2016 ESRI</SPAN>
<SPAN class="comment token">//</SPAN>
<SPAN class="comment token">// All rights reserved under the copyright laws of the United States</SPAN>
<SPAN class="comment token">// and applicable international laws, treaties, and conventions.</SPAN>
<SPAN class="comment token">//</SPAN>
<SPAN class="comment token">// You may freely redistribute and use this sample code, with or</SPAN>
<SPAN class="comment token">// without modification, provided you include the original copyright</SPAN>
<SPAN class="comment token">// notice and use restrictions.</SPAN>
<SPAN class="comment token">//</SPAN>
<SPAN class="comment token">// See the Sample code usage restrictions document for further information.</SPAN>
<SPAN class="comment token">//</SPAN>
<SPAN class="comment token">// C++ API headers</SPAN>
<SPAN class="property macro token">#include <SPAN class="string token">"Basemap.h"</SPAN></SPAN>
<SPAN class="comment token">// Other headers</SPAN>
<SPAN class="property macro token">#include <SPAN class="string token">"ArcGIS_QtWidgets.h"</SPAN></SPAN>
<SPAN class="property macro token">#include <SPAN class="string token">"Map.h"</SPAN></SPAN>
<SPAN class="property macro token">#include <SPAN class="string token">"MapGraphicsView.h"</SPAN></SPAN>
<SPAN class="property macro token">#include <SPAN class="string token">"EncExchangeSet.h"</SPAN></SPAN>
<SPAN class="property macro token">#include <SPAN class="string token">"EncLayer.h"</SPAN></SPAN>
<SPAN class="property macro token">#include <SPAN class="string token">"EncFeature.h"</SPAN></SPAN>
<SPAN class="property macro token">#include <SPAN class="string token">"EncCell.h"</SPAN></SPAN>
<SPAN class="property macro token">#include <SPAN class="string token">"EncTextGroupVisibilitySettings.h"</SPAN></SPAN>
<SPAN class="property macro token">#include <SPAN class="string token">"EncEnvironmentSettings.h"</SPAN></SPAN>
<SPAN class="keyword token">using</SPAN> <SPAN class="keyword token">namespace</SPAN> Esri<SPAN class="operator token">::</SPAN>ArcGISRuntime<SPAN class="punctuation token">;</SPAN>
ArcGIS_QtWidgets<SPAN class="operator token">::</SPAN><SPAN class="token function">ArcGIS_QtWidgets</SPAN><SPAN class="punctuation token">(</SPAN>QWidget<SPAN class="operator token">*</SPAN> parent <SPAN class="comment token">/*=nullptr*/</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="operator token">:</SPAN>
<SPAN class="token function">QMainWindow</SPAN><SPAN class="punctuation token">(</SPAN>parent<SPAN class="punctuation token">)</SPAN>
<SPAN class="punctuation token">{</SPAN>
<SPAN class="comment token">// get EncDisplaySettings instance</SPAN>
EncDisplaySettings<SPAN class="operator token">*</SPAN> displaySettings <SPAN class="operator token">=</SPAN> EncEnvironmentSettings<SPAN class="operator token">::</SPAN><SPAN class="token function">displaySettings</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="comment token">// set paths</SPAN>
EncEnvironmentSettings<SPAN class="operator token">::</SPAN><SPAN class="token function">setSencDataPath</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="string token">"/Users/tmptmp/Documents/Charts/SENC"</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
EncEnvironmentSettings<SPAN class="operator token">::</SPAN><SPAN class="token function">setResourcePath</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="string token">"/Users/tmptmp/Documents/Charts/hydrography"</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="comment token">// create EncExchangeSet using paths</SPAN>
encExchangeSet <SPAN class="operator token">=</SPAN> <SPAN class="keyword token">new</SPAN> <SPAN class="token function">EncExchangeSet</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="token function">QStringList</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="token function">QStringList</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN> <SPAN class="operator token"><<</SPAN> <SPAN class="string token">"/Users/tmptmp/Documents/Charts/ENC_ROOT_Boston_Harbor/CATALOG.031"</SPAN> <SPAN class="operator token"><<</SPAN> <SPAN class="string token">"/Users/tmptmp/Documents/Charts/ENC/US_REGION02/CATALOG.031"</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="keyword token">this</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="token function">connect</SPAN><SPAN class="punctuation token">(</SPAN>encExchangeSet<SPAN class="punctuation token">,</SPAN> <SPAN class="operator token">&</SPAN>EncExchangeSet<SPAN class="operator token">::</SPAN>doneLoading<SPAN class="punctuation token">,</SPAN> <SPAN class="keyword token">this</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="punctuation token">[</SPAN><SPAN class="keyword token">this</SPAN><SPAN class="punctuation token">]</SPAN><SPAN class="punctuation token">{</SPAN>
<SPAN class="comment token">// get the list of EncDataset</SPAN>
QList<SPAN class="operator token"><</SPAN>EncDataset<SPAN class="operator token">*</SPAN><SPAN class="operator token">></SPAN> EncDatasets <SPAN class="operator token">=</SPAN> encExchangeSet<SPAN class="operator token">-</SPAN><SPAN class="operator token">></SPAN><SPAN class="token function">datasets</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="comment token">// display the names of EncDataset</SPAN>
<SPAN class="keyword token">for</SPAN> <SPAN class="punctuation token">(</SPAN>EncDataset<SPAN class="operator token">*</SPAN> EncDataset<SPAN class="operator token">:</SPAN> EncDatasets<SPAN class="punctuation token">)</SPAN>
<SPAN class="punctuation token">{</SPAN>
<SPAN class="comment token">// Create the cell and layer</SPAN>
<SPAN class="keyword token">auto</SPAN> myEncLayer <SPAN class="operator token">=</SPAN> <SPAN class="keyword token">new</SPAN> <SPAN class="token function">EncLayer</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="keyword token">new</SPAN> <SPAN class="token function">EncCell</SPAN><SPAN class="punctuation token">(</SPAN>EncDataset<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="comment token">// Add the layer to the map</SPAN>
m_map<SPAN class="operator token">-</SPAN><SPAN class="operator token">></SPAN><SPAN class="token function">operationalLayers</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="operator token">-</SPAN><SPAN class="operator token">></SPAN><SPAN class="token function">append</SPAN><SPAN class="punctuation token">(</SPAN>myEncLayer<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="token function">qDebug</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="operator token"><<</SPAN> <SPAN class="string token">"Loaded map: "</SPAN> <SPAN class="operator token"><<</SPAN> EncDataset<SPAN class="operator token">-</SPAN><SPAN class="operator token">></SPAN><SPAN class="token function">name</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="punctuation token">}</SPAN>
<SPAN class="token function">qDebug</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="operator token"><<</SPAN> <SPAN class="string token">"Loaded all maps"</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="punctuation token">}</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="comment token">// Load the EncExchangeSet</SPAN>
encExchangeSet<SPAN class="operator token">-</SPAN><SPAN class="operator token">></SPAN><SPAN class="token function">load</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="comment token">// get ENC text group visibility settings object</SPAN>
EncTextGroupVisibilitySettings<SPAN class="operator token">*</SPAN> encTextGroupVisibilitySettings <SPAN class="operator token">=</SPAN> EncEnvironmentSettings<SPAN class="operator token">::</SPAN><SPAN class="token function">displaySettings</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="operator token">-</SPAN><SPAN class="operator token">></SPAN><SPAN class="token function">textGroupVisibilitySettings</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="comment token">// set properties</SPAN>
encTextGroupVisibilitySettings<SPAN class="operator token">-</SPAN><SPAN class="operator token">></SPAN><SPAN class="token function">setImportantText</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="token boolean">false</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
encTextGroupVisibilitySettings<SPAN class="operator token">-</SPAN><SPAN class="operator token">></SPAN><SPAN class="token function">setNatureOfSeabed</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="token boolean">false</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="comment token">// Create the Widget view</SPAN>
m_mapView <SPAN class="operator token">=</SPAN> <SPAN class="keyword token">new</SPAN> <SPAN class="token function">MapGraphicsView</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="keyword token">this</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="token function">connect</SPAN><SPAN class="punctuation token">(</SPAN>m_mapView<SPAN class="punctuation token">,</SPAN> <SPAN class="operator token">&</SPAN>MapGraphicsView<SPAN class="operator token">::</SPAN>mousePressedAndHeld<SPAN class="punctuation token">,</SPAN> <SPAN class="keyword token">this</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="punctuation token">[</SPAN><SPAN class="keyword token">this</SPAN><SPAN class="punctuation token">]</SPAN><SPAN class="punctuation token">(</SPAN>QMouseEvent<SPAN class="operator token">&</SPAN> mouseEvent<SPAN class="punctuation token">)</SPAN>
<SPAN class="punctuation token">{</SPAN>
<SPAN class="token function">qDebug</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="operator token"><<</SPAN> <SPAN class="string token">"Mouse pressed"</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="keyword token">double</SPAN> tolerance <SPAN class="operator token">=</SPAN> <SPAN class="number token">5.0</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="keyword token">bool</SPAN> returnPopupsOnly <SPAN class="operator token">=</SPAN> <SPAN class="token boolean">false</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="keyword token">int</SPAN> maximumResults <SPAN class="operator token">=</SPAN> <SPAN class="number token">5</SPAN><SPAN class="punctuation token">;</SPAN>
m_mapView<SPAN class="operator token">-</SPAN><SPAN class="operator token">></SPAN><SPAN class="token function">identifyLayers</SPAN><SPAN class="punctuation token">(</SPAN>mouseEvent<SPAN class="punctuation token">.</SPAN><SPAN class="token function">x</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">,</SPAN> mouseEvent<SPAN class="punctuation token">.</SPAN><SPAN class="token function">y</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">,</SPAN> tolerance<SPAN class="punctuation token">,</SPAN> returnPopupsOnly<SPAN class="punctuation token">,</SPAN> maximumResults<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="punctuation token">}</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="token function">connect</SPAN><SPAN class="punctuation token">(</SPAN>m_mapView<SPAN class="punctuation token">,</SPAN> <SPAN class="operator token">&</SPAN>MapGraphicsView<SPAN class="operator token">::</SPAN>identifyLayersCompleted<SPAN class="punctuation token">,</SPAN> <SPAN class="keyword token">this</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="punctuation token">[</SPAN><SPAN class="punctuation token">]</SPAN><SPAN class="punctuation token">(</SPAN>QUuid taskId<SPAN class="punctuation token">,</SPAN> QList<SPAN class="operator token"><</SPAN>Esri<SPAN class="operator token">::</SPAN>ArcGISRuntime<SPAN class="operator token">::</SPAN>IdentifyLayerResult<SPAN class="operator token">*</SPAN><SPAN class="operator token">></SPAN> identifyResults<SPAN class="punctuation token">)</SPAN>
<SPAN class="punctuation token">{</SPAN>
<SPAN class="token function">Q_UNUSED</SPAN><SPAN class="punctuation token">(</SPAN>taskId<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="keyword token">for</SPAN> <SPAN class="punctuation token">(</SPAN><SPAN class="keyword token">int</SPAN> i <SPAN class="operator token">=</SPAN> <SPAN class="number token">0</SPAN><SPAN class="punctuation token">;</SPAN> i <SPAN class="operator token"><</SPAN> identifyResults<SPAN class="punctuation token">.</SPAN><SPAN class="token function">size</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN> i<SPAN class="operator token">++</SPAN><SPAN class="punctuation token">)</SPAN>
<SPAN class="punctuation token">{</SPAN>
EncLayer<SPAN class="operator token">*</SPAN> encLayer <SPAN class="operator token">=</SPAN> <SPAN class="keyword token">dynamic_cast</SPAN><SPAN class="operator token"><</SPAN>EncLayer<SPAN class="operator token">*</SPAN><SPAN class="operator token">></SPAN><SPAN class="punctuation token">(</SPAN>identifyResults<SPAN class="punctuation token">.</SPAN><SPAN class="token function">at</SPAN><SPAN class="punctuation token">(</SPAN>i<SPAN class="punctuation token">)</SPAN><SPAN class="operator token">-</SPAN><SPAN class="operator token">></SPAN><SPAN class="token function">layerContent</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="keyword token">if</SPAN> <SPAN class="punctuation token">(</SPAN>encLayer<SPAN class="punctuation token">)</SPAN>
<SPAN class="punctuation token">{</SPAN>
<SPAN class="token function">qDebug</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN> <SPAN class="operator token"><<</SPAN> <SPAN class="string token">"EncFeatures identified in EncLayer #"</SPAN> <SPAN class="operator token"><<</SPAN> i <SPAN class="operator token"><<</SPAN> <SPAN class="string token">":"</SPAN><SPAN class="punctuation token">;</SPAN>
QList<SPAN class="operator token"><</SPAN>GeoElement<SPAN class="operator token">*</SPAN><SPAN class="operator token">></SPAN>objects <SPAN class="operator token">=</SPAN> identifyResults<SPAN class="punctuation token">.</SPAN><SPAN class="token function">at</SPAN><SPAN class="punctuation token">(</SPAN>i<SPAN class="punctuation token">)</SPAN><SPAN class="operator token">-</SPAN><SPAN class="operator token">></SPAN><SPAN class="token function">geoElements</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="keyword token">for</SPAN> <SPAN class="punctuation token">(</SPAN><SPAN class="keyword token">int</SPAN> j <SPAN class="operator token">=</SPAN> <SPAN class="number token">0</SPAN><SPAN class="punctuation token">;</SPAN> j <SPAN class="operator token"><</SPAN> objects<SPAN class="punctuation token">.</SPAN><SPAN class="token function">size</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN> j<SPAN class="operator token">++</SPAN><SPAN class="punctuation token">)</SPAN>
<SPAN class="punctuation token">{</SPAN>
EncFeature<SPAN class="operator token">*</SPAN> encFeature <SPAN class="operator token">=</SPAN> <SPAN class="keyword token">dynamic_cast</SPAN><SPAN class="operator token"><</SPAN>EncFeature<SPAN class="operator token">*</SPAN><SPAN class="operator token">></SPAN><SPAN class="punctuation token">(</SPAN>objects<SPAN class="punctuation token">.</SPAN><SPAN class="token function">at</SPAN><SPAN class="punctuation token">(</SPAN>j<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="keyword token">if</SPAN> <SPAN class="punctuation token">(</SPAN>encFeature<SPAN class="punctuation token">)</SPAN>
<SPAN class="punctuation token">{</SPAN>
<SPAN class="token function">qDebug</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN> <SPAN class="operator token"><<</SPAN> <SPAN class="string token">"Found EncFeature: "</SPAN> <SPAN class="operator token"><<</SPAN> encFeature<SPAN class="operator token">-</SPAN><SPAN class="operator token">></SPAN><SPAN class="token function">description</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
QVariantMap map <SPAN class="operator token">=</SPAN> encFeature<SPAN class="operator token">-</SPAN><SPAN class="operator token">></SPAN><SPAN class="token function">attributes</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="operator token">-</SPAN><SPAN class="operator token">></SPAN><SPAN class="token function">attributesMap</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="token function">qDebug</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN> <SPAN class="operator token"><<</SPAN> <SPAN class="string token">" - Attributes: "</SPAN> <SPAN class="operator token"><<</SPAN> map<SPAN class="punctuation token">;</SPAN>
<SPAN class="punctuation token">}</SPAN>
<SPAN class="punctuation token">}</SPAN>
<SPAN class="punctuation token">}</SPAN>
<SPAN class="punctuation token">}</SPAN>
<SPAN class="punctuation token">}</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="comment token">// Create a map using the navigationVector Basemap</SPAN>
m_map <SPAN class="operator token">=</SPAN> <SPAN class="keyword token">new</SPAN> <SPAN class="token function">Map</SPAN><SPAN class="punctuation token">(</SPAN>Basemap<SPAN class="operator token">::</SPAN><SPAN class="token function">oceans</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="keyword token">this</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="keyword token">this</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="comment token">// Set map to map view</SPAN>
m_mapView<SPAN class="operator token">-</SPAN><SPAN class="operator token">></SPAN><SPAN class="token function">setMap</SPAN><SPAN class="punctuation token">(</SPAN>m_map<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="comment token">// set the mapView as the central widget</SPAN>
<SPAN class="token function">setCentralWidget</SPAN><SPAN class="punctuation token">(</SPAN>m_mapView<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="punctuation token">}</SPAN>
<SPAN class="comment token">// destructor</SPAN>
ArcGIS_QtWidgets<SPAN class="operator token">::</SPAN><SPAN class="operator token">~</SPAN><SPAN class="token function">ArcGIS_QtWidgets</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN>
<SPAN class="punctuation token">{</SPAN>
<SPAN class="punctuation token">}</SPAN>
<SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>Header file:
<SPAN class="comment token">// Copyright 2016 ESRI</SPAN>
<SPAN class="comment token">//</SPAN>
<SPAN class="comment token">// All rights reserved under the copyright laws of the United States</SPAN>
<SPAN class="comment token">// and applicable international laws, treaties, and conventions.</SPAN>
<SPAN class="comment token">//</SPAN>
<SPAN class="comment token">// You may freely redistribute and use this sample code, with or</SPAN>
<SPAN class="comment token">// without modification, provided you include the original copyright</SPAN>
<SPAN class="comment token">// notice and use restrictions.</SPAN>
<SPAN class="comment token">//</SPAN>
<SPAN class="comment token">// See the Sample code usage restrictions document for further information.</SPAN>
<SPAN class="comment token">//</SPAN>
<SPAN class="property macro token">#ifndef ARCGIS_QTWIDGETS_H</SPAN>
<SPAN class="property macro token">#define ARCGIS_QTWIDGETS_H</SPAN>
<SPAN class="keyword token">namespace</SPAN> Esri
<SPAN class="punctuation token">{</SPAN>
<SPAN class="keyword token">namespace</SPAN> ArcGISRuntime
<SPAN class="punctuation token">{</SPAN>
<SPAN class="keyword token">class</SPAN> <SPAN class="token class-name">Map</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="keyword token">class</SPAN> <SPAN class="token class-name">MapGraphicsView</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="punctuation token">}</SPAN>
<SPAN class="punctuation token">}</SPAN>
<SPAN class="property macro token">#include <SPAN class="string token"><QMainWindow></SPAN></SPAN>
<SPAN class="property macro token">#include <SPAN class="string token">"EncExchangeSet.h"</SPAN></SPAN>
<SPAN class="keyword token">class</SPAN> <SPAN class="token class-name">ArcGIS_QtWidgets</SPAN> <SPAN class="operator token">:</SPAN> <SPAN class="keyword token">public</SPAN> QMainWindow
<SPAN class="punctuation token">{</SPAN>
Q_OBJECT
<SPAN class="keyword token">public</SPAN><SPAN class="operator token">:</SPAN>
<SPAN class="token function">ArcGIS_QtWidgets</SPAN><SPAN class="punctuation token">(</SPAN>QWidget<SPAN class="operator token">*</SPAN> parent <SPAN class="operator token">=</SPAN> <SPAN class="keyword token">nullptr</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="operator token">~</SPAN><SPAN class="token function">ArcGIS_QtWidgets</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="keyword token">public</SPAN> slots<SPAN class="operator token">:</SPAN>
<SPAN class="keyword token">private</SPAN><SPAN class="operator token">:</SPAN>
Esri<SPAN class="operator token">::</SPAN>ArcGISRuntime<SPAN class="operator token">::</SPAN>EncExchangeSet<SPAN class="operator token">*</SPAN> encExchangeSet <SPAN class="operator token">=</SPAN> <SPAN class="keyword token">nullptr</SPAN><SPAN class="punctuation token">;</SPAN>
Esri<SPAN class="operator token">::</SPAN>ArcGISRuntime<SPAN class="operator token">::</SPAN>Map<SPAN class="operator token">*</SPAN> m_map <SPAN class="operator token">=</SPAN> <SPAN class="keyword token">nullptr</SPAN><SPAN class="punctuation token">;</SPAN>
Esri<SPAN class="operator token">::</SPAN>ArcGISRuntime<SPAN class="operator token">::</SPAN>MapGraphicsView<SPAN class="operator token">*</SPAN> m_mapView <SPAN class="operator token">=</SPAN> <SPAN class="keyword token">nullptr</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="punctuation token">}</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="property macro token">#endif </SPAN><SPAN class="comment token">// ARCGIS_QTWIDGETS_H</SPAN>
<SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>