qskinny/doc/classes/QskPlacementPolicy.dox

184 lines
4.7 KiB
Plaintext
Raw Normal View History

2022-04-08 18:00:10 +02:00
/*!
\class QskPlacementPolicy QskPlacementPolicy.h
\ingroup Framework
2022-04-15 13:22:58 +02:00
QskPlacementPolicy is a hint for layout code how to deal with
the geometry of an item depending on its visibility.
2022-04-08 18:00:10 +02:00
\sa QskControl::placementPolicy(), qskPlacementPolicy()
*/
/*!
\enum QskPlacementPolicy::Policy
2022-04-15 13:22:58 +02:00
Hint for the layout code how to deal with the geometry of an
item. QskPlacementPolicy has two values: one for the visible,
the other for the hidden state.
2022-04-08 18:00:10 +02:00
\var QskPlacementPolicy::Ignore
2022-04-15 13:22:58 +02:00
Ignore the item for all type of layout calculations
2022-04-08 18:00:10 +02:00
\var QskPlacementPolicy::Reserve
2022-04-15 13:22:58 +02:00
Reseve space without giving the item its geometry
2022-04-08 18:00:10 +02:00
\var QskPlacementPolicy::Adjust
Reserve space and adjust the geometry of the item
2022-04-15 13:22:58 +02:00
\sa visiblePolicy, hiddenPolicy
2022-04-08 18:00:10 +02:00
*/
/*!
\property QskPlacementPolicy::Policy QskPlacementPolicy::visiblePolicy
\brief Policy for the item, when being visible ( to its parent )
2022-04-15 13:22:58 +02:00
- QskPlacementPolicy::Ignore
2022-04-08 18:00:10 +02:00
For situations where a parent takes care of the geometry for its children,
2022-04-15 13:22:58 +02:00
but the specific item should be omitted. F.e a focus indicator.
2022-04-08 18:00:10 +02:00
2022-04-15 13:22:58 +02:00
- QskPlacementPolicy::Reserve
2022-04-08 18:00:10 +02:00
2022-04-15 13:22:58 +02:00
There are not many relevant scenarios for reserving space for visible items
without adjusting them. An example might be when an item is inside of a
grid box, where all the size hints should have an effect, but the final
alignment of the item inside of the cell has to be done manually.
2022-04-08 18:00:10 +02:00
2022-04-15 13:22:58 +02:00
- QskPlacementPolicy::Adjust:
2022-04-08 18:00:10 +02:00
The default value
\accessors visiblePolicy(), setVisiblePolicy()
2024-02-02 14:13:33 +01:00
\sa hiddenPolicy, QskItem::isVisibleToParent(), qskIsVisibleToParent()
2022-04-08 18:00:10 +02:00
\note QskPlacementPolicy::Ignore is stored in the transparentForPositioner
2022-04-15 13:22:58 +02:00
bit in QQuickItem and might have an impact on Qt/Quick layout code.
2022-04-08 18:00:10 +02:00
*/
/*!
\property QskPlacementPolicy::Policy QskPlacementPolicy::hiddenPolicy
\brief Policy for the item, when being hidden ( to its parent )
- QskPlacementPolicy::Ignore
The default value
- QskPlacementPolicy::Reserve:
In combination with a visiblePolicy != QskPlacementPolicy::Ignore
the layout of the parent does not change, when the item is shown/hidden.
- QskPlacementPolicy::Adjust:
Sometimes an item wants to have its proper size even when being hidden.
2022-04-15 13:22:58 +02:00
\accessors hiddenPolicy(), setHiddenPolicy()
2024-02-02 14:13:33 +01:00
\sa visiblePolicy, QskItem::isVisibleToParent(), qskIsVisibleToParent()
2022-04-08 18:00:10 +02:00
\note QskPlacementPolicy::Ignore is stored in the transparentForPositioner
bit in QQuickItem and might have an impact on Qt/Quick layout code.
2022-04-15 13:22:58 +02:00
\note QskPlacementPolicy::Reserve is equivalent to what is offered by
\saqt QSizePolicy::retainSizeWhenHidden().
2022-04-08 18:00:10 +02:00
*/
/*!
\fn QskPlacementPolicy::QskPlacementPolicy()
2022-04-15 13:22:58 +02:00
\brief Default constructor
QskPlacementPolicy::Adjust is set for Qsk::Visible, while
QskPlacementPolicy::Ignore is used for Qsk::Hidden.
\sa visiblePolicy, hiddenPolicy
2022-04-08 18:00:10 +02:00
*/
/*!
\fn QskPlacementPolicy::QskPlacementPolicy( Policy policy )
2022-04-15 13:22:58 +02:00
visiblePolicy and hiddenPolicy are set to policy
2022-04-08 18:00:10 +02:00
*/
/*!
\fn QskPlacementPolicy::QskPlacementPolicy( Policy visiblePolicy, Policy hiddenPolicy )
2022-04-15 13:22:58 +02:00
Initialization from visiblePolicy and hiddenPolicy
2022-04-08 18:00:10 +02:00
*/
/*!
\fn QskPlacementPolicy::QskPlacementPolicy( Qsk::Visibilities visiblities, Policy policy )
2022-04-15 13:22:58 +02:00
Initialize visiblePolicy and hiddenPolicy depending on visiblities
2022-04-08 18:00:10 +02:00
*/
2022-04-15 13:22:58 +02:00
/*!
2022-04-08 18:00:10 +02:00
\fn QskPlacementPolicy::operator==( const QskPlacementPolicy& )
"Equal to" operator
\sa operator!=(), operator<()
*/
2022-04-15 13:22:58 +02:00
/*!
2022-04-08 18:00:10 +02:00
\fn QskPlacementPolicy::operator!=( const QskPlacementPolicy& )
2022-04-15 13:22:58 +02:00
"Not equal to" operator
2022-04-08 18:00:10 +02:00
\sa operator==(), operator<()
*/
2022-04-15 13:22:58 +02:00
/*!
2022-04-08 18:00:10 +02:00
\fn QskPlacementPolicy::setPolicy( Qsk::Visibilities, Policy )
*/
2022-04-15 13:22:58 +02:00
/*!
2022-04-08 18:00:10 +02:00
\fn QskPlacementPolicy::policy( Qsk::Visibility )
*/
2022-04-15 13:22:58 +02:00
/*!
2022-04-08 18:00:10 +02:00
\fn QskPlacementPolicy::isEffective()
2022-04-15 13:22:58 +02:00
\return true, when visiblePolicy or hiddenPolicy is not QskPlacementPolicy::Ignore
\sa isIgnoring()
2022-04-08 18:00:10 +02:00
*/
2022-04-15 13:22:58 +02:00
/*!
2022-04-08 18:00:10 +02:00
\fn QskPlacementPolicy::isIgnoring( Qsk::Visibility )
2022-04-15 13:22:58 +02:00
\return true, when visiblePolicy and hiddenPolicy are set to QskPlacementPolicy::Ignore
\sa isEffective()
2022-04-08 18:00:10 +02:00
*/
2022-04-15 13:22:58 +02:00
/*!
2022-04-08 18:00:10 +02:00
\fn QskPlacementPolicy::isAdjusting( Qsk::Visibility )
2022-04-15 13:22:58 +02:00
\return true, when QskPlacementPolicy::Adjust is set for the visibility
2022-04-08 18:00:10 +02:00
*/
2022-04-15 13:22:58 +02:00
/*!
2022-04-08 18:00:10 +02:00
\fn QskPlacementPolicy::setVisiblePolicy( Policy )
2022-04-15 13:22:58 +02:00
\sa visiblePolicy(), setHiddenPolicy()
2022-04-08 18:00:10 +02:00
*/
2022-04-15 13:22:58 +02:00
/*!
2022-04-08 18:00:10 +02:00
\fn QskPlacementPolicy::visiblePolicy()
2022-04-15 13:22:58 +02:00
\sa setVisiblePolicy(), hiddenPolicy()
2022-04-08 18:00:10 +02:00
*/
2022-04-15 13:22:58 +02:00
/*!
2022-04-08 18:00:10 +02:00
\fn QskPlacementPolicy::setHiddenPolicy( Policy )
2022-04-15 13:22:58 +02:00
\sa hiddenPolicy(), setVisiblePolicy()
2022-04-08 18:00:10 +02:00
*/
2022-04-15 13:22:58 +02:00
/*!
2022-04-08 18:00:10 +02:00
\fn QskPlacementPolicy::hiddenPolicy()
2022-04-15 13:22:58 +02:00
\sa setHiddenPolicy(), visiblePolicy()
2022-04-08 18:00:10 +02:00
*/