diff options
author | Aaron Kennedy <aaron.kennedy@nokia.com> | 2009-10-30 06:12:18 (GMT) |
---|---|---|
committer | Aaron Kennedy <aaron.kennedy@nokia.com> | 2009-10-30 06:12:18 (GMT) |
commit | 564894627debad93433f16506ccf32afeb23d004 (patch) | |
tree | a96a4c6cc7cf4f8032bb915e08bbd0092a890e9c /src/declarative/fx/qmlgraphicsimagebase_p.h | |
parent | 44a0c19eae2099e6cdb44825123a4b8ee9a5bf20 (diff) | |
download | Qt-564894627debad93433f16506ccf32afeb23d004.zip Qt-564894627debad93433f16506ccf32afeb23d004.tar.gz Qt-564894627debad93433f16506ccf32afeb23d004.tar.bz2 |
Make private headers _p
Diffstat (limited to 'src/declarative/fx/qmlgraphicsimagebase_p.h')
-rw-r--r-- | src/declarative/fx/qmlgraphicsimagebase_p.h | 67 |
1 files changed, 37 insertions, 30 deletions
diff --git a/src/declarative/fx/qmlgraphicsimagebase_p.h b/src/declarative/fx/qmlgraphicsimagebase_p.h index 5fd5f11..3ad0e4b 100644 --- a/src/declarative/fx/qmlgraphicsimagebase_p.h +++ b/src/declarative/fx/qmlgraphicsimagebase_p.h @@ -39,45 +39,52 @@ ** ****************************************************************************/ -#ifndef QMLGRAPHICSIMAGEBASE_P_H -#define QMLGRAPHICSIMAGEBASE_P_H +#ifndef QMLGRAPHICSIMAGEBASE_H +#define QMLGRAPHICSIMAGEBASE_H -// -// W A R N I N G -// ------------- -// -// This file is not part of the Qt API. It exists purely as an -// implementation detail. This header file may change from version to -// version without notice, or even be removed. -// -// We mean it. -// - -#include "qmlgraphicsitem_p.h" -#include <QtCore/QPointer> +#include <QtDeclarative/qmlgraphicsitem.h> +QT_BEGIN_HEADER QT_BEGIN_NAMESPACE -class QNetworkReply; -class QmlGraphicsImageBasePrivate : public QmlGraphicsItemPrivate +class QmlGraphicsImageBasePrivate; +class QmlGraphicsImageBase : public QmlGraphicsItem { - Q_DECLARE_PUBLIC(QmlGraphicsImageBase) + Q_OBJECT + Q_ENUMS(Status) + + Q_PROPERTY(Status status READ status NOTIFY statusChanged) + Q_PROPERTY(QUrl source READ source WRITE setSource NOTIFY sourceChanged) + Q_PROPERTY(qreal progress READ progress NOTIFY progressChanged) public: - QmlGraphicsImageBasePrivate() - : status(QmlGraphicsImageBase::Null), - progress(0.0), - pendingPixmapCache(false) - { - } + QmlGraphicsImageBase(QmlGraphicsItem *parent = 0); + ~QmlGraphicsImageBase(); + enum Status { Null, Ready, Loading, Error }; + Status status() const; + qreal progress() const; + + QUrl source() const; + virtual void setSource(const QUrl &url); + +Q_SIGNALS: + void sourceChanged(const QUrl &); + void statusChanged(Status); + void progressChanged(qreal progress); + +protected: + QmlGraphicsImageBase(QmlGraphicsImageBasePrivate &dd, QmlGraphicsItem *parent); + +private Q_SLOTS: + virtual void requestFinished(); + void requestProgress(qint64,qint64); - QPixmap pix; - QmlGraphicsImageBase::Status status; - QUrl url; - qreal progress; - bool pendingPixmapCache; +private: + Q_DISABLE_COPY(QmlGraphicsImageBase) + Q_DECLARE_PRIVATE_D(QGraphicsItem::d_ptr.data(), QmlGraphicsImageBase) }; QT_END_NAMESPACE +QT_END_HEADER -#endif +#endif // QMLGRAPHICSIMAGEBASE_H |