src/declarative/graphicsitems/qdeclarativetext_p.h
changeset 33 3e2da88830cd
parent 30 5dc02b23752f
--- a/src/declarative/graphicsitems/qdeclarativetext_p.h	Tue Jul 06 15:10:48 2010 +0300
+++ b/src/declarative/graphicsitems/qdeclarativetext_p.h	Wed Aug 18 10:37:55 2010 +0300
@@ -71,6 +71,8 @@
     Q_PROPERTY(WrapMode wrapMode READ wrapMode WRITE setWrapMode NOTIFY wrapModeChanged)
     Q_PROPERTY(TextFormat textFormat READ textFormat WRITE setTextFormat NOTIFY textFormatChanged)
     Q_PROPERTY(TextElideMode elide READ elideMode WRITE setElideMode NOTIFY elideModeChanged) //### elideMode?
+    Q_PROPERTY(qreal paintedWidth READ paintedWidth NOTIFY paintedSizeChanged)
+    Q_PROPERTY(qreal paintedHeight READ paintedHeight NOTIFY paintedSizeChanged)
 
 public:
     QDeclarativeText(QDeclarativeItem *parent=0);
@@ -98,7 +100,8 @@
     enum WrapMode { NoWrap = QTextOption::NoWrap,
                     WordWrap = QTextOption::WordWrap,
                     WrapAnywhere = QTextOption::WrapAnywhere,
-                    WrapAtWordBoundaryOrAnywhere = QTextOption::WrapAtWordBoundaryOrAnywhere
+                    WrapAtWordBoundaryOrAnywhere = QTextOption::WrapAtWordBoundaryOrAnywhere, // COMPAT
+                    Wrap = QTextOption::WrapAtWordBoundaryOrAnywhere
                   };
 
     QString text() const;
@@ -137,6 +140,11 @@
 
     int resourcesLoading() const; // mainly for testing
 
+    qreal paintedWidth() const;
+    qreal paintedHeight() const;
+
+    QRectF boundingRect() const;
+
 Q_SIGNALS:
     void textChanged(const QString &text);
     void linkActivated(const QString &link);
@@ -149,6 +157,7 @@
     void wrapModeChanged();
     void textFormatChanged(TextFormat textFormat);
     void elideModeChanged(TextElideMode mode);
+    void paintedSizeChanged();
 
 protected:
     void mousePressEvent(QGraphicsSceneMouseEvent *event);
@@ -159,9 +168,6 @@
 private:
     Q_DISABLE_COPY(QDeclarativeText)
     Q_DECLARE_PRIVATE_D(QGraphicsItem::d_ptr.data(), QDeclarativeText)
-
-    friend class QTextDocumentWithImageResources;
-    void reloadWithResources();
 };
 
 QT_END_NAMESPACE