QSkinny 0.8.0
C++/Qt UI toolkit
|
#include <QskPlacementPolicy.h>
QskPlacementPolicy is a hint for layout code how to deal with the geometry of an item depending on its visibility.
Definition at line 13 of file QskPlacementPolicy.h.
Public Types | |
enum | Policy { Ignore , Reserve , Adjust } |
Properties | |
Policy | visiblePolicy |
Policy for the item, when being visible ( to its parent ) | |
Policy | hiddenPolicy |
Policy for the item, when being hidden ( to its parent ) | |
Public Member Functions | |
constexpr | QskPlacementPolicy () noexcept |
Default constructor. | |
constexpr | QskPlacementPolicy (Policy) noexcept |
constexpr | QskPlacementPolicy (Policy visiblePolicy, Policy hiddenPolicy) noexcept |
constexpr | QskPlacementPolicy (Qsk::Visibilities, Policy) noexcept |
constexpr bool | operator== (const QskPlacementPolicy &) const noexcept |
constexpr bool | operator!= (const QskPlacementPolicy &) const noexcept |
void | setPolicy (Qsk::Visibilities, Policy) noexcept |
constexpr Policy | policy (Qsk::Visibility) const noexcept |
constexpr bool | isEffective () const noexcept |
constexpr bool | isIgnoring (Qsk::Visibility) const noexcept |
constexpr bool | isAdjusting (Qsk::Visibility) const noexcept |
void | setVisiblePolicy (Policy) noexcept |
constexpr Policy | visiblePolicy () const noexcept |
void | setHiddenPolicy (Policy) noexcept |
constexpr Policy | hiddenPolicy () const noexcept |
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.
Enumerator | |
---|---|
Ignore | Ignore the item for all type of layout calculations |
Reserve | Reseve space without giving the item its geometry |
Adjust | Reserve space and adjust the geometry of the item
|
Definition at line 22 of file QskPlacementPolicy.h.
|
inlineconstexprnoexcept |
Default constructor.
QskPlacementPolicy::Adjust is set for Qsk::Visible, while QskPlacementPolicy::Ignore is used for Qsk::Hidden.
Definition at line 57 of file QskPlacementPolicy.h.
|
constexprnoexcept |
visiblePolicy and hiddenPolicy are set to policy
Definition at line 70 of file QskPlacementPolicy.h.
|
inlineconstexprnoexcept |
Initialization from visiblePolicy and hiddenPolicy
Definition at line 63 of file QskPlacementPolicy.h.
|
constexprnoexcept |
Initialize visiblePolicy and hiddenPolicy depending on visiblities
Definition at line 76 of file QskPlacementPolicy.h.
|
inlineconstexprnoexcept |
Definition at line 127 of file QskPlacementPolicy.h.
|
inlineconstexprnoexcept |
Definition at line 143 of file QskPlacementPolicy.h.
|
inlineconstexprnoexcept |
Definition at line 132 of file QskPlacementPolicy.h.
|
inlineconstexprnoexcept |
Definition at line 137 of file QskPlacementPolicy.h.
|
inlineconstexprnoexcept |
"Not equal to" operator
Definition at line 90 of file QskPlacementPolicy.h.
|
inlineconstexprnoexcept |
"Equal to" operator
Definition at line 83 of file QskPlacementPolicy.h.
|
inlineconstexprnoexcept |
Definition at line 107 of file QskPlacementPolicy.h.
|
inlinenoexcept |
Definition at line 122 of file QskPlacementPolicy.h.
|
inlinenoexcept |
Definition at line 96 of file QskPlacementPolicy.h.
|
inlinenoexcept |
Definition at line 112 of file QskPlacementPolicy.h.
|
inlineconstexprnoexcept |
Definition at line 117 of file QskPlacementPolicy.h.
|
readwrite |
Policy for the item, when being hidden ( to its parent )
The default value
In combination with a visiblePolicy != QskPlacementPolicy::Ignore the layout of the parent does not change, when the item is shown/hidden.
Sometimes an item wants to have its proper size even when being hidden.
Definition at line 18 of file QskPlacementPolicy.h.
|
readwrite |
Policy for the item, when being visible ( to its parent )
For situations where a parent takes care of the geometry for its children, but the specific item should be omitted. F.e a focus indicator.
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.
The default value
Definition at line 17 of file QskPlacementPolicy.h.