aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquickitemsmodule.cpp
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@qt.io>2015-12-03 17:48:38 +0100
committerShawn Rutledge <shawn.rutledge@qt.io>2019-08-24 12:26:20 +0200
commit5d995ae122aa07486ead849560b74d2b62b883bb (patch)
treefba57d7eac473f9a41923bfc7719a5a87a281f79 /src/quick/items/qquickitemsmodule.cpp
parent506b4093b47f8ecf29c2e1e83e73e47e9ac767ad (diff)
Move currentFrame and frameCount properties up to QQuickImageBase
AnimatedImage already had these properties, but some typically non-animated image formats such as PDF, TIFF and ICO can also support multiple pages. In either case, the currentFrame property can be used to select a specific frame or page. However an AnimatedImage uses a QMovie to do that, whereas a plain Image uses QQuickPixmap. So the accessors need to be virtual in order to have these different implementations. [ChangeLog][QtQuick][Image] Image and BorderImage now have currentFrame and frameCount properties which can be used to step through the frames of multi-page image formats such as TIFF, WEBP and ICO. Task-number: QTBUG-77506 Change-Id: Id4d95a99a26a862957e44b1bd8ffe06d7eababef Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Diffstat (limited to 'src/quick/items/qquickitemsmodule.cpp')
-rw-r--r--src/quick/items/qquickitemsmodule.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/quick/items/qquickitemsmodule.cpp b/src/quick/items/qquickitemsmodule.cpp
index d8ad104a6d..6ce079a0dc 100644
--- a/src/quick/items/qquickitemsmodule.cpp
+++ b/src/quick/items/qquickitemsmodule.cpp
@@ -491,6 +491,9 @@ static void qt_quickitems_defineModule(const char *uri, int major, int minor)
#if QT_CONFIG(wheelevent)
qmlRegisterType<QQuickWheelHandler>(uri, 2, 14, "WheelHandler");
#endif
+ qmlRegisterUncreatableType<QQuickImageBase, 14>(uri, 2, 14, "ImageBase",
+ QQuickPointerHandler::tr("ImageBase is an abstract base class"));
+ qmlRegisterType<QQuickImage, 14>(uri, 2, 14, "Image");
}
static void initResources()