41 const QString skyboxTypeStr = element.attribute( QStringLiteral(
"skybox-type" ) );
42 if ( skyboxTypeStr == QLatin1String(
"Distinct Faces" ) )
44 else if ( skyboxTypeStr == QLatin1String(
"Panoramic Texture" ) )
46 mPanoramicTexturePath = pathResolver.
readPath( element.attribute( QStringLiteral(
"panoramic-texture-path" ) ) );
47 mCubeMapFacesPaths.clear();
48 mCubeMapFacesPaths[QStringLiteral(
"posX" )] = pathResolver.
readPath( element.attribute( QStringLiteral(
"posX-texture-path" ) ) );
49 mCubeMapFacesPaths[QStringLiteral(
"posY" )] = pathResolver.
readPath( element.attribute( QStringLiteral(
"posY-texture-path" ) ) );
50 mCubeMapFacesPaths[QStringLiteral(
"posZ" )] = pathResolver.
readPath( element.attribute( QStringLiteral(
"posZ-texture-path" ) ) );
51 mCubeMapFacesPaths[QStringLiteral(
"negX" )] = pathResolver.
readPath( element.attribute( QStringLiteral(
"negX-texture-path" ) ) );
52 mCubeMapFacesPaths[QStringLiteral(
"negY" )] = pathResolver.
readPath( element.attribute( QStringLiteral(
"negY-texture-path" ) ) );
53 mCubeMapFacesPaths[QStringLiteral(
"negZ" )] = pathResolver.
readPath( element.attribute( QStringLiteral(
"negZ-texture-path" ) ) );
58 switch ( mSkyboxType )
61 element.setAttribute( QStringLiteral(
"skybox-type" ), QStringLiteral(
"Distinct Faces" ) );
64 element.setAttribute( QStringLiteral(
"skybox-type" ), QStringLiteral(
"Panoramic Texture" ) );
69 element.setAttribute( QStringLiteral(
"panoramic-texture-path" ), pathResolver.
writePath( mPanoramicTexturePath ) );
70 element.setAttribute( QStringLiteral(
"posX-texture-path" ), pathResolver.
writePath( mCubeMapFacesPaths[QStringLiteral(
"posX" )] ) );
71 element.setAttribute( QStringLiteral(
"posY-texture-path" ), pathResolver.
writePath( mCubeMapFacesPaths[QStringLiteral(
"posY" )] ) );
72 element.setAttribute( QStringLiteral(
"posZ-texture-path" ), pathResolver.
writePath( mCubeMapFacesPaths[QStringLiteral(
"posZ" )] ) );
73 element.setAttribute( QStringLiteral(
"negX-texture-path" ), pathResolver.
writePath( mCubeMapFacesPaths[QStringLiteral(
"negX" )] ) );
74 element.setAttribute( QStringLiteral(
"negY-texture-path" ), pathResolver.
writePath( mCubeMapFacesPaths[QStringLiteral(
"negY" )] ) );
75 element.setAttribute( QStringLiteral(
"negZ-texture-path" ), pathResolver.
writePath( mCubeMapFacesPaths[QStringLiteral(
"negZ" )] ) );
The class is used as a container of context for various read/write operations on other objects.
const QgsPathResolver & pathResolver() const
Returns path resolver for conversion between relative and absolute paths.