QStringList RGBText::animationStyles() { QStringList list; list << animationStyleToString(StaticLetters); list << animationStyleToString(Horizontal); list << animationStyleToString(Vertical); return list; }
QStringList RGBImage::animationStyles() { QStringList list; list << animationStyleToString(Static); list << animationStyleToString(Horizontal); list << animationStyleToString(Vertical); list << animationStyleToString(Animation); return list; }
bool RGBText::saveXML(QDomDocument* doc, QDomElement* mtx_root) const { Q_ASSERT(doc != NULL); Q_ASSERT(mtx_root != NULL); QDomElement root = doc->createElement(KXMLQLCRGBAlgorithm); root.setAttribute(KXMLQLCRGBAlgorithmType, KXMLQLCRGBText); mtx_root->appendChild(root); QDomElement content = doc->createElement(KXMLQLCRGBTextContent); QDomText contentText = doc->createTextNode(m_text); content.appendChild(contentText); root.appendChild(content); QDomElement font = doc->createElement(KXMLQLCRGBTextFont); QDomText fontText = doc->createTextNode(m_font.toString()); font.appendChild(fontText); root.appendChild(font); QDomElement ani = doc->createElement(KXMLQLCRGBTextAnimationStyle); QDomText aniText = doc->createTextNode(animationStyleToString(animationStyle())); ani.appendChild(aniText); root.appendChild(ani); QDomElement offset = doc->createElement(KXMLQLCRGBTextOffset); offset.setAttribute(KXMLQLCRGBTextOffsetX, xOffset()); offset.setAttribute(KXMLQLCRGBTextOffsetY, yOffset()); root.appendChild(offset); return true; }
bool RGBImage::saveXML(QDomDocument* doc, QDomElement* mtx_root) const { Q_ASSERT(doc != NULL); Q_ASSERT(mtx_root != NULL); QDomElement root = doc->createElement(KXMLQLCRGBAlgorithm); root.setAttribute(KXMLQLCRGBAlgorithmType, KXMLQLCRGBImage); mtx_root->appendChild(root); QDomElement filename = doc->createElement(KXMLQLCRGBImageFilename); QDomText filenameText = doc->createTextNode(this->doc()->normalizeComponentPath(m_filename)); filename.appendChild(filenameText); root.appendChild(filename); QDomElement ani = doc->createElement(KXMLQLCRGBImageAnimationStyle); QDomText aniText = doc->createTextNode(animationStyleToString(animationStyle())); ani.appendChild(aniText); root.appendChild(ani); QDomElement offset = doc->createElement(KXMLQLCRGBImageOffset); offset.setAttribute(KXMLQLCRGBImageOffsetX, xOffset()); offset.setAttribute(KXMLQLCRGBImageOffsetY, yOffset()); root.appendChild(offset); return true; }
bool RGBImage::saveXML(QXmlStreamWriter *doc) const { Q_ASSERT(doc != NULL); doc->writeStartElement(KXMLQLCRGBAlgorithm); doc->writeAttribute(KXMLQLCRGBAlgorithmType, KXMLQLCRGBImage); doc->writeTextElement(KXMLQLCRGBImageFilename, this->doc()->normalizeComponentPath(m_filename)); doc->writeTextElement(KXMLQLCRGBImageAnimationStyle, animationStyleToString(animationStyle())); doc->writeStartElement(KXMLQLCRGBImageOffset); doc->writeAttribute(KXMLQLCRGBImageOffsetX, QString::number(xOffset())); doc->writeAttribute(KXMLQLCRGBImageOffsetY, QString::number(yOffset())); doc->writeEndElement(); /* End the <Algorithm> tag */ doc->writeEndElement(); return true; }