79 QDomElement itemElement = doc.createElement(
"storyboarditem");
81 int frame = qvariant_cast<ThumbnailData>(
child(
FrameNumber)->data()).frameNum.toInt();
82 itemElement.setAttribute(
"frame", frame);
83 itemElement.setAttribute(
"item-name",
child(
ItemName)->data().toString());
89 QDomElement commentElement = doc.createElement(
"comment");
91 commentElement.setAttribute(
"content", comment.
content.toString());
92 commentElement.setAttribute(
"scroll-value", comment.
scrollValue.toInt());
94 itemElement.appendChild(commentElement);
103 thumbnail.
frameNum = itemNode.attribute(
"frame").toInt();
104 appendChild(QVariant::fromValue<ThumbnailData>(thumbnail));
106 appendChild(itemNode.attribute(
"duration-second").toInt());
107 appendChild(itemNode.attribute(
"duration-frame").toInt());
109 for (QDomElement commentNode = itemNode.firstChildElement(); !commentNode.isNull(); commentNode = commentNode.nextSiblingElement()) {
110 if (commentNode.nodeName().toUpper() !=
"COMMENT")
continue;
113 if (commentNode.hasAttribute(
"content")) {
114 comment.
content = commentNode.attribute(
"content");
116 if (commentNode.hasAttribute(
"scroll-value")) {
117 comment.
scrollValue = commentNode.attribute(
"scroll-value");
119 appendChild(QVariant::fromValue<CommentBox>(comment));
This class makes up the StoryboardItem class. It consists of pointer to its parent item and the data ...
This class stores a list of StoryboardChild objects and provides functionality to manipulate the list...
void insertChild(int row, QVariant data=QVariant())
QDomElement toXML(QDomDocument doc)
QVector< QSharedPointer< StoryboardChild > > m_childData
void moveChild(int from, int to)
void removeChild(int row)
@ DurationFrame
Store the duration in frame at index 3. Data type stored here should be int.
@ FrameNumber
Store the frame number at index 0. Data type stored here should be ThumbnailData.
@ DurationSecond
Store the duration in second at index 2. Data type stored here should be int.
@ ItemName
Store the item name at index 1. Data type stored here should be string.
@ Comments
Store the comments at indices greater_than_or_equal_to to index 4. Data type stored here should be Co...
void loadXML(const QDomElement &itemNode)
void cloneChildrenFrom(const StoryboardItem &other)
void appendChild(QVariant data)
static StoryboardItemList cloneStoryboardItemList(const StoryboardItemList &list)
QSharedPointer< StoryboardChild > child(int row) const