Logo Search packages:      
Sourcecode: kdenlive version File versions  Download package

bool DocClipTextFile::matchesXML ( const QDomElement &  element  )  const [virtual]

returns true if the xml passed matches the values in the clip

Definition at line 324 of file doccliptextfile.cpp.

{
    bool result = false;

    if (element.tagName() == "kdenliveclip") {
      bool found = false;
      QDomNode n = element.firstChild();
      while (!n.isNull()) {
          QDomElement avElement = n.toElement();      // try to convert the node to an element.

          if (!avElement.isNull()) {
            if (avElement.tagName() == "avfile") {
                if (found) {
                  kdWarning() <<
                      "Clip contains multiple avclip definitions, only matching XML of the first one,"
                      << endl;
                  break;
                } else {
                  found = true;
                  //if(avElement.attribute("url") == fileURL().url()) {
                  if (avElement.attribute("id") ==
                      QString::number(getId())) {
                      result = true;
                  }
                }
            }
          }

          n = n.nextSibling();
      }
    }

    return result;
}


Generated by  Doxygen 1.6.0   Back to index