mirror of
https://github.com/mapmapteam/mapmap.git
synced 2026-06-16 12:33:19 +02:00
Added option to import image files using QImage
This commit is contained in:
+12
-1
@@ -97,7 +97,18 @@ void ProjectReader::parsePaint(const QDomElement& paint)
|
||||
QString y = paint.firstChildElement("y").text();
|
||||
|
||||
uid id = _window->createMediaPaint(paintAttrId.toInt(), uri, x.toFloat(), y.toFloat(),
|
||||
std::tr1::shared_ptr<Paint>(static_cast<Paint*>(0)));
|
||||
std::tr1::shared_ptr<Paint>(static_cast<Paint*>(0)), false);
|
||||
if (id == NULL_UID)
|
||||
_xml.raiseError(QObject::tr("Cannot create media with uri %1.").arg(uri));
|
||||
}
|
||||
else if (paintAttrType == "image")
|
||||
{
|
||||
QString uri = paint.firstChildElement("uri").text();
|
||||
QString x = paint.firstChildElement("x").text();
|
||||
QString y = paint.firstChildElement("y").text();
|
||||
|
||||
uid id = _window->createMediaPaint(paintAttrId.toInt(), uri, x.toFloat(), y.toFloat(),
|
||||
std::tr1::shared_ptr<Paint>(static_cast<Paint*>(0)), true);
|
||||
if (id == NULL_UID)
|
||||
_xml.raiseError(QObject::tr("Cannot create media with uri %1.").arg(uri));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user