--- a/src/declarative/graphicsitems/qdeclarativerepeater.cpp Fri Sep 17 08:34:18 2010 +0300
+++ b/src/declarative/graphicsitems/qdeclarativerepeater.cpp Mon Oct 04 01:19:32 2010 +0300
@@ -62,6 +62,7 @@
/*!
\qmlclass Repeater QDeclarativeRepeater
+ \ingroup qml-utility-elements
\since 4.7
\inherits Item
@@ -133,35 +134,23 @@
create items as they are required.
Also, note that Repeater is \l {Item}-based, and can only repeat \l {Item}-derived objects.
- For example, it cannot be used to repeat QtObjects:
+ For example, it cannot be used to repeat QObjects:
\badcode
Item {
- //XXX does not work! Can't repeat QtObject as it doesn't derive from Item.
+ //XXX does not work! Can't repeat QObject as it doesn't derive from Item.
Repeater {
model: 10
- QtObject {}
+ QObject {}
}
}
\endcode
*/
-/*!
- \internal
- \class QDeclarativeRepeater
- */
-
-/*!
- Create a new QDeclarativeRepeater instance.
- */
QDeclarativeRepeater::QDeclarativeRepeater(QDeclarativeItem *parent)
: QDeclarativeItem(*(new QDeclarativeRepeaterPrivate), parent)
{
}
-/*!
- Destroy the repeater instance. All items it instantiated are also
- destroyed.
- */
QDeclarativeRepeater::~QDeclarativeRepeater()
{
}
@@ -245,8 +234,8 @@
connect(d->model, SIGNAL(destroyingItem(QDeclarativeItem*)), this, SLOT(destroyingItem(QDeclarativeItem*)));
*/
regenerate();
- emit countChanged();
}
+ emit countChanged();
}
/*!
@@ -300,18 +289,12 @@
}
-/*!
- \internal
- */
void QDeclarativeRepeater::componentComplete()
{
QDeclarativeItem::componentComplete();
regenerate();
}
-/*!
- \internal
- */
QVariant QDeclarativeRepeater::itemChange(GraphicsItemChange change,
const QVariant &value)
{
@@ -334,9 +317,6 @@
d->deletables.clear();
}
-/*!
- \internal
- */
void QDeclarativeRepeater::regenerate()
{
Q_D(QDeclarativeRepeater);
@@ -377,6 +357,7 @@
d->deletables.insert(modelIndex, item);
}
}
+ emit countChanged();
}
void QDeclarativeRepeater::itemsRemoved(int index, int count)
@@ -391,6 +372,7 @@
else
break;
}
+ emit countChanged();
}
void QDeclarativeRepeater::itemsMoved(int from, int to, int count)
@@ -420,6 +402,7 @@
if (!isComponentComplete())
return;
regenerate();
+ emit countChanged();
}
QT_END_NAMESPACE