summaryrefslogtreecommitdiffstats
path: root/src/declarative/fx/qfxscalegrid.cpp
diff options
context:
space:
mode:
authorYann Bodson <yann.bodson@nokia.com>2009-08-09 22:35:18 (GMT)
committerYann Bodson <yann.bodson@nokia.com>2009-08-09 22:35:18 (GMT)
commit1a05457011ca570b1f082f2e4312ad4897fbeb2d (patch)
tree2aa9de11974cf98a684e027e6991ec3411ff4d80 /src/declarative/fx/qfxscalegrid.cpp
parent7105e534a980554277fbe1da2698fca6a5bc49aa (diff)
downloadQt-1a05457011ca570b1f082f2e4312ad4897fbeb2d.zip
Qt-1a05457011ca570b1f082f2e4312ad4897fbeb2d.tar.gz
Qt-1a05457011ca570b1f082f2e4312ad4897fbeb2d.tar.bz2
Add new class QFxBorderImage.
* Move scalegrid code into QFxBorderImage * Update examples
Diffstat (limited to 'src/declarative/fx/qfxscalegrid.cpp')
-rw-r--r--src/declarative/fx/qfxscalegrid.cpp28
1 files changed, 8 insertions, 20 deletions
diff --git a/src/declarative/fx/qfxscalegrid.cpp b/src/declarative/fx/qfxscalegrid.cpp
index 8eb9890..4856c15 100644
--- a/src/declarative/fx/qfxscalegrid.cpp
+++ b/src/declarative/fx/qfxscalegrid.cpp
@@ -74,8 +74,7 @@ QT_BEGIN_NAMESPACE
*/
QML_DEFINE_NOCREATE_TYPE(QFxScaleGrid)
-QFxScaleGrid::QFxScaleGrid() : QObject(), _left(0), _top(0), _right(0), _bottom(0),
- _horizontalTileRule(Stretch), _verticalTileRule(Stretch)
+QFxScaleGrid::QFxScaleGrid() : QObject(), _left(0), _top(0), _right(0), _bottom(0)
{
}
@@ -124,20 +123,9 @@ void QFxScaleGrid::setBottom(int pos)
_bottom = pos;
}
-void QFxScaleGrid::setHorizontalTileRule(TileRule r)
-{
- _horizontalTileRule = r;
-}
-
-void QFxScaleGrid::setVerticalTileRule(TileRule r)
-{
- _verticalTileRule = r;
-}
-
-
QFxGridScaledImage::QFxGridScaledImage()
: _l(-1), _r(-1), _t(-1), _b(-1),
- _h(QFxScaleGrid::Stretch), _v(QFxScaleGrid::Stretch)
+ _h(QFxBorderImage::Stretch), _v(QFxBorderImage::Stretch)
{
}
@@ -159,7 +147,7 @@ QFxGridScaledImage &QFxGridScaledImage::operator=(const QFxGridScaledImage &o)
}
QFxGridScaledImage::QFxGridScaledImage(QIODevice *data)
-: _l(-1), _r(-1), _t(-1), _b(-1), _h(QFxScaleGrid::Stretch), _v(QFxScaleGrid::Stretch)
+: _l(-1), _r(-1), _t(-1), _b(-1), _h(QFxBorderImage::Stretch), _v(QFxBorderImage::Stretch)
{
int l = -1;
int r = -1;
@@ -203,17 +191,17 @@ QFxGridScaledImage::QFxGridScaledImage(QIODevice *data)
_pix = imgFile;
}
-QFxScaleGrid::TileRule QFxGridScaledImage::stringToRule(const QString &s)
+QFxBorderImage::TileMode QFxGridScaledImage::stringToRule(const QString &s)
{
if (s == QLatin1String("Stretch"))
- return QFxScaleGrid::Stretch;
+ return QFxBorderImage::Stretch;
if (s == QLatin1String("Repeat"))
- return QFxScaleGrid::Repeat;
+ return QFxBorderImage::Repeat;
if (s == QLatin1String("Round"))
- return QFxScaleGrid::Round;
+ return QFxBorderImage::Round;
qWarning() << "Unknown tile rule specified. Using Stretch";
- return QFxScaleGrid::Stretch;
+ return QFxBorderImage::Stretch;
}
bool QFxGridScaledImage::isValid() const