diff options
author | Matthew Vogt <matthew.vogt@nokia.com> | 2012-03-21 17:55:07 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-03-21 09:41:49 +0100 |
commit | 392b078c78b265ee636e57fca01eebd69f262985 (patch) | |
tree | 2000ae954837f15dd8fabbd669577417e7551898 /src/qml/qml/qqmlengine.h | |
parent | ab1e510121c8a679fdaca12ccd30e0f7ac12a26b (diff) |
Provide imageType() from QQmlImageProviderBase
Clients who are only interested in the type of image data provided
by an image provider should not need to cast the base pointer to
a QQuickImageProvider to access this information.
Also make the QQmlImageProviderBase constructor private to prevent
unwanted inheritance; all implementors should use the
QQuickImageProvider class.
Change-Id: Ia2dd2595c2711fa7df47265c9857f45ef0f4cc41
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
Diffstat (limited to 'src/qml/qml/qqmlengine.h')
-rw-r--r-- | src/qml/qml/qqmlengine.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/qml/qml/qqmlengine.h b/src/qml/qml/qqmlengine.h index 41696923c5..21a03d63ce 100644 --- a/src/qml/qml/qqmlengine.h +++ b/src/qml/qml/qqmlengine.h @@ -57,7 +57,20 @@ QT_BEGIN_NAMESPACE class Q_QML_EXPORT QQmlImageProviderBase { public: + enum ImageType { + Image, + Pixmap, + Texture, + Invalid + }; + virtual ~QQmlImageProviderBase(); + + virtual ImageType imageType() const = 0; + +private: + friend class QQuickImageProvider; + QQmlImageProviderBase(); }; class QQmlComponent; |