Major Changes:
- Merged latest Qt5 devel content from dlbo (292 files changed, 7 new dirs)
- Consolidated forward-declarations and include folders
- Removed unneeded modules per Niklas' repo check list
Build System Fixes:
- Fixed CMake VERSION_GREATER syntax in ParticipantManagement/CMakeLists.txt
- Added VLC packages (libvlc-dev, vlc-plugin-base) to docker_build.sh
- Added PostgreSQL dev packages (libpq-dev, postgresql-server-dev-all) to Dockerfile
- Fixed locale warnings (ANSI_X3.4-1968 → C.UTF-8)
- Fixed ArcGIS SDK path warnings when BUILD_ARCGIS=OFF
Code Generation Fixes:
- Fixed IDL enum collisions (PortType→CorePortType/DdsutPortType, PdmEventType)
- Fixed Grantlee template svc_translation.cpp.grantlee:
- Changed {{ idl_enum.name }}_def:: to {{ idl_enum.name }}::
- Fixed .underlying() calls for C++11 scoped enums (enum class)
- Removed generated files from repo (moc_*, *_dtc.h, *_ftc.h)
Validation:
- BUILD_RTI=ON: SUCCESS
- BUILD_RTI=OFF: SUCCESS
- C++17 standard maintained for RTI 7.7 compatibility
- Ubuntu 26.04 Docker environment verified
Remaining Warnings (expected):
- BgViewer, KDChart, KDReports, Poppler-Qt6 not found (optional features)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
84 lines
2.9 KiB
C++
84 lines
2.9 KiB
C++
/**
|
|
* @RDE_HEADER@
|
|
* Declaration/Definition
|
|
* $Id$
|
|
* $HeadURL$
|
|
* $Author$
|
|
*/
|
|
|
|
|
|
#include <QtWidgets/QApplication>
|
|
#include <QtWidgets/QGraphicsScene>
|
|
#include <QtWidgets/QGraphicsView>
|
|
#include <QtWidgets/QGraphicsProxyWidget>
|
|
#include <QtWidgets/QPushButton>
|
|
#include <QtWidgets/QTextEdit>
|
|
#include <QtWidgets/QHBoxLayout>
|
|
|
|
#include "Map.h"
|
|
#include "MapGraphicsView.h"
|
|
#include "ArcGISLocalTiledLayer.h"
|
|
|
|
#include "event_mouse_navigator.h"
|
|
|
|
|
|
int main (int argc, char* argv[])
|
|
{
|
|
QApplication app ( argc, argv );
|
|
|
|
// under windows for ArcGIS 10.2.6 and higher
|
|
#ifdef Q_OS_WIN
|
|
QCoreApplication::setAttribute( Qt::AA_UseOpenGLES );
|
|
#endif
|
|
|
|
QApplication::setApplicationName(QString("Esri - Map Touch Test"));
|
|
|
|
QWidget top;
|
|
QHBoxLayout * layout = new QHBoxLayout( &top );
|
|
QTextEdit * console = new QTextEdit( &top );
|
|
EsriRuntimeQt::Map * map = new EsriRuntimeQt::Map();
|
|
EsriRuntimeQt::MapGraphicsView * mapGraphicsView = EsriRuntimeQt::MapGraphicsView::create(map);
|
|
|
|
QString samplePath = EsriRuntimeQt::ArcGISRuntime::installDirectory();
|
|
|
|
samplePath.append("/sdk/samples/data/tpks/Topographic.tpk");
|
|
|
|
samplePath = QDir::toNativeSeparators(samplePath);
|
|
|
|
if (!QFileInfo::exists(samplePath))
|
|
{
|
|
qDebug() << "Load map from not existing file" << samplePath;
|
|
}
|
|
|
|
EsriRuntimeQt::ArcGISLocalTiledLayer * geoMapBaseLayer = new EsriRuntimeQt::ArcGISLocalTiledLayer( samplePath, &top );
|
|
geoMapBaseLayer -> setName( "Base Map Layer" );
|
|
|
|
QObject::connect( geoMapBaseLayer, &EsriRuntimeQt::ArcGISLocalTiledLayer::layerCreateError , []() { qDebug() << "Loading map failed!"; } );
|
|
QObject::connect( geoMapBaseLayer, &EsriRuntimeQt::ArcGISLocalTiledLayer::layerCreateComplete, []() { qDebug() << "Loading map finished."; } );
|
|
|
|
map->setAnimationMode( EsriRuntimeQt::AnimationMode::NoAnimation );
|
|
map->addLayer(geoMapBaseLayer);
|
|
map->setWrapAroundEnabled(true);
|
|
|
|
map->grid()->setType( EsriRuntimeQt::GridType::Mgrs );
|
|
map->grid()->setVisible(false);
|
|
|
|
mapGraphicsView -> setFixedSize( 600, 400 );
|
|
|
|
SituationMap::RB::EventMouseNavigator * eventDispatcher = new SituationMap::RB::EventMouseNavigator( mapGraphicsView->viewport(), map );
|
|
layout->addWidget( mapGraphicsView );
|
|
layout->addWidget( console );
|
|
|
|
top.show();
|
|
|
|
QPushButton * button = new QPushButton( QString("Touch or Click me"), nullptr ); // button must be toplevel widget
|
|
QGraphicsProxyWidget * widgetProxy = mapGraphicsView->scene()->addWidget( button );
|
|
|
|
widgetProxy -> setPos( mapGraphicsView->mapToScene(250,200) );
|
|
|
|
QObject::connect( button, &QPushButton::clicked, [console]() { console->append(QString("Button has been clicked.\n")); });
|
|
QObject::connect( button, &QPushButton::pressed, [console]() { console->append(QString("Button has been pressed.\n")); });
|
|
|
|
return app.exec();
|
|
} // main (int argc, char* argv[])
|