16class QSK_EXPORT
QskItem :
public QQuickItem
20 Q_PROPERTY( QRectF geometry READ geometry WRITE setGeometry )
21 Q_PROPERTY( QRectF rect READ rect )
23 Q_PROPERTY(
bool tabFence READ isTabFence
24 WRITE setTabFence NOTIFY itemFlagsChanged )
26 Q_PROPERTY(
bool polishOnResize READ polishOnResize
27 WRITE setPolishOnResize NOTIFY itemFlagsChanged FINAL )
29 Q_PROPERTY(
bool polishOnParentResize READ polishOnParentResize
30 WRITE setPolishOnParentResize NOTIFY itemFlagsChanged FINAL )
32 Q_PROPERTY( Qt::FocusPolicy focusPolicy READ focusPolicy
33 WRITE setFocusPolicy NOTIFY focusPolicyChanged )
35 Q_PROPERTY(
bool wheelEnabled READ isWheelEnabled
36 WRITE setWheelEnabled NOTIFY wheelEnabledChanged )
38 Q_PROPERTY(
bool visibleToParent READ isVisibleToParent )
39 Q_PROPERTY(
bool hasChildItems READ hasChildItems )
40 Q_PROPERTY(
bool initiallyPainted READ isInitiallyPainted )
42 Q_PROPERTY( UpdateFlags updateFlags READ updateFlags NOTIFY updateFlagsChanged )
44 using Inherited = QQuickItem;
49 DeferredUpdate = 1 << 0,
50 DeferredPolish = 1 << 1,
51 DeferredLayout = 1 << 2,
52 CleanupOnVisibility = 1 << 3,
54 PreferRasterForTextures = 1 << 4,
56 DebugForceBackground = 1 << 7
60 Q_DECLARE_FLAGS( UpdateFlags, UpdateFlag )
64 const char* className()
const;
66 bool isVisibleTo(
const QQuickItem* )
const;
67 bool isVisibleToParent()
const;
69 bool hasChildItems()
const;
72 QSizeF implicitSize()
const;
74 void setGeometry( qreal x, qreal y, qreal width, qreal height );
75 void setGeometry(
const QPointF&,
const QSizeF& );
76 QRectF geometry()
const;
78 using QQuickItem::setPosition;
79 using QQuickItem::setSize;
81 void setPosition( qreal x, qreal y );
82 void setSize( qreal width, qreal height );
84 void setPolishOnResize(
bool );
85 bool polishOnResize()
const;
87 void setPolishOnParentResize(
bool );
88 bool polishOnParentResize()
const;
90 void setFocusPolicy( Qt::FocusPolicy );
91 Qt::FocusPolicy focusPolicy()
const;
93 void setTabFence(
bool );
94 bool isTabFence()
const;
96 void setWheelEnabled(
bool );
97 bool isWheelEnabled()
const;
99 void setLayoutMirroring(
bool on,
bool childrenInherit =
false );
100 void resetLayoutMirroring();
101 bool layoutMirroring()
const;
103 void resetUpdateFlags();
104 UpdateFlags updateFlags()
const;
106 void setUpdateFlag( UpdateFlag,
bool on =
true );
107 void resetUpdateFlag( UpdateFlag );
108 bool testUpdateFlag( UpdateFlag )
const;
110 void classBegin()
override;
111 void componentComplete()
override;
112 void releaseResources()
override;
114 bool isPolishScheduled()
const;
115 bool isUpdateNodeScheduled()
const;
116 bool isInitiallyPainted()
const;
118 bool maybeUnresized()
const;
121 void wheelEnabledChanged(
bool );
122 void focusPolicyChanged( Qt::FocusPolicy );
128 void setGeometry(
const QRectF& );
133 void setHidden(
bool );
134 void setDisabled(
bool );
136 void resetImplicitSize();
140 void setVisible(
bool );
141 void setEnabled(
bool );
145 QskItem( QskItemPrivate&, QQuickItem* =
nullptr );
147 bool event( QEvent* )
override;
149 virtual void changeEvent( QEvent* );
153 void mouseUngrabEvent()
override;
154 void touchUngrabEvent()
override;
156#if QT_VERSION < QT_VERSION_CHECK( 6, 0, 0 )
157 void windowDeactivateEvent()
override;
160 void itemChange( ItemChange,
const ItemChangeData& )
override;
161#if QT_VERSION >= QT_VERSION_CHECK( 6, 0, 0 )
162 void geometryChange(
const QRectF&,
const QRectF& )
override;
165 void geometryChanged(
const QRectF&,
const QRectF& )
override final;
166 virtual void geometryChange(
const QRectF&,
const QRectF& );
169 virtual void aboutToShow();
173 QRectF boundingRect() const override final {
return rect(); }
180 void childrenRect() =
delete;
182 void setActiveFocusOnTab(
bool ) =
delete;
183 void applyUpdateFlag( UpdateFlag,
bool on );
185 QSGNode* updatePaintNode( QSGNode*, UpdatePaintNodeData* )
override final;
186 virtual QSGNode* updateItemPaintNode( QSGNode* );
188 void updatePolish() override final;
189 virtual
void updateItemPolish();