@ -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 + " / " ;
relativePathe s < < 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 + " / " ;
relativePathe s < < 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 " ;
relativePathe s < < QUrl ( widgetPath ) ;
relativePaths < < QUrl ( widgetPath ) ;
relativePathe s < < QUrl ( screenshotPath ) ;
relativePaths < < QUrl ( screenshotPath ) ;
continue ;
return relativePaths ;
}
}
UBGraphicsPixmapItem * pixmapItem = qgraphicsitem _cast< UBGraphicsPixmapItem * > ( item ) ;
UBGraphicsPixmapItem * pixmapItem = dynamic _cast< UBGraphicsPixmapItem * > ( item ) ;
if ( pixmapItem ) {
if ( pixmapItem ) {
relativePathe s < < 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 ) {
relativePathe s < < 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 ( )