|
|
@ -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; |
|
|
|
QList<QUrl> relativePaths; |
|
|
|
|
|
|
|
|
|
|
|
QListIterator<QGraphicsItem*> itItems(mFastAccessItems); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
while (itItems.hasNext()) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
QGraphicsItem* item = itItems.next(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
UBGraphicsVideoItem *videoItem = qgraphicsitem_cast<UBGraphicsVideoItem*> (item); |
|
|
|
UBGraphicsVideoItem *videoItem = dynamic_cast<UBGraphicsVideoItem*> (item); |
|
|
|
if (videoItem){ |
|
|
|
if (videoItem){ |
|
|
|
QString completeFileName = QFileInfo(videoItem->mediaFileUrl().toLocalFile()).fileName(); |
|
|
|
QString completeFileName = QFileInfo(videoItem->mediaFileUrl().toLocalFile()).fileName(); |
|
|
|
QString path = UBPersistenceManager::videoDirectory + "/"; |
|
|
|
QString path = UBPersistenceManager::videoDirectory + "/"; |
|
|
|
relativePathes << QUrl(path + completeFileName); |
|
|
|
relativePaths << QUrl(path + completeFileName); |
|
|
|
continue; |
|
|
|
return relativePaths; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
UBGraphicsAudioItem *audioItem = qgraphicsitem_cast<UBGraphicsAudioItem*> (item); |
|
|
|
UBGraphicsAudioItem *audioItem = dynamic_cast<UBGraphicsAudioItem*> (item); |
|
|
|
if (audioItem){ |
|
|
|
if (audioItem){ |
|
|
|
QString completeFileName = QFileInfo(audioItem->mediaFileUrl().toLocalFile()).fileName(); |
|
|
|
QString completeFileName = QFileInfo(audioItem->mediaFileUrl().toLocalFile()).fileName(); |
|
|
|
QString path = UBPersistenceManager::audioDirectory + "/"; |
|
|
|
QString path = UBPersistenceManager::audioDirectory + "/"; |
|
|
|
relativePathes << QUrl(path + completeFileName); |
|
|
|
relativePaths << QUrl(path + completeFileName); |
|
|
|
continue; |
|
|
|
return relativePaths; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
UBGraphicsWidgetItem* widget = qgraphicsitem_cast<UBGraphicsWidgetItem*>(item); |
|
|
|
UBGraphicsWidgetItem* widget = dynamic_cast<UBGraphicsWidgetItem*>(item); |
|
|
|
if(widget){ |
|
|
|
if(widget){ |
|
|
|
QString widgetPath = UBPersistenceManager::widgetDirectory + "/" + widget->uuid().toString() + ".wgt"; |
|
|
|
QString widgetPath = UBPersistenceManager::widgetDirectory + "/" + widget->uuid().toString() + ".wgt"; |
|
|
|
QString screenshotPath = UBPersistenceManager::widgetDirectory + "/" + widget->uuid().toString().remove("{").remove("}") + ".png"; |
|
|
|
QString screenshotPath = UBPersistenceManager::widgetDirectory + "/" + widget->uuid().toString().remove("{").remove("}") + ".png"; |
|
|
|
relativePathes << QUrl(widgetPath); |
|
|
|
relativePaths << QUrl(widgetPath); |
|
|
|
relativePathes << QUrl(screenshotPath); |
|
|
|
relativePaths << QUrl(screenshotPath); |
|
|
|
continue; |
|
|
|
return relativePaths; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
UBGraphicsPixmapItem* pixmapItem = qgraphicsitem_cast<UBGraphicsPixmapItem*>(item); |
|
|
|
UBGraphicsPixmapItem* pixmapItem = dynamic_cast<UBGraphicsPixmapItem*>(item); |
|
|
|
if(pixmapItem){ |
|
|
|
if(pixmapItem){ |
|
|
|
relativePathes << QUrl(UBPersistenceManager::imageDirectory + "/" + pixmapItem->uuid().toString() + ".png"); |
|
|
|
relativePaths << QUrl(UBPersistenceManager::imageDirectory + "/" + pixmapItem->uuid().toString() + ".png"); |
|
|
|
continue; |
|
|
|
return relativePaths; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
UBGraphicsSvgItem* svgItem = qgraphicsitem_cast<UBGraphicsSvgItem*>(item); |
|
|
|
UBGraphicsSvgItem* svgItem = dynamic_cast<UBGraphicsSvgItem*>(item); |
|
|
|
if(svgItem){ |
|
|
|
if(svgItem){ |
|
|
|
relativePathes << QUrl(UBPersistenceManager::imageDirectory + "/" + svgItem->uuid().toString() + ".svg"); |
|
|
|
relativePaths << QUrl(UBPersistenceManager::imageDirectory + "/" + svgItem->uuid().toString() + ".svg"); |
|
|
|
continue; |
|
|
|
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() |
|
|
|
QSize UBGraphicsScene::nominalSize() |
|
|
|