42 #include "private/qdeclarativeimagebase_p.h" 43 #include "private/qdeclarativeimagebase_p_p.h" 88 if (
d->async != async) {
104 if ((
d->url.isEmpty() == url.
isEmpty()) && url ==
d->url)
117 if (
d->sourcesize == size)
120 d->sourcesize = size;
121 d->explicitSourceSize =
true;
131 int width =
d->sourcesize.width();
132 int height =
d->sourcesize.height();
133 return QSize(width != -1 ? width :
d->pix.width(), height != -1 ?
height :
d->pix.height());
139 if (!
d->explicitSourceSize)
141 d->explicitSourceSize =
false;
157 if (
d->cache == cache)
169 if (mirror ==
d->mirror)
190 if (
d->url.isEmpty()) {
199 QDeclarativePixmap::Options options;
207 if (
d->pix.isLoading()) {
213 static int thisRequestProgress = -1;
214 static int thisRequestFinished = -1;
215 if (thisRequestProgress == -1) {
216 thisRequestProgress =
218 thisRequestFinished =
222 d->pix.connectFinished(
this, thisRequestFinished);
223 d->pix.connectDownloadProgress(
this, thisRequestProgress);
236 qreal oldProgress =
d->progress;
238 if (
d->pix.isError()) {
249 if (
d->sourcesize.width() !=
d->pix.width() ||
d->sourcesize.height() !=
d->pix.height())
252 if (
d->status != oldStatus)
254 if (
d->progress != oldProgress)
263 if (
d->status ==
Loading && total > 0) {
264 d->progress =
qreal(received)/total;
273 if (
d->url.isValid())
bool asynchronous() const
#define QT_END_NAMESPACE
This macro expands to.
virtual void requestFinished()
QDeclarativeParserStatus ** d
bool isComponentComplete() const
Returns true if construction of the QML component is complete; otherwise returns false.
bool isEmpty() const
Returns true if the URL has no data; otherwise returns false.
virtual void setMirror(bool mirror)
static const QMetaObject staticMetaObject
This variable stores the meta-object for the class.
The QUrl class provides a convenient interface for working with URLs.
void update(const QRectF &rect=QRectF())
Schedules a redraw of the area covered by rect in this item.
void setAsynchronous(bool)
virtual void setSourceSize(const QSize &)
void statusChanged(QDeclarativeImageBase::Status)
#define QT_BEGIN_NAMESPACE
This macro expands to.
The QDeclarativeItem class provides the most basic of all visual items in QML.
void sourceChanged(const QUrl &)
void setImplicitWidth(qreal)
Sets the implied width of the item to w.
void asynchronousChanged()
QDeclarativeImageBase(QDeclarativeItem *parent=0)
void progressChanged(qreal progress)
Q_DECLARATIVE_EXPORT QDeclarativeEngine * qmlEngine(const QObject *)
QObject * parent() const
Returns a pointer to the parent object.
virtual void componentComplete()
virtual void componentComplete()
The QSize class defines the size of a two-dimensional object using integer point precision.
QDeclarativeInfo qmlInfo(const QObject *me)
void setImplicitHeight(qreal)
Sets the implied height of the item to h.
virtual void pixmapChange()
virtual void setSource(const QUrl &url)
void requestProgress(qint64, qint64)