5#include <private/qquickitem_p.h>
7#if QT_CONFIG(quick_shadereffect)
8#include <QtQuick/private/qquickshadereffectsource_p.h>
10#include <QtQuick/private/qquickrectangle_p.h>
11#include <QtQml/private/qabstractanimationjob_p.h>
12#include <private/qqmlengine_p.h>
13#include <private/qquickview_p.h>
14#include <QtQuick/private/qquickstategroup_p.h>
15#include <QtGui/QImage>
16#include <private/qqmlvme_p.h>
17#include <private/qqmlcomponentattached_p.h>
18#include <private/qqmldata_p.h>
19#include <private/qsgadaptationlayer_p.h>
31 for (ItemTextureHashIt iterator = m_itemTextureHash.
begin(),
end = m_itemTextureHash.
end(); iterator !=
end; ++iterator) {
41 if (referencedItem ==
nullptr)
49 if (!m_itemTextureHash.
contains(referencedItem)) {
68 if (referencedItem ==
nullptr)
71 delete m_itemTextureHash.
take(referencedItem);
77 if (referencedItem ==
nullptr || referencedItem->
parentItem() ==
nullptr) {
78 qDebug() << __FILE__ << __LINE__ <<
"Warning: Item can be rendered.";
82 QSGLayer *renderTexture = m_itemTextureHash.
value(referencedItem);
85 if (renderTexture ==
nullptr)
94 renderImage = renderImage.
mirrored(
false,
true);
97 qDebug() << __FILE__ << __LINE__ <<
"Warning: Image is empty.";
104 if (referencedItem ==
nullptr)
112 if (referencedItem ==
nullptr)
120 if (referencedItem ==
nullptr)
129 if (referencedItem ==
nullptr)
137 if (referencedItem ==
nullptr)
149 switch (anchorLine) {
174 return anchorNameList.contains(
name);
194 const auto childItems = fromItem->
childItems();
291 QObject *targetObject =
nullptr;
305 targetObject = anchorLine.
item;
345 while (componentAttached) {
346 if (componentAttached->
parent())
347 if (componentAttached->
parent() ==
object)
350 componentAttached = componentAttached->
next();
ComponentCompleteDisabler()
~ComponentCompleteDisabler()
QGraphicsWidget * window() const
iterator begin()
Returns an \l{STL-style iterators}{STL-style iterator} pointing to the first item in the hash.
T take(const Key &key)
Removes the item with the key from the hash and returns the value associated with it.
bool contains(const Key &key) const noexcept
Returns true if the hash contains an item with the key; otherwise returns false.
T value(const Key &key) const noexcept
iterator end() noexcept
Returns an \l{STL-style iterators}{STL-style iterator} pointing to the imaginary item after the last ...
iterator insert(const Key &key, const T &value)
Inserts a new item with the key and a value of value.
QSize size() const
Returns the size of the image, i.e.
QImage mirrored(bool horizontally=false, bool vertically=true) const &
qsizetype size() const noexcept
void reserve(qsizetype size)
void append(parameter_type t)
QObject * parent() const
Returns a pointer to the parent object.
\inmodule QtCore\reentrant
QQmlComponentAttached * next() const
static QQmlRefPointer< QQmlContextData > get(QQmlContext *context)
void refreshExpressions()
The QQmlContext class defines a context within a QML engine.
static QQmlData * get(QObjectPrivate *priv, bool create)
static void activateDesignerMode()
The QQmlProperty class abstracts accessing properties on objects created from QML.
bool isValid() const
Returns true if the QQmlProperty refers to a valid property, otherwise false.
QVariant read() const
Returns the property value.
static void disableComponentComplete()
static void enableComponentComplete()
QQuickAnchors::Anchor anchorLine
void resetVerticalCenter()
QQuickAnchorLine horizontalCenter
Anchors usedAnchors() const
QQuickAnchorLine baseline
QQuickAnchorLine verticalCenter
void resetHorizontalCenter()
static QTransform parentTransform(QQuickItem *referencedItem)
static QPair< QString, QObject * > anchorLineTarget(QQuickItem *item, const QString &name, QQmlContext *context)
void refFromEffectItem(QQuickItem *referencedItem, bool hide=true)
static QTransform windowTransform(QQuickItem *referencedItem)
static void enableComponentComplete()
static bool hasAnchor(QQuickItem *item, const QString &name)
static bool isDirty(QQuickItem *referencedItem, DirtyType dirtyType)
static bool isValidHeight(QQuickItem *item)
static void emitComponentCompleteSignalForAttachedProperty(QObject *item)
static void updateDirtyNode(QQuickItem *item)
static void polishItems(QQuickWindow *window)
static bool isComponentComplete(QQuickItem *item)
static void resetDirty(QQuickItem *referencedItem)
QImage renderImageForItem(QQuickItem *referencedItem, const QRectF &boundingRect, const QSize &imageSize)
static void activateDesignerMode()
static void disableComponentComplete()
static QQuickItem * anchorFillTargetItem(QQuickItem *item)
static void setRootItem(QQuickView *view, QQuickItem *item)
static void addDirty(QQuickItem *referencedItem, DirtyType dirtyType)
static bool isValidWidth(QQuickItem *item)
static bool isAnchoredTo(QQuickItem *fromItem, QQuickItem *toItem)
static bool areChildrenAnchoredTo(QQuickItem *fromItem, QQuickItem *toItem)
static QQuickItem * anchorCenterInTargetItem(QQuickItem *item)
static void refreshExpressions(QQmlContext *context)
static void resetAnchor(QQuickItem *item, const QString &name)
static QList< QObject * > statesForItem(QQuickItem *item)
static int borderWidth(QQuickItem *item)
void derefFromEffectItem(QQuickItem *referencedItem, bool unhide=true)
QQuickAnchors * anchors() const
\qmlpropertygroup QtQuick::Item::anchors \qmlproperty AnchorLine QtQuick::Item::anchors....
void derefFromEffectItem(bool unhide)
QTransform itemToWindowTransform() const
Returns a transform that maps points from item space into window space.
void itemToParentTransform(QTransform *) const
Modifies t with this item's local transform relative to its parent.
void removeFromDirtyList()
quint32 componentComplete
void refFromEffectItem(bool hide)
QQuickStateGroup * _states()
static QQuickItemPrivate * get(QQuickItem *item)
The QQuickItem class provides the most basic of all visual items in \l {Qt Quick}.
QList< QQuickItem * > childItems() const
Returns the children of this item.
QQuickWindow * window() const
Returns the window in which this item is rendered.
QQuickItem * parentItem() const
QQuickPen * border
\qmlproperty bool QtQuick::Rectangle::antialiasing
QQmlListProperty< QQuickState > states
static QQuickViewPrivate * get(QQuickView *view)
bool setRootObject(QObject *)
The QQuickView class provides a window for displaying a Qt Quick user interface.
static QQuickWindowPrivate * get(QQuickWindow *c)
QSGRenderContext * context
void updateDirtyNode(QQuickItem *)
\qmltype Window \instantiates QQuickWindow \inqmlmodule QtQuick
\inmodule QtCore\reentrant
virtual QSGLayer * createLayer(QSGRenderContext *renderContext)=0
virtual bool updateTexture()=0
Call this function to explicitly update the dynamic texture.
virtual Q_SLOT void markDirtyTexture()=0
virtual QImage toImage() const =0
virtual void setItem(QSGNode *item)=0
virtual void setSize(const QSize &pixelSize)=0
virtual void setRect(const QRectF &logicalRect)=0
QSGContext * sceneGraphContext() const
constexpr QSize toSize() const noexcept
Returns an integer based copy of this size.
constexpr bool isEmpty() const noexcept
Returns true if either of the width and height is less than or equal to 0; otherwise returns false.
\macro QT_RESTRICTED_CAST_FROM_ASCII
Combined button and popup list for selecting options.
std::pair< T1, T2 > QPair
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei imageSize
static const QRectF boundingRect(const QPointF *points, int pointCount)
QString propertyNameForAnchorLine(const QQuickAnchors::Anchor &anchorLine)
bool isValidAnchorName(const QString &name)
QQuickAnchors * anchors(QQuickItem *item)
QQuickAnchors::Anchor anchorLineFlagForName(const QString &name)
#define Q_ASSERT_X(cond, x, msg)
QLatin1StringView QLatin1String