summaryrefslogtreecommitdiffstats
path: root/src/declarative/fx/qmlgraphicsloader_p.h
diff options
context:
space:
mode:
authorAaron Kennedy <aaron.kennedy@nokia.com>2009-10-30 06:12:18 (GMT)
committerAaron Kennedy <aaron.kennedy@nokia.com>2009-10-30 06:12:18 (GMT)
commit564894627debad93433f16506ccf32afeb23d004 (patch)
treea96a4c6cc7cf4f8032bb915e08bbd0092a890e9c /src/declarative/fx/qmlgraphicsloader_p.h
parent44a0c19eae2099e6cdb44825123a4b8ee9a5bf20 (diff)
downloadQt-564894627debad93433f16506ccf32afeb23d004.zip
Qt-564894627debad93433f16506ccf32afeb23d004.tar.gz
Qt-564894627debad93433f16506ccf32afeb23d004.tar.bz2
Make private headers _p
Diffstat (limited to 'src/declarative/fx/qmlgraphicsloader_p.h')
-rw-r--r--src/declarative/fx/qmlgraphicsloader_p.h83
1 files changed, 54 insertions, 29 deletions
diff --git a/src/declarative/fx/qmlgraphicsloader_p.h b/src/declarative/fx/qmlgraphicsloader_p.h
index ea55334..98f764f 100644
--- a/src/declarative/fx/qmlgraphicsloader_p.h
+++ b/src/declarative/fx/qmlgraphicsloader_p.h
@@ -39,44 +39,69 @@
**
****************************************************************************/
-#ifndef QMLGRAPHICSLOADER_P_H
-#define QMLGRAPHICSLOADER_P_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 "qmlgraphicsloader.h"
+#ifndef QMLGRAPHICSLOADER_H
+#define QMLGRAPHICSLOADER_H
+
+#include <QtDeclarative/qmlgraphicsitem.h>
+
+QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-class QmlContext;
-class QmlGraphicsLoaderPrivate : public QmlGraphicsItemPrivate
+QT_MODULE(Declarative)
+
+class QmlGraphicsLoaderPrivate;
+class Q_DECLARATIVE_EXPORT QmlGraphicsLoader : public QmlGraphicsItem
{
- Q_DECLARE_PUBLIC(QmlGraphicsLoader)
+ Q_OBJECT
+ Q_ENUMS(Status)
+ Q_ENUMS(ResizeMode)
+
+ Q_PROPERTY(QUrl source READ source WRITE setSource NOTIFY sourceChanged)
+ Q_PROPERTY(QmlComponent *sourceComponent READ sourceComponent WRITE setSourceComponent NOTIFY sourceChanged)
+ Q_PROPERTY(ResizeMode resizeMode READ resizeMode WRITE setResizeMode)
+ Q_PROPERTY(QmlGraphicsItem *item READ item NOTIFY itemChanged)
+ Q_PROPERTY(Status status READ status NOTIFY statusChanged)
+ Q_PROPERTY(qreal progress READ progress NOTIFY progressChanged)
+ //### sourceItem
public:
- QmlGraphicsLoaderPrivate();
- ~QmlGraphicsLoaderPrivate();
+ QmlGraphicsLoader(QmlGraphicsItem *parent=0);
+ virtual ~QmlGraphicsLoader();
+
+ QUrl source() const;
+ void setSource(const QUrl &);
+
+ QmlComponent *sourceComponent() const;
+ void setSourceComponent(QmlComponent *);
- QUrl source;
- QmlGraphicsItem *item;
- QmlComponent *component;
- bool ownComponent;
- QmlGraphicsLoader::ResizeMode resizeMode;
+ enum Status { Null, Ready, Loading, Error };
+ Status status() const;
+ qreal progress() const;
- void _q_sourceLoaded();
- void _q_updateSize();
+ enum ResizeMode { NoResize, SizeLoaderToItem, SizeItemToLoader };
+ ResizeMode resizeMode() const;
+ void setResizeMode(ResizeMode mode);
+
+ QmlGraphicsItem *item() const;
+
+Q_SIGNALS:
+ void itemChanged();
+ void sourceChanged();
+ void statusChanged();
+ void progressChanged();
+
+private:
+ Q_DISABLE_COPY(QmlGraphicsLoader)
+ Q_DECLARE_PRIVATE_D(QGraphicsItem::d_ptr.data(), QmlGraphicsLoader)
+ Q_PRIVATE_SLOT(d_func(), void _q_sourceLoaded())
+ Q_PRIVATE_SLOT(d_func(), void _q_updateSize())
};
QT_END_NAMESPACE
-#endif // QMLGRAPHICSLOADER_P_H
+QML_DECLARE_TYPE(QmlGraphicsLoader)
+
+QT_END_HEADER
+
+#endif // QMLGRAPHICSLOADER_H