src/declarative/graphicsitems/qdeclarativeimage_p.h
changeset 33 3e2da88830cd
parent 30 5dc02b23752f
equal deleted inserted replaced
30:5dc02b23752f 33:3e2da88830cd
    50 QT_BEGIN_NAMESPACE
    50 QT_BEGIN_NAMESPACE
    51 
    51 
    52 QT_MODULE(Declarative)
    52 QT_MODULE(Declarative)
    53 
    53 
    54 class QDeclarativeImagePrivate;
    54 class QDeclarativeImagePrivate;
    55 class Q_DECLARATIVE_EXPORT QDeclarativeImage : public QDeclarativeImageBase
    55 class Q_AUTOTEST_EXPORT QDeclarativeImage : public QDeclarativeImageBase
    56 {
    56 {
    57     Q_OBJECT
    57     Q_OBJECT
    58     Q_ENUMS(FillMode)
    58     Q_ENUMS(FillMode)
    59 
    59 
    60     Q_PROPERTY(QPixmap pixmap READ pixmap WRITE setPixmap NOTIFY pixmapChanged DESIGNABLE false)
       
    61     Q_PROPERTY(FillMode fillMode READ fillMode WRITE setFillMode NOTIFY fillModeChanged)
    60     Q_PROPERTY(FillMode fillMode READ fillMode WRITE setFillMode NOTIFY fillModeChanged)
    62     Q_PROPERTY(qreal paintedWidth READ paintedWidth NOTIFY paintedGeometryChanged)
    61     Q_PROPERTY(qreal paintedWidth READ paintedWidth NOTIFY paintedGeometryChanged)
    63     Q_PROPERTY(qreal paintedHeight READ paintedHeight NOTIFY paintedGeometryChanged)
    62     Q_PROPERTY(qreal paintedHeight READ paintedHeight NOTIFY paintedGeometryChanged)
    64 
    63 
    65 public:
    64 public:
    77     qreal paintedHeight() const;
    76     qreal paintedHeight() const;
    78 
    77 
    79     void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget *);
    78     void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget *);
    80 
    79 
    81 Q_SIGNALS:
    80 Q_SIGNALS:
    82     void pixmapChanged();
       
    83     void fillModeChanged();
    81     void fillModeChanged();
    84     void paintedGeometryChanged();
    82     void paintedGeometryChanged();
    85 
    83 
    86 protected:
    84 protected:
    87     QDeclarativeImage(QDeclarativeImagePrivate &dd, QDeclarativeItem *parent);
    85     QDeclarativeImage(QDeclarativeImagePrivate &dd, QDeclarativeItem *parent);
    88     void geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry);
    86     void geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry);
    89     void pixmapChange();
    87     void pixmapChange();
    90 
       
    91 protected Q_SLOTS:
       
    92     void updatePaintedGeometry();
    88     void updatePaintedGeometry();
    93 
    89 
    94 private:
    90 private:
    95     Q_DISABLE_COPY(QDeclarativeImage)
    91     Q_DISABLE_COPY(QDeclarativeImage)
    96     Q_DECLARE_PRIVATE_D(QGraphicsItem::d_ptr.data(), QDeclarativeImage)
    92     Q_DECLARE_PRIVATE_D(QGraphicsItem::d_ptr.data(), QDeclarativeImage)