diff options
author | Shawn Rutledge <shawn.rutledge@qt.io> | 2015-12-03 17:48:38 +0100 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@qt.io> | 2019-08-24 12:26:20 +0200 |
commit | 5d995ae122aa07486ead849560b74d2b62b883bb (patch) | |
tree | fba57d7eac473f9a41923bfc7719a5a87a281f79 /src/quick/items/qquickimagebase_p_p.h | |
parent | 506b4093b47f8ecf29c2e1e83e73e47e9ac767ad (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/qquickimagebase_p_p.h')
-rw-r--r-- | src/quick/items/qquickimagebase_p_p.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/quick/items/qquickimagebase_p_p.h b/src/quick/items/qquickimagebase_p_p.h index 1b771166a2..88e18ba32e 100644 --- a/src/quick/items/qquickimagebase_p_p.h +++ b/src/quick/items/qquickimagebase_p_p.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2016 The Qt Company Ltd. +** Copyright (C) 2019 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the QtQuick module of the Qt Toolkit. @@ -68,6 +68,8 @@ public: : status(QQuickImageBase::Null), progress(0.0), devicePixelRatio(1.0), + currentFrame(0), + frameCount(0), async(false), cache(true), mirror(false), @@ -85,6 +87,8 @@ public: QSize oldSourceSize; qreal devicePixelRatio; QQuickImageProviderOptions providerOptions; + int currentFrame; + int frameCount; bool async : 1; bool cache : 1; bool mirror: 1; |