diff options
author | Yann Bodson <yann.bodson@nokia.com> | 2009-08-10 00:11:08 (GMT) |
---|---|---|
committer | Yann Bodson <yann.bodson@nokia.com> | 2009-08-10 00:11:08 (GMT) |
commit | c4235f6f90613f1a877da067354b912ef0004259 (patch) | |
tree | 911306f9fe7d7dd81aa8cf8b7fb89e30292e38b7 | |
parent | 1a05457011ca570b1f082f2e4312ad4897fbeb2d (diff) | |
download | Qt-c4235f6f90613f1a877da067354b912ef0004259.zip Qt-c4235f6f90613f1a877da067354b912ef0004259.tar.gz Qt-c4235f6f90613f1a877da067354b912ef0004259.tar.bz2 |
Documentation
-rw-r--r-- | src/declarative/fx/qfxborderimage.cpp | 13 | ||||
-rw-r--r-- | src/declarative/fx/qfximage.cpp | 13 | ||||
-rw-r--r-- | src/declarative/fx/qfxitem.cpp | 14 | ||||
-rw-r--r-- | src/declarative/fx/qfxlineedit.cpp | 15 | ||||
-rw-r--r-- | src/declarative/fx/qfxrect.cpp | 13 | ||||
-rw-r--r-- | src/declarative/fx/qfxtext.cpp | 13 | ||||
-rw-r--r-- | src/declarative/fx/qfxtextedit.cpp | 15 |
7 files changed, 80 insertions, 16 deletions
diff --git a/src/declarative/fx/qfxborderimage.cpp b/src/declarative/fx/qfxborderimage.cpp index 34f0e66..7e2e3c6 100644 --- a/src/declarative/fx/qfxborderimage.cpp +++ b/src/declarative/fx/qfxborderimage.cpp @@ -118,6 +118,19 @@ QFxBorderImage::~QFxBorderImage() */
/*!
+ \qmlproperty bool BorderImage::smooth
+
+ Set this property if you want the image to be smoothly filtered when scaled or
+ transformed. Smooth filtering gives better visual quality, but is slower. If
+ the image is displayed at its natural size, this property has no visual or
+ performance effect.
+
+ \note Generally scaling artifacts are only visible if the image is stationary on
+ the screen. A common pattern when animating an image is to disable smooth
+ filtering at the beginning of the animation and reenable it at the conclusion.
+*/
+
+/*!
\qmlproperty url BorderImage::source
BorderImage can handle any image format supported by Qt, loaded from any URL scheme supported by Qt.
diff --git a/src/declarative/fx/qfximage.cpp b/src/declarative/fx/qfximage.cpp index 79c11b1..0cb7988 100644 --- a/src/declarative/fx/qfximage.cpp +++ b/src/declarative/fx/qfximage.cpp @@ -225,6 +225,19 @@ void QFxImage::setFillMode(FillMode mode) */ /*! + \qmlproperty bool Image::smooth + + Set this property if you want the image to be smoothly filtered when scaled or + transformed. Smooth filtering gives better visual quality, but is slower. If + the image is displayed at its natural size, this property has no visual or + performance effect. + + \note Generally scaling artifacts are only visible if the image is stationary on + the screen. A common pattern when animating an image is to disable smooth + filtering at the beginning of the animation and reenable it at the conclusion. +*/ + +/*! \qmlproperty url Image::source Image can handle any image format supported by Qt, loaded from any URL scheme supported by Qt. diff --git a/src/declarative/fx/qfxitem.cpp b/src/declarative/fx/qfxitem.cpp index b36e994..66d5fc7 100644 --- a/src/declarative/fx/qfxitem.cpp +++ b/src/declarative/fx/qfxitem.cpp @@ -1701,20 +1701,6 @@ void QFxItem::setTransformOrigin(TransformOrigin origin) } /*! - \qmlproperty bool Item::smooth - - Set this property if you want the item to be smoothly scaled or - transformed. Smooth filtering gives better visual quality, but is slower. If - the item is displayed at its natural size, this property has no visual or - performance effect. - Currently, only the \c Image, \c Text , \c TextEdit and \c LineEdit items implement smooth filtering. - - \note Generally scaling artifacts are only visible if the item is stationary on - the screen. A common pattern when animating an item is to disable smooth - filtering at the beginning of the animation and reenable it at the conclusion. - */ - -/*! \property QFxItem::smooth \brief whether the item is smoothly transformed. diff --git a/src/declarative/fx/qfxlineedit.cpp b/src/declarative/fx/qfxlineedit.cpp index 13267f2..760344d 100644 --- a/src/declarative/fx/qfxlineedit.cpp +++ b/src/declarative/fx/qfxlineedit.cpp @@ -467,13 +467,26 @@ void QFxLineEdit::drawContents(QPainter *p, const QRect &r) p->restore(); } +/*! + \qmlproperty bool LineEdit::smooth + + Set this property if you want the text to be smoothly scaled or + transformed. Smooth filtering gives better visual quality, but is slower. If + the item is displayed at its natural size, this property has no visual or + performance effect. + + \note Generally scaling artifacts are only visible if the item is stationary on + the screen. A common pattern when animating an item is to disable smooth + filtering at the beginning of the animation and reenable it at the conclusion. +*/ + void QFxLineEditPrivate::init() { Q_Q(QFxLineEdit); control->setCursorWidth(1); control->setPasswordCharacter(QLatin1Char('*')); control->setLayoutDirection(Qt::LeftToRight); - q->setSmoothTransform(true); + q->setSmoothTransform(smooth); q->setAcceptedMouseButtons(Qt::LeftButton); q->setFlag(QGraphicsItem::ItemHasNoContents, false); q->setFlag(QGraphicsItem::ItemAcceptsInputMethod); diff --git a/src/declarative/fx/qfxrect.cpp b/src/declarative/fx/qfxrect.cpp index 29321b8..0bd240e 100644 --- a/src/declarative/fx/qfxrect.cpp +++ b/src/declarative/fx/qfxrect.cpp @@ -591,6 +591,19 @@ void QFxRect::drawRect(QPainter &p) } } +/*! + \qmlproperty bool Rect::smooth + + Set this property if you want the item to be smoothly scaled or + transformed. Smooth filtering gives better visual quality, but is slower. If + the item is displayed at its natural size, this property has no visual or + performance effect. + + \note Generally scaling artifacts are only visible if the item is stationary on + the screen. A common pattern when animating an item is to disable smooth + filtering at the beginning of the animation and reenable it at the conclusion. +*/ + QRectF QFxRect::boundingRect() const { Q_D(const QFxRect); diff --git a/src/declarative/fx/qfxtext.cpp b/src/declarative/fx/qfxtext.cpp index 0c3f4e9..c3872c4 100644 --- a/src/declarative/fx/qfxtext.cpp +++ b/src/declarative/fx/qfxtext.cpp @@ -809,6 +809,19 @@ void QFxText::paint(QPainter *p, const QStyleOptionGraphicsItem *, QWidget *) } } +/*! + \qmlproperty bool Text::smooth + + Set this property if you want the text to be smoothly scaled or + transformed. Smooth filtering gives better visual quality, but is slower. If + the item is displayed at its natural size, this property has no visual or + performance effect. + + \note Generally scaling artifacts are only visible if the item is stationary on + the screen. A common pattern when animating an item is to disable smooth + filtering at the beginning of the animation and reenable it at the conclusion. +*/ + void QFxText::componentComplete() { Q_D(QFxText); diff --git a/src/declarative/fx/qfxtextedit.cpp b/src/declarative/fx/qfxtextedit.cpp index e4001b2..dbaba79 100644 --- a/src/declarative/fx/qfxtextedit.cpp +++ b/src/declarative/fx/qfxtextedit.cpp @@ -1010,11 +1010,24 @@ void QFxTextEdit::updateImgCache(const QRectF &r) emit update(); } +/*! + \qmlproperty bool TextEdit::smooth + + Set this property if you want the text to be smoothly scaled or + transformed. Smooth filtering gives better visual quality, but is slower. If + the item is displayed at its natural size, this property has no visual or + performance effect. + + \note Generally scaling artifacts are only visible if the item is stationary on + the screen. A common pattern when animating an item is to disable smooth + filtering at the beginning of the animation and reenable it at the conclusion. +*/ + void QFxTextEditPrivate::init() { Q_Q(QFxTextEdit); - q->setSmoothTransform(true); + q->setSmoothTransform(smooth); q->setAcceptedMouseButtons(Qt::LeftButton); q->setFlag(QGraphicsItem::ItemHasNoContents, false); q->setFlag(QGraphicsItem::ItemAcceptsInputMethod); |