|
|
@ -240,6 +240,7 @@ UBCFFSubsetAdaptor::UBCFFSubsetReader::UBCFFSubsetReader(UBDocumentProxy *proxy, |
|
|
|
// QTextStream out(&tfile);
|
|
|
|
// QTextStream out(&tfile);
|
|
|
|
// out << content;
|
|
|
|
// out << content;
|
|
|
|
// tfile.close();
|
|
|
|
// tfile.close();
|
|
|
|
|
|
|
|
qDebug() << "tmp path is" << pwdContent; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
bool UBCFFSubsetAdaptor::UBCFFSubsetReader::parse() |
|
|
|
bool UBCFFSubsetAdaptor::UBCFFSubsetReader::parse() |
|
|
@ -798,6 +799,8 @@ bool UBCFFSubsetAdaptor::UBCFFSubsetReader::parseSvgImage(const QDomElement &ele |
|
|
|
if (!QFile::exists(imagePath)) { |
|
|
|
if (!QFile::exists(imagePath)) { |
|
|
|
qDebug() << "can't load file" << pwdContent + "/" + itemRefPath << "maybe file corrupted"; |
|
|
|
qDebug() << "can't load file" << pwdContent + "/" + itemRefPath << "maybe file corrupted"; |
|
|
|
return false; |
|
|
|
return false; |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
qDebug() << "size of file" << itemRefPath << QFileInfo(itemRefPath).size(); |
|
|
|
} |
|
|
|
} |
|
|
|
pix.load(imagePath); |
|
|
|
pix.load(imagePath); |
|
|
|
if (pix.isNull()) { |
|
|
|
if (pix.isNull()) { |
|
|
@ -815,6 +818,7 @@ bool UBCFFSubsetAdaptor::UBCFFSubsetReader::parseSvgImage(const QDomElement &ele |
|
|
|
} |
|
|
|
} |
|
|
|
// repositionSvgItem(svgItem, rx * 2 + 10, ry * 2 + 10, cx - rx - 5, cy - ry -5, hastransform, transform);
|
|
|
|
// repositionSvgItem(svgItem, rx * 2 + 10, ry * 2 + 10, cx - rx - 5, cy - ry -5, hastransform, transform);
|
|
|
|
repositionPixmapItem(pixItem, width, height, x, y, hastransform, transform); |
|
|
|
repositionPixmapItem(pixItem, width, height, x, y, hastransform, transform); |
|
|
|
|
|
|
|
// hashSceneItem(element, pixItem->);
|
|
|
|
|
|
|
|
|
|
|
|
return true; |
|
|
|
return true; |
|
|
|
} |
|
|
|
} |
|
|
@ -848,6 +852,14 @@ bool UBCFFSubsetAdaptor::UBCFFSubsetReader::parseIwbGroup(QDomNode *group) |
|
|
|
return true; |
|
|
|
return true; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//void UBCFFSubsetAdaptor::UBCFFSubsetReader::hashSceneItem(QDomNode &element, UBGraphicsItemDelegate *item)
|
|
|
|
|
|
|
|
//{
|
|
|
|
|
|
|
|
//// adding element pointer to hash to refer if needed
|
|
|
|
|
|
|
|
// QString key = element.attribute(aId);
|
|
|
|
|
|
|
|
// if (!key.isNull())
|
|
|
|
|
|
|
|
// persistedItems.insert(key, item);
|
|
|
|
|
|
|
|
//}
|
|
|
|
|
|
|
|
|
|
|
|
bool UBCFFSubsetAdaptor::UBCFFSubsetReader::parseSvgElement(const QDomElement &parent) |
|
|
|
bool UBCFFSubsetAdaptor::UBCFFSubsetReader::parseSvgElement(const QDomElement &parent) |
|
|
|
{ |
|
|
|
{ |
|
|
|
QString tagName = parent.tagName(); |
|
|
|
QString tagName = parent.tagName(); |
|
|
@ -856,6 +868,7 @@ bool UBCFFSubsetAdaptor::UBCFFSubsetReader::parseSvgElement(const QDomElement &p |
|
|
|
return false; |
|
|
|
return false; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (tagName == tRect && !parseSvgRect(parent)) return false; |
|
|
|
if (tagName == tRect && !parseSvgRect(parent)) return false; |
|
|
|
else if (tagName == tEllipse && !parseSvgEllipse(parent)) return false; |
|
|
|
else if (tagName == tEllipse && !parseSvgEllipse(parent)) return false; |
|
|
|
else if (tagName == tPolygon && !parseSvgPolygon(parent)) return false; |
|
|
|
else if (tagName == tPolygon && !parseSvgPolygon(parent)) return false; |
|
|
|