summaryrefslogtreecommitdiffstats
path: root/src/declarative/graphicsitems
diff options
context:
space:
mode:
authorYann Bodson <yann.bodson@nokia.com>2009-11-02 06:47:29 (GMT)
committerYann Bodson <yann.bodson@nokia.com>2009-11-02 06:47:29 (GMT)
commitd073dfb82c02c1d0a9818525a2a4a4f1adbf44bf (patch)
treed0c1115d2adc9f002688406d6103a3579f2eb01e /src/declarative/graphicsitems
parent8c39a1ad27594e514afad12fd089ccd988bf4519 (diff)
downloadQt-d073dfb82c02c1d0a9818525a2a4a4f1adbf44bf.zip
Qt-d073dfb82c02c1d0a9818525a2a4a4f1adbf44bf.tar.gz
Qt-d073dfb82c02c1d0a9818525a2a4a4f1adbf44bf.tar.bz2
renaming QmlGraphicsRect -> QmlGraphicsRectangle
Diffstat (limited to 'src/declarative/graphicsitems')
-rw-r--r--src/declarative/graphicsitems/graphicsitems.pri6
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsrectangle.cpp (renamed from src/declarative/graphicsitems/qmlgraphicsrect.cpp)74
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsrectangle_p.h (renamed from src/declarative/graphicsitems/qmlgraphicsrect_p.h)14
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsrectangle_p_p.h (renamed from src/declarative/graphicsitems/qmlgraphicsrect_p_p.h)14
4 files changed, 54 insertions, 54 deletions
diff --git a/src/declarative/graphicsitems/graphicsitems.pri b/src/declarative/graphicsitems/graphicsitems.pri
index 8eac580..15d775c 100644
--- a/src/declarative/graphicsitems/graphicsitems.pri
+++ b/src/declarative/graphicsitems/graphicsitems.pri
@@ -28,8 +28,8 @@ HEADERS += \
graphicsitems/qmlgraphicspath_p_p.h \
graphicsitems/qmlgraphicspathview_p.h \
graphicsitems/qmlgraphicspathview_p_p.h \
- graphicsitems/qmlgraphicsrect_p.h \
- graphicsitems/qmlgraphicsrect_p_p.h \
+ graphicsitems/qmlgraphicsrectangle_p.h \
+ graphicsitems/qmlgraphicsrectangle_p_p.h \
graphicsitems/qmlgraphicsrepeater_p.h \
graphicsitems/qmlgraphicsrepeater_p_p.h \
graphicsitems/qmlgraphicsscalegrid_p_p.h \
@@ -64,7 +64,7 @@ SOURCES += \
graphicsitems/qmlgraphicsmouseregion.cpp \
graphicsitems/qmlgraphicspath.cpp \
graphicsitems/qmlgraphicspathview.cpp \
- graphicsitems/qmlgraphicsrect.cpp \
+ graphicsitems/qmlgraphicsrectangle.cpp \
graphicsitems/qmlgraphicsrepeater.cpp \
graphicsitems/qmlgraphicsscalegrid.cpp \
graphicsitems/qmlgraphicstextinput.cpp \
diff --git a/src/declarative/graphicsitems/qmlgraphicsrect.cpp b/src/declarative/graphicsitems/qmlgraphicsrectangle.cpp
index 605e82c..8ae40b7 100644
--- a/src/declarative/graphicsitems/qmlgraphicsrect.cpp
+++ b/src/declarative/graphicsitems/qmlgraphicsrectangle.cpp
@@ -39,8 +39,8 @@
**
****************************************************************************/
-#include "qmlgraphicsrect_p.h"
-#include "qmlgraphicsrect_p_p.h"
+#include "qmlgraphicsrectangle_p.h"
+#include "qmlgraphicsrectangle_p_p.h"
#include <QPainter>
#include <QtCore/qmath.h>
@@ -149,10 +149,10 @@ void QmlGraphicsGradient::doUpdate()
emit updated();
}
-QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,Rectangle,QmlGraphicsRect)
+QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,Rectangle,QmlGraphicsRectangle)
/*!
- \qmlclass Rectangle QmlGraphicsRect
+ \qmlclass Rectangle QmlGraphicsRectangle
\brief The Rectangle item allows you to add rectangles to a scene.
\inherits Item
@@ -175,28 +175,28 @@ QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,Rectangle,QmlGraphicsRect)
/*!
\internal
- \class QmlGraphicsRect
- \brief The QmlGraphicsRect class provides a rectangle item that you can add to a QmlView.
+ \class QmlGraphicsRectangle
+ \brief The QmlGraphicsRectangle class provides a rectangle item that you can add to a QmlView.
*/
-QmlGraphicsRect::QmlGraphicsRect(QmlGraphicsItem *parent)
- : QmlGraphicsItem(*(new QmlGraphicsRectPrivate), parent)
+QmlGraphicsRectangle::QmlGraphicsRectangle(QmlGraphicsItem *parent)
+ : QmlGraphicsItem(*(new QmlGraphicsRectanglePrivate), parent)
{
- Q_D(QmlGraphicsRect);
+ Q_D(QmlGraphicsRectangle);
d->init();
setFlag(QGraphicsItem::ItemHasNoContents, false);
}
-QmlGraphicsRect::QmlGraphicsRect(QmlGraphicsRectPrivate &dd, QmlGraphicsItem *parent)
+QmlGraphicsRectangle::QmlGraphicsRectangle(QmlGraphicsRectanglePrivate &dd, QmlGraphicsItem *parent)
: QmlGraphicsItem(dd, parent)
{
- Q_D(QmlGraphicsRect);
+ Q_D(QmlGraphicsRectangle);
d->init();
setFlag(QGraphicsItem::ItemHasNoContents, false);
}
-void QmlGraphicsRect::doUpdate()
+void QmlGraphicsRectangle::doUpdate()
{
- Q_D(QmlGraphicsRect);
+ Q_D(QmlGraphicsRectangle);
d->rectImage = QPixmap();
const int pw = d->pen && d->pen->isValid() ? d->pen->width() : 0;
d->setPaintMargin((pw+1)/2);
@@ -214,9 +214,9 @@ void QmlGraphicsRect::doUpdate()
To keep the border smooth (rather than blurry), odd widths cause the rectangle to be painted at
a half-pixel offset;
*/
-QmlGraphicsPen *QmlGraphicsRect::border()
+QmlGraphicsPen *QmlGraphicsRectangle::border()
{
- Q_D(QmlGraphicsRect);
+ Q_D(QmlGraphicsRectangle);
return d->getPen();
}
@@ -254,15 +254,15 @@ QmlGraphicsPen *QmlGraphicsRect::border()
\sa Gradient, color
*/
-QmlGraphicsGradient *QmlGraphicsRect::gradient() const
+QmlGraphicsGradient *QmlGraphicsRectangle::gradient() const
{
- Q_D(const QmlGraphicsRect);
+ Q_D(const QmlGraphicsRectangle);
return d->gradient;
}
-void QmlGraphicsRect::setGradient(QmlGraphicsGradient *gradient)
+void QmlGraphicsRectangle::setGradient(QmlGraphicsGradient *gradient)
{
- Q_D(QmlGraphicsRect);
+ Q_D(QmlGraphicsRectangle);
if (d->gradient == gradient)
return;
if (d->gradient)
@@ -282,15 +282,15 @@ void QmlGraphicsRect::setGradient(QmlGraphicsGradient *gradient)
painted as a normal rectangle. The same radius is used by all 4 corners; there is currently
no way to specify different radii for different corners.
*/
-qreal QmlGraphicsRect::radius() const
+qreal QmlGraphicsRectangle::radius() const
{
- Q_D(const QmlGraphicsRect);
+ Q_D(const QmlGraphicsRectangle);
return d->radius;
}
-void QmlGraphicsRect::setRadius(qreal radius)
+void QmlGraphicsRectangle::setRadius(qreal radius)
{
- Q_D(QmlGraphicsRect);
+ Q_D(QmlGraphicsRectangle);
if (d->radius == radius)
return;
@@ -316,15 +316,15 @@ void QmlGraphicsRect::setRadius(qreal radius)
If both a gradient and a color are specified, the gradient will be used.
*/
-QColor QmlGraphicsRect::color() const
+QColor QmlGraphicsRectangle::color() const
{
- Q_D(const QmlGraphicsRect);
+ Q_D(const QmlGraphicsRectangle);
return d->color;
}
-void QmlGraphicsRect::setColor(const QColor &c)
+void QmlGraphicsRectangle::setColor(const QColor &c)
{
- Q_D(QmlGraphicsRect);
+ Q_D(QmlGraphicsRectangle);
if (d->color == c)
return;
@@ -334,9 +334,9 @@ void QmlGraphicsRect::setColor(const QColor &c)
emit colorChanged();
}
-void QmlGraphicsRect::generateRoundedRect()
+void QmlGraphicsRectangle::generateRoundedRect()
{
- Q_D(QmlGraphicsRect);
+ Q_D(QmlGraphicsRectangle);
if (d->rectImage.isNull()) {
const int pw = d->pen && d->pen->isValid() ? d->pen->width() : 0;
const int radius = qCeil(d->radius); //ensure odd numbered width/height so we get 1-pixel center
@@ -358,9 +358,9 @@ void QmlGraphicsRect::generateRoundedRect()
}
}
-void QmlGraphicsRect::generateBorderedRect()
+void QmlGraphicsRectangle::generateBorderedRect()
{
- Q_D(QmlGraphicsRect);
+ Q_D(QmlGraphicsRectangle);
if (d->rectImage.isNull()) {
const int pw = d->pen && d->pen->isValid() ? d->pen->width() : 0;
d->rectImage = QPixmap(pw*2 + 3, pw*2 + 3);
@@ -382,9 +382,9 @@ void QmlGraphicsRect::generateBorderedRect()
}
}
-void QmlGraphicsRect::paint(QPainter *p, const QStyleOptionGraphicsItem *, QWidget *)
+void QmlGraphicsRectangle::paint(QPainter *p, const QStyleOptionGraphicsItem *, QWidget *)
{
- Q_D(QmlGraphicsRect);
+ Q_D(QmlGraphicsRectangle);
if (d->radius > 0 || (d->pen && d->pen->isValid())
|| (d->gradient && d->gradient->gradient()) ) {
drawRect(*p);
@@ -399,9 +399,9 @@ void QmlGraphicsRect::paint(QPainter *p, const QStyleOptionGraphicsItem *, QWidg
}
}
-void QmlGraphicsRect::drawRect(QPainter &p)
+void QmlGraphicsRectangle::drawRect(QPainter &p)
{
- Q_D(QmlGraphicsRect);
+ Q_D(QmlGraphicsRectangle);
if (d->gradient && d->gradient->gradient()) {
// XXX This path is still slower than the image path
// Image path won't work for gradients though
@@ -466,9 +466,9 @@ void QmlGraphicsRect::drawRect(QPainter &p)
\image rect-smooth.png
*/
-QRectF QmlGraphicsRect::boundingRect() const
+QRectF QmlGraphicsRectangle::boundingRect() const
{
- Q_D(const QmlGraphicsRect);
+ Q_D(const QmlGraphicsRectangle);
return QRectF(-d->paintmargin, -d->paintmargin, d->width+d->paintmargin*2, d->height+d->paintmargin*2);
}
diff --git a/src/declarative/graphicsitems/qmlgraphicsrect_p.h b/src/declarative/graphicsitems/qmlgraphicsrectangle_p.h
index 97334fd..2a80619 100644
--- a/src/declarative/graphicsitems/qmlgraphicsrect_p.h
+++ b/src/declarative/graphicsitems/qmlgraphicsrectangle_p.h
@@ -130,8 +130,8 @@ private:
friend class QmlGraphicsGradientStop;
};
-class QmlGraphicsRectPrivate;
-class Q_DECLARATIVE_EXPORT QmlGraphicsRect : public QmlGraphicsItem
+class QmlGraphicsRectanglePrivate;
+class Q_DECLARATIVE_EXPORT QmlGraphicsRectangle : public QmlGraphicsItem
{
Q_OBJECT
@@ -140,7 +140,7 @@ class Q_DECLARATIVE_EXPORT QmlGraphicsRect : public QmlGraphicsItem
Q_PROPERTY(QmlGraphicsPen * border READ border CONSTANT)
Q_PROPERTY(qreal radius READ radius WRITE setRadius NOTIFY radiusChanged)
public:
- QmlGraphicsRect(QmlGraphicsItem *parent=0);
+ QmlGraphicsRectangle(QmlGraphicsItem *parent=0);
QColor color() const;
void setColor(const QColor &);
@@ -170,11 +170,11 @@ private:
void drawRect(QPainter &painter);
protected:
- QmlGraphicsRect(QmlGraphicsRectPrivate &dd, QmlGraphicsItem *parent);
+ QmlGraphicsRectangle(QmlGraphicsRectanglePrivate &dd, QmlGraphicsItem *parent);
private:
- Q_DISABLE_COPY(QmlGraphicsRect)
- Q_DECLARE_PRIVATE_D(QGraphicsItem::d_ptr.data(), QmlGraphicsRect)
+ Q_DISABLE_COPY(QmlGraphicsRectangle)
+ Q_DECLARE_PRIVATE_D(QGraphicsItem::d_ptr.data(), QmlGraphicsRectangle)
};
QT_END_NAMESPACE
@@ -182,7 +182,7 @@ QT_END_NAMESPACE
QML_DECLARE_TYPE(QmlGraphicsPen)
QML_DECLARE_TYPE(QmlGraphicsGradientStop)
QML_DECLARE_TYPE(QmlGraphicsGradient)
-QML_DECLARE_TYPE(QmlGraphicsRect)
+QML_DECLARE_TYPE(QmlGraphicsRectangle)
QT_END_HEADER
diff --git a/src/declarative/graphicsitems/qmlgraphicsrect_p_p.h b/src/declarative/graphicsitems/qmlgraphicsrectangle_p_p.h
index f44e8de..cb914d6 100644
--- a/src/declarative/graphicsitems/qmlgraphicsrect_p_p.h
+++ b/src/declarative/graphicsitems/qmlgraphicsrectangle_p_p.h
@@ -58,18 +58,18 @@
QT_BEGIN_NAMESPACE
class QmlGraphicsGradient;
-class QmlGraphicsRect;
-class QmlGraphicsRectPrivate : public QmlGraphicsItemPrivate
+class QmlGraphicsRectangle;
+class QmlGraphicsRectanglePrivate : public QmlGraphicsItemPrivate
{
- Q_DECLARE_PUBLIC(QmlGraphicsRect)
+ Q_DECLARE_PUBLIC(QmlGraphicsRectangle)
public:
- QmlGraphicsRectPrivate() :
+ QmlGraphicsRectanglePrivate() :
color(Qt::white), gradient(0), pen(0), radius(0), paintmargin(0)
{
}
- ~QmlGraphicsRectPrivate()
+ ~QmlGraphicsRectanglePrivate()
{
delete pen;
}
@@ -83,7 +83,7 @@ public:
QmlGraphicsGradient *gradient;
QmlGraphicsPen *getPen() {
if (!pen) {
- Q_Q(QmlGraphicsRect);
+ Q_Q(QmlGraphicsRectangle);
pen = new QmlGraphicsPen;
QObject::connect(pen, SIGNAL(penChanged()), q, SLOT(doUpdate()));
}
@@ -96,7 +96,7 @@ public:
void setPaintMargin(qreal margin)
{
- Q_Q(QmlGraphicsRect);
+ Q_Q(QmlGraphicsRectangle);
if (margin == paintmargin)
return;
q->prepareGeometryChange();