5#include <QtQuick/qsgnode.h>
7#include <QQmlComponent>
96 clock =
new Clock(
this);
130 m_deletables <<
item;
131 data->delegate =
nullptr;
149void QQuickItemParticle::processDeletables()
156 if ((mpa = qobject_cast<QQuickItemParticleAttached*>(qmlAttachedPropertiesObject<QQuickItemParticle>(
item)))) {
157 if (mpa->m_parentItem !=
nullptr)
168 m_deletables.
clear();
171void QQuickItemParticle::tick(
int time)
177 if (!
d->delegate &&
d->t != -1 &&
d->stillAlive(
m_system)) {
179 if (!m_pendingItems.
isEmpty()){
184 }
else if (m_delegate){
187 m_managed <<
d->delegate;
189 if (d &&
d->delegate){
190 d->delegate->setX(
d->curX(
m_system) -
d->delegate->width() / 2);
191 d->delegate->setY(
d->curY(
m_system) -
d->delegate->height() / 2);
192 QQuickItemParticleAttached* mpa = qobject_cast<QQuickItemParticleAttached*>(qmlAttachedPropertiesObject<QQuickItemParticle>(
d->delegate));
198 d->delegate->setParentItem(
this);
200 d->delegate->setOpacity(0.);
201 d->delegate->setVisible(
false);
221 m_deletables.
unite(lost);
246 qreal curT = timeStamp/1000.0;
247 qreal dt = curT - m_lastT;
258 float t = ((timeStamp / 1000.0f) -
data->t) /
data->lifeSpan;
264 m_deletables <<
item;
265 data->delegate =
nullptr;
290#include "moc_qquickitemparticle_p.cpp"
DarwinBluetooth::DeviceInquiryDelegate * m_delegate
void setOpacity(qreal opacity)
void setParentItem(QGraphicsItem *parent)
Sets this item's parent item to newParent.
QGraphicsItem * parentItem() const
Returns a pointer to this item's parent item.
void setVisible(bool visible)
If visible is true, the item is made visible.
void push_front(rvalue_ref t)
bool isEmpty() const noexcept
void push_back(parameter_type t)
void pop_front() noexcept
const_iterator cend() const noexcept
const_iterator cbegin() const noexcept
constexpr qreal x() const noexcept
Returns the x coordinate of this point.
constexpr qreal y() const noexcept
Returns the y coordinate of this point.
virtual QObject * create(QQmlContext *context=nullptr)
Create an object instance from this component, within the specified context.
static QQuickItemParticleAttached * qmlAttachedProperties(QObject *object)
void commit(int gIdx, int pIdx) override
void give(QQuickItem *item)
void initialize(int gIdx, int pIdx) override
QQuickItemParticle(QQuickItem *parent=nullptr)
\qmltype ItemParticle \instantiates QQuickItemParticle \inqmlmodule QtQuick.Particles \inherits Parti...
QSGNode * updatePaintNode(QSGNode *, UpdatePaintNodeData *) override
Called on the render thread when it is time to sync the state of the item with the scene graph.
void freeze(QQuickItem *item)
void take(QQuickItem *item, bool prioritize=false)
void unfreeze(QQuickItem *item)
The QQuickItem class provides the most basic of all visual items in \l {Qt Quick}.
virtual QSGNode * updatePaintNode(QSGNode *, UpdatePaintNodeData *)
Called on the render thread when it is time to sync the state of the item with the scene graph.
void setFlag(Flag flag, bool enabled=true)
Enables the specified flag for this item if enabled is true; if enabled is false, the flag is disable...
QQuickItem * parentItem() const
void update()
Schedules a call to updatePaintNode() for this item.
const GroupIDs & groupIds() const
QQuickParticleSystem * m_system
QVarLengthArray< QQuickParticleGroupData *, 32 > groupData
int systemSync(QQuickParticlePainter *p)
\group qtquick-scenegraph-nodes \title Qt Quick Scene Graph Node classes
bool remove(const T &value)
QSet< T > & unite(const QSet< T > &other)
bool contains(const T &value) const
qDeleteAll(list.begin(), list.end())
Combined button and popup list for selecting options.
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
QQmlContext * qmlContext(const QObject *obj)
QQuickItem * qobject_cast< QQuickItem * >(QObject *o)
qsizetype indexOf(const AT &t, qsizetype from=0) const noexcept
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent