diff options
author | Martin Jones <martin.jones@nokia.com> | 2009-08-17 23:03:28 (GMT) |
---|---|---|
committer | Martin Jones <martin.jones@nokia.com> | 2009-08-17 23:03:28 (GMT) |
commit | f76fe94068ac790cc3df60b41350bed795d42d39 (patch) | |
tree | 5073d3a5cae2a0e85809ef5fee2fdc5540cc9607 | |
parent | 772944bf3888fd43ce484fc39faf9f01b4c9ae65 (diff) | |
download | Qt-f76fe94068ac790cc3df60b41350bed795d42d39.zip Qt-f76fe94068ac790cc3df60b41350bed795d42d39.tar.gz Qt-f76fe94068ac790cc3df60b41350bed795d42d39.tar.bz2 |
Small fixes following API review.
-rw-r--r-- | src/declarative/fx/qfxborderimage.cpp | 12 | ||||
-rw-r--r-- | src/declarative/fx/qfxborderimage.h | 7 | ||||
-rw-r--r-- | src/declarative/fx/qfximage.h | 2 | ||||
-rw-r--r-- | src/declarative/fx/qfxitem.cpp | 2 |
4 files changed, 18 insertions, 5 deletions
diff --git a/src/declarative/fx/qfxborderimage.cpp b/src/declarative/fx/qfxborderimage.cpp index f8c79a6..67b05fd 100644 --- a/src/declarative/fx/qfxborderimage.cpp +++ b/src/declarative/fx/qfxborderimage.cpp @@ -284,7 +284,11 @@ QFxBorderImage::TileMode QFxBorderImage::horizontalTileMode() const void QFxBorderImage::setHorizontalTileMode(TileMode t) { Q_D(QFxBorderImage); - d->horizontalTileMode = t; + if (t != d->horizontalTileMode) { + d->horizontalTileMode = t; + emit tileModeChanged(); + update(); + } } QFxBorderImage::TileMode QFxBorderImage::verticalTileMode() const @@ -296,7 +300,11 @@ QFxBorderImage::TileMode QFxBorderImage::verticalTileMode() const void QFxBorderImage::setVerticalTileMode(TileMode t) { Q_D(QFxBorderImage); - d->verticalTileMode = t; + if (t != d->verticalTileMode) { + d->verticalTileMode = t; + emit tileModeChanged(); + update(); + } } void QFxBorderImage::setGridScaledImage(const QFxGridScaledImage& sci) diff --git a/src/declarative/fx/qfxborderimage.h b/src/declarative/fx/qfxborderimage.h index b0ec3bc..c6885fb 100644 --- a/src/declarative/fx/qfxborderimage.h +++ b/src/declarative/fx/qfxborderimage.h @@ -59,8 +59,8 @@ class Q_DECLARATIVE_EXPORT QFxBorderImage : public QFxImageBase Q_ENUMS(TileMode) Q_PROPERTY(QFxScaleGrid *border READ border CONSTANT) - Q_PROPERTY(TileMode horizontalTileMode READ horizontalTileMode WRITE setHorizontalTileMode) - Q_PROPERTY(TileMode verticalTileMode READ verticalTileMode WRITE setVerticalTileMode) + Q_PROPERTY(TileMode horizontalTileMode READ horizontalTileMode WRITE setHorizontalTileMode NOTIFY tileModeChanged) + Q_PROPERTY(TileMode verticalTileMode READ verticalTileMode WRITE setVerticalTileMode NOTIFY tileModeChanged) public: QFxBorderImage(QFxItem *parent=0); @@ -79,6 +79,9 @@ public: void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget *); void setSource(const QUrl &url); +signals: + void tileModeChanged(); + protected: QFxBorderImage(QFxBorderImagePrivate &dd, QFxItem *parent); diff --git a/src/declarative/fx/qfximage.h b/src/declarative/fx/qfximage.h index c8e21ea..4f46495 100644 --- a/src/declarative/fx/qfximage.h +++ b/src/declarative/fx/qfximage.h @@ -57,7 +57,7 @@ class Q_DECLARATIVE_EXPORT QFxImage : public QFxImageBase Q_ENUMS(FillMode) Q_PROPERTY(QPixmap pixmap READ pixmap WRITE setPixmap DESIGNABLE false) - Q_PROPERTY(FillMode fillMode READ fillMode WRITE setFillMode NOTIFY fillModeChanged); + Q_PROPERTY(FillMode fillMode READ fillMode WRITE setFillMode NOTIFY fillModeChanged) public: QFxImage(QFxItem *parent=0); diff --git a/src/declarative/fx/qfxitem.cpp b/src/declarative/fx/qfxitem.cpp index 0b86a54..04fc5d9 100644 --- a/src/declarative/fx/qfxitem.cpp +++ b/src/declarative/fx/qfxitem.cpp @@ -663,6 +663,7 @@ signals: void downPressed(QFxKeyEvent *event); void asteriskPressed(QFxKeyEvent *event); + void numberSignPressed(QFxKeyEvent *event); void escapePressed(QFxKeyEvent *event); void returnPressed(QFxKeyEvent *event); void enterPressed(QFxKeyEvent *event); @@ -718,6 +719,7 @@ const QFxKeysAttached::SigMap QFxKeysAttached::sigMap[] = { { Qt::Key_Up, "upPressed" }, { Qt::Key_Down, "downPressed" }, { Qt::Key_Asterisk, "asteriskPressed" }, + { Qt::Key_NumberSign, "numberSignPressed" }, { Qt::Key_Escape, "escapePressed" }, { Qt::Key_Return, "returnPressed" }, { Qt::Key_Enter, "enterPressed" }, |