|
|
|
@ -2473,55 +2473,73 @@ void UBGraphicsScene::setRenderingQuality(UBItem::RenderingQuality pRenderingQua |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
QList<QUrl> UBGraphicsScene::relativeDependencies() const |
|
|
|
|
QList<QUrl> UBGraphicsScene::relativeDependenciesOfItem(QGraphicsItem* item) const |
|
|
|
|
{ |
|
|
|
|
QList<QUrl> relativePathes; |
|
|
|
|
|
|
|
|
|
QListIterator<QGraphicsItem*> itItems(mFastAccessItems); |
|
|
|
|
|
|
|
|
|
while (itItems.hasNext()) |
|
|
|
|
{ |
|
|
|
|
QGraphicsItem* item = itItems.next(); |
|
|
|
|
QList<QUrl> relativePaths; |
|
|
|
|
|
|
|
|
|
UBGraphicsVideoItem *videoItem = qgraphicsitem_cast<UBGraphicsVideoItem*> (item); |
|
|
|
|
UBGraphicsVideoItem *videoItem = dynamic_cast<UBGraphicsVideoItem*> (item); |
|
|
|
|
if (videoItem){ |
|
|
|
|
QString completeFileName = QFileInfo(videoItem->mediaFileUrl().toLocalFile()).fileName(); |
|
|
|
|
QString path = UBPersistenceManager::videoDirectory + "/"; |
|
|
|
|
relativePathes << QUrl(path + completeFileName); |
|
|
|
|
continue; |
|
|
|
|
relativePaths << QUrl(path + completeFileName); |
|
|
|
|
return relativePaths; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
UBGraphicsAudioItem *audioItem = qgraphicsitem_cast<UBGraphicsAudioItem*> (item); |
|
|
|
|
UBGraphicsAudioItem *audioItem = dynamic_cast<UBGraphicsAudioItem*> (item); |
|
|
|
|
if (audioItem){ |
|
|
|
|
QString completeFileName = QFileInfo(audioItem->mediaFileUrl().toLocalFile()).fileName(); |
|
|
|
|
QString path = UBPersistenceManager::audioDirectory + "/"; |
|
|
|
|
relativePathes << QUrl(path + completeFileName); |
|
|
|
|
continue; |
|
|
|
|
relativePaths << QUrl(path + completeFileName); |
|
|
|
|
return relativePaths; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
UBGraphicsWidgetItem* widget = qgraphicsitem_cast<UBGraphicsWidgetItem*>(item); |
|
|
|
|
UBGraphicsWidgetItem* widget = dynamic_cast<UBGraphicsWidgetItem*>(item); |
|
|
|
|
if(widget){ |
|
|
|
|
QString widgetPath = UBPersistenceManager::widgetDirectory + "/" + widget->uuid().toString() + ".wgt"; |
|
|
|
|
QString screenshotPath = UBPersistenceManager::widgetDirectory + "/" + widget->uuid().toString().remove("{").remove("}") + ".png"; |
|
|
|
|
relativePathes << QUrl(widgetPath); |
|
|
|
|
relativePathes << QUrl(screenshotPath); |
|
|
|
|
continue; |
|
|
|
|
relativePaths << QUrl(widgetPath); |
|
|
|
|
relativePaths << QUrl(screenshotPath); |
|
|
|
|
return relativePaths; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
UBGraphicsPixmapItem* pixmapItem = qgraphicsitem_cast<UBGraphicsPixmapItem*>(item); |
|
|
|
|
UBGraphicsPixmapItem* pixmapItem = dynamic_cast<UBGraphicsPixmapItem*>(item); |
|
|
|
|
if(pixmapItem){ |
|
|
|
|
relativePathes << QUrl(UBPersistenceManager::imageDirectory + "/" + pixmapItem->uuid().toString() + ".png"); |
|
|
|
|
continue; |
|
|
|
|
relativePaths << QUrl(UBPersistenceManager::imageDirectory + "/" + pixmapItem->uuid().toString() + ".png"); |
|
|
|
|
return relativePaths; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
UBGraphicsSvgItem* svgItem = qgraphicsitem_cast<UBGraphicsSvgItem*>(item); |
|
|
|
|
UBGraphicsSvgItem* svgItem = dynamic_cast<UBGraphicsSvgItem*>(item); |
|
|
|
|
if(svgItem){ |
|
|
|
|
relativePathes << QUrl(UBPersistenceManager::imageDirectory + "/" + svgItem->uuid().toString() + ".svg"); |
|
|
|
|
continue; |
|
|
|
|
relativePaths << QUrl(UBPersistenceManager::imageDirectory + "/" + svgItem->uuid().toString() + ".svg"); |
|
|
|
|
return relativePaths; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return relativePaths; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
QList<QUrl> UBGraphicsScene::relativeDependencies() const |
|
|
|
|
{ |
|
|
|
|
QList<QUrl> relativePaths; |
|
|
|
|
|
|
|
|
|
QListIterator<QGraphicsItem*> itItems(mFastAccessItems); |
|
|
|
|
|
|
|
|
|
while (itItems.hasNext()) |
|
|
|
|
{ |
|
|
|
|
QGraphicsItem* item = itItems.next(); |
|
|
|
|
|
|
|
|
|
UBGraphicsGroupContainerItem* groupItem = dynamic_cast<UBGraphicsGroupContainerItem*>(item); |
|
|
|
|
if(groupItem) |
|
|
|
|
{ |
|
|
|
|
for (auto child : groupItem->childItems()) |
|
|
|
|
{ |
|
|
|
|
relativePaths << relativeDependenciesOfItem(child); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
relativePaths << relativeDependenciesOfItem(item); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return relativePathes; |
|
|
|
|
return relativePaths; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
QSize UBGraphicsScene::nominalSize() |
|
|
|
|