summaryrefslogtreecommitdiffstats
path: root/src/gui/painting
diff options
context:
space:
mode:
authorTrond Kjernåsen <trond@trolltech.com>2009-10-02 11:56:53 (GMT)
committerTrond Kjernåsen <trond@trolltech.com>2009-10-02 11:57:56 (GMT)
commitfb85af439715ff5ec141473b5c1d8f9744aca19d (patch)
tree233a749b6056491c4d45102a4574413c26929ce2 /src/gui/painting
parent6b2f1f919d135929d508e5cfd2d64c390420ad50 (diff)
downloadQt-fb85af439715ff5ec141473b5c1d8f9744aca19d.zip
Qt-fb85af439715ff5ec141473b5c1d8f9744aca19d.tar.gz
Qt-fb85af439715ff5ec141473b5c1d8f9744aca19d.tar.bz2
Renamed the values in the Qt::TileRule enum.
Stretch, Repeat and Round are too generic. Renamed to StretchTile, RepeatTile and RoundTile. Reviewed-by: Gunnar
Diffstat (limited to 'src/gui/painting')
-rw-r--r--src/gui/painting/qdrawutil.cpp36
-rw-r--r--src/gui/painting/qdrawutil.h18
2 files changed, 27 insertions, 27 deletions
diff --git a/src/gui/painting/qdrawutil.cpp b/src/gui/painting/qdrawutil.cpp
index 716300e..ac3796a 100644
--- a/src/gui/painting/qdrawutil.cpp
+++ b/src/gui/painting/qdrawutil.cpp
@@ -1225,7 +1225,7 @@ void qDrawBorderPixmap(QPainter *painter, const QRect &targetRect, const QMargin
// horizontal edges
switch (rules.horizontal) {
- case Qt::Stretch:
+ case Qt::StretchTile:
if (targetMargins.top() > 0 && sourceMargins.top() > 0) { // top
const QRect targetTopRect(targetCenterLeft, targetTop, targetCenterWidth, targetMargins.top());
const QRect sourceTopRect(sourceCenterLeft, sourceTop, sourceCenterWidth, sourceMargins.top());
@@ -1237,7 +1237,7 @@ void qDrawBorderPixmap(QPainter *painter, const QRect &targetRect, const QMargin
qDrawPixmap(painter, targetBottomRect, pixmap, sourceBottomRect);
}
break;
- case Qt::Repeat:
+ case Qt::RepeatTile:
if (targetMargins.top() > 0 && sourceMargins.top() > 0) { // top
const QRect targetTopRect(targetCenterLeft, targetTop, targetCenterWidth, targetMargins.top());
const QRect sourceTopRect(sourceCenterLeft, sourceTop, sourceCenterWidth, sourceMargins.top());
@@ -1249,7 +1249,7 @@ void qDrawBorderPixmap(QPainter *painter, const QRect &targetRect, const QMargin
qDrawHorizontallyRepeatedPixmap(painter, targetBottomRect, pixmap, sourceBottomRect);
}
break;
- case Qt::Round:
+ case Qt::RoundTile:
if (targetMargins.top() > 0 && sourceMargins.top() > 0) { // top
const QRect targetTopRect(targetCenterLeft, targetTop, targetCenterWidth, targetMargins.top());
const QRect sourceTopRect(sourceCenterLeft, sourceTop, sourceCenterWidth, sourceMargins.top());
@@ -1265,7 +1265,7 @@ void qDrawBorderPixmap(QPainter *painter, const QRect &targetRect, const QMargin
// vertical edges
switch (rules.vertical) {
- case Qt::Stretch:
+ case Qt::StretchTile:
if (targetMargins.left() > 0 && sourceMargins.left() > 0) { // left
const QRect targetLeftRect(targetLeft, targetCenterTop, targetMargins.left(), targetCenterHeight);
const QRect sourceLeftRect(sourceLeft, sourceCenterTop, sourceMargins.left(), sourceCenterHeight);
@@ -1277,7 +1277,7 @@ void qDrawBorderPixmap(QPainter *painter, const QRect &targetRect, const QMargin
qDrawPixmap(painter, targetRightRect, pixmap, sourceRightRect);
}
break;
- case Qt::Repeat:
+ case Qt::RepeatTile:
if (targetMargins.left() > 0 && sourceMargins.left() > 0) { // left
const QRect targetLeftRect(targetLeft, targetCenterTop, targetMargins.left(), targetCenterHeight);
const QRect sourceLeftRect(sourceLeft, sourceCenterTop, sourceMargins.left(), sourceCenterHeight);
@@ -1289,7 +1289,7 @@ void qDrawBorderPixmap(QPainter *painter, const QRect &targetRect, const QMargin
qDrawVerticallyRepeatedPixmap(painter, targetRightRect, pixmap, sourceRightRect);
}
break;
- case Qt::Round:
+ case Qt::RoundTile:
if (targetMargins.left() > 0 && sourceMargins.left() > 0) { // left
const QRect targetLeftRect(targetLeft, targetCenterTop, targetMargins.left(), targetCenterHeight);
const QRect sourceLeftRect(sourceLeft, sourceCenterTop, sourceMargins.left(), sourceCenterHeight);
@@ -1308,41 +1308,41 @@ void qDrawBorderPixmap(QPainter *painter, const QRect &targetRect, const QMargin
const QRect targetCenterRect(targetCenterLeft, targetCenterTop, targetCenterWidth, targetCenterHeight);
const QRect sourceCenterRect(sourceCenterLeft, sourceCenterTop, sourceCenterWidth, sourceCenterHeight);
switch (rules.horizontal) {
- case Qt::Stretch:
+ case Qt::StretchTile:
switch (rules.vertical) {
- case Qt::Stretch: // stretch stretch
+ case Qt::StretchTile: // stretch stretch
qDrawPixmap(painter, targetCenterRect, pixmap, sourceCenterRect);
break;
- case Qt::Repeat: // stretch repeat
+ case Qt::RepeatTile: // stretch repeat
qVerticalRepeat(painter, targetCenterRect, pixmap, sourceCenterRect, qDrawPixmap);
break;
- case Qt::Round: // stretch round
+ case Qt::RoundTile: // stretch round
qVerticalRound(painter, targetCenterRect, pixmap, sourceCenterRect, qDrawPixmap);
break;
}
break;
- case Qt::Repeat:
+ case Qt::RepeatTile:
switch (rules.vertical) {
- case Qt::Stretch: // repeat stretch
+ case Qt::StretchTile: // repeat stretch
qHorizontalRepeat(painter, targetCenterRect, pixmap, sourceCenterRect, qDrawPixmap);
break;
- case Qt::Repeat: // repeat repeat
+ case Qt::RepeatTile: // repeat repeat
qVerticalRepeat(painter, targetCenterRect, pixmap, sourceCenterRect, qDrawHorizontallyRepeatedPixmap);
break;
- case Qt::Round: // repeat round
+ case Qt::RoundTile: // repeat round
qVerticalRound(painter, targetCenterRect, pixmap, sourceCenterRect, qDrawHorizontallyRepeatedPixmap);
break;
}
break;
- case Qt::Round:
+ case Qt::RoundTile:
switch (rules.vertical) {
- case Qt::Stretch: // round stretch
+ case Qt::StretchTile: // round stretch
qHorizontalRound(painter, targetCenterRect, pixmap, sourceCenterRect, qDrawPixmap);
break;
- case Qt::Repeat: // round repeat
+ case Qt::RepeatTile: // round repeat
qHorizontalRound(painter, targetCenterRect, pixmap, sourceCenterRect, qDrawVerticallyRepeatedPixmap);
break;
- case Qt::Round: // round round
+ case Qt::RoundTile: // round round
qHorizontalRound(painter, targetCenterRect, pixmap, sourceCenterRect, qDrawVerticallyRoundedPixmap);
break;
}
diff --git a/src/gui/painting/qdrawutil.h b/src/gui/painting/qdrawutil.h
index 3a2dd0e..22a57e9 100644
--- a/src/gui/painting/qdrawutil.h
+++ b/src/gui/painting/qdrawutil.h
@@ -137,22 +137,22 @@ struct QTileRules
{
inline QTileRules(Qt::TileRule horizontalRule, Qt::TileRule verticalRule)
: horizontal(horizontalRule), vertical(verticalRule) {}
- inline QTileRules(Qt::TileRule rule = Qt::Stretch)
+ inline QTileRules(Qt::TileRule rule = Qt::StretchTile)
: horizontal(rule), vertical(rule) {}
Qt::TileRule horizontal;
Qt::TileRule vertical;
};
-Q_GUI_EXPORT void qDrawBorderPixmap(QPainter *painter,
- const QRect &targetRect,
- const QMargins &targetMargins,
+Q_GUI_EXPORT void qDrawBorderPixmap(QPainter *painter,
+ const QRect &targetRect,
+ const QMargins &targetMargins,
const QPixmap &pixmap,
- const QRect &sourceRect,
- const QMargins &sourceMargins,
+ const QRect &sourceRect,
+ const QMargins &sourceMargins,
const QTileRules &rules = QTileRules());
-inline void qDrawBorderPixmap(QPainter *painter,
- const QRect &target,
- const QMargins &margins,
+inline void qDrawBorderPixmap(QPainter *painter,
+ const QRect &target,
+ const QMargins &margins,
const QPixmap &pixmap)
{
qDrawBorderPixmap(painter, target, margins, pixmap, pixmap.rect(), margins);