diff options
Diffstat (limited to 'src/declarative/fx/qfxscalegrid.cpp')
-rw-r--r-- | src/declarative/fx/qfxscalegrid.cpp | 26 |
1 files changed, 22 insertions, 4 deletions
diff --git a/src/declarative/fx/qfxscalegrid.cpp b/src/declarative/fx/qfxscalegrid.cpp index 4856c15..60ab418 100644 --- a/src/declarative/fx/qfxscalegrid.cpp +++ b/src/declarative/fx/qfxscalegrid.cpp @@ -93,7 +93,10 @@ bool QFxScaleGrid::isNull() const */ void QFxScaleGrid::setLeft(int pos) { - _left = pos; + if (_left != pos) { + _left = pos; + emit borderChanged(); + } } /*! @@ -102,7 +105,10 @@ void QFxScaleGrid::setLeft(int pos) */ void QFxScaleGrid::setTop(int pos) { - _top = pos; + if (_top != pos) { + _top = pos; + emit borderChanged(); + } } /*! @@ -111,7 +117,10 @@ void QFxScaleGrid::setTop(int pos) */ void QFxScaleGrid::setRight(int pos) { - _right = pos; + if (_right != pos) { + _right = pos; + emit borderChanged(); + } } /*! @@ -120,9 +129,18 @@ void QFxScaleGrid::setRight(int pos) */ void QFxScaleGrid::setBottom(int pos) { - _bottom = pos; + if (_bottom != pos) { + _bottom = pos; + emit borderChanged(); + } } +/*! + \fn void QFxScaleGrid::borderChanged() + + This signal is emitted when one of the border properties is changed. +*/ + QFxGridScaledImage::QFxGridScaledImage() : _l(-1), _r(-1), _t(-1), _b(-1), _h(QFxBorderImage::Stretch), _v(QFxBorderImage::Stretch) |