bool QLandmarkFileHandlerLmx::writeLandmark(const QLandmark &landmark) { m_writer->writeStartElement(m_ns, "landmark"); if (!landmark.name().isEmpty()) m_writer->writeTextElement(m_ns, "name", landmark.name()); if (!landmark.description().isEmpty()) m_writer->writeTextElement(m_ns, "description", landmark.description()); if (landmark.coordinate().isValid()) if (!writeCoordinates(landmark)) return false; if (landmark.radius() > 0) m_writer->writeTextElement(m_ns, "coverageRadius", QString::number(landmark.radius())); if (!writeAddressInfo(landmark)) return false; if (!landmark.url().isEmpty()) if (!writeMediaLink(landmark)) return false; if (m_option != QLandmarkManager::ExcludeCategoryData) { for (int i = 0; i < landmark.categoryIds().size(); ++i) { if (!writeCategory(landmark.categoryIds().at(i))) return false; } } m_writer->writeEndElement(); return true; }
void writeScale(std::string &fStr, float fX, float fY, float fZ, int fTab) { int _i; for (_i = 0; _i<fTab; _i++) { fStr.append("\t"); } fStr.append("<scale>\n"); writeCoordinates(fStr, fX, fY, fZ, fTab + 1); for (_i = 0; _i<fTab; _i++) { fStr.append("\t"); } fStr.append("</scale>\n"); }
void writeRotation(std::string &fStr, float fX, float fY, float fZ, int fTab) { int _i; for (_i = 0; _i<fTab; _i++) { fStr.append("\t"); } fStr.append("<rotation>\n"); writeCoordinates(fStr, fX, fY, fZ, fTab + 1); for (_i = 0; _i<fTab; _i++) { fStr.append("\t"); } fStr.append("</rotation>\n"); }