Migrates ./Lts/Viewer successfully to Qt6
This commit is contained in:
28 files changed
+250
-129
No files matched your search
@@ -185,9 +185,11 @@ IF(WIN32)
|
||||
ELSE()
|
||||
# Linux: ArcGIS SDK Pfad konfigurieren (nur wenn BUILD_ARCGIS=ON)
|
||||
IF(BUILD_ARCGIS)
|
||||
# Use environment variable ARCGIS_ROOT if set, otherwise default to /repo/external/...
|
||||
# Use environment variable ARCGIS_ROOT if set, otherwise default to /workspace/external/... (Docker) or host path
|
||||
IF(DEFINED ENV{ARCGIS_ROOT})
|
||||
SET(ARCGIS_SDK_DIR "$ENV{ARCGIS_ROOT}" CACHE STRING "ArcGIS Runtime SDK for Qt directory")
|
||||
ELSEIF(EXISTS "/workspace/external/ArcGIS/MapsSDK_Qt_300.0.0/ArcGIS_Maps_SDK_Qt_300.0.0/qt300.0.0/sdk")
|
||||
SET(ARCGIS_SDK_DIR "/workspace/external/ArcGIS/MapsSDK_Qt_300.0.0/ArcGIS_Maps_SDK_Qt_300.0.0/qt300.0.0/sdk" CACHE STRING "ArcGIS Runtime SDK for Qt directory")
|
||||
ELSE()
|
||||
SET(ARCGIS_SDK_DIR "/repo/external/ArcGIS/MapsSDK_Qt_300.0.0/ArcGIS_Maps_SDK_Qt_300.0.0/qt300.0.0/sdk" CACHE STRING "ArcGIS Runtime SDK for Qt directory")
|
||||
ENDIF()
|
||||
|
||||
@@ -150,6 +150,8 @@ NGL_WRAP_UI(ltswidgets_SRCS
|
||||
NGL_ADD_BIG_RESOURCES(ltswidgets_SRCS resources/lts_resources.qrc)
|
||||
NGL_ADD_LIBRARY(WS TOOLSWS TOOLSSV LtsWidgets SHARED ${ltswidgets_SRCS})
|
||||
|
||||
# ui_requirement.h is not a UI file but regular C++ code - disable AUTOUIC
|
||||
set_target_properties(LtsWidgets PROPERTIES AUTOUIC OFF)
|
||||
|
||||
NGL_TARGET_INCLUDE_DIRECTORIES(LtsWidgets
|
||||
PUBLIC
|
||||
@@ -162,6 +164,7 @@ NGL_TARGET_LINK_LIBRARIES(LtsWidgets
|
||||
Qt6::Svg
|
||||
ngltools
|
||||
ngltranslator
|
||||
NGLLogger
|
||||
TabBarTabStyle
|
||||
LtsSessionData
|
||||
LtsUtilsSettings
|
||||
|
||||
@@ -24,7 +24,7 @@ DataDelegate::DataDelegate(QObject *parent)
|
||||
|
||||
QString DataDelegate::displayText(const QVariant &value, const QLocale &locale) const
|
||||
{
|
||||
if (value.type() == QVariant::Type::DateTime)
|
||||
if (value.userType() == QMetaType::QDateTime)
|
||||
return DTG::toString(value.toDateTime());
|
||||
return QStyledItemDelegate::displayText(value, locale);
|
||||
}
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
#include <QtCore/QJsonArray>
|
||||
#include <QtCore/QJsonDocument>
|
||||
#include <QtCore/QDebug>
|
||||
#include <utility>
|
||||
|
||||
/// get the list of visual index as they are display
|
||||
namespace LtsDataView
|
||||
@@ -1233,7 +1234,7 @@ void LtsDataView::slotCsvExport() // TODO: maybe save to dds (office/filemanagem
|
||||
}
|
||||
}
|
||||
|
||||
for (const int logicalIndex : qAsConst(colsHeader))
|
||||
for (const int logicalIndex : std::as_const(colsHeader))
|
||||
colsList.append(m_columnFilterProxy->headerData(logicalIndex, Qt::Horizontal).toString());
|
||||
|
||||
//qCritical() << "slotCsvExport: header colsList = " << colsList;
|
||||
@@ -1253,7 +1254,7 @@ void LtsDataView::slotCsvExport() // TODO: maybe save to dds (office/filemanagem
|
||||
for (int row = 0; row < rows; ++row)
|
||||
{
|
||||
colsList.clear();
|
||||
for (const int logicalIndex : qAsConst(colsHeader))
|
||||
for (const int logicalIndex : std::as_const(colsHeader))
|
||||
colsList.append(m_columnFilterProxy->data(m_columnFilterProxy->index(row, logicalIndex)).toString());
|
||||
// for (int col = 0; col < cols; col++)
|
||||
// if (m_ui->stackedWidget->currentIndex() != TABLE || !m_ui->tableView->isColumnHidden(col))
|
||||
|
||||
@@ -51,7 +51,7 @@ QVariant SearchModel::data(const QModelIndex &index, int role) const
|
||||
return m_displayData.value(index.column());
|
||||
case Qt::EditRole: // Editor Text
|
||||
return m_columnFilters.value(index.column());
|
||||
case Qt::TextColorRole: // Text-Color
|
||||
case Qt::ForegroundRole: // Text-Color
|
||||
if (!m_columnFilters.contains(index.column()))
|
||||
return QGuiApplication::palette().color(QPalette::Disabled, QPalette::ButtonText);
|
||||
break;
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
// Qt
|
||||
#include <QtCore/QDir>
|
||||
#include <QtCore/QVector>
|
||||
#include <utility>
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
@@ -38,7 +39,7 @@ QString getResourcePath()
|
||||
pathsToSearch += QLatin1String("/usr/share/arcgis/resources");
|
||||
#endif
|
||||
|
||||
for (const QString &path : qAsConst(pathsToSearch))
|
||||
for (const QString &path : std::as_const(pathsToSearch))
|
||||
{
|
||||
if (QDir(path).exists())
|
||||
return path + QLatin1Char('/');
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
#include <QtCore/QJsonArray>
|
||||
#include <QNetworkProxy>
|
||||
#include <QtWidgets/QMessageBox>
|
||||
#include <utility>
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
@@ -592,7 +593,7 @@ bool MapInitializer::initializeBasemapsQSettings(Mode mapMode)
|
||||
bool success = true;
|
||||
int localLayerCount = 0;
|
||||
// item => val, name
|
||||
for (const QPair<QString, QString> &item : qAsConst(basemapUrls))
|
||||
for (const QPair<QString, QString> &item : std::as_const(basemapUrls))
|
||||
{
|
||||
QString layername = QStringLiteral("%1%2").arg(m_map.layerFactory().basemapLayernamePrefix()).arg(localLayerCount);
|
||||
|
||||
@@ -658,7 +659,7 @@ bool MapInitializer::initializeBasemapsJson(const QVector<BaseUrl> &baseUrls)
|
||||
bool success = true;
|
||||
|
||||
int localLayerCount = 0;
|
||||
for (const BaseUrl &baseUrl : qAsConst(baseUrls))
|
||||
for (const BaseUrl &baseUrl : std::as_const(baseUrls))
|
||||
{
|
||||
const QString &layername = QStringLiteral("%1%2").arg(m_map.layerFactory().basemapLayernamePrefix()).arg(localLayerCount);
|
||||
|
||||
@@ -688,7 +689,7 @@ bool MapInitializer::initializeSceneObjectLayers()
|
||||
return true; // handle as successful
|
||||
|
||||
bool success = true;
|
||||
for (const QString &item : qAsConst(sceneObjectUrls))
|
||||
for (const QString &item : std::as_const(sceneObjectUrls))
|
||||
{
|
||||
QChar seperator(QLatin1Char('#'));
|
||||
QStringList slUrlExt = item.split(seperator);
|
||||
@@ -730,7 +731,7 @@ bool MapInitializer::initializeSceneObjectLayersJson()
|
||||
return true; // handle as successful
|
||||
|
||||
bool success = true;
|
||||
for (const BaseUrl &item : qAsConst(urls))
|
||||
for (const BaseUrl &item : std::as_const(urls))
|
||||
{
|
||||
const QString &urlVal = item.url();
|
||||
|
||||
|
||||
+2
-1
@@ -15,6 +15,7 @@
|
||||
#include <QtCore/QJsonDocument>
|
||||
#include <QtCore/QJsonObject>
|
||||
#include <QtCore/QJsonArray>
|
||||
#include <utility>
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
@@ -71,7 +72,7 @@ QJsonObject OperatorMapSettings::toJsonObject() const
|
||||
// orderedLayers
|
||||
{
|
||||
QJsonArray jArray;
|
||||
for (const QPair<QString, LayerParameter> &pair : qAsConst(orderedLayers))
|
||||
for (const QPair<QString, LayerParameter> &pair : std::as_const(orderedLayers))
|
||||
{
|
||||
const QString &layername = pair.first;
|
||||
const LayerParameter &lp = pair.second;
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
#include <QtGui/QColor>
|
||||
#include <QtCore/QList>
|
||||
#include <QtCore/QPointF>
|
||||
#include <utility>
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
@@ -306,7 +307,7 @@ inline PositionCont convert2D3D(const QList<QPointF> &lst)
|
||||
{
|
||||
PositionCont posCont;
|
||||
posCont.reserve(lst.size());
|
||||
for (auto i : qAsConst(lst) )
|
||||
for (auto i : std::as_const(lst) )
|
||||
posCont.append(Point3D::fromQPointF(i));
|
||||
return posCont;
|
||||
}
|
||||
@@ -315,7 +316,7 @@ inline PositionCont convert2D3D(const QVector<QPointF> &vec)
|
||||
{
|
||||
PositionCont posCont;
|
||||
posCont.reserve(vec.size());
|
||||
for (auto i : qAsConst(vec) )
|
||||
for (auto i : std::as_const(vec) )
|
||||
posCont.append(Point3D::fromQPointF(i));
|
||||
return posCont;
|
||||
}
|
||||
|
||||
@@ -10,6 +10,8 @@
|
||||
#include "sidc_builder.h"
|
||||
#include "sidc_codec.h"
|
||||
|
||||
#include <QStringView>
|
||||
|
||||
|
||||
// 1234567890
|
||||
qint32 AdvancedSymbology::SidcBuilder::_smallest = 1000000000;
|
||||
@@ -73,7 +75,7 @@ void SidcBuilder::setStandardIdentity(const SidcDefinitions::StandardIdentity &s
|
||||
|
||||
SidcDefinitions::Context SidcBuilder::context() const
|
||||
{
|
||||
return static_cast<Context>(QStringRef(&m_first10_mil2525D, 2, 1).toInt());
|
||||
return static_cast<Context>(QStringView(m_first10_mil2525D).slice(2, 1).toInt());
|
||||
}
|
||||
void SidcBuilder::setContext(SidcDefinitions::Context context)
|
||||
{
|
||||
@@ -81,7 +83,7 @@ void SidcBuilder::setContext(SidcDefinitions::Context context)
|
||||
}
|
||||
SidcDefinitions::Identity SidcBuilder::identity() const
|
||||
{
|
||||
return static_cast<Identity>(QStringRef(&m_first10_mil2525D, 3, 1).toInt());
|
||||
return static_cast<Identity>(QStringView(m_first10_mil2525D).slice(3, 1).toInt());
|
||||
}
|
||||
|
||||
void SidcBuilder::setIdentity(SidcDefinitions::Identity identity)
|
||||
@@ -110,7 +112,7 @@ bool SidcBuilder::isIdentityAssumed() const
|
||||
|
||||
SidcDefinitions::SymbolSet SidcBuilder::symbolSet() const
|
||||
{
|
||||
SymbolSet sset = static_cast<SymbolSet>(QStringRef(&m_first10_mil2525D, 4, 2).toString().toInt());
|
||||
SymbolSet sset = static_cast<SymbolSet>(QStringView(m_first10_mil2525D).slice(4, 2).toString().toInt());
|
||||
return sset;
|
||||
}
|
||||
void SidcBuilder::setSymbolSet(const SymbolSet &symbolSet)
|
||||
@@ -121,7 +123,7 @@ void SidcBuilder::setSymbolSet(const SymbolSet &symbolSet)
|
||||
|
||||
SidcDefinitions::Status SidcBuilder::status() const
|
||||
{
|
||||
Status status = static_cast<Status>(QStringRef(&m_first10_mil2525D, 6, 1).toInt());
|
||||
Status status = static_cast<Status>(QStringView(m_first10_mil2525D).slice(6, 1).toInt());
|
||||
return status;
|
||||
}
|
||||
|
||||
@@ -154,7 +156,7 @@ void SidcBuilder::setSymbolEntityCode(const QString &entityCode)
|
||||
|
||||
SidcDefinitions::HQTFDummy SidcBuilder::hqTfFd() const
|
||||
{
|
||||
HQTFDummy hdtffd = static_cast<HQTFDummy>(QStringRef(&m_first10_mil2525D, 7, 1).toInt());
|
||||
HQTFDummy hdtffd = static_cast<HQTFDummy>(QStringView(m_first10_mil2525D).slice(7, 1).toInt());
|
||||
return hdtffd;
|
||||
}
|
||||
|
||||
@@ -198,7 +200,7 @@ bool SidcBuilder::feintDummy() const
|
||||
|
||||
SidcDefinitions::AmplifierGroup SidcBuilder::amplifierGroup() const
|
||||
{
|
||||
AmplifierGroup amplifierGroup = static_cast<AmplifierGroup>(QStringRef(&m_first10_mil2525D, 8, 1).toInt());
|
||||
AmplifierGroup amplifierGroup = static_cast<AmplifierGroup>(QStringView(m_first10_mil2525D).slice(8, 1).toInt());
|
||||
return amplifierGroup;
|
||||
}
|
||||
void SidcBuilder::setAmplifierGroup(const AmplifierGroup &lifierGroup)
|
||||
@@ -208,7 +210,7 @@ void SidcBuilder::setAmplifierGroup(const AmplifierGroup &lifierGroup)
|
||||
|
||||
unsigned int SidcBuilder::amplifier2ndDigit() const
|
||||
{
|
||||
return QStringRef(&m_first10_mil2525D, 9, 1).toUInt();
|
||||
return QStringView(m_first10_mil2525D).slice(9, 1).toUInt();
|
||||
} // unsigned int SidcBuilder::amplifier2ndDigit() const
|
||||
|
||||
|
||||
@@ -220,13 +222,13 @@ void SidcBuilder::setAmplifier2ndDigit(unsigned int amplifierSecondDigit)
|
||||
|
||||
unsigned int SidcBuilder::sectorModifier1Digit()
|
||||
{
|
||||
return QStringRef(&m_second10_mil2525D, 6, 2).toUInt();
|
||||
return QStringView(m_second10_mil2525D).slice(6, 2).toUInt();
|
||||
} // unsigned int SidcBuilder::sectorModifier1Digit()
|
||||
|
||||
|
||||
unsigned int SidcBuilder::sectorModifier2Digit()
|
||||
{
|
||||
return QStringRef(&m_second10_mil2525D, 8, 2).toUInt();
|
||||
return QStringView(m_second10_mil2525D).slice(8, 2).toUInt();
|
||||
} // unsigned int SidcBuilder::sectorModifier2Digit()
|
||||
|
||||
|
||||
@@ -311,7 +313,7 @@ bool SidcBuilder::initFromSymbologyType(SymbologyType symbologyType, const QStri
|
||||
}
|
||||
|
||||
// check version
|
||||
if (QStringRef(&rawSidc, 0, 2) != QLatin1String("10"))
|
||||
if (QStringView(rawSidc).slice(0, 2) != QLatin1String("10"))
|
||||
{
|
||||
ERROR_LOG(m_logger) << LOGFUNCTION
|
||||
<< " sidc='" << sidc << "'"
|
||||
@@ -369,7 +371,7 @@ bool SidcBuilder::initFromSymbologyTypeBaseSymbolCode(SymbologyType symbologyTyp
|
||||
init();
|
||||
|
||||
// set SymbolSet:
|
||||
SymbolSet sSet = static_cast<SymbolSet>(QStringRef(&rawBaseSymbolCode, 0, 2).toInt());
|
||||
SymbolSet sSet = static_cast<SymbolSet>(QStringView(rawBaseSymbolCode).slice(0, 2).toInt());
|
||||
this->setSymbolSet(sSet);
|
||||
|
||||
// set Entity:
|
||||
|
||||
+3
-2
@@ -16,6 +16,7 @@
|
||||
// Qt
|
||||
#include <QtCore/QDebug>
|
||||
#include <QtCore/QRegularExpression>
|
||||
#include <QStringView>
|
||||
|
||||
|
||||
namespace AdvancedSymbology
|
||||
@@ -162,8 +163,8 @@ QString SidcBuilderBase::concreteSidcToBaseSymbolCode(const QString &sidcCodec)
|
||||
return QString();
|
||||
|
||||
QString baseSymbolCode(
|
||||
QStringRef(&rawSidc, 4, 2).toString() +
|
||||
QStringRef(&rawSidc, 10, 6).toString());
|
||||
QStringView(rawSidc).slice(4, 2).toString() +
|
||||
QStringView(rawSidc).slice(10, 6).toString());
|
||||
return SidcCodec::encodeBaseSymbolCode(symbologyType, baseSymbolCode);
|
||||
} break;
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ QString encode(SymbologyType symbologyType)
|
||||
return QLatin1String("EROR");
|
||||
}
|
||||
|
||||
SymbologyType decodeSymbology(const QStringRef &symbologyTypeStr)
|
||||
SymbologyType decodeSymbology(const QStringView &symbologyTypeStr)
|
||||
{
|
||||
SymbologyType symbologyType = SymbologyType::None;
|
||||
if (symbologyTypeStr.compare(QLatin1String("NONE")) == 0) symbologyType = SymbologyType::None;
|
||||
@@ -63,7 +63,7 @@ QString encode(SidcCodec::SidcType sidcType)
|
||||
return QLatin1String("EROR");
|
||||
}
|
||||
|
||||
SidcCodec::SidcType decodeSidc(const QStringRef &sidcTypeStr)
|
||||
SidcCodec::SidcType decodeSidc(const QStringView &sidcTypeStr)
|
||||
{
|
||||
SidcCodec::SidcType symbologyType = SidcCodec::SidcType::None;
|
||||
if ( sidcTypeStr.compare(QLatin1String("NONE")) == 0) symbologyType = SidcCodec::SidcType::None;
|
||||
@@ -92,9 +92,9 @@ bool SidcCodec::checkSidcSyntax(const QString &encodedSidc)
|
||||
{
|
||||
if (!isEncoded(encodedSidc)) return false;
|
||||
|
||||
SidcCodec::SidcType sidcType = SidcCodecHelper::decodeSidc(QStringRef(&encodedSidc, 5, 4));
|
||||
SidcCodec::SidcType sidcType = SidcCodecHelper::decodeSidc(QStringView(encodedSidc).slice(5, 4));
|
||||
|
||||
const QStringRef symbologyTypeStr(&encodedSidc, 0, 4);
|
||||
const QStringView symbologyTypeStr = QStringView(encodedSidc).slice(0, 4);
|
||||
|
||||
if (symbologyTypeStr.compare(QLatin1String("NONE")) == 0) return true;
|
||||
else if (symbologyTypeStr.compare(QLatin1String("AP6B")) == 0) return true;
|
||||
@@ -156,18 +156,18 @@ int SidcCodec::decodeCivilXml(const QString &civilSidc)
|
||||
//
|
||||
// DECODE
|
||||
//
|
||||
// QStringRef(const QString *string, int position, int size);
|
||||
// QStringView(const QString &string, int position, int size);
|
||||
// QString mid(int position, int n = -1) const Q_REQUIRED_RESULT;
|
||||
//
|
||||
|
||||
SymbologyType SidcCodec::decodeSymbologyType(const QString &encodedSidc)
|
||||
{
|
||||
return SidcCodecHelper::decodeSymbology(QStringRef(&encodedSidc, 0, 4));
|
||||
return SidcCodecHelper::decodeSymbology(QStringView(encodedSidc).slice(0, 4));
|
||||
}
|
||||
|
||||
SidcCodec::SidcType SidcCodec::decodeSidcType(const QString &encodedSidc)
|
||||
{
|
||||
return SidcCodecHelper::decodeSidc(QStringRef(&encodedSidc, 5, 4));
|
||||
return SidcCodecHelper::decodeSidc(QStringView(encodedSidc).slice(5, 4));
|
||||
}
|
||||
|
||||
QString SidcCodec::decodeRawSidc(const QString &encodedSidc)
|
||||
@@ -202,19 +202,19 @@ QString SidcCodec::extractCivilXmlBaseSidc( const QString &sidc )
|
||||
//
|
||||
// Some convenience functions
|
||||
|
||||
QString SidcCodec::encodeBaseSymbolCode(SymbologyType symbologyType, const QStringRef &baseSymboCodeSidc) { return encodeBaseSymbolCode(symbologyType, *baseSymboCodeSidc.string()); }
|
||||
QString SidcCodec::encodeBaseSymbolCode(SymbologyType symbologyType, const QStringView &baseSymboCodeSidc) { return encodeBaseSymbolCode(symbologyType, baseSymboCodeSidc.toString()); }
|
||||
QString SidcCodec::encodeBaseSymbolCode(SymbologyType symbologyType, const std::string &baseSymboCodeSidc) { return encodeBaseSymbolCode(symbologyType, QString::fromStdString(baseSymboCodeSidc));}
|
||||
QString SidcCodec::encodeBaseSymbolCode(SymbologyType symbologyType, const char *baseSymboCodeSidc) { return encodeBaseSymbolCode(symbologyType, QString::fromLatin1(baseSymboCodeSidc));}
|
||||
|
||||
QString SidcCodec::encodeComplete(SymbologyType symbologyType, const QStringRef &completeSidc) { return encodeComplete(symbologyType, *completeSidc.string());}
|
||||
QString SidcCodec::encodeComplete(SymbologyType symbologyType, const QStringView &completeSidc) { return encodeComplete(symbologyType, completeSidc.toString());}
|
||||
QString SidcCodec::encodeComplete(SymbologyType symbologyType, const std::string &completeSidc) { return encodeComplete(symbologyType, QString::fromStdString(completeSidc)); }
|
||||
QString SidcCodec::encodeComplete(SymbologyType symbologyType, const char *completeSidc) { return encodeComplete(symbologyType, QString::fromLatin1(completeSidc)); }
|
||||
|
||||
QString SidcCodec::encodeCivilEts(const QStringRef &civilSidc) { return encodeCivilEts(*civilSidc.string());}
|
||||
QString SidcCodec::encodeCivilEts(const QStringView &civilSidc) { return encodeCivilEts(civilSidc.toString());}
|
||||
QString SidcCodec::encodeCivilEts(const std::string &civilSidc) { return encodeCivilEts(QString::fromStdString(civilSidc)); }
|
||||
QString SidcCodec::encodeCivilEts(const char *civilSidc) { return encodeCivilEts(QString::fromLatin1(civilSidc)); }
|
||||
|
||||
QString SidcCodec::encodeCivilXml(const QStringRef &civilSidc) { return encodeCivilXml(*civilSidc.string());}
|
||||
QString SidcCodec::encodeCivilXml(const QStringView &civilSidc) { return encodeCivilXml(civilSidc.toString());}
|
||||
QString SidcCodec::encodeCivilXml(const std::string &civilSidc) { return encodeCivilXml(QString::fromStdString(civilSidc)); }
|
||||
QString SidcCodec::encodeCivilXml(const char *civilSidc) { return encodeCivilXml(QString::fromLatin1(civilSidc)); }
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
// Qt
|
||||
#include <QtCore/QHash>
|
||||
#include <QtCore/QString>
|
||||
#include <QStringRef>
|
||||
#include <QStringView>
|
||||
|
||||
namespace AdvancedSymbology
|
||||
{
|
||||
@@ -121,10 +121,10 @@ ADVANCED_SYMBOLOGY_EXPORT int decodeCivilXml(const QString &civilSidc)
|
||||
* Some convience functions ...
|
||||
* @{
|
||||
*/
|
||||
ADVANCED_SYMBOLOGY_EXPORT QString encodeBaseSymbolCode(SymbologyType symbologyType, const QStringRef &baseSymboCodeSidc);
|
||||
ADVANCED_SYMBOLOGY_EXPORT QString encodeComplete(SymbologyType symbologyType, const QStringRef &completeSidc);
|
||||
ADVANCED_SYMBOLOGY_EXPORT QString encodeCivilEts(const QStringRef &civilSidc);
|
||||
ADVANCED_SYMBOLOGY_EXPORT QString encodeCivilXml(const QStringRef &civilSidc);
|
||||
ADVANCED_SYMBOLOGY_EXPORT QString encodeBaseSymbolCode(SymbologyType symbologyType, const QStringView &baseSymboCodeSidc);
|
||||
ADVANCED_SYMBOLOGY_EXPORT QString encodeComplete(SymbologyType symbologyType, const QStringView &completeSidc);
|
||||
ADVANCED_SYMBOLOGY_EXPORT QString encodeCivilEts(const QStringView &civilSidc);
|
||||
ADVANCED_SYMBOLOGY_EXPORT QString encodeCivilXml(const QStringView &civilSidc);
|
||||
|
||||
ADVANCED_SYMBOLOGY_EXPORT QString encodeBaseSymbolCode(SymbologyType symbologyType, const std::string &baseSymboCodeSidc);
|
||||
ADVANCED_SYMBOLOGY_EXPORT QString encodeComplete(SymbologyType symbologyType, const std::string &completeSidc);
|
||||
|
||||
+6
-6
@@ -15,7 +15,7 @@
|
||||
|
||||
|
||||
// Qt
|
||||
#include <QStringRef>
|
||||
#include <QStringView>
|
||||
|
||||
|
||||
namespace AdvancedSymbology
|
||||
@@ -117,20 +117,20 @@ void SymbolProperties::setOriginalKey(const QString &originalKey)
|
||||
|
||||
QString SymbolProperties::key_SymbolSet() const
|
||||
{
|
||||
if (m_key.count() < 8)
|
||||
if (m_key.size() < 8)
|
||||
return QString();
|
||||
return QStringRef(&m_key, 0, 2).toString();
|
||||
return QStringView(m_key).slice(0, 2).toString();
|
||||
}
|
||||
QString SymbolProperties::key_Entity() const
|
||||
{
|
||||
if (m_key.count() < 8)
|
||||
if (m_key.size() < 8)
|
||||
return QString();
|
||||
return QStringRef(&m_key, 2, 6).toString();
|
||||
return QStringView(m_key).slice(2, 6).toString();
|
||||
}
|
||||
|
||||
QString SymbolProperties::key_SymbolSetEntity() const
|
||||
{
|
||||
if (m_key.count() < 8)
|
||||
if (m_key.size() < 8)
|
||||
return QString();
|
||||
|
||||
return key_SymbolSet() + key_Entity();
|
||||
|
||||
+13
-12
@@ -18,8 +18,8 @@
|
||||
|
||||
|
||||
// arcgis
|
||||
#include <arcgis/TaskWatcher.h>
|
||||
#include <arcgis/DictionarySymbolStyle.h>
|
||||
#include <TaskWatcher.h>
|
||||
#include <DictionarySymbolStyle.h>
|
||||
|
||||
|
||||
// Qt
|
||||
@@ -28,6 +28,7 @@
|
||||
#include <QtCore/QUuid>
|
||||
#include <QtCore/QByteArray>
|
||||
#include <QtCore/QBuffer>
|
||||
#include <utility>
|
||||
#include <QMimeData>
|
||||
#include <QtCore/QTimer>
|
||||
|
||||
@@ -441,7 +442,7 @@ void BaseSymbolModel::initModel(SymbolDictionary *symbolDictionary,
|
||||
int itemCounter = 0;
|
||||
QVector<DATA_T> vecData;
|
||||
vecData.reserve(searchResultList.size());
|
||||
for (const Esri::ArcGISRuntime::SymbolStyleSearchResult &searchResult : qAsConst(searchResultList))
|
||||
for (const Esri::ArcGISRuntime::SymbolStyleSearchResult &searchResult : std::as_const(searchResultList))
|
||||
{
|
||||
GeometryType gt = GeometryType::Undefined;
|
||||
auto it = baseSymbolCodeToSymbolPropertyTable.find(searchResult.key().left(8));
|
||||
@@ -593,7 +594,7 @@ QVariant BaseSymbolModel::headerData(int section, Qt::Orientation orientation, i
|
||||
cfc.sortItems = true;
|
||||
cfc.data.reserve(d->m_usedOperator.size());
|
||||
LtsWidgets::ComboboxFilterData cfd;
|
||||
for (const QString &opName : qAsConst(d->m_usedOperator))
|
||||
for (const QString &opName : std::as_const(d->m_usedOperator))
|
||||
{
|
||||
cfd.data = opName;
|
||||
cfd.text = opName;
|
||||
@@ -606,7 +607,7 @@ QVariant BaseSymbolModel::headerData(int section, Qt::Orientation orientation, i
|
||||
LtsWidgets::ComboboxFilterContent cfc;
|
||||
cfc.data.reserve(d->m_usedSymbolSet.size());
|
||||
LtsWidgets::ComboboxFilterData cfd;
|
||||
for (const auto &symSet : qAsConst(d->m_usedSymbolSet))
|
||||
for (const auto &symSet : std::as_const(d->m_usedSymbolSet))
|
||||
{
|
||||
cfd.data = symSet;
|
||||
cfd.text = symSet;
|
||||
@@ -619,7 +620,7 @@ QVariant BaseSymbolModel::headerData(int section, Qt::Orientation orientation, i
|
||||
LtsWidgets::ComboboxFilterContent cfc;
|
||||
cfc.data.reserve(d->m_usedSymbolClass.size());
|
||||
LtsWidgets::ComboboxFilterData cfd;
|
||||
for (const auto &sc : qAsConst(d->m_usedSymbolClass))
|
||||
for (const auto &sc : std::as_const(d->m_usedSymbolClass))
|
||||
{
|
||||
cfd.data = sc;
|
||||
cfd.text = sc;
|
||||
@@ -633,7 +634,7 @@ QVariant BaseSymbolModel::headerData(int section, Qt::Orientation orientation, i
|
||||
cfc.sortItems = true;
|
||||
cfc.data.reserve(d->m_usedXmlSymbolScale.size());
|
||||
LtsWidgets::ComboboxFilterData cfd;
|
||||
for (const auto &symScale : qAsConst(d->m_usedXmlSymbolScale))
|
||||
for (const auto &symScale : std::as_const(d->m_usedXmlSymbolScale))
|
||||
{
|
||||
cfd.data = symScale;
|
||||
cfd.text = QString::number(symScale);
|
||||
@@ -646,7 +647,7 @@ QVariant BaseSymbolModel::headerData(int section, Qt::Orientation orientation, i
|
||||
LtsWidgets::ComboboxFilterContent cfc;
|
||||
cfc.data.reserve(d->m_usedGeometryTypes.size());
|
||||
LtsWidgets::ComboboxFilterData cfd;
|
||||
for (const AdvancedSymbology::GeometryType > : qAsConst(d->m_usedGeometryTypes))
|
||||
for (const AdvancedSymbology::GeometryType > : std::as_const(d->m_usedGeometryTypes))
|
||||
{
|
||||
cfd.data = (int)gt;
|
||||
cfd.text = geometryTypeToDisplayString(gt);
|
||||
@@ -660,7 +661,7 @@ QVariant BaseSymbolModel::headerData(int section, Qt::Orientation orientation, i
|
||||
cfc.sortItems = true;
|
||||
cfc.data.reserve(d->m_usedCategory.size());
|
||||
LtsWidgets::ComboboxFilterData cfd;
|
||||
for (const auto &cat : qAsConst(d->m_usedCategory))
|
||||
for (const auto &cat : std::as_const(d->m_usedCategory))
|
||||
{
|
||||
cfd.data = cat;
|
||||
cfd.text = cat;
|
||||
@@ -674,7 +675,7 @@ QVariant BaseSymbolModel::headerData(int section, Qt::Orientation orientation, i
|
||||
cfc.sortItems = true;
|
||||
cfc.data.reserve(d->m_usedGctStrings.size());
|
||||
LtsWidgets::ComboboxFilterData cfd;
|
||||
for (const auto &gctStr : qAsConst(d->m_usedGctStrings))
|
||||
for (const auto &gctStr : std::as_const(d->m_usedGctStrings))
|
||||
{
|
||||
cfd.data = gctStr;
|
||||
cfd.text = gctStr;
|
||||
@@ -922,7 +923,7 @@ void BaseSymbolModel::onUpdateUsedItemsForComboBox()
|
||||
d->m_usedCategory.clear();
|
||||
d->m_usedGctStrings.clear();
|
||||
|
||||
for (const QSharedPointer<BaseSymbolItem> &item : qAsConst(m_vecData))
|
||||
for (const QSharedPointer<BaseSymbolItem> &item : std::as_const(m_vecData))
|
||||
{
|
||||
if (!item)
|
||||
continue;
|
||||
@@ -944,7 +945,7 @@ SymbolProperties BaseSymbolModel::symbolProperties(const QString &baseSymbolCode
|
||||
// bisher aus m_baseSymbolCodeToSymbolPropertyTable beantwortet:
|
||||
|
||||
SymbolProperties symbolProperties;
|
||||
for (const auto &item : qAsConst(m_vecData))
|
||||
for (const auto &item : std::as_const(m_vecData))
|
||||
{
|
||||
if (item->baseSymbolCode() != baseSymbolCode)
|
||||
continue;
|
||||
|
||||
+6
-6
@@ -19,13 +19,13 @@
|
||||
|
||||
|
||||
// ESRI
|
||||
#include <arcgis/Symbol.h>
|
||||
#include <arcgis/Loadable.h>
|
||||
#include <arcgis/DictionarySymbolStyle.h>
|
||||
#include <Symbol.h>
|
||||
#include <Loadable.h>
|
||||
#include <DictionarySymbolStyle.h>
|
||||
|
||||
#include <arcgis/SymbolStyleSearchParameters.h>
|
||||
#include <arcgis/SymbolStyleSearchResultListModel.h>
|
||||
#include <arcgis/SymbolStyleSearchResult.h>
|
||||
#include <SymbolStyleSearchParameters.h>
|
||||
#include <SymbolStyleSearchResultListModel.h>
|
||||
#include <SymbolStyleSearchResult.h>
|
||||
|
||||
// XML:
|
||||
#include <SymbologyXML/symbol.h>
|
||||
|
||||
+7
-6
@@ -14,15 +14,16 @@
|
||||
|
||||
|
||||
// ESRI
|
||||
#include <arcgis/TaskWatcher.h>
|
||||
#include <arcgis/Symbol.h>
|
||||
#include <arcgis/SymbolStyleSearchParameters.h>
|
||||
#include <arcgis/SymbolStyleSearchResultListModel.h>
|
||||
#include <arcgis/SymbolStyleSearchResult.h>
|
||||
#include <TaskWatcher.h>
|
||||
#include <Symbol.h>
|
||||
#include <SymbolStyleSearchParameters.h>
|
||||
#include <SymbolStyleSearchResultListModel.h>
|
||||
#include <SymbolStyleSearchResult.h>
|
||||
|
||||
|
||||
// Qt
|
||||
#include <QtConcurrent>
|
||||
#include <utility>
|
||||
#include <QtCore/QFuture>
|
||||
|
||||
#define CREATE_ESRI_SYMBOL_ON_DEMAND // save time on startup
|
||||
@@ -291,7 +292,7 @@ void EsriDictionaryProcessor::syncTableWithinMainThread()
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
|
||||
|
||||
// for ALL searchResuls (for valid baseSymbolCodes, for modifierTable...)
|
||||
for (const Esri::ArcGISRuntime::SymbolStyleSearchResult &resultItem : qAsConst(m_searchResultList))
|
||||
for (const Esri::ArcGISRuntime::SymbolStyleSearchResult &resultItem : std::as_const(m_searchResultList))
|
||||
{
|
||||
const QString &originalKey = resultItem.key();
|
||||
|
||||
|
||||
+1
-1
@@ -19,7 +19,7 @@
|
||||
|
||||
|
||||
// Esri
|
||||
#include <arcgis/DictionarySymbolStyle.h>
|
||||
#include <DictionarySymbolStyle.h>
|
||||
|
||||
|
||||
|
||||
|
||||
+4
-3
@@ -16,6 +16,7 @@
|
||||
// Qt
|
||||
#include <QtConcurrent>
|
||||
#include <QtCore/QFuture>
|
||||
#include <utility>
|
||||
|
||||
|
||||
namespace AdvancedSymbology
|
||||
@@ -130,7 +131,7 @@ bool EsriDictionaryProcessorApp6::processBaseSymbolCodeToPropertyTable()
|
||||
|
||||
int resultItemCounter = 0;
|
||||
int gctStringEmptyCounter = 0;
|
||||
for (const Esri::ArcGISRuntime::SymbolStyleSearchResult &resultItem : qAsConst(m_searchResultList))
|
||||
for (const Esri::ArcGISRuntime::SymbolStyleSearchResult &resultItem : std::as_const(m_searchResultList))
|
||||
{
|
||||
|
||||
// canceled?
|
||||
@@ -229,11 +230,11 @@ bool EsriDictionaryProcessorApp6::processBaseSymbolCodeToPropertyTable()
|
||||
|
||||
/*
|
||||
const QString cat = resultItem.category();
|
||||
const QVector<QStringRef> &slCategory = cat.splitRef(QLatin1Char(':'));
|
||||
const QVector<QStringView> &slCategory = cat.split(QLatin1Char(':'));
|
||||
|
||||
if (!slCategory.isEmpty())
|
||||
{
|
||||
const QStringRef &geometryStr = slCategory.last().trimmed();
|
||||
const QStringView geometryStr = slCategory.last().trimmed();
|
||||
bool isPoint = geometryStr.compare(QLatin1String("Point"), Qt::CaseInsensitive) == 0;
|
||||
bool isMainIcon = geometryStr.compare(QLatin1String("Main Icon"), Qt::CaseInsensitive) == 0;
|
||||
bool isLine = geometryStr.compare(QLatin1String("Line"), Qt::CaseInsensitive) == 0;
|
||||
|
||||
+10
-8
@@ -35,10 +35,12 @@
|
||||
|
||||
// Qt
|
||||
#include <QtCore/QThread>
|
||||
#include <utility>
|
||||
#include <QStringView>
|
||||
|
||||
|
||||
|
||||
#include <arcgis/arcgisversion.h> // This file is created by RME, not ESRI
|
||||
#include <arcgisversion.h> // This file is created by RME, not ESRI
|
||||
|
||||
|
||||
namespace AdvancedSymbology
|
||||
@@ -243,7 +245,7 @@ bool EsriDictionaryProcessorApp6D::processBaseSymbolCodeToPropertyTable()
|
||||
|
||||
int resultItemCounter = 0;
|
||||
int gctStringEmptyCounter = 0;
|
||||
for (const Esri::ArcGISRuntime::SymbolStyleSearchResult &resultItem : qAsConst(m_searchResultList))
|
||||
for (const Esri::ArcGISRuntime::SymbolStyleSearchResult &resultItem : std::as_const(m_searchResultList))
|
||||
{
|
||||
|
||||
// canceled?
|
||||
@@ -316,10 +318,10 @@ bool EsriDictionaryProcessorApp6D::processBaseSymbolCodeToPropertyTable()
|
||||
symProps.setSidc(SidcCodec::encodeBaseSymbolCode(m_baseSymbolCodeToSymbolPropertyTable.symbologyType(), key8));
|
||||
// retrieve GeometryType
|
||||
const QString cat = resultItem.category();
|
||||
const QVector<QStringRef> &slCategory = cat.splitRef(QLatin1Char(':'));
|
||||
const QVector<QStringView> &slCategory = cat.split(QLatin1Char(':'));
|
||||
if (!slCategory.isEmpty())
|
||||
{
|
||||
const QStringRef &geometryStr = slCategory.last().trimmed();
|
||||
const QStringView geometryStr = slCategory.last().trimmed();
|
||||
bool isPoint = geometryStr.compare(QLatin1String("Point"), Qt::CaseInsensitive) == 0;
|
||||
bool isMainIcon = geometryStr.compare(QLatin1String("Main Icon"), Qt::CaseInsensitive) == 0;
|
||||
bool isLine = geometryStr.compare(QLatin1String("Line"), Qt::CaseInsensitive) == 0;
|
||||
@@ -385,7 +387,7 @@ bool EsriDictionaryProcessorApp6D::processModifierTable()
|
||||
}
|
||||
|
||||
int counter = 0;
|
||||
for (const Esri::ArcGISRuntime::SymbolStyleSearchResult &resultItem : qAsConst(m_searchResultList))
|
||||
for (const Esri::ArcGISRuntime::SymbolStyleSearchResult &resultItem : std::as_const(m_searchResultList))
|
||||
{
|
||||
++counter;
|
||||
|
||||
@@ -415,8 +417,8 @@ bool EsriDictionaryProcessorApp6D::processModifierTable()
|
||||
|
||||
if (isDigit)
|
||||
{
|
||||
const QString &resultItemName = resultItem.name(); // store result item name locally to guaranty following splitRef
|
||||
const QVector<QStringRef> &sl = resultItemName.splitRef(QLatin1String(" : ")); // otherwise ("resultItem.name().splitRef(...)") unpredictable results are possible
|
||||
const QString &resultItemName = resultItem.name(); // store result item name locally to guaranty following split
|
||||
const QVector<QStringView> &sl = resultItemName.split(QLatin1String(" : ")); // otherwise ("resultItem.name().split(...)") unpredictable results are possible
|
||||
|
||||
// log multiple keys:
|
||||
if (m_modifierTable.contains(originalKey))
|
||||
@@ -428,7 +430,7 @@ bool EsriDictionaryProcessorApp6D::processModifierTable()
|
||||
|
||||
modData.m_modifierKey = originalKey;
|
||||
|
||||
QStringRef symbolSetStringRef = originalKey.midRef(0, 2);
|
||||
QStringView symbolSetStringRef = originalKey.mid(0, 2);
|
||||
SidcDefinitions::SymbolSet symbolSetEnum = static_cast<SidcDefinitions::SymbolSet>(symbolSetStringRef.toUInt());
|
||||
|
||||
if (!SidcDefinitions::symbolSets().contains(symbolSetEnum))
|
||||
|
||||
+11
-9
@@ -15,6 +15,8 @@
|
||||
|
||||
// Qt
|
||||
#include <QtCore/QThread>
|
||||
#include <utility>
|
||||
#include <QStringView>
|
||||
|
||||
|
||||
namespace AdvancedSymbology
|
||||
@@ -243,7 +245,7 @@ bool EsriDictionaryProcessorMil2525D::processBaseSymbolCodeToPropertyTable()
|
||||
|
||||
int resultItemCounter = 0;
|
||||
int gctStringEmptyCounter = 0;
|
||||
for (const Esri::ArcGISRuntime::SymbolStyleSearchResult &resultItem : qAsConst(m_searchResultList))
|
||||
for (const Esri::ArcGISRuntime::SymbolStyleSearchResult &resultItem : std::as_const(m_searchResultList))
|
||||
{
|
||||
|
||||
// canceled?
|
||||
@@ -315,10 +317,10 @@ bool EsriDictionaryProcessorMil2525D::processBaseSymbolCodeToPropertyTable()
|
||||
symProps.setSidc(SidcCodec::encodeBaseSymbolCode(m_baseSymbolCodeToSymbolPropertyTable.symbologyType(), key8));
|
||||
// retrieve GeometryType
|
||||
const QString cat = resultItem.category();
|
||||
const QVector<QStringRef> &slCategory = cat.splitRef(QLatin1Char(':'));
|
||||
const QVector<QStringView> &slCategory = cat.split(QLatin1Char(':'));
|
||||
if (!slCategory.isEmpty())
|
||||
{
|
||||
const QStringRef &geometryStr = slCategory.last().trimmed();
|
||||
const QStringView geometryStr = slCategory.last().trimmed();
|
||||
bool isPoint = geometryStr.compare(QLatin1String("Point"), Qt::CaseInsensitive) == 0;
|
||||
bool isMainIcon = geometryStr.compare(QLatin1String("Main Icon"), Qt::CaseInsensitive) == 0;
|
||||
bool isLine = geometryStr.compare(QLatin1String("Line"), Qt::CaseInsensitive) == 0;
|
||||
@@ -383,7 +385,7 @@ bool EsriDictionaryProcessorMil2525D::processModifierTable()
|
||||
|
||||
|
||||
int counter = 0;
|
||||
for (const Esri::ArcGISRuntime::SymbolStyleSearchResult &resultItem : qAsConst(m_searchResultList))
|
||||
for (const Esri::ArcGISRuntime::SymbolStyleSearchResult &resultItem : std::as_const(m_searchResultList))
|
||||
{
|
||||
++counter;
|
||||
|
||||
@@ -413,8 +415,8 @@ bool EsriDictionaryProcessorMil2525D::processModifierTable()
|
||||
|
||||
if (isDigit)
|
||||
{
|
||||
const QString &resultItemName = resultItem.name(); // store result item name locally to guaranty following splitRef
|
||||
const QVector<QStringRef> &sl = resultItemName.splitRef(QLatin1String(" : ")); // otherwise ("resultItem.name().splitRef(...)") unpredictable results are possible
|
||||
const QString &resultItemName = resultItem.name(); // store result item name locally to guaranty following split
|
||||
const QVector<QStringView> &sl = resultItemName.split(QLatin1String(" : ")); // otherwise ("resultItem.name().split(...)") unpredictable results are possible
|
||||
|
||||
// log multiple keys:
|
||||
if (m_modifierTable.contains(originalKey))
|
||||
@@ -424,7 +426,7 @@ bool EsriDictionaryProcessorMil2525D::processModifierTable()
|
||||
|
||||
modData.m_modifierKey = originalKey;
|
||||
|
||||
SidcDefinitions::SymbolSet symbolSetEnum = static_cast<SidcDefinitions::SymbolSet>(originalKey.midRef(0, 2).toUInt());
|
||||
SidcDefinitions::SymbolSet symbolSetEnum = static_cast<SidcDefinitions::SymbolSet>(originalKey.mid(0, 2).toUInt());
|
||||
|
||||
if (!SidcDefinitions::symbolSets().contains(symbolSetEnum))
|
||||
{
|
||||
@@ -434,8 +436,8 @@ bool EsriDictionaryProcessorMil2525D::processModifierTable()
|
||||
}
|
||||
|
||||
modData.m_symbolSet = symbolSetEnum;
|
||||
modData.m_modifierSector = originalKey.midRef(4, 1).toUInt();
|
||||
modData.m_modifierValue = originalKey.midRef(2, 2).toUInt();
|
||||
modData.m_modifierSector = originalKey.mid(4, 1).toUInt();
|
||||
modData.m_modifierValue = originalKey.mid(2, 2).toUInt();
|
||||
modData.m_modifierName = (sl.size() == 2) ? sl.last().toString() : resultItem.name();
|
||||
|
||||
m_modifierTable[originalKey] = modData;
|
||||
|
||||
+15
-13
@@ -27,11 +27,11 @@
|
||||
#include <SymbologyXML/xml_symbol_codec.h>
|
||||
|
||||
// ESRI
|
||||
#include <arcgis/TaskWatcher.h>
|
||||
#include <arcgis/Symbol.h>
|
||||
#include <arcgis/SymbolStyleSearchParameters.h>
|
||||
#include <arcgis/SymbolStyleSearchResultListModel.h>
|
||||
#include <arcgis/SymbolStyleSearchResult.h>
|
||||
#include <TaskWatcher.h>
|
||||
#include <Symbol.h>
|
||||
#include <SymbolStyleSearchParameters.h>
|
||||
#include <SymbolStyleSearchResultListModel.h>
|
||||
#include <SymbolStyleSearchResult.h>
|
||||
|
||||
|
||||
# include <arcgis/arcgisversion.h> // This file is created by RME, not ESRI
|
||||
@@ -48,6 +48,8 @@
|
||||
#include <QtWidgets/QTreeView>
|
||||
#include <QtWidgets/QHBoxLayout>
|
||||
#include <QtWidgets/QDialog>
|
||||
#include <QStringView>
|
||||
#include <utility>
|
||||
#include <QtCore/QRegularExpression>
|
||||
#include <QtCore/QDir>
|
||||
#include <QtCore/QThread>
|
||||
@@ -785,7 +787,7 @@ int SymbolDictionaryImpl::addEtsSymbols(const QString &path)
|
||||
|
||||
// iterate over sorted files:
|
||||
int fileId_substitute = 0;
|
||||
for (const auto &filePath : qAsConst(slFilePaths))
|
||||
for (const auto &filePath : std::as_const(slFilePaths))
|
||||
{
|
||||
++fileId_substitute;
|
||||
// DEBUG_LOG(m_logger) << LOGFUNCTION << " found file= '" << filePath << "'";
|
||||
@@ -819,10 +821,10 @@ int SymbolDictionaryImpl::addEtsSymbols(const QString &path)
|
||||
// rootDir.absolutePath(): ':/advancedSymbology/CivilSymbols'
|
||||
// filepath : ':/advancedSymbology/CivilSymbols/Sonstige/Bundeswehr_Stelle.gif'
|
||||
// remove path from filePath:
|
||||
QStringRef filePathReduced = filePath.midRef(rootDir.absolutePath().size() + 1);
|
||||
QStringView filePathReduced = filePath.mid(rootDir.absolutePath().size() + 1);
|
||||
// filepath 'Sonstige/Bundeswehr_Stelle.gif'
|
||||
|
||||
QVector<QStringRef> parts = filePathReduced.split(QLatin1Char('/'));
|
||||
QVector<QStringView> parts = filePathReduced.split(QLatin1Char('/'));
|
||||
|
||||
// remove filename (to get dirname's as tags:
|
||||
parts.removeLast();
|
||||
@@ -840,7 +842,7 @@ int SymbolDictionaryImpl::addEtsSymbols(const QString &path)
|
||||
QStringList tags;
|
||||
tags.reserve(parts.size() + 2);
|
||||
tags.append(ETS_SYMBOL_KEYWORD); // 'ETS'
|
||||
for (const auto &item : qAsConst(parts))
|
||||
for (const auto &item : std::as_const(parts))
|
||||
tags.append(item.toString());
|
||||
tags.append(humanReadableName);
|
||||
|
||||
@@ -1441,7 +1443,7 @@ QSharedPointer<SymbolResult> SymbolDictionaryImpl::fetchSymbol(const SymbolDataT
|
||||
}
|
||||
|
||||
// linear search - maybe optimize. But how many different icons are really rendered in parallel?
|
||||
for (const QWeakPointer<SymbolResult> &res : qAsConst(m_findSymbol2symbolResult))
|
||||
for (const QWeakPointer<SymbolResult> &res : std::as_const(m_findSymbol2symbolResult))
|
||||
{
|
||||
auto sp = res.toStrongRef();
|
||||
if (!sp)
|
||||
@@ -1988,7 +1990,7 @@ QImage renderXML_Symbol(const QSharedPointer<SymbologyXML::PixmapSymbolCache> &x
|
||||
}
|
||||
additionalSymbolData.m_vbg.color = injuryColor;
|
||||
|
||||
for (const AdditionalSymbolType additionalSymbolType : qAsConst(symbolDataToRender.additionalSymbols))
|
||||
for (const AdditionalSymbolType additionalSymbolType : std::as_const(symbolDataToRender.additionalSymbols))
|
||||
{
|
||||
switch (additionalSymbolType)
|
||||
{
|
||||
@@ -2089,7 +2091,7 @@ QImage renderExtensions(QImage &coreImage,
|
||||
|
||||
// coreImage.save(QLatin1String("/tmp/dummy.png"));
|
||||
|
||||
for (const QColor &oldColor : qAsConst(oldColorVec))
|
||||
for (const QColor &oldColor : std::as_const(oldColorVec))
|
||||
{
|
||||
if (oldColor.isValid())
|
||||
{
|
||||
@@ -2128,7 +2130,7 @@ QImage renderExtensions(QImage &coreImage,
|
||||
#endif // USE_ARCADE_SYMBOLOGY
|
||||
|
||||
// replace honoring the hotSpot by simple scaling :
|
||||
int hqFdTf = QStringRef(&sidc, 7, 1).toInt();
|
||||
int hqFdTf = QStringView(sidc).slice(7, 1).toInt();
|
||||
// int amplifierDescriptor = QStringRef(&sidc, 8, 2).toInt();
|
||||
if (((hqFdTf > 0) && ((hqFdTf < 8)))) // HeadQuarter/FeintDummy/TaskFore have more height then width
|
||||
newSize = fullImage.size();
|
||||
|
||||
+1
-1
@@ -13,7 +13,7 @@
|
||||
#include "advanced_symbology_logging.h"
|
||||
|
||||
// Esri
|
||||
#include <arcgis/DictionarySymbolStyle.h>
|
||||
#include <DictionarySymbolStyle.h>
|
||||
|
||||
|
||||
class QStandardItemModel;
|
||||
|
||||
+2
-1
@@ -36,6 +36,7 @@
|
||||
|
||||
#include <QtCore/QChar>
|
||||
#include <QtCore/QString>
|
||||
#include <QStringView>
|
||||
|
||||
/**
|
||||
* \brief The SidcCodec namespace enables the encoding and decoding of a (base) symbol id of xml symbols.
|
||||
@@ -90,7 +91,7 @@ namespace SymbologyXML
|
||||
, SymbolTypes::t_affil &affil
|
||||
, SymbolTypes::t_mob &mob)
|
||||
{
|
||||
QVector<QStringRef> tokenVector = encodedId.splitRef( QLatin1Char('-') );
|
||||
auto tokenVector = encodedId.split(QLatin1Char('-'));
|
||||
if (tokenVector.size() == 5)
|
||||
{
|
||||
bool ok = false;
|
||||
|
||||
@@ -34,8 +34,14 @@ ELSE()
|
||||
RETURN()
|
||||
ENDIF()
|
||||
|
||||
SET(_arcgis_include_hint "${CMAKE_SOURCE_DIR}/../../external/ArcGIS/MapsSDK_Qt_300.0.0/ArcGIS_Maps_SDK_Qt_300.0.0/qt300.0.0/sdk/include")
|
||||
SET(_arcgis_library_hint "${CMAKE_SOURCE_DIR}/../../external/ArcGIS/MapsSDK_Qt_300.0.0/ArcGIS_Maps_SDK_Qt_300.0.0/qt300.0.0/sdk/linux/x64/lib")
|
||||
SET(_arcgis_include_hint "${CMAKE_SOURCE_DIR}/external/ArcGIS/MapsSDK_Qt_300.0.0/ArcGIS_Maps_SDK_Qt_300.0.0/qt300.0.0/sdk/include")
|
||||
SET(_arcgis_library_hint "${CMAKE_SOURCE_DIR}/external/ArcGIS/MapsSDK_Qt_300.0.0/ArcGIS_Maps_SDK_Qt_300.0.0/qt300.0.0/sdk/linux/x64/lib")
|
||||
|
||||
# Check if paths exist, if not try alternative paths
|
||||
IF(NOT EXISTS "${_arcgis_include_hint}")
|
||||
SET(_arcgis_include_hint "${CMAKE_SOURCE_DIR}/../../external/ArcGIS/MapsSDK_Qt_300.0.0/ArcGIS_Maps_SDK_Qt_300.0.0/qt300.0.0/sdk/include")
|
||||
SET(_arcgis_library_hint "${CMAKE_SOURCE_DIR}/../../external/ArcGIS/MapsSDK_Qt_300.0.0/ArcGIS_Maps_SDK_Qt_300.0.0/qt300.0.0/sdk/linux/x64/lib")
|
||||
ENDIF()
|
||||
|
||||
SET(_arcgis_lib_dir $ENV{ARCGIS_LIB_DIR})
|
||||
SET(_arcgis_inc_dir $ENV{ARCGIS_INC_DIR})
|
||||
@@ -66,13 +72,13 @@ ELSE()
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
FIND_PATH(ARCGIS_INCLUDE_DIR arcgis/ArcGISQt_global.h HINTS ${_arcgis_include_hint})
|
||||
FIND_LIBRARY_WITH_DEBUG(ARCGIS_LIBRARY WIN32_DEBUG_POSTFIX d NAMES EsriRuntimeQt HINTS ${_arcgis_library_hint})
|
||||
FIND_PATH(ARCGIS_INCLUDE_DIR ArcGISQt_global.h HINTS ${_arcgis_include_hint})
|
||||
FIND_LIBRARY(ARCGIS_LIBRARY NAMES EsriRuntimeQt HINTS ${_arcgis_library_hint})
|
||||
|
||||
FIND_LIBRARY_WITH_DEBUG(ARCGIS_COMMON_LIBRARY WIN32_DEBUG_POSTFIX d NAMES EsriCommonQt HINTS ${_arcgis_library_hint})
|
||||
FIND_LIBRARY(ARCGIS_COMMON_LIBRARY NAMES EsriCommonQt HINTS ${_arcgis_library_hint})
|
||||
IF (UNIX)
|
||||
|
||||
FIND_LIBRARY_WITH_DEBUG(ARCGIS_CPP_LIBRARY WIN32_DEBUG_POSTFIX d NAMES runtimecore HINTS ${_arcgis_library_hint})
|
||||
FIND_LIBRARY(ARCGIS_CPP_LIBRARY NAMES runtimecore HINTS ${_arcgis_library_hint})
|
||||
ENDIF()
|
||||
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(ArcGIS DEFAULT_MSG ARCGIS_LIBRARY ARCGIS_INCLUDE_DIR)
|
||||
|
||||
+1
@@ -0,0 +1 @@
|
||||
/workspace/external/ArcGIS
|
||||
+50
@@ -0,0 +1,50 @@
|
||||
#!/bin/bash
|
||||
# install_arcgis.sh - Install/setup ArcGIS Runtime SDK for Qt in Docker container
|
||||
# This script prepares the ArcGIS SDK for use with Qt6 builds
|
||||
|
||||
set -e
|
||||
|
||||
ARCGIS_SRC="/workspace/external/ArcGIS"
|
||||
ARCGIS_DEST="/workspace/qt-migration-legatus/qt6-after/qt6-migrated-legatus/external/ArcGIS"
|
||||
|
||||
echo "=== ArcGIS SDK Setup ==="
|
||||
echo "Source: ${ARCGIS_SRC}"
|
||||
echo "Destination: ${ARCGIS_DEST}"
|
||||
|
||||
# Check if source exists
|
||||
if [ ! -d "${ARCGIS_SRC}" ]; then
|
||||
echo "ERROR: ArcGIS SDK not found at ${ARCGIS_SRC}"
|
||||
echo "Make sure the SDK is mounted in the Docker container"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Create destination directory if needed
|
||||
mkdir -p "$(dirname ${ARCGIS_DEST})"
|
||||
|
||||
# Remove existing symlink/directory if it exists
|
||||
if [ -e "${ARCGIS_DEST}" ]; then
|
||||
echo "Removing existing ArcGIS SDK at ${ARCGIS_DEST}"
|
||||
rm -rf "${ARCGIS_DEST}"
|
||||
fi
|
||||
|
||||
# Create symlink to the SDK
|
||||
echo "Creating symlink: ${ARCGIS_DEST} -> ${ARCGIS_SRC}"
|
||||
ln -s "${ARCGIS_SRC}" "${ARCGIS_DEST}"
|
||||
|
||||
# Verify the SDK structure
|
||||
SDK_PATH="${ARCGIS_DEST}/MapsSDK_Qt_300.0.0/ArcGIS_Maps_SDK_Qt_300.0.0/qt300.0.0/sdk"
|
||||
if [ -d "${SDK_PATH}" ]; then
|
||||
echo "✓ ArcGIS SDK found at: ${SDK_PATH}"
|
||||
echo " Include dir: ${SDK_PATH}/include"
|
||||
echo " Library dir: ${SDK_PATH}/linux/x64/lib"
|
||||
|
||||
# List available libraries
|
||||
echo " Available libraries:"
|
||||
ls -lh "${SDK_PATH}/linux/x64/lib/" | grep -E '\.(so|a)$' || true
|
||||
else
|
||||
echo "WARNING: Expected SDK structure not found at ${SDK_PATH}"
|
||||
echo "Available contents:"
|
||||
ls -la "${ARCGIS_DEST}/" || true
|
||||
fi
|
||||
|
||||
echo "=== ArcGIS SDK Setup Complete ==="
|
||||
@@ -30,6 +30,9 @@ BUILD_RTI:
|
||||
BUILD_GRANTLEE:
|
||||
--grantlee / --no-grantlee Enable/disable BUILD_GRANTLEE (default: ON)
|
||||
|
||||
BUILD_ARCGIS:
|
||||
--arcgis / --no-arcgis Enable/disable BUILD_ARCGIS (default: OFF)
|
||||
|
||||
Build groups:
|
||||
--group1 / --no-group1 Enable/disable DDS core libraries build
|
||||
--group2 / --no-group2 Enable/disable migration_tests build
|
||||
@@ -56,6 +59,7 @@ Prebuilt Docker image management:
|
||||
Environment variable overrides:
|
||||
BUILD_RTI=ON|OFF
|
||||
BUILD_GRANTLEE=ON|OFF
|
||||
BUILD_ARCGIS=ON|OFF
|
||||
BUILD_GROUP1=ON|OFF
|
||||
BUILD_GROUP2=ON|OFF
|
||||
BUILD_GROUP3=ON|OFF
|
||||
@@ -78,6 +82,7 @@ Expected file:
|
||||
Defaults:
|
||||
BUILD_RTI=ON
|
||||
BUILD_GRANTLEE=ON
|
||||
BUILD_ARCGIS=OFF
|
||||
BUILD_GROUP1=ON
|
||||
BUILD_GROUP2=ON
|
||||
BUILD_GROUP3=ON
|
||||
@@ -209,6 +214,8 @@ APT_PACKAGES=(
|
||||
libqt6core6
|
||||
libqt6gui6
|
||||
libqt6widgets6
|
||||
libqt6sql6
|
||||
libqt6test6
|
||||
qt6-base-dev
|
||||
qt6-tools-dev-tools
|
||||
qt6-tools-dev
|
||||
@@ -320,17 +327,6 @@ GROUP4_TARGETS=(
|
||||
Tetra_dgps_simulator
|
||||
)
|
||||
|
||||
GROUP5_TARGETS=(
|
||||
# Viewer module
|
||||
situationMapCommon
|
||||
advancedSymbology
|
||||
advancedSymbologyXML
|
||||
advancedSymbologyXML_Gui
|
||||
LtsDataView
|
||||
LtsFileDialog
|
||||
LtsReportDisplay
|
||||
)
|
||||
|
||||
APT_PACKAGES_STRING="$(join_by ' ' "${APT_PACKAGES[@]}")"
|
||||
|
||||
build_prebuilt_image() {
|
||||
@@ -408,6 +404,7 @@ set +a
|
||||
BUILD_ALL="${BUILD_ALL:-ON}"
|
||||
BUILD_RTI="${BUILD_RTI:-ON}"
|
||||
BUILD_GRANTLEE="${BUILD_GRANTLEE:-ON}"
|
||||
BUILD_ARCGIS="${BUILD_ARCGIS:-OFF}"
|
||||
BUILD_GROUP1="${BUILD_GROUP1:-ON}"
|
||||
BUILD_GROUP2="${BUILD_GROUP2:-ON}"
|
||||
BUILD_GROUP3="${BUILD_GROUP3:-ON}"
|
||||
@@ -477,6 +474,12 @@ while [[ $# -gt 0 ]]; do
|
||||
--no-grantlee)
|
||||
BUILD_GRANTLEE=OFF
|
||||
;;
|
||||
--arcgis)
|
||||
BUILD_ARCGIS=ON
|
||||
;;
|
||||
--no-arcgis)
|
||||
BUILD_ARCGIS=OFF
|
||||
;;
|
||||
--no-ctest)
|
||||
RUN_CTEST=OFF
|
||||
;;
|
||||
@@ -530,6 +533,7 @@ DELETE_PREBUILT_IMAGE="${DELETE_PREBUILT_IMAGE:-OFF}"
|
||||
BUILD_ALL="$(normalize_on_off "$BUILD_ALL" "BUILD_ALL")"
|
||||
BUILD_RTI="$(normalize_on_off "$BUILD_RTI" "BUILD_RTI")"
|
||||
BUILD_GRANTLEE="$(normalize_on_off "$BUILD_GRANTLEE" "BUILD_GRANTLEE")"
|
||||
BUILD_ARCGIS="$(normalize_on_off "$BUILD_ARCGIS" "BUILD_ARCGIS")"
|
||||
BUILD_GROUP1="$(normalize_on_off "$BUILD_GROUP1" "BUILD_GROUP1")"
|
||||
BUILD_GROUP2="$(normalize_on_off "$BUILD_GROUP2" "BUILD_GROUP2")"
|
||||
BUILD_GROUP3="$(normalize_on_off "$BUILD_GROUP3" "BUILD_GROUP3")"
|
||||
@@ -543,7 +547,29 @@ BUILD_PREBUILT_IMAGE="$(normalize_on_off "$BUILD_PREBUILT_IMAGE" "BUILD_PREBUILT
|
||||
DELETE_PREBUILT_IMAGE="$(normalize_on_off "$DELETE_PREBUILT_IMAGE" "DELETE_PREBUILT_IMAGE")"
|
||||
|
||||
# Export variables for Docker container
|
||||
export BUILD_ALL BUILD_RTI BUILD_GRANTLEE BUILD_GROUP1 BUILD_GROUP2 BUILD_GROUP3 BUILD_GROUP4 BUILD_GROUP5 RUN_CTEST TESTS_ONLY INTEGRATION_TEST USE_PREBUILT_IMAGE BUILD_PREBUILT_IMAGE DELETE_PREBUILT_IMAGE DOCKER_IMAGE
|
||||
export BUILD_ALL BUILD_RTI BUILD_GRANTLEE BUILD_ARCGIS BUILD_GROUP1 BUILD_GROUP2 BUILD_GROUP3 BUILD_GROUP4 BUILD_GROUP5 RUN_CTEST TESTS_ONLY INTEGRATION_TEST USE_PREBUILT_IMAGE BUILD_PREBUILT_IMAGE DELETE_PREBUILT_IMAGE DOCKER_IMAGE
|
||||
|
||||
# Group 5: Viewer module targets (conditional on BUILD_ARCGIS)
|
||||
if [[ "${BUILD_ARCGIS}" == "ON" ]]; then
|
||||
GROUP5_TARGETS=(
|
||||
# Viewer module with ArcGIS
|
||||
situationMapCommon
|
||||
advancedSymbology
|
||||
advancedSymbologyXML
|
||||
LtsDataView
|
||||
LtsFileDialog
|
||||
LtsReportDisplay
|
||||
)
|
||||
else
|
||||
GROUP5_TARGETS=(
|
||||
# Viewer module without ArcGIS (advancedSymbology requires ArcGIS)
|
||||
situationMapCommon
|
||||
advancedSymbologyXML
|
||||
LtsDataView
|
||||
LtsFileDialog
|
||||
LtsReportDisplay
|
||||
)
|
||||
fi
|
||||
|
||||
require_non_empty "${DOCKER_IMAGE}" "DOCKER_IMAGE"
|
||||
|
||||
@@ -620,6 +646,7 @@ USE_PREBUILT_IMAGE="${USE_PREBUILT_IMAGE:-OFF}"
|
||||
BUILD_ALL="${BUILD_ALL:-ON}"
|
||||
BUILD_RTI="${BUILD_RTI:-ON}"
|
||||
BUILD_GRANTLEE="${BUILD_GRANTLEE:-ON}"
|
||||
BUILD_ARCGIS="${BUILD_ARCGIS:-OFF}"
|
||||
BUILD_GROUP1="${BUILD_GROUP1:-ON}"
|
||||
BUILD_GROUP2="${BUILD_GROUP2:-ON}"
|
||||
BUILD_GROUP3="${BUILD_GROUP3:-ON}"
|
||||
@@ -685,6 +712,16 @@ fi
|
||||
export RTI_LICENSE_FILE=/workspace/rti_license.dat
|
||||
export QT_QPA_PLATFORM=offscreen
|
||||
|
||||
# Setup ArcGIS SDK if enabled
|
||||
if [[ "${BUILD_ARCGIS}" == "ON" ]]; then
|
||||
log_info "Setting up ArcGIS SDK"
|
||||
if [[ -f "/workspace/qt-migration-legatus/qt6-after/qt6-migrated-legatus/install_arcgis.sh" ]]; then
|
||||
bash /workspace/qt-migration-legatus/qt6-after/qt6-migrated-legatus/install_arcgis.sh
|
||||
else
|
||||
log_info "install_arcgis.sh not found, skipping ArcGIS SDK setup"
|
||||
fi
|
||||
fi
|
||||
|
||||
cd /workspace/qt-migration-legatus/qt6-after/qt6-migrated-legatus
|
||||
|
||||
rm -rf build4
|
||||
@@ -695,10 +732,10 @@ cmake .. \
|
||||
-DBUILD_TESTING=ON \
|
||||
-DBUILD_RTI="${BUILD_RTI}" \
|
||||
-DBUILD_GRANTLEE="${BUILD_GRANTLEE}" \
|
||||
-DBUILD_ARCGIS=OFF \
|
||||
-DBUILD_ARCGIS="${BUILD_ARCGIS}" \
|
||||
-DCMAKE_CXX_STANDARD=17 \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_PREFIX_PATH="${QT_BASE_DIR}/${QT_VERSION}/${QT_ARCH_DIR}"
|
||||
-DCMAKE_PREFIX_PATH="${QT_BASE_DIR}/${QT_VERSION}/${QT_ARCH_DIR}${BUILD_ARCGIS:+;/workspace/qt-migration-legatus/qt6-after/qt6-migrated-legatus/external/ArcGIS/MapsSDK_Qt_300.0.0/ArcGIS_Maps_SDK_Qt_300.0.0/qt300.0.0/sdk}"
|
||||
|
||||
read -r -a GROUP1_ARRAY <<< "${GROUP1_TARGETS}"
|
||||
read -r -a GROUP2_ARRAY <<< "${GROUP2_TARGETS}"
|
||||
@@ -708,7 +745,7 @@ read -r -a GROUP5_ARRAY <<< "${GROUP5_TARGETS}"
|
||||
|
||||
if [[ "${TESTS_ONLY}" != "ON" ]]; then
|
||||
run_build_group "Group 1" "${BUILD_GROUP1}" "group1_build.log" "${GROUP1_ARRAY[@]}"
|
||||
run_build_group "Group 4 (DDS Tests)" "${BUILD_GROUP1}" "group4_build.log" "${GROUP4_ARRAY[@]}"
|
||||
run_build_group "Group 4 (DDS Tests)" "${BUILD_GROUP4}" "group4_build.log" "${GROUP4_ARRAY[@]}"
|
||||
run_build_group "Group 2" "${BUILD_GROUP2}" "group2_build.log" "${GROUP2_ARRAY[@]}"
|
||||
run_build_group "Group 3" "${BUILD_GROUP3}" "group3_build.log" "${GROUP3_ARRAY[@]}"
|
||||
run_build_group "Group 4" "${BUILD_GROUP4}" "group4_build.log" "${GROUP4_ARRAY[@]}"
|
||||
@@ -737,10 +774,13 @@ docker run --rm \
|
||||
-e LANG \
|
||||
-e LC_ALL \
|
||||
-e BUILD_RTI \
|
||||
-e BUILD_GRANTLEE \
|
||||
-e BUILD_ARCGIS \
|
||||
-e BUILD_GROUP1 \
|
||||
-e BUILD_GROUP2 \
|
||||
-e BUILD_GROUP3 \
|
||||
-e BUILD_GROUP4 \
|
||||
-e BUILD_GROUP5 \
|
||||
-e RUN_CTEST \
|
||||
-e TESTS_ONLY \
|
||||
-e INTEGRATION_TEST \
|
||||
@@ -757,6 +797,7 @@ docker run --rm \
|
||||
-e GROUP5_TARGETS="${GROUP5_TARGETS_STRING}" \
|
||||
-v "${WORKSPACE_ROOT_HOST}:/workspace" \
|
||||
-v "${RTI_LICENSE_FILE_HOST}:/workspace/rti_license.dat" \
|
||||
-v "${MIGRATE_PIPELINE_ROOT}/external:/workspace/external:ro" \
|
||||
-v "${CONTAINER_SCRIPT_HOST}:/tmp/run-build-inside-container.sh:ro" \
|
||||
"${DOCKER_IMAGE}" \
|
||||
bash /tmp/run-build-inside-container.sh
|
||||
Reference in new issue
Block a user