CrossFadeImage
An Image like component which smoothly fades when its source is updated. More...
Properties
- fadeDuration : int
- fillMode : enumeration
- running : bool
- source : url
- sourceSize : size
- status : enumeration
Detailed Description
import QtQuick 2.0 import Ubuntu.Components 0.1 CrossFadeImage { width: units.gu(100) height: units.gu(75) source: "http://design.ubuntu.com/wp-content/uploads/ubuntu-logo14.png" fadeDuration: 1000 MouseArea { anchors.fill: parent onClicked: parent.source = "http://design.ubuntu.com/wp-content/uploads/canonical-logo1.png" } }
Property Documentation
The time over which to fade between images. Defaults to UbuntuAnimation.FastDuration.
See also UbuntuAnimation.
Defaults to Image.PreserveAspectFit.
- Image.Stretch - the image is scaled to fit
- Image.PreserveAspectFit - the image is scaled uniformly to fit without cropping
- Image.PreserveAspectCrop - the image is scaled uniformly to fill, cropping if necessary
- Image.Tile - the image is duplicated horizontally and vertically
- Image.TileVertically - the image is stretched horizontally and tiled vertically
- Image.TileHorizontally - the image is stretched vertically and tiled horizontally
- Image.Pad - the image is not transformed
This property holds the status of image loading. It can be one of:
- Image.Null - no image has been set
- Image.Ready - the image has been loaded
- Image.Loading - the image is currently being loaded
- Image.Error - an error occurred while loading the image