qskinny/doc/classes/QskQuickItem.dox

728 lines
21 KiB
Plaintext
Raw Normal View History

2020-12-08 11:02:57 +01:00
/*!
2020-12-12 14:05:09 +01:00
\class QskQuickItem QskQuickItem.h
2021-01-25 11:06:01 +01:00
2021-02-01 10:09:03 +01:00
\ingroup Framework
2021-01-25 11:06:01 +01:00
2021-03-03 08:24:51 +01:00
QskQuickItem completes the C++ API of QQuickItem and re-establishs basic
2021-02-02 10:15:29 +01:00
concepts like events. It also offers better control over the operations
happening in the update cycle.
2020-12-08 11:02:57 +01:00
*/
2020-12-12 14:05:09 +01:00
/*!
2021-02-09 08:13:20 +01:00
\enum QskQuickItem::UpdateFlag
2021-01-25 11:06:01 +01:00
Qt/Quick classes have a tendency to update items too early
and too often. To avoid processing of unwanted operations
QskQuickItem implements a couple of modifications, that
can be en/disabled individually.
2021-03-04 09:15:19 +01:00
\sa updateFlags(), resetUpdateFlags()
testUpdateFlag(), setUpdateFlag(), resetUpdateFlag()
2021-02-09 08:13:20 +01:00
\var QskQuickItem::UpdateFlag QskQuickItem::DeferredUpdate
2021-01-25 11:06:01 +01:00
2021-02-23 08:14:07 +01:00
Creating of scene graph nodes is blocked when being invisible.
2021-01-25 11:06:01 +01:00
2021-02-02 10:15:29 +01:00
The default implementation of Qt/Quick creates scene graph nodes for all items
in the scene what might become a significant factor for the startup performance
( and memory footprint ) of large user interfaces.
Instead of trying to work around these problems by asynchrounous instantiation
strategies ( QQmlIncubator ) the DeferredUpdate flag offers a much simpler
and obvious solution: don't instantiate before really needed.
2021-02-09 12:24:49 +01:00
\saqt QQuickItem::isVisible()
2021-02-02 10:15:29 +01:00
\note Some more advanced algorithms have not yet been implemented,
such as viewport frustrum culling (i.e. hiding items outside of the
window geometry).
2021-01-25 11:06:01 +01:00
2021-02-09 08:13:20 +01:00
\var QskQuickItem::UpdateFlag QskQuickItem::DeferredPolish
2021-01-25 11:06:01 +01:00
2021-02-09 12:24:49 +01:00
Polishing an item is blocked when being invisible.
2021-01-25 11:06:01 +01:00
F.e for all items being derived from QskControl the layout calculations
happen during polishing.
2021-02-09 12:24:49 +01:00
\saqt QQuickItem::updatePolish(), QQuickItem::polish()
2021-02-02 10:15:29 +01:00
2021-02-09 08:13:20 +01:00
\var QskQuickItem::UpdateFlag QskQuickItem::DeferredLayout
2021-01-25 11:06:01 +01:00
2021-02-23 08:14:07 +01:00
Recalculations of the implicitSize are blocked until being explicitly requested.
2021-01-25 11:06:01 +01:00
2021-03-03 08:24:51 +01:00
When being enabled the item indicates layout relevant changes by
2021-01-25 11:06:01 +01:00
sending a QEvent::LayoutRequest ( similar to QWidget ) to its parent item
2021-03-03 08:24:51 +01:00
without recalculating the actual size hints ( f.e the implicitSize ).
2021-01-25 11:06:01 +01:00
When having layout code that relies on binding the implicit width/height
the QskQuickItem::DeferredLayout flag needs to be disabled.
2021-02-02 10:15:29 +01:00
\note All layout classes offered by the Qt/Quick modules of the Qt Company
( f.e anchors ) do require immediate updates of the implicit size.
2021-01-25 11:06:01 +01:00
2021-02-02 10:15:29 +01:00
\sa QskQuickItem::resetImplicitSize()
2021-02-09 12:24:49 +01:00
\saqt QQuickItem::implicitSize()
2021-01-25 11:06:01 +01:00
2021-02-09 08:13:20 +01:00
\var QskQuickItem::UpdateFlag QskQuickItem::CleanupOnVisibility
2021-01-25 11:06:01 +01:00
2021-02-09 12:24:49 +01:00
Delete scene graph nodes, when the item becomes hidden.
2021-01-25 11:06:01 +01:00
Enabling this mode will reduce the memory footprint, but comes at the cost
2021-02-02 10:15:29 +01:00
of having to recreate nodes once the item gets shown again.
2021-01-25 11:06:01 +01:00
2021-02-09 12:24:49 +01:00
\saqt QQuickItem::isVisible()
2021-02-09 08:13:20 +01:00
\var QskQuickItem::UpdateFlag QskQuickItem::PreferRasterForTextures
2021-01-25 11:06:01 +01:00
When creating textures from QskGraphic, prefer the raster paint
engine over the OpenGL paint engine.
2021-02-09 08:13:20 +01:00
\var QskQuickItem::UpdateFlag QskQuickItem::DebugForceBackground
2021-01-25 11:06:01 +01:00
Always fill the background of the item with a random color.
2021-02-03 13:20:46 +01:00
\note This flag is useful when analyzing layouts.
2021-01-25 11:06:01 +01:00
*/
2021-02-01 10:09:03 +01:00
/*!
2021-03-04 09:15:19 +01:00
\property QskQuickItem::geometry
2021-02-01 10:09:03 +01:00
This property holds the geometry of the item relative to its parent item.
2021-03-03 08:24:51 +01:00
When changing the geometry, the item receives a QskEvent::GeometryChange event.
2021-02-01 10:09:03 +01:00
2021-02-02 10:15:29 +01:00
\sa geometryChangeEvent(), geometryChange(), rect
*/
/*!
2021-03-04 09:15:19 +01:00
\property QskQuickItem::rect
2021-02-02 10:15:29 +01:00
2021-03-03 08:24:51 +01:00
This property returns the internal geometry of the item.
It equals QRect(0, 0, width(), height() ).
2021-02-02 10:15:29 +01:00
\sa geometryChangeEvent(), geometryChange(), geometry
2021-02-01 10:09:03 +01:00
*/
/*!
\var QskQuickItem::transparentForPositioners
When transparentForPositioners is set the item indicates, that it should be excluded
from any layout calculations. This flag is actually a concept of QQuickItem, that
has not been exposed to its public API.
\sa isTransparentForPositioner()
*/
/*!
2021-03-04 09:15:19 +01:00
\property QskQuickItem::tabFence
2021-02-01 10:09:03 +01:00
The tabFence flag can be used to create local tab focus chains. It is usually
used in combination with QQuickItem::ItemIsFocusScope.
QskPopup is an example where the focus tab chain is expected to continue
with the first child instead of leaving the popup, when reaching its end.
\sa isTabFence(), QQuickItem::ItemIsFocusScope
2021-02-09 12:24:49 +01:00
\saqt QQuickItem::ItemIsFocusScope
2021-02-01 10:09:03 +01:00
*/
/*!
2021-03-04 09:15:19 +01:00
\property QskQuickItem::visibleToParent
2021-02-01 10:09:03 +01:00
2021-03-03 08:24:51 +01:00
Flag indicating if an item would become visible if its parentItem() is shown.
2021-02-01 10:09:03 +01:00
The implementation relies on the internal explicitVisible flag, that has not
been exposed by the public API of QQuickItem.
In many situations it is important to know if an item has been explicitly hidden
because of a setVisible( false ) or it is a child of an item, that is in
an invisible state. F,e for calculating the size hint for a hidden container
it is necessary to know which children would stay hidden when the container
becomes visible.
2021-02-09 12:24:49 +01:00
\sa isVisibleToParent()
\saqt QQuickItem::setVisible()
2021-02-01 10:09:03 +01:00
*/
/*!
2021-03-04 09:15:19 +01:00
\property QskQuickItem::polishOnResize
2021-02-01 10:09:03 +01:00
When polishOnResize is set QQuickItem::polish() will be called automatically
2021-02-23 08:14:07 +01:00
whenever the size of the item has been changed. This is usually necessary
2021-02-01 10:09:03 +01:00
when the item is a container and the layout of its children depends on the
size of the container.
\sa QskControl::updateLayout(), QskControl::autoLayoutChildren
*/
/*!
2021-03-04 09:15:19 +01:00
\property QskQuickItem::initiallyPainted
2021-02-01 10:09:03 +01:00
Status flag indicating that there has already been a call
of QQuickItem::updatePaintNode() since the item has become visible.
Before each initial call of updatePaintNode() the specific
hook aboutToShow() is called, that is intended to be overloaded.
\sa isInitiallyPainted(), aboutToShow()
*/
2021-01-25 11:06:01 +01:00
2021-02-02 10:15:29 +01:00
/*!
2021-03-04 09:15:19 +01:00
\property QskQuickItem::hasChildItems
2021-02-02 10:15:29 +01:00
A property indicating if the item has child items.
2021-02-09 12:24:49 +01:00
\saqt QQuickItem::childItems(), QQuickItem::parentItem()
*/
/*!
2021-03-04 09:15:19 +01:00
\property QskQuickItem::updateFlags
2021-02-09 12:24:49 +01:00
2021-03-03 08:24:51 +01:00
QskQuickItem offers several tweaks to the Qt/Quick update cycle,
2021-02-09 12:24:49 +01:00
that can be en/disabled individually.
2021-03-03 08:24:51 +01:00
The flags are a combination from bits that have been explicitly set
by setUpdateFlag() and those being derived from the aapplication
wide default settings, that can be set with QskSetup.
2021-02-09 12:24:49 +01:00
\sa QskQuickItem::UpdateFlag, QskQuickItem::updateFlags(), QskSetup::itemUpdateFlags()
2021-02-02 10:15:29 +01:00
*/
2021-01-25 11:06:01 +01:00
/*!
\fn QskQuickItem::QskQuickItem
2021-02-01 10:09:03 +01:00
Sets the QQuickItem::ItemHasContents flag to true.
2021-01-25 11:06:01 +01:00
*/
*!
\fn QskQuickItem::~QskQuickItem
2021-02-01 10:09:03 +01:00
Sets the componentComplete to false, so that its about-to-delete state is known
2021-02-23 08:14:07 +01:00
when detaching it from parent/window.
2021-01-25 11:06:01 +01:00
*/
/*!
\fn QskQuickItem::className
2021-02-01 10:09:03 +01:00
A convenience wrapper for metaObject()->className()
\return Class name
2021-01-25 11:06:01 +01:00
*/
/*!
\fn QskQuickItem::isVisibleTo
2021-02-01 10:09:03 +01:00
The true case occurs if neither the item itself nor any parent up to but excluding
ancestor has been explicitly hidden.
\param ancestor Ancestor is the parentItem() hierarchy
\return true if this item would become visible if ancestor is shown; otherwise returns false.
\sa visibleToParent
2021-01-25 11:06:01 +01:00
*/
/*!
\fn QskQuickItem::isVisibleToParent
2021-02-02 10:15:29 +01:00
An item might be invisible because it has been explicitly hidden or
one of its ancestors has been hidden. isVisibleToParent() indicates
the first situation.
2021-02-09 12:24:49 +01:00
\return true once setVisible( false ) has been called
2021-02-02 10:15:29 +01:00
2021-03-03 08:24:51 +01:00
\sa visibleToParent
\saqt QQuickItem::setVisible()
2021-01-25 11:06:01 +01:00
*/
/*!
2021-04-23 15:15:18 +02:00
\fn QskQuickItem::hasChildItems() const
2021-01-25 11:06:01 +01:00
2021-02-02 10:15:29 +01:00
\return true, if the item has child items
\sa hasChildItems
2021-01-25 11:06:01 +01:00
*/
/*!
\fn QskQuickItem::setGeometry( qreal, qreal, qreal, qreal )
2021-03-03 08:24:51 +01:00
Set the position and the size of an item
2021-02-02 10:15:29 +01:00
2021-03-03 08:24:51 +01:00
\param x X ( = left ) coordinate relative to the parent item
\param y Y ( = top ) coordinate relative to the parent item
\param width Width
\param height Height
2021-02-02 10:15:29 +01:00
2021-03-03 08:24:51 +01:00
\sa geometry(), geometryChange()
\saqt QQuickItem::size(), QQuickItem::position()
2021-01-25 11:06:01 +01:00
*/
/*!
\fn QskQuickItem::setGeometry( const QRectF& )
2021-02-02 10:15:29 +01:00
Set the position and the size of an item
\param rect Geometry relative to the parent item
2021-03-03 08:24:51 +01:00
\sa geometry(), geometryChange()
\saqt QQuickItem::size(), QQuickItem::position()
2021-01-25 11:06:01 +01:00
*/
/*!
\fn QskQuickItem::geometry() const
2021-03-03 08:24:51 +01:00
\return Position and size relative to the parent item
2021-02-02 10:15:29 +01:00
\sa geometry, setGeometry()
2021-01-25 11:06:01 +01:00
*/
/*!
\fn QskQuickItem::geometryChange
2021-02-02 10:15:29 +01:00
This overloaded notifier calls QQuickItem::polish() depending on the
polishOnResize() flag and forwards the notification to the event queue.
\sa geometryChangeEvent(), polishOnResize()
2021-01-25 11:06:01 +01:00
*/
/*!
2021-02-03 13:20:46 +01:00
\fn QskQuickItem::rect() const
2021-01-25 11:06:01 +01:00
2021-03-03 08:24:51 +01:00
\return Internal geometry of the item, where the position is always at ( 0, 0 )
2021-02-02 10:15:29 +01:00
\sa geometry
2021-01-25 11:06:01 +01:00
*/
/*!
\fn QskQuickItem::implicitSize
2021-02-02 10:15:29 +01:00
Qt/Quick offers an oversimplified layout system of Qt/Quick that is based on the
property bindings of implicit width and height. QSkinny restablishs a layout
system that can compete with what is available in the Qt/Widgets or Qt/Graphics
technologies.
In the QSkinny layout system the implicitSize is a synonym for what is also known
as sizeHint or preferredSize.
\return Implicit size,
\note Layout code that relies on property bindings of the implicit width a height
needs to disable the QskQuickItem::DeferredLayout flag
2021-02-09 12:24:49 +01:00
\sa QskControl::preferredSize(), QskControl::sizeHint()
2021-03-03 08:24:51 +01:00
\saqt QQuickItem::implicitWidth(), QQuickItem::implicitHeight()
2021-01-25 11:06:01 +01:00
*/
/*!
\fn QskQuickItem::setPolishOnResize
2021-03-03 08:24:51 +01:00
Set or clear the polishOnResize flag.
2021-02-02 10:15:29 +01:00
\sa polishOnResize
2021-01-25 11:06:01 +01:00
*/
/*!
\fn QskQuickItem::polishOnResize() const
2021-03-03 08:24:51 +01:00
\return Value of the polishOnResize flag
\sa setPolishOnResize()
2021-01-25 11:06:01 +01:00
*/
/*!
\fn QskQuickItem::setTransparentForPositioner
2021-03-03 08:24:51 +01:00
Set or clear the transparentForPositioner flag
\sa isTransparentForPositioner()
2021-01-25 11:06:01 +01:00
*/
/*!
\fn QskQuickItem::isTransparentForPositioner
2021-03-03 08:24:51 +01:00
\return Value of the transparentForPositioner flag
\sa transparentForPositioner
2021-01-25 11:06:01 +01:00
*/
/*!
\fn QskQuickItem::setTabFence
2021-03-03 08:24:51 +01:00
Set or clear the tabFence property
\sa isTabFence()
2021-01-25 11:06:01 +01:00
*/
/*!
\fn QskQuickItem::isTabFence
2021-03-03 08:24:51 +01:00
\return Value of the tabFence property
\sa setTransparentForPositioner()
2021-01-25 11:06:01 +01:00
*/
/*!
\fn QskQuickItem::setLayoutMirroring
2021-03-03 08:24:51 +01:00
Change the direction how the content is laid out horizontally.
2021-02-03 13:20:46 +01:00
2021-03-03 08:24:51 +01:00
\param on True enables layoutMirroring
2021-02-03 13:20:46 +01:00
\param childrenInherit If true the mirroring behavior is propagated
to all child items as well.
Changes of this property will be indicated by a QEvent::LayoutDirectionChange.
2021-03-03 08:24:51 +01:00
\sa layoutMirroring, resetLayoutMirroring(), changeEvent()
\note In Qml the parameters are routed through the attached LayoutMirroring property
2021-02-03 13:20:46 +01:00
to have something declarative
2021-01-25 11:06:01 +01:00
*/
/*!
\fn QskQuickItem::resetLayoutMirroring
2021-03-03 08:24:51 +01:00
Clear the layoutMirroring property
2021-02-03 13:20:46 +01:00
2021-03-03 08:24:51 +01:00
\sa setLayoutMirroring(), layoutMirroring
2021-01-25 11:06:01 +01:00
*/
/*!
2021-02-03 13:20:46 +01:00
\fn QskQuickItem::layoutMirroring() const
2021-01-25 11:06:01 +01:00
2021-03-03 08:24:51 +01:00
Direction how the content is layed out horizontally.
2021-02-03 13:20:46 +01:00
If no value has been explicitly assigned it is inherited
2021-03-03 08:24:51 +01:00
from the closest ancestor, where the attribute has been
2021-02-03 13:20:46 +01:00
assigned with the childrenInherit parameter. If such an ancestor
does not exists layoutMirroring is false.
2021-03-03 08:24:51 +01:00
\return Inherited or explicitly assigned value
2021-02-03 13:20:46 +01:00
\sa setLayoutMirroring(), layoutMirroring()
\todo Several controls do not respect this flag
2021-03-03 08:24:51 +01:00
\sa setLayoutMirroring(), resetLayoutMirroring()
2021-02-03 13:20:46 +01:00
\note Several controls do not respect this flag
2021-03-03 08:24:51 +01:00
\note In Qml the parameters are routed through the attached LayoutMirroring property
2021-02-03 13:20:46 +01:00
to have something declarative
2021-01-25 11:06:01 +01:00
*/
/*!
2021-02-09 08:13:20 +01:00
\fn QskQuickItem::resetUpdateFlags
2021-01-25 11:06:01 +01:00
2021-03-03 08:24:51 +01:00
Reset all flags to the default settings
2021-02-09 12:24:49 +01:00
\sa QskSetup::itemUpdateFlags(), updateFlags(), updateFlags
2021-01-25 11:06:01 +01:00
*/
/*!
2021-02-09 12:24:49 +01:00
\fn QskQuickItem::updateFlags() const
2021-01-25 11:06:01 +01:00
2021-03-03 08:24:51 +01:00
\return Flags affecting the item update process
\sa testUpdateFlag(), setUpdateFlag(), updateFlags
2021-01-25 11:06:01 +01:00
*/
/*!
2021-02-09 08:13:20 +01:00
\fn QskQuickItem::setUpdateFlag
2021-01-25 11:06:01 +01:00
2021-03-03 08:24:51 +01:00
QskQuickItem offers several tweaks to the Qt/Quick update cycle,
that can be en/disables individually.
2021-02-09 12:24:49 +01:00
The default settings for these flags are taken from QskSetup::itemUpdateFlags()
2021-03-03 08:24:51 +01:00
When calling setUpdateFlag() the value for the particular flag is decoupled
from the corresponding default bit - even if both bits have the same value.
2021-02-09 12:24:49 +01:00
This can be reverted by calling resetUpdateFlag()
2021-03-03 08:24:51 +01:00
\param flag Flag affecting the item update process
\param on En/Disable the behaviour related to the flag
2021-02-09 12:24:49 +01:00
2021-03-03 08:24:51 +01:00
\sa QskSetup::itemUpdateFlags(), testUpdateFlag(). updateFlags
2021-01-25 11:06:01 +01:00
*/
2020-12-12 14:05:09 +01:00
2021-01-25 11:06:01 +01:00
/*!
2021-02-09 08:13:20 +01:00
\fn QskQuickItem::resetUpdateFlag
2020-12-08 11:02:57 +01:00
2021-03-03 08:24:51 +01:00
Reset the value for flag to the default settings from QskSetup. Future
changes of the corresponding bit with QskSetup::setItemUpdateFlag() will affect
the behaviour of this item.
2021-02-09 12:24:49 +01:00
2021-03-03 08:24:51 +01:00
\param flag Flag affecting the item update process
\sa QskSetup::itemUpdateFlags(), updateFlags(), testUpdateFlag(), updateFlags
2021-01-25 11:06:01 +01:00
*/
2020-12-08 11:02:57 +01:00
2021-01-25 11:06:01 +01:00
/*!
2021-02-09 08:13:20 +01:00
\fn QskQuickItem::testUpdateFlag
2020-12-08 11:02:57 +01:00
2021-03-03 08:24:51 +01:00
\param Flag affecting the item update process
\return true, when the corresponding bit is effective
2021-02-09 12:24:49 +01:00
2021-03-03 08:24:51 +01:00
\sa setUpdateFlag(), QskSetup::itemUpdateFlag(), updateFlags
2021-01-25 11:06:01 +01:00
*/
2020-12-08 11:02:57 +01:00
2021-01-25 11:06:01 +01:00
/*!
2021-02-09 08:13:20 +01:00
\fn QskQuickItem::updateFlagsChanged
2020-12-08 11:02:57 +01:00
2021-03-03 08:24:51 +01:00
Signal indicating, that the effective update flags have changed
2021-02-09 12:24:49 +01:00
2021-03-03 08:24:51 +01:00
\param flags Effective flags, might be derived in parts from QskSetup::itemUpdateFlags()
\sa updateFlags
2021-01-25 11:06:01 +01:00
*/
2020-12-08 11:02:57 +01:00
2021-01-25 11:06:01 +01:00
/*!
\fn QskQuickItem::classBegin
2020-12-08 11:02:57 +01:00
2021-03-03 08:24:51 +01:00
The QML engine initializes an item as being incomplete by
2021-02-23 08:14:07 +01:00
explicitly calling classBegin(). Once the item
2021-02-03 13:20:46 +01:00
has been constructed componentComplete() is called. This way
temporary operations during the construction can be avoided.
In the C++ case the item indicates being complete from
the beginning and both hooks are never called.
2021-03-03 08:24:51 +01:00
The overloaded version calls the base class and has no
2021-02-03 13:20:46 +01:00
purpose beside being an entry point for debugging.
2021-02-09 12:24:49 +01:00
\sa componentComplete()
\saqt QQuickItem::classBegin, QQuickItem::isComponentComplete()
2021-01-25 11:06:01 +01:00
*/
2020-12-08 11:02:57 +01:00
2021-01-25 11:06:01 +01:00
/*!
\fn QskQuickItem::componentComplete
2020-12-08 11:02:57 +01:00
2021-02-03 13:20:46 +01:00
The QML engine initilizes an item as being incomplete by
2021-02-23 08:14:07 +01:00
explicitly calling QQuickItem::classBegin(). Once the item
2021-02-03 13:20:46 +01:00
has been constructed componentComplete() is called. This way
temporary operations during the construction can be avoided.
In the C++ case the item indicates being complete from
the beginning and both hooks are never called.
2021-03-03 08:24:51 +01:00
The overloaded does some sanity checks in debug mode
and calls the base class.
2021-02-03 13:20:46 +01:00
2021-03-03 08:24:51 +01:00
\sa classBegin()
2021-02-09 12:24:49 +01:00
\saqt QQuickItem::isComponentComplete(), QQuickItem::componentComplete
2021-01-25 11:06:01 +01:00
*/
2020-12-08 11:02:57 +01:00
2021-01-25 11:06:01 +01:00
/*!
\fn QskQuickItem::releaseResources
2020-12-08 11:02:57 +01:00
2021-03-03 08:24:51 +01:00
This specific hook is called, when the item is about to be removed
2021-02-03 13:20:46 +01:00
from the window it was previously rendering to.
2021-03-03 08:24:51 +01:00
The implementation stores the values needed for the following QskWindowChangeEvent.
2021-02-03 13:20:46 +01:00
2021-03-03 08:24:51 +01:00
\sa windowChangeEvent()
2021-01-25 11:06:01 +01:00
*/
2020-12-08 11:02:57 +01:00
2021-01-25 11:06:01 +01:00
/*!
\fn QskQuickItem::isPolishScheduled
2020-12-08 11:02:57 +01:00
2021-03-03 08:24:51 +01:00
\return True, if the item will be polished in the next
2021-02-03 13:20:46 +01:00
scene graph update cycle.
2021-03-03 08:24:51 +01:00
\sa isUpdateNodeScheduled()
\saqt QQuickItem::polish()
2021-01-25 11:06:01 +01:00
*/
2020-12-08 11:02:57 +01:00
2021-01-25 11:06:01 +01:00
/*!
\fn QskQuickItem::isUpdateNodeScheduled
2020-12-08 11:02:57 +01:00
2021-03-03 08:24:51 +01:00
\return True, if the item will update the paint node in
2021-02-03 13:20:46 +01:00
the next scene graph update cycle
2020-12-12 14:05:09 +01:00
*/
/*!
2021-01-25 11:06:01 +01:00
\fn QskQuickItem::isInitiallyPainted
2021-02-23 08:14:07 +01:00
\return Value of the initiallyPainted property
2021-03-03 08:24:51 +01:00
\sa initiallyPainted
2021-01-25 11:06:01 +01:00
*/
2020-12-08 11:02:57 +01:00
2021-01-25 11:06:01 +01:00
/*!
\fn QskQuickItem::maybeUnresized
2021-02-09 12:24:49 +01:00
2021-03-03 08:24:51 +01:00
Flag indicating a potential state, where the item is waiting to be
sized by the layout system.
2021-02-09 12:24:49 +01:00
Unfortunately the list of items to-be-polished is not processed
in top/down order and a container might be requested to calculate
2021-03-03 08:24:51 +01:00
the geometries for its children before having a proper size itself.
2021-02-09 12:24:49 +01:00
2021-03-03 08:24:51 +01:00
Some of these situations can be avoided by ignoring these requests
depending on the maybeUnresized flag.
2020-12-12 14:05:09 +01:00
*/
2021-01-25 11:06:01 +01:00
/*!
\fn QskQuickItem::itemFlagsChanged
2021-02-09 12:24:49 +01:00
2021-03-03 08:24:51 +01:00
Signal indicating that at least one if the following attributes has changed:
2021-02-09 12:24:49 +01:00
2021-03-03 08:24:51 +01:00
- transparentForPositioners
- tabFence
- polishOnResize
2021-01-25 11:06:01 +01:00
*/
/*!
\fn QskQuickItem::show
2021-03-03 08:24:51 +01:00
An alternative way to call setVisible( true ).
Useful for signal/slot connections
2021-02-03 13:20:46 +01:00
2021-03-03 08:24:51 +01:00
\sa hide()
\saqt QQuickItem::setVisible()
2021-01-25 11:06:01 +01:00
*/
/*!
\fn QskQuickItem::hide
2021-03-03 08:24:51 +01:00
An alternative way to call setVisible( false ).
Useful for signal/slot connections
2021-02-03 13:20:46 +01:00
2021-03-03 08:24:51 +01:00
\sa show()
\saqt QQuickItem::setVisible()
2021-01-25 11:06:01 +01:00
*/
/*!
2021-02-15 09:17:29 +01:00
\fn QskQuickItem::setHidden
2021-01-25 11:06:01 +01:00
2021-02-15 09:17:29 +01:00
Convenience function, equivalent to setVisible( !on ).
\saqt QQuickItem::setVisible()
*/
2021-02-03 13:20:46 +01:00
2021-02-15 09:17:29 +01:00
/*!
\fn QskQuickItem::setDisabled
2021-02-03 13:20:46 +01:00
2021-03-03 08:24:51 +01:00
Convenience function, equivalent to setEnabled( !on ).
2021-02-15 09:17:29 +01:00
\saqt QQuickItem::setEnabled()
2021-01-25 11:06:01 +01:00
*/
/*!
\fn QskQuickItem::resetImplicitSize
2021-03-03 08:24:51 +01:00
Notifies the layout system that attributes affecting the layout
2021-02-03 13:20:46 +01:00
system have changed.
If the QskQuickItem::DeferredLayout flag is enabled ( = default )
the cached implicitSize() gets invalidated and a QEvent::LayoutRequest is sent
to the parent item ( like QWidget::updateGeometry ).
Otherwise the implicitSize() gets recalculated and layout updates can
be executed using property bindings.
2021-01-25 11:06:01 +01:00
*/
/*!
\fn QskQuickItem::event
2021-02-09 12:24:49 +01:00
QskQuickItem handles the additional type of events.
2021-03-03 08:24:51 +01:00
For some reason the QQuick classes introduced proprietory notfier hooks
instead of using the well established and powerful concept of events.
QskQuickItem tries to revert this decision by mapping notifications
to events, when possible.
The following notification events are added by QSkinny - usually with a
very similar to how they are used known for Qt/Widgets:
- QEvent::ContentsRectChange
- QEvent::LocaleChange
- QEvent::ParentChange
- QEvent::EnabledChange
- QEvent::ReadOnlyChange
- QEvent::LayoutDirectionChange
- QEvent::LayoutRequest
Furthermore events derived from QskEvent are used.
\param event Qt event
2021-01-25 11:06:01 +01:00
*/
/*!
\fn QskQuickItem::changeEvent
2021-02-09 12:24:49 +01:00
2021-03-03 08:24:51 +01:00
This event handler can be reimplemented to handle certain state changes:
- QEvent::StyleChange
- QEvent::ContentsRectChange
- QEvent::FontChange
- QEvent::PaletteChange
- QEvent::ReadOnlyChange
- QEvent::EnabledChange
- QEvent::LocaleChange
- QEvent::ParentChange
- QEvent::LayoutDirectionChange
2021-02-09 12:24:49 +01:00
2021-03-03 08:24:51 +01:00
\param event Qt event
2021-02-09 12:24:49 +01:00
2021-03-03 08:24:51 +01:00
\note QEvent::PaletteChange, QEvent::FontChange are handled, but both event types
do not fit to the themeing concept of QSkinny and are not posted. However
it is possible to post them if an application has a concept, where they
make sense.
2021-01-25 11:06:01 +01:00
*/
/*!
\fn QskQuickItem::geometryChangeEvent
2021-02-01 10:09:03 +01:00
For no known reason QQuickItem propagates changes of position and size
by calling QQuickItem::geometryChange(), instead of using events.
QskQuickItem reestablished the more powerful concept of events by sending/posting
events, that can be preprocessed by event filtering.
\param event Event indicating the geometry change
2021-02-09 12:24:49 +01:00
\sa geometryChange()
\saqt QObject::installEventFilter()
2021-01-25 11:06:01 +01:00
*/
2021-02-01 10:09:03 +01:00
2021-01-25 11:06:01 +01:00
/*!
\fn QskQuickItem::windowChangeEvent
2021-03-03 08:24:51 +01:00
This event handler can be reimplemented to handle situations, where
an item is added, removed or transferred between windows. It corresponds
to the QQuickItem::ItemSceneChange notification, but is more convenient:
2021-02-09 12:24:49 +01:00
- being an event it can be processed by event filtering
- the previous window is available
2021-03-03 08:24:51 +01:00
\param event Event with the old/new windows
2021-01-25 11:06:01 +01:00
*/
/*!
\fn QskQuickItem::itemChange
2021-02-09 12:24:49 +01:00
For no obvious reason Qt/Quick has introduced an additional callback
mechanism beside events and signals.
2021-03-03 08:24:51 +01:00
\param change Indicator, to identify what has changed
2021-02-09 12:24:49 +01:00
\param changeData Extra information relating to the change
2021-03-03 08:24:51 +01:00
\note It is recommended to avoid using this type of notifications where possible.
2021-02-09 12:24:49 +01:00
Netter rely on overloading the corresponding event handlers, what allows
application code to make use of convenient and well established concepts
like event filtering ( QObject::installEventFilter() ).
\note If you re-implement this method in a subclass, be sure to call
the overloaded method of the base class.
2021-03-03 08:24:51 +01:00
\sa event()
\saqt QQuickItem::itemChange()
2021-01-25 11:06:01 +01:00
*/
/*!
2021-02-09 12:24:49 +01:00
\fn QskQuickItem::aboutToShow
2021-01-25 11:06:01 +01:00
2021-02-01 10:09:03 +01:00
A specific hook that is intended to be overloaded by controls that need
to do some specific operations, when an item is painted the first time
2021-02-23 08:14:07 +01:00
after becoming visible.
2021-02-01 10:09:03 +01:00
The default implementation is a no operation.
2021-02-09 12:24:49 +01:00
\sa initiallyPainted
\saqt QQuickItem::setVisible()
2021-01-25 11:06:01 +01:00
*/
2021-03-04 09:15:19 +01:00
/*!
\fn QskQuickItem::mouseUngrabEvent
Notification, that is overloaded for debuging purposes, without
doing anything beside calling the base class.
\saqt QQuickItem::mouseUngrabEvent
*/
/*!
\fn QskQuickItem::touchUngrabEvent
Notification, that is overloaded for debuging purposes, without
doing anything beside calling the base class.
\saqt QQuickItem::touchUngrabEvent
*/