Marble
7#include "DgmlPenTagHandler.h"
13#include "DgmlAttributeDictionary.h"
14#include "DgmlElementDictionary.h"
16#include "GeoSceneGeodata.h"
22DGML_DEFINE_TAG_HANDLER(Pen)
24GeoNode *DgmlPenTagHandler::parse(GeoParser &parser)
const
27 Q_ASSERT(parser.isStartElement() && parser.isValidElement(QLatin1StringView(dgmlTag_Pen)));
29 QString color = parser.attribute(dgmlAttr_color).trimmed();
30 QString style = parser.attribute(dgmlAttr_style).toLower().trimmed();
31 QString widthString = parser.attribute(dgmlAttr_width);
41 if (style == QLatin1StringView(
"nopen")) {
43 }
else if (style == QLatin1StringView(
"solidline")) {
45 }
else if (style == QLatin1StringView(
"dashline")) {
47 }
else if (style == QLatin1StringView(
"dotline")) {
49 }
else if (style == QLatin1StringView(
"dashdotline")) {
51 }
else if (style == QLatin1StringView(
"dashdotdotline")) {
61 GeoStackItem parentItem = parser.parentElement();
62 if (parentItem.represents(dgmlTag_Vector) || parentItem.represents(dgmlTag_Geodata)) {
63 auto geodata = parentItem.nodeAs<GeoSceneGeodata>();
bool isValid(QStringView ifopt)
Binds a QML item to a specific geodetic location in screen coordinates.
void setColor(const QColor &color)
void setStyle(Qt::PenStyle style)
void setWidthF(qreal width)
bool isEmpty() const const
double toDouble(bool *ok) const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 24 2025 11:52:09 by
doxygen 1.13.2 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.