MCPcopy Create free account
hub / github.com/IENT/YUView / getPlaylistString

Method getPlaylistString

YUViewLib/src/ui/widgets/PlaylistTreeWidget.cpp:800–825  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

798}
799
800QString PlaylistTreeWidget::getPlaylistString(QDir dirName)
801{
802 // Create the XML document structure
803 QDomDocument document;
804 document.appendChild(document.createProcessingInstruction(
805 QStringLiteral("xml"), QStringLiteral("version=\"1.0\" encoding=\"UTF-8\"")));
806 QDomElement plist = document.createElement(QStringLiteral("playlistItems"));
807 plist.setAttribute(QStringLiteral("version"), QStringLiteral("2.0"));
808 document.appendChild(plist);
809
810 // Append all the playlist items to the output
811 for (int i = 0; i < topLevelItemCount(); ++i)
812 {
813 QTreeWidgetItem *item = topLevelItem(i);
814 playlistItem * plItem = dynamic_cast<playlistItem *>(item);
815
816 plItem->savePlaylist(plist, dirName);
817 }
818
819 // Append the view states
820 QDomElement states = document.createElement(QStringLiteral("viewStates"));
821 plist.appendChild(states);
822 stateHandler->savePlaylist(states);
823
824 return document.toString();
825}
826
827void PlaylistTreeWidget::savePlaylistToFile()
828{

Callers

nothing calls this directly

Calls 3

setAttributeMethod · 0.80
toStringMethod · 0.80
savePlaylistMethod · 0.45

Tested by

no test coverage detected