diff options
author | Laszlo Agocs <laszlo.agocs@qt.io> | 2018-08-06 15:39:48 +0200 |
---|---|---|
committer | Laszlo Agocs <laszlo.agocs@qt.io> | 2018-08-07 08:22:53 +0000 |
commit | 327a9290e120894a58e266ce35cc70d61d6e6507 (patch) | |
tree | 21d4919665f4f2db85535ed9d64d7b57e1151d84 /src/runtime/q3dsuippresentation.cpp | |
parent | 09c027651087e17f28cc515351aa77144bdfd4a1 (diff) |
Add support for QImage in Q3DSImage
Also fixes changing the filename in the sourcepath property of an Image.
Change-Id: Ie805cc288ecda96cdf126ec1d611aa863cb82c48
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
Diffstat (limited to 'src/runtime/q3dsuippresentation.cpp')
-rw-r--r-- | src/runtime/q3dsuippresentation.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/runtime/q3dsuippresentation.cpp b/src/runtime/q3dsuippresentation.cpp index 0197b82..307d37a 100644 --- a/src/runtime/q3dsuippresentation.cpp +++ b/src/runtime/q3dsuippresentation.cpp @@ -1707,9 +1707,20 @@ void Q3DSImage::calculateTextureTransform() Q3DSPropertyChange Q3DSImage::setSourcePath(const QString &v) { + if (!m_customImage.isNull()) + m_customImage = QImage(); + return createPropSetter(m_sourcePath, v, "sourcepath"); } +Q3DSPropertyChange Q3DSImage::setCustomImage(const QImage &v) +{ + if (!m_sourcePath.isEmpty()) + m_sourcePath = QString(); + + return createPropSetter(m_customImage, v, "sourcepath"); +} + Q3DSPropertyChange Q3DSImage::setScaleU(float v) { return createPropSetter(m_scaleU, v, "scaleu"); |