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>
150 lines
3.9 KiB
C++
150 lines
3.9 KiB
C++
/**
|
|
* @RDE_HEADER@
|
|
* Interface-Implementation of Text
|
|
* $Id$
|
|
* $HeadURL$
|
|
* $Author$
|
|
*/
|
|
|
|
// Own
|
|
#include "text_impl.h"
|
|
#include <MapImpl/map_impl.h>
|
|
#include <GraphicalObjects/graphical_object_path.h>
|
|
#include <GraphicalObjects/stub_graphical_object.h>
|
|
#include <GraphicalObjects/graphical_object_picture_marker.h>
|
|
#include <GraphicalObjects/graphical_object_text.h>
|
|
|
|
// ESRI
|
|
|
|
|
|
// Qt
|
|
#include <QString>
|
|
|
|
|
|
#include "position_marker.xpm"
|
|
|
|
|
|
namespace SituationMap
|
|
{
|
|
|
|
//-----------------------------------------------------------------------------
|
|
// constants
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
|
//-----------------------------------------------------------------------------
|
|
// Utils:
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
|
|
//-----------------------------------------------------------------------------
|
|
// class TextImpl
|
|
//-----------------------------------------------------------------------------
|
|
TextImpl::TextImpl(const QString &debugInfo)
|
|
: Text() // Interface
|
|
, BaseClass(debugInfo) // Implementation
|
|
, m_showAnchorMarker(false)
|
|
, m_anchorMarker(nullptr)
|
|
, m_logger(getLogger("TextImpl"))
|
|
{
|
|
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
|
|
|
|
m_visibilityScaleRange.resetToMax();
|
|
|
|
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
|
|
}
|
|
|
|
TextImpl::~TextImpl()
|
|
{
|
|
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
|
|
delete m_anchorMarker;
|
|
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
|
|
}
|
|
|
|
|
|
void TextImpl::setShowAnchorMarker(bool on)
|
|
{
|
|
if (on == m_showAnchorMarker)
|
|
return;
|
|
|
|
m_showAnchorMarker = on;
|
|
if (on)
|
|
{
|
|
static QImage markerSymbol;
|
|
|
|
if (markerSymbol.isNull())
|
|
markerSymbol = QImage(position_marker_xpm);
|
|
|
|
m_anchorMarker = new GraphicalObjectPictureMarker(m_mapImpl->getEsriGeoView(),
|
|
m_graphicsLayer,
|
|
QLatin1String("AnchorMarker"),
|
|
INVALID_MAP_ID);
|
|
m_anchorMarker->setImage(markerSymbol);
|
|
}
|
|
else
|
|
{
|
|
delete m_anchorMarker;
|
|
m_anchorMarker = nullptr;
|
|
}
|
|
} // TextImpl::setShowAnchorMarker
|
|
|
|
|
|
bool TextImpl::showAnchorMarker() const { return m_showAnchorMarker; }
|
|
|
|
|
|
bool TextImpl::updateViewImpl()
|
|
{
|
|
TRACE_LOG(m_logger) << LOGFUNCTION << " START"
|
|
<< " visibility=" << m_visibility;
|
|
|
|
// put translated origin to stub. Later GOText will takeover the (translated) origin.
|
|
if (m_mainGraphicalObject) m_mainGraphicalObject->setOrigin(originTranslated());
|
|
|
|
bool success = BaseClass::updateViewImpl();
|
|
|
|
if (m_anchorMarker)
|
|
{
|
|
m_anchorMarker -> setSelected(m_selected);
|
|
m_anchorMarker -> setDrawOrder(m_internalDrawOrder);
|
|
m_anchorMarker -> setOrigin(m_mainGraphicalObjectText->origin());
|
|
m_anchorMarker -> setVisibility(m_mainGraphicalObjectText->visibility());
|
|
m_anchorMarker -> updateView();
|
|
}
|
|
|
|
|
|
if (!success)
|
|
ERROR_LOG(m_logger) << LOGFUNCTION << " updateViewImpl failed";
|
|
|
|
TRACE_LOG(m_logger) << LOGFUNCTION << " END, success=" << success;
|
|
return success;
|
|
}
|
|
|
|
|
|
|
|
bool TextImpl::init(MapImpl *mapImpl, const QString &logicalLayerName)
|
|
{
|
|
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
|
|
|
|
bool success = BaseClass::init(mapImpl, logicalLayerName);
|
|
|
|
if (success)
|
|
{
|
|
/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
* Use the StubGraphicalObject, which is doing nothing of the work, because
|
|
* the text will be rendered using m_mainGraphicalObjectText
|
|
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
|
|
m_mainGraphicalObject = new StubGraphicalObject();
|
|
}
|
|
else
|
|
ERROR_LOG(m_logger) << LOGFUNCTION << " init failed";
|
|
|
|
TRACE_LOG(m_logger) << LOGFUNCTION << " END, success=" << success;
|
|
return success;
|
|
}
|
|
|
|
|
|
} // namespace SituationMap
|