MapMarker::MapMarker(MapMarker::MarkerType type, QString text) { setMarkerType (type); this->text = text; if (this->type == MapMarker::AnchorType || this->type == MapMarker::AnchorOrangeType || this->type == MapMarker::AnchorPurpleType || this->type == MapMarker::AnchorRedType || this->type == MapMarker::AnchorBlueType || this->type == MapMarker::PeerType || this->type == MapMarker::PeerOrangeType || this->type == MapMarker::PeerPurpleType || this->type == MapMarker::PeerRedType || this->type == MapMarker::PeerBlueType || this->type == MapMarker::PoiType || this->type == MapMarker::RestaurantType || this->type == MapMarker::HotelType || this->type == MapMarker::UndoType) { wedge = new Wedge(getWedgeColour()); setWedgeIcon(type); wedge->setWedgeTargetIcon(this); } else { wedge = NULL; } }
void Marker::read(XmlReader* r) { MarkerType mt; while (r->readElement()) { QString s; if (r->readString("label", &s)) { setLabel(s); mt = markerType(s); } else if (!Text::readProperties(r)) r->unknown(); } switch(mt) { case MARKER_SEGNO: case MARKER_CODA: case MARKER_VARCODA: case MARKER_CODETTA: setTextStyle(TEXT_STYLE_REPEAT_LEFT); break; case MARKER_FINE: case MARKER_TOCODA: setTextStyle(TEXT_STYLE_REPEAT_RIGHT); break; case MARKER_USER: setTextStyle(TEXT_STYLE_REPEAT); break; } setMarkerType(mt); }
void Marker::read(const QDomElement& de) { MarkerType mt = MARKER_SEGNO; for (QDomElement e = de.firstChildElement(); !e.isNull(); e = e.nextSiblingElement()) { const QString& tag(e.tagName()); if (tag == "label") { setLabel(e.text()); mt = markerType(e.text()); } else if (!Text::readProperties(e)) domError(e); } switch (mt) { case MARKER_SEGNO: case MARKER_VARSEGNO: case MARKER_CODA: case MARKER_VARCODA: case MARKER_CODETTA: setTextStyleType(TEXT_STYLE_REPEAT_LEFT); break; case MARKER_FINE: case MARKER_TOCODA: setTextStyleType(TEXT_STYLE_REPEAT_RIGHT); break; case MARKER_USER: setTextStyleType(TEXT_STYLE_REPEAT); break; } setMarkerType(mt); }
void Marker::read(XmlReader& e) { MarkerType mt = MarkerType::SEGNO; while (e.readNextStartElement()) { const QStringRef& tag(e.name()); if (tag == "label") { QString s(e.readElementText()); setLabel(s); mt = markerType(s); } else if (!Text::readProperties(e)) e.unknown(); } switch (mt) { case MarkerType::SEGNO: case MarkerType::VARSEGNO: case MarkerType::CODA: case MarkerType::VARCODA: case MarkerType::CODETTA: setTextStyleType(TEXT_STYLE_REPEAT_LEFT); break; case MarkerType::FINE: case MarkerType::TOCODA: setTextStyleType(TEXT_STYLE_REPEAT_RIGHT); break; case MarkerType::USER: setTextStyleType(TEXT_STYLE_REPEAT); break; } setMarkerType(mt); }
void Marker::read(XmlReader& e) { Type mt = Type::SEGNO; while (e.readNextStartElement()) { const QStringRef& tag(e.name()); if (tag == "label") { QString s(e.readElementText()); setLabel(s); mt = markerType(s); } else if (!Text::readProperties(e)) e.unknown(); } setMarkerType(mt); }
bool Marker::setProperty(P_ID propertyId, const QVariant& v) { switch (propertyId) { case P_ID::LABEL: setLabel(v.toString()); break; case P_ID::MARKER_TYPE: setMarkerType(Type(v.toInt())); break; default: if (!Text::setProperty(propertyId, v)) return false; break; } score()->setLayoutAll(); return true; }
void Marker::read(XmlReader& e) { Type mt = Type::SEGNO; while (e.readNextStartElement()) { const QStringRef& tag(e.name()); if (tag == "label") { QString s(e.readElementText()); setLabel(s); mt = markerType(s); } else if (!Text::readProperties(e)) e.unknown(); } // REPEAT is obsolete, but was previously used for both left and right aligned text if (textStyleType() == TextStyleType::REPEAT) setTextStyleType(TextStyleType::REPEAT_LEFT); setMarkerType(mt); }
void Marker::styleChanged() { setMarkerType(_markerType); }
Marker::Marker(MarkerType type) : QGeoMapPixmapObject(), d(new MarkerPrivate) { setMarkerType(type); }