QSkinny 0.8.0
C++/Qt UI toolkit
Loading...
Searching...
No Matches
QskItem Class Reference

#include <QskItem.h>

Detailed Description

QskItem completes the C++ API of QQuickItem and re-establishs basic concepts like events. It also offers better control over the operations happening in the update cycle.

Definition at line 16 of file QskItem.h.

Inheritance diagram for QskItem:

Public Types

enum  UpdateFlag {
  DeferredUpdate = 1 << 0 , DeferredPolish = 1 << 1 , DeferredLayout = 1 << 2 , CleanupOnVisibility = 1 << 3 ,
  PreferRasterForTextures = 1 << 4 , DebugForceBackground = 1 << 7
}
 

Public Slots

void setGeometry (const QRectF &)
 
void show ()
 
void hide ()
 
void setHidden (bool)
 
void setDisabled (bool)
 
void resetImplicitSize ()
 

Signals

void wheelEnabledChanged (bool)
 
void focusPolicyChanged (Qt::FocusPolicy)
 
void itemFlagsChanged ()
 
void updateFlagsChanged (UpdateFlags)
 

Public Member Functions

const char * className () const
 
bool isVisibleTo (const QQuickItem *) const
 
bool isVisibleToParent () const
 
bool hasChildItems () const
 
QRectF rect () const
 
QSizeF implicitSize () const
 
void setGeometry (qreal x, qreal y, qreal width, qreal height)
 
void setGeometry (const QPointF &, const QSizeF &)
 
QRectF geometry () const
 
void setPosition (qreal x, qreal y)
 
void setSize (qreal width, qreal height)
 
void setPolishOnResize (bool)
 
bool polishOnResize () const
 
void setPolishOnParentResize (bool)
 
bool polishOnParentResize () const
 
void setFocusPolicy (Qt::FocusPolicy)
 
Qt::FocusPolicy focusPolicy () const
 
void setTabFence (bool)
 
bool isTabFence () const
 
void setWheelEnabled (bool)
 
bool isWheelEnabled () const
 
void setLayoutMirroring (bool on, bool childrenInherit=false)
 
void resetLayoutMirroring ()
 
bool layoutMirroring () const
 
void resetUpdateFlags ()
 
UpdateFlags updateFlags () const
 
void setUpdateFlag (UpdateFlag, bool on=true)
 
void resetUpdateFlag (UpdateFlag)
 
bool testUpdateFlag (UpdateFlag) const
 
void classBegin () override
 
void componentComplete () override
 
void releaseResources () override
 
bool isPolishScheduled () const
 
bool isUpdateNodeScheduled () const
 
bool isInitiallyPainted () const
 
bool maybeUnresized () const
 

Protected Member Functions

 QskItem (QskItemPrivate &, QQuickItem *=nullptr)
 
bool event (QEvent *) override
 
virtual void changeEvent (QEvent *)
 
virtual void geometryChangeEvent (QskGeometryChangeEvent *)
 
virtual void windowChangeEvent (QskWindowChangeEvent *)
 
void mouseUngrabEvent () override
 
void touchUngrabEvent () override
 
void itemChange (ItemChange, const ItemChangeData &) override
 
void geometryChange (const QRectF &, const QRectF &) override
 
virtual void aboutToShow ()
 

Properties

QRectF geometry
 
QRectF rect
 
bool tabFence
 
bool polishOnResize
 
bool polishOnParentResize
 
Qt::FocusPolicy focusPolicy
 
bool wheelEnabled
 
bool visibleToParent
 
bool hasChildItems
 
bool initiallyPainted
 
UpdateFlags updateFlags
 

Member Enumeration Documentation

◆ UpdateFlag

Qt/Quick classes have a tendency to update items too early and too often. To avoid processing of unwanted operations QskItem implements a couple of modifications, that can be en/disabled individually.

See also
updateFlags(), resetUpdateFlags() testUpdateFlag(), setUpdateFlag(), resetUpdateFlag()
Enumerator
DeferredUpdate 
Creating of scene graph nodes is blocked when being invisible.

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.

\saqt QQuickItem::isVisible()

Note
Some more advanced algorithms have not yet been implemented, such as viewport frustrum culling (i.e. hiding items outside of the window geometry).
DeferredPolish 
Polishing an item is blocked when being invisible.
F.e for all items being derived from QskControl the layout calculations
happen during polishing.

\saqt QQuickItem::updatePolish(), QQuickItem::polish()

DeferredLayout 
Recalculations of the implicitSize are blocked until being explicitly requested. 

When being enabled the item indicates layout relevant changes by
sending a QEvent::LayoutRequest ( similar to QWidget ) to its parent item
without recalculating the actual size hints ( f.e the implicitSize ).

When having layout code that relies on binding the implicit width/height
the QskItem::DeferredLayout flag needs to be disabled.
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.
See also
QskItem::resetImplicitSize() \saqt QQuickItem::implicitSize()
CleanupOnVisibility 
Delete scene graph nodes, when the item becomes hidden.
Enabling this mode will reduce the memory footprint, but comes at the cost
of having to recreate nodes once the item gets shown again.

\saqt QQuickItem::isVisible()

PreferRasterForTextures 
When creating textures from QskGraphic, prefer the raster paint
engine over the OpenGL paint engine.
DebugForceBackground 
Always fill the background of the item with a random color.
Note
This flag is useful when analyzing layouts.

Definition at line 47 of file QskItem.h.

Constructor & Destructor Documentation

◆ ~QskItem()

QskItem::~QskItem ( )
override

Definition at line 244 of file QskItem.cpp.

◆ QskItem()

QskItem::QskItem ( QskItemPrivate &  dd,
QQuickItem *  parent = nullptr 
)
protected

Sets the QQuickItem::ItemHasContents flag to true.

Definition at line 232 of file QskItem.cpp.

Member Function Documentation

◆ aboutToShow()

void QskItem::aboutToShow ( )
protectedvirtual

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 after becoming visible.

The default implementation is a no operation.

See also
initiallyPainted \saqt QQuickItem::setVisible()

Reimplemented in QskMenu, QskPopup, and QskSlider.

Definition at line 1091 of file QskItem.cpp.

◆ boundingRect()

QRectF QskItem::boundingRect ( ) const
inlinefinaloverrideprivate

Definition at line 173 of file QskItem.h.

◆ changeEvent()

void QskItem::changeEvent ( QEvent *  )
protectedvirtual

This event handler can be reimplemented to handle certain state changes:

- QEvent::StyleChange
- QEvent::ContentsRectChange
- QEvent::ReadOnlyChange
- QEvent::EnabledChange
- QEvent::LocaleChange
- QEvent::ParentChange
- QEvent::LayoutDirectionChange
Parameters
eventQt event

Reimplemented in QskCheckBox, QskGraphicLabel, QskListView, QskPushButton, QskStatusIndicator, QskTabButton, QskTextLabel, and QskDialogButton.

Definition at line 859 of file QskItem.cpp.

◆ classBegin()

void QskItem::classBegin ( )
override

The QML engine initializes an item as being incomplete by explicitly calling classBegin(). Once the item 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.

The overloaded version calls the base class and has no purpose beside being an entry point for debugging.

See also
componentComplete() \saqt QQuickItem::classBegin, QQuickItem::isComponentComplete()

Definition at line 267 of file QskItem.cpp.

◆ className()

const char * QskItem::className ( ) const

A convenience wrapper for metaObject()->className()

Returns
Class name

Definition at line 262 of file QskItem.cpp.

◆ componentComplete()

void QskItem::componentComplete ( )
override

The QML engine initilizes an item as being incomplete by explicitly calling QQuickItem::classBegin(). Once the item 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.

The overloaded does some sanity checks in debug mode and calls the base class.

See also
classBegin() \saqt QQuickItem::isComponentComplete(), QQuickItem::componentComplete

Definition at line 272 of file QskItem.cpp.

◆ event()

bool QskItem::event ( QEvent *  event)
overrideprotected

QskItem handles the additional type of events.

For some reason the QQuick classes introduced proprietory notfier hooks instead of using the well established and powerful concept of events. QskItem 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.

Parameters
eventQt event

Definition at line 736 of file QskItem.cpp.

◆ focusPolicy()

Qt::FocusPolicy QskItem::focusPolicy ( ) const

Definition at line 446 of file QskItem.cpp.

◆ geometry()

QRectF QskItem::geometry ( ) const
Returns
Position and size relative to the parent item
See also
geometry, setGeometry()

Definition at line 394 of file QskItem.cpp.

◆ geometryChange()

void QskItem::geometryChange ( const QRectF &  newGeometry,
const QRectF &  oldGeometry 
)
overrideprotected

This overloaded notifier calls QQuickItem::polish() depending on the polishOnResize() flag and forwards the notification to the event queue.

See also
geometryChangeEvent(), polishOnResize()

Definition at line 1024 of file QskItem.cpp.

◆ geometryChangeEvent()

void QskItem::geometryChangeEvent ( QskGeometryChangeEvent )
protectedvirtual

For no known reason QQuickItem propagates changes of position and size by calling QQuickItem::geometryChange(), instead of using events.

QskItem reestablished the more powerful concept of events by sending/posting events, that can be preprocessed by event filtering.

Parameters
eventEvent indicating the geometry change
See also
geometryChange() \saqt QObject::installEventFilter()

Reimplemented in QskGraphicLabel, QskScrollBox, QskSubWindowArea, QskGridBox, and QskLinearBox.

Definition at line 855 of file QskItem.cpp.

◆ hasChildItems()

bool QskItem::hasChildItems ( ) const
inline
Returns
true, if the item has child items
See also
hasChildItems

Definition at line 194 of file QskItem.h.

◆ hide

void QskItem::hide ( )
slot

An alternative way to call setVisible( false ). Useful for signal/slot connections

See also
show() \saqt QQuickItem::setVisible()

Definition at line 315 of file QskItem.cpp.

◆ implicitSize()

QSizeF QskItem::implicitSize ( ) const
inline

Qt/Quick offers an oversimplified layout system 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.

Returns
Implicit size,
Note
Layout code that relies on property bindings of the implicit width a height needs to disable the QskItem::DeferredLayout flag
See also
QskControl::preferredSize(), QskControl::sizeHint() \saqt QQuickItem::implicitWidth(), QQuickItem::implicitHeight()

Definition at line 219 of file QskItem.h.

◆ isInitiallyPainted()

bool QskItem::isInitiallyPainted ( ) const
Returns
Value of the initiallyPainted property
See also
initiallyPainted

Definition at line 578 of file QskItem.cpp.

◆ isPolishScheduled()

bool QskItem::isPolishScheduled ( ) const
Returns
True, if the item will be polished in the next scene graph update cycle.
See also
isUpdateNodeScheduled() \saqt QQuickItem::polish()

Definition at line 565 of file QskItem.cpp.

◆ isTabFence()

bool QskItem::isTabFence ( ) const
Returns
Value of the tabFence property
See also
setTransparentForPositioner()

Definition at line 410 of file QskItem.cpp.

◆ isUpdateNodeScheduled()

bool QskItem::isUpdateNodeScheduled ( ) const
Returns
True, if the item will update the paint node in the next scene graph update cycle

Definition at line 570 of file QskItem.cpp.

◆ isVisibleTo()

bool QskItem::isVisibleTo ( const QQuickItem *  ancestor) const

The true case occurs if neither the item itself nor any parent up to but excluding ancestor has been explicitly hidden.

Parameters
ancestorAncestor is the parentItem() hierarchy
Returns
true if this item would become visible if ancestor is shown; otherwise returns false.
See also
visibleToParent

Definition at line 320 of file QskItem.cpp.

◆ isVisibleToParent()

bool QskItem::isVisibleToParent ( ) const

An item might be invisible because it has been explicitly hidden or one of its ancestors has been hidden. isVisibleToParent() indicates the first situation.

Returns
true once setVisible( false ) has been called
See also
visibleToParent(), qskIsVisibleToParent() \saqt QQuickItem::setVisible()

Definition at line 325 of file QskItem.cpp.

◆ isWheelEnabled()

bool QskItem::isWheelEnabled ( ) const

Definition at line 465 of file QskItem.cpp.

◆ itemChange()

void QskItem::itemChange ( ItemChange  ,
const ItemChangeData &   
)
overrideprotected

For no obvious reason Qt/Quick has introduced an additional callback mechanism beside events and signals.

Parameters
changeIndicator, to identify what has changed
changeDataExtra information relating to the change
Note
It is recommended to avoid using this type of notifications where possible. 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() ).
If you re-implement this method in a subclass, be sure to call the overloaded method of the base class.
See also
event() \saqt QQuickItem::itemChange()

Definition at line 863 of file QskItem.cpp.

◆ itemFlagsChanged

QskItem::itemFlagsChanged ( )
signal

Signal indicating that at least one if the following attributes has changed:

  • transparentForPositioners
  • tabFence
  • polishOnResize

◆ layoutMirroring()

bool QskItem::layoutMirroring ( ) const

Direction how the content is layed out horizontally.

If no value has been explicitly assigned it is inherited from the closest ancestor, where the attribute has been assigned with the childrenInherit parameter. If such an ancestor does not exists layoutMirroring is false.

Returns
Inherited or explicitly assigned value
See also
setLayoutMirroring(), layoutMirroring()
See also
setLayoutMirroring(), resetLayoutMirroring()
Note
Several controls do not respect this flag
In Qml the parameters are routed through the attached LayoutMirroring property to have something declarative

Definition at line 511 of file QskItem.cpp.

◆ maybeUnresized()

bool QskItem::maybeUnresized ( ) const

Flag indicating a potential state, where the item is waiting to be sized by the layout system.

Unfortunately the list of items to-be-polished is not processed in top/down order and a container might be requested to calculate the geometries for its children before having a proper size itself.

Some of these situations can be avoided by ignoring these requests depending on the maybeUnresized flag.

Definition at line 583 of file QskItem.cpp.

◆ mouseUngrabEvent()

void QskItem::mouseUngrabEvent ( )
overrideprotected

Notification, that is overloaded for debuging purposes, without doing anything beside calling the base class.

\saqt QQuickItem::mouseUngrabEvent

Definition at line 1044 of file QskItem.cpp.

◆ polishOnParentResize()

bool QskItem::polishOnParentResize ( ) const

Definition at line 506 of file QskItem.cpp.

◆ polishOnResize()

bool QskItem::polishOnResize ( ) const
Returns
Value of the polishOnResize flag
See also
setPolishOnResize()

Definition at line 482 of file QskItem.cpp.

◆ rect()

QRectF QskItem::rect ( ) const
Returns
Internal geometry of the item, where the position is always at ( 0, 0 )
See also
geometry

Definition at line 388 of file QskItem.cpp.

◆ releaseResources()

void QskItem::releaseResources ( )
override

This specific hook is called, when the item is about to be removed from the window it was previously rendering to.

The implementation stores the values needed for the following QskWindowChangeEvent.

See also
windowChangeEvent()

Definition at line 287 of file QskItem.cpp.

◆ resetImplicitSize

void QskItem::resetImplicitSize ( )
slot

Notifies the layout system that attributes affecting the layout system have changed.

If the QskItem::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.

Definition at line 721 of file QskItem.cpp.

◆ resetLayoutMirroring()

void QskItem::resetLayoutMirroring ( )

Clear the layoutMirroring property

See also
setLayoutMirroring(), layoutMirroring

Definition at line 553 of file QskItem.cpp.

◆ resetUpdateFlag()

void QskItem::resetUpdateFlag ( UpdateFlag  flag)

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.

Parameters
flagFlag affecting the item update process
See also
QskSetup::itemUpdateFlags(), updateFlags(), testUpdateFlag(), updateFlags

Definition at line 630 of file QskItem.cpp.

◆ resetUpdateFlags()

void QskItem::resetUpdateFlags ( )

Reset all flags to the default settings

See also
QskSetup::itemUpdateFlags(), updateFlags(), updateFlags

Definition at line 608 of file QskItem.cpp.

◆ setDisabled

void QskItem::setDisabled ( bool  on)
slot

Convenience function, equivalent to setEnabled( !on ). \saqt QQuickItem::setEnabled()

Definition at line 300 of file QskItem.cpp.

◆ setFocusPolicy()

void QskItem::setFocusPolicy ( Qt::FocusPolicy  policy)

Definition at line 415 of file QskItem.cpp.

◆ setGeometry() [1/3]

void QskItem::setGeometry ( const QPointF &  pos,
const QSizeF &  size 
)
inline

Set the position and the size of an item

Parameters
posPosition relative to the parent item
sizeSize of the item

Definition at line 199 of file QskItem.h.

◆ setGeometry [2/3]

void QskItem::setGeometry ( const QRectF &  rect)
inlineslot

Set the position and the size of an item

Parameters
rectGeometry relative to the parent item
See also
geometry(), geometryChange() \saqt QQuickItem::size(), QQuickItem::position()

Definition at line 204 of file QskItem.h.

◆ setGeometry() [3/3]

void QskItem::setGeometry ( qreal  x,
qreal  y,
qreal  width,
qreal  height 
)

Set the position and the size of an item

Parameters
xX ( = left ) coordinate relative to the parent item
yY ( = top ) coordinate relative to the parent item
widthWidth
heightHeight
See also
geometry(), geometryChange() \saqt QQuickItem::size(), QQuickItem::position()

Definition at line 330 of file QskItem.cpp.

◆ setHidden

void QskItem::setHidden ( bool  on)
slot

Convenience function, equivalent to setVisible( !on ).

See also
show(), hide() \saqt QQuickItem::setVisible()

Definition at line 305 of file QskItem.cpp.

◆ setLayoutMirroring()

void QskItem::setLayoutMirroring ( bool  on,
bool  childrenInherit = false 
)

Change the direction how the content is laid out horizontally.

Parameters
onTrue enables layoutMirroring
childrenInheritIf true the mirroring behavior is propagated to all child items as well.

Changes of this property will be indicated by a QEvent::LayoutDirectionChange.

See also
layoutMirroring, resetLayoutMirroring(), changeEvent()
Note
In Qml the parameters are routed through the attached LayoutMirroring property to have something declarative

Definition at line 525 of file QskItem.cpp.

◆ setPolishOnParentResize()

void QskItem::setPolishOnParentResize ( bool  on)

Definition at line 487 of file QskItem.cpp.

◆ setPolishOnResize()

void QskItem::setPolishOnResize ( bool  on)

Set or clear the polishOnResize flag.

See also
polishOnResize

Definition at line 470 of file QskItem.cpp.

◆ setPosition()

void QskItem::setPosition ( qreal  x,
qreal  y 
)
inline

Definition at line 209 of file QskItem.h.

◆ setSize()

void QskItem::setSize ( qreal  width,
qreal  height 
)
inline

Definition at line 214 of file QskItem.h.

◆ setTabFence()

void QskItem::setTabFence ( bool  on)

Set or clear the tabFence property

See also
isTabFence()

Definition at line 400 of file QskItem.cpp.

◆ setUpdateFlag()

void QskItem::setUpdateFlag ( UpdateFlag  flag,
bool  on = true 
)

QskItem offers several tweaks to the Qt/Quick update cycle, that can be en/disables individually.

The default settings for these flags are taken from QskSetup::itemUpdateFlags() When calling setUpdateFlag() the value for the particular flag is decoupled from the corresponding default bit - even if both bits have the same value. This can be reverted by calling resetUpdateFlag()

Parameters
flagFlag affecting the item update process
onEn/Disable the behaviour related to the flag
See also
QskSetup::itemUpdateFlags(), testUpdateFlag(). updateFlags

Definition at line 617 of file QskItem.cpp.

◆ setWheelEnabled()

void QskItem::setWheelEnabled ( bool  on)

Definition at line 455 of file QskItem.cpp.

◆ show

void QskItem::show ( )
slot

An alternative way to call setVisible( true ). Useful for signal/slot connections

See also
hide(), setHidden() \saqt QQuickItem::setVisible()

Definition at line 310 of file QskItem.cpp.

◆ testUpdateFlag()

bool QskItem::testUpdateFlag ( UpdateFlag  flag) const
Parameters
Flagaffecting the item update process
Returns
true, when the corresponding bit is effective
See also
setUpdateFlag(), QskSetup::itemUpdateFlag(), updateFlags

Definition at line 645 of file QskItem.cpp.

◆ touchUngrabEvent()

void QskItem::touchUngrabEvent ( )
overrideprotected

Notification, that is overloaded for debuging purposes, without doing anything beside calling the base class.

\saqt QQuickItem::touchUngrabEvent

Definition at line 1049 of file QskItem.cpp.

◆ updateFlags()

QskItem::UpdateFlags QskItem::updateFlags ( ) const
Returns
Flags affecting the item update process
See also
testUpdateFlag(), setUpdateFlag(), updateFlags

Definition at line 603 of file QskItem.cpp.

◆ updateFlagsChanged

QskItem::updateFlagsChanged ( UpdateFlags  )
signal

Signal indicating, that the effective update flags have changed

Parameters
flagsEffective flags, might be derived in parts from QskSetup::itemUpdateFlags()
See also
updateFlags

◆ updateItemPaintNode()

QSGNode * QskItem::updateItemPaintNode ( QSGNode *  node)
privatevirtual

Definition at line 1133 of file QskItem.cpp.

◆ updateItemPolish()

void QskItem::updateItemPolish ( )
privatevirtual

Definition at line 1095 of file QskItem.cpp.

◆ updatePaintNode()

QSGNode * QskItem::updatePaintNode ( QSGNode *  node,
UpdatePaintNodeData *  data 
)
finaloverrideprivate

Definition at line 1099 of file QskItem.cpp.

◆ updatePolish()

void QskItem::updatePolish ( )
finaloverrideprivate

Definition at line 1063 of file QskItem.cpp.

◆ windowChangeEvent()

void QskItem::windowChangeEvent ( QskWindowChangeEvent )
protectedvirtual

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:

  • being an event it can be processed by event filtering
  • the previous window is available
Parameters
eventEvent with the old/new windows

Reimplemented in QskFocusIndicator, QskPopup, and QskScrollBox.

Definition at line 851 of file QskItem.cpp.

Property Documentation

◆ focusPolicy

Qt::FocusPolicy QskItem::focusPolicy
readwrite

Definition at line 32 of file QskItem.h.

◆ geometry

QskItem::geometry
readwrite

This property holds the geometry of the item relative to its parent item. When changing the geometry, the item receives a QskEvent::GeometryChange event.

See also
geometryChangeEvent(), geometryChange(), rect

Definition at line 20 of file QskItem.h.

◆ hasChildItems

QskItem::hasChildItems
read

A property indicating if the item has child items.

\saqt QQuickItem::childItems(), QQuickItem::parentItem()

Definition at line 39 of file QskItem.h.

◆ initiallyPainted

QskItem::initiallyPainted
read

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.

See also
isInitiallyPainted(), aboutToShow()

Definition at line 40 of file QskItem.h.

◆ polishOnParentResize

bool QskItem::polishOnParentResize
readwrite

Definition at line 29 of file QskItem.h.

◆ polishOnResize

QskItem::polishOnResize
readwrite

When polishOnResize is set QQuickItem::polish() will be called automatically whenever the size of the item has been changed. This is usually necessary when the item is a container and the layout of its children depends on the size of the container.

See also
QskControl::updateLayout(), QskControl::autoLayoutChildren

Definition at line 26 of file QskItem.h.

◆ rect

QskItem::rect
read

This property returns the internal geometry of the item. It equals QRect(0, 0, width(), height() ).

See also
geometryChangeEvent(), geometryChange(), geometry

Definition at line 21 of file QskItem.h.

◆ tabFence

QskItem::tabFence
readwrite

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.

See also
isTabFence(), QQuickItem::ItemIsFocusScope \saqt QQuickItem::ItemIsFocusScope

Definition at line 23 of file QskItem.h.

◆ updateFlags

QskItem::updateFlags
read

QskItem offers several tweaks to the Qt/Quick update cycle, that can be en/disabled individually.

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.

See also
QskItem::UpdateFlag, QskItem::updateFlags(), QskSetup::itemUpdateFlags()

Definition at line 42 of file QskItem.h.

◆ visibleToParent

QskItem::visibleToParent
read

Flag indicating if an item would become visible if its parentItem() is shown. 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.

See also
setHidden(), show(), hide(), isVisibleToParent(), qskIsVisibleToParent() \saqt QQuickItem::setVisible()

Definition at line 38 of file QskItem.h.

◆ wheelEnabled

bool QskItem::wheelEnabled
readwrite

Definition at line 35 of file QskItem.h.