Skip to content

Commit

Permalink
Merge v.next/200.1.0 into main
Browse files Browse the repository at this point in the history
  • Loading branch information
tanneryould authored Apr 19, 2023
1 parent 45ae724 commit 6d49d3f
Show file tree
Hide file tree
Showing 731 changed files with 3,457 additions and 4,329 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@

#include "DisplayScenesInTabletopAR.h"

#include "ArcGISSceneLayer.h"
#include "ArcGISTiledElevationSource.h"
#include "Error.h"
#include "MobileScenePackage.h"
#include "Scene.h"
#include "SceneQuickView.h"
#include "SceneViewTypes.h"
#include "Surface.h"

#include <QtCore/qglobal.h>
#include <QStandardPaths>
Expand Down Expand Up @@ -69,14 +69,13 @@ void DisplayScenesInTabletopAR::setArcGISArView(ArcGISArView* arcGISArView)

DisplayScenesInTabletopAR::DisplayScenesInTabletopAR(QObject* parent /* = nullptr */):
QObject(parent),
m_scene(new Scene(SceneViewTilingScheme::Geographic, this)),
m_permissionsHelper(new PermissionsHelper(this))
m_scene(new Scene(SceneViewTilingScheme::Geographic, this))
{

const QString dataPath = defaultDataPath() + "/ArcGIS/Runtime/Data/mspk/philadelphia.mspk";

// Connect to the Mobile Scene Package instance to know when errors occur
connect(MobileScenePackage::instance(), &MobileScenePackage::errorOccurred, [](Error e)
connect(MobileScenePackage::instance(), &MobileScenePackage::errorOccurred, [](const Error& e)
{
if (e.isEmpty())
return;
Expand Down Expand Up @@ -141,16 +140,7 @@ void DisplayScenesInTabletopAR::createScenePackage(const QString& path)
{
m_scenePackage = new MobileScenePackage(path, this);
connect(m_scenePackage, &MobileScenePackage::doneLoading, this, &DisplayScenesInTabletopAR::packageLoaded);

connect(m_permissionsHelper, &PermissionsHelper::requestFilesystemAccessCompleted, this, [this]()
{
m_scenePackage->load();
});

if (!m_permissionsHelper->fileSystemAccessGranted())
m_permissionsHelper->requestFilesystemAccess();
else
m_scenePackage->load();
m_scenePackage->load();
}

void DisplayScenesInTabletopAR::onMouseClicked(QMouseEvent& event)
Expand Down Expand Up @@ -178,7 +168,7 @@ void DisplayScenesInTabletopAR::onMouseClicked(QMouseEvent& event)
m_sceneView->arcGISScene()->baseSurface()->setNavigationConstraint(NavigationConstraint::None);

// Set the initial transformation using the point clicked on the screen
const QPoint screenPoint = event.localPos().toPoint();
const QPoint screenPoint = event.position().toPoint();
m_arcGISArView->setInitialTransformation(screenPoint);

// Set the origin camera.
Expand All @@ -190,4 +180,3 @@ void DisplayScenesInTabletopAR::onMouseClicked(QMouseEvent& event)
emit sceneViewChanged();
emit arcGISArViewChanged();
}

Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ class SceneQuickView;

#include <QObject>
#include "ArcGISArView.h"
#include "PermissionsHelper.h"

class DisplayScenesInTabletopAR : public QObject
{
Expand Down Expand Up @@ -62,7 +61,6 @@ private slots:
Esri::ArcGISRuntime::SceneQuickView* m_sceneView = nullptr;
Esri::ArcGISRuntime::MobileScenePackage* m_scenePackage = nullptr;
Esri::ArcGISRuntime::Camera m_originCamera;
PermissionsHelper* m_permissionsHelper = nullptr;

Esri::ArcGISRuntime::Toolkit::ArcGISArView* arcGISArView() const;
void setArcGISArView(Esri::ArcGISRuntime::Toolkit::ArcGISArView* arcGISArView);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,17 @@ QT += opengl qml quick
TEMPLATE = app
TARGET = DisplayScenesInTabletopAR

ARCGIS_RUNTIME_VERSION = 200.0.0
ARCGIS_RUNTIME_VERSION = 200.1.0
include($$PWD/arcgisruntime.pri)

#-------------------------------------------------------------------------------

HEADERS += \
DisplayScenesInTabletopAR.h \
PermissionsHelper.h
DisplayScenesInTabletopAR.h

SOURCES += \
main.cpp \
DisplayScenesInTabletopAR.cpp \
PermissionsHelper.cpp
DisplayScenesInTabletopAR.cpp

RESOURCES += DisplayScenesInTabletopAR.qrc

Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@
"snippets": [
"DisplayScenesInTabletopAR.cpp",
"DisplayScenesInTabletopAR.h",
"PermissionsHelper.cpp",
"PermissionsHelper.h",
"DisplayScenesInTabletopAR.qml"
],
"title": "Display scenes in tabletop AR"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?xml version="1.0"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.esri.arcgis.DisplayScenesInTabletopAR" android:installLocation="auto" android:versionCode="-- %%INSERT_VERSION_CODE%% --" android:versionName="-- %%INSERT_VERSION_NAME%% --">

<uses-sdk android:minSdkVersion="24" android:targetSdkVersion="28"/>

<!-- required at targetSdkVersion=30 to check for arcore support -->
<queries>
<package android:name="com.google.ar.core"/>
</queries>
<!-- %%INSERT_PERMISSIONS -->
<uses-permission android:name="android.permission.CAMERA"/>
<!-- %%INSERT_FEATURES -->
<uses-feature android:name="android.hardware.camera.ar" android:required="true"/>
<supports-screens android:anyDensity="true" android:largeScreens="true" android:normalScreens="true" android:smallScreens="true"/>
<application android:name="org.qtproject.qt.android.bindings.QtApplication" android:hardwareAccelerated="true" android:label="-- %%INSERT_APP_NAME%% --" android:requestLegacyExternalStorage="true" android:allowNativeHeapPointerTagging="false" android:allowBackup="true" android:fullBackupOnly="false">
<activity android:name="org.qtproject.qt.android.bindings.QtActivity" android:configChanges="orientation|uiMode|screenLayout|screenSize|smallestScreenSize|layoutDirection|locale|fontScale|keyboard|keyboardHidden|navigation|mcc|mnc|density" android:label="-- %%INSERT_APP_NAME%% --" android:launchMode="singleTop" android:screenOrientation="unspecified" android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
<meta-data android:name="android.app.lib_name" android:value="-- %%INSERT_APP_LIB_NAME%% --"/>
<meta-data android:name="android.app.arguments" android:value="-- %%INSERT_APP_ARGUMENTS%% --"/>
<meta-data android:name="android.app.extract_android_style" android:value="minimal"/>
<meta-data android:name="com.google.ar.core" android:value="required"/>
</activity>
</application>
</manifest>
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
buildscript {
repositories {
google()
mavenCentral()
}

dependencies {
classpath 'com.android.tools.build:gradle:7.0.2'
}
}

repositories {
google()
mavenCentral()
}

apply plugin: 'com.android.application'

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar', '*.aar'])
implementation 'com.google.ar:core:1.11.0'
}

android {
/*******************************************************
* The following variables:
* - androidBuildToolsVersion,
* - androidCompileSdkVersion
* - qtAndroidDir - holds the path to qt android files
* needed to build any Qt application
* on Android.
*
* are defined in gradle.properties file. This file is
* updated by QtCreator and androiddeployqt tools.
* Changing them manually might break the compilation!
*******************************************************/

compileSdkVersion androidCompileSdkVersion.toInteger()
buildToolsVersion androidBuildToolsVersion
ndkVersion androidNdkVersion

// Extract native libraries from the APK
packagingOptions.jniLibs.useLegacyPackaging true

sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = [qtAndroidDir + '/src', 'src', 'java']
aidl.srcDirs = [qtAndroidDir + '/src', 'src', 'aidl']
res.srcDirs = [qtAndroidDir + '/res', 'res']
resources.srcDirs = ['resources']
renderscript.srcDirs = ['src']
assets.srcDirs = ['assets']
jniLibs.srcDirs = ['libs']
}
}

tasks.withType(JavaCompile) {
options.incremental = true
}

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}

lintOptions {
abortOnError false
}

// Do not compress Qt binary resources file
aaptOptions {
noCompress 'rcc'
}

defaultConfig {
resConfig "en"
minSdkVersion qtMinSdkVersion
targetSdkVersion qtTargetSdkVersion
ndk.abiFilters = qtTargetAbiList.split(",")
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.


#include "ArcGISArView.h"
#include "DisplayScenesInTabletopAR.h"
#include "ArcGISRuntimeEnvironment.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,17 @@
#include "ExploreScenesInFlyoverAR.h"

#include "ArcGISTiledElevationSource.h"
#include "ElevationSourceListModel.h"
#include "Envelope.h"
#include "Error.h"
#include "IntegratedMeshLayer.h"
#include "LayerListModel.h"
#include "MapTypes.h"
#include "Point.h"
#include "Scene.h"
#include "SceneQuickView.h"
#include "IntegratedMeshLayer.h"
#include "SceneViewTypes.h"
#include "Surface.h"

using namespace Esri::ArcGISRuntime;
namespace toolkit = Esri::ArcGISRuntime::Toolkit;
Expand All @@ -47,11 +55,11 @@ ExploreScenesInFlyoverAR::ExploreScenesInFlyoverAR(QObject* parent /* = nullptr
// add the layer to the scene
m_scene->operationalLayers()->append(m_integratedMeshLayer);

connect(m_integratedMeshLayer, &IntegratedMeshLayer::doneLoading, this, [this](Error e)
connect(m_integratedMeshLayer, &IntegratedMeshLayer::doneLoading, this, [this](const Error& e)
{
if (!e.isEmpty())
{
qDebug() << e.code() << e.message() << " - " << e.additionalMessage();
qDebug() << e.errorType() << ":" << e.message() << "-" << e.additionalMessage();
return;
}

Expand Down Expand Up @@ -118,4 +126,3 @@ void ExploreScenesInFlyoverAR::setArcGISArView(toolkit::ArcGISArView* arcGISArVi

emit arcGISArViewChanged();
}

Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ QT += opengl qml quick
TEMPLATE = app
TARGET = ExploreScenesInFlyoverAR

ARCGIS_RUNTIME_VERSION = 200.0.0
ARCGIS_RUNTIME_VERSION = 200.1.0
include($$PWD/arcgisruntime.pri)

#-------------------------------------------------------------------------------
Expand Down
Loading

0 comments on commit 6d49d3f

Please sign in to comment.