Files
qt-migration-legatus/qt5-before/dlbo/Lts/Viewer/SituationMap/Map/text_style.cpp
T
torstenandCopilot 7173785915 Qt6 Migration: Complete migration with DDS/RTI support and build validation
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>
2026-09-15 18:20:26 +00:00

199 lines
4.0 KiB
C++

/**
* @RDE_HEADER@
* TextStyle
* $Id$
* $HeadURL$
* $Author$
*/
// Own
#include "text_style.h"
// ESRI
namespace SituationMap
{
TextStyle::TextStyle(const QColor &textColor, float size)
: m_textColor(textColor)
, m_size(size)
{}
TextStyle::TextStyle(const QColor &textColor)
: m_textColor(textColor)
{}
QColor TextStyle::textColor() const
{
return m_textColor;
}
void TextStyle::setTextColor(const QColor &textColor)
{
m_textColor = textColor;
}
float TextStyle::size() const
{
return m_size;
}
void TextStyle::setSize(float size)
{
m_size = size;
}
bool TextStyle::bold() const
{
return m_bold;
}
void TextStyle::setBold(bool bold)
{
m_bold = bold;
}
bool TextStyle::italic() const
{
return m_italic;
}
void TextStyle::setItalic(bool italic)
{
m_italic = italic;
}
bool TextStyle::underline() const
{
return m_underline;
}
void TextStyle::setUnderline(bool underline)
{
m_underline = underline;
}
bool TextStyle::strikeThrough() const
{
return m_strikeThrough;
}
void TextStyle::setStrikeThrough(bool strikeThrough)
{
m_strikeThrough = strikeThrough;
}
float TextStyle::textOutlineWidth() const
{
return m_textOutlineWidth;
}
void TextStyle::setTextOutlineWidth(float textOutlineWidth)
{
m_textOutlineWidth = textOutlineWidth;
}
QColor TextStyle::textOutlineColor() const
{
return m_textOutlineColor;
}
void TextStyle::setTextOutlineColor(const QColor &textOutlineColor)
{
m_textOutlineColor = textOutlineColor;
}
QColor TextStyle::backgroundColor() const
{
return m_backgroundColor;
}
void TextStyle::setBackgroundColor(const QColor &backgroundColor)
{
m_backgroundColor = backgroundColor;
}
bool TextStyle::antiAliased() const
{
return m_antiAliased;
}
void TextStyle::setAntiAliased(bool antiAliased)
{
m_antiAliased = antiAliased;
}
HorizontalAlignment TextStyle::horizontalAlignment() const
{
return m_horizontalAlignment;
}
void TextStyle::setHorizontalAlignment(const HorizontalAlignment &horizontalAlignment)
{
m_horizontalAlignment = horizontalAlignment;
}
VerticalAlignment TextStyle::verticalAlignment() const
{
return m_verticalAlignment;
}
void TextStyle::setVerticalAlignment(const VerticalAlignment &verticalAlignment)
{
m_verticalAlignment = verticalAlignment;
}
float TextStyle::angle() const
{
return m_angle;
}
void TextStyle::setAngle(float angleDegree)
{
m_angle = angleDegree;
}
const QString &TextStyle::fontFamily() const
{
return m_fontFamily;
}
void SituationMap::TextStyle::setFontFamily(const QString &fontFamily)
{
m_fontFamily = fontFamily;
}
//-----------------------------------------------------------------------------
// output operator:
//-----------------------------------------------------------------------------
std::ostream &operator<< (std::ostream &stream,
const TextStyle &value)
{
QString str;
str.append(QStringLiteral(" textColor='%1'").arg(value.textColor().name(QColor::HexArgb)));
str.append(QStringLiteral(" size=%1").arg(value.size()));
str.append(QStringLiteral(" angle=%1").arg(value.angle()));
str.append(QStringLiteral(" fontFamily='%1'").arg(value.fontFamily()));
str.append(QStringLiteral(" bold=%1").arg(value.bold()));
str.append(QStringLiteral(" italic=%1").arg(value.italic()));
str.append(QStringLiteral(" underline=%1").arg(value.underline()));
str.append(QStringLiteral(" strikeThrough=%1").arg(value.strikeThrough()));
str.append(QStringLiteral(" textOutlineWidth=%1").arg(value.textOutlineWidth()));
str.append(QStringLiteral(" textOutlineColor=%1").arg(value.textOutlineColor().name(QColor::HexArgb)));
str.append(QStringLiteral(" backgroundColor=%1").arg(value.backgroundColor().name(QColor::HexArgb)));
str.append(QStringLiteral(" horizontalAlignment=%1").arg(static_cast<int>(value.horizontalAlignment())));
str.append(QStringLiteral(" verticalAlignment=%1").arg(static_cast<int>(value.verticalAlignment())));
str.append(QStringLiteral(" antiAliased=%1").arg(value.antiAliased()));
stream << str.toStdString();
return stream;
}
} // namespace SituationMap