qskinny/doc/classes/QskSkinnable.dox

1095 lines
29 KiB
Plaintext
Raw Normal View History

2020-12-08 11:02:57 +01:00
/*!
2020-12-12 14:05:09 +01:00
\class QskSkinnable QskSkinnable.h
2020-12-08 11:02:57 +01:00
2021-03-03 08:27:08 +01:00
\ingroup Framework
2020-12-08 11:02:57 +01:00
2021-03-03 08:27:08 +01:00
QskSkinnable is the base for all objects, that can be configured by skin hints
and are displayed by a skinlet. The configuration from the skin can be overwritten by
2021-02-16 12:19:05 +01:00
adding values to the local skin hint table - it is even possible to replace the
skinlet individually.
2021-03-03 08:27:08 +01:00
In most cases a skinnable is a QskControl, but conceptually it is
2021-02-16 12:19:05 +01:00
possible to have controls, that consist of many skinnables.
2021-03-03 08:27:08 +01:00
\sa QskSkin, QskSkinlet, QskControl, QskSkinHintTable
2021-02-16 12:19:05 +01:00
*/
/*! \fn QskSkinnable::QskSkinnable()
2021-03-03 08:27:08 +01:00
Constructs a skinnable where all settings will be resolved from the skin
2021-02-16 12:19:05 +01:00
2021-03-03 08:27:08 +01:00
\sa effectiveSkin(), effectiveSkinlet, effectiveSkinHint
2021-02-16 12:19:05 +01:00
*/
/*! \fn QskSkinnable::~QskSkinnable()
2021-03-03 08:27:08 +01:00
Called when the skinnable is destroyed.
2020-12-12 14:05:09 +01:00
*/
2020-12-08 11:02:57 +01:00
2020-12-12 14:05:09 +01:00
/*!
2021-02-11 12:46:19 +01:00
\fn void QskSkinnable::setSkinlet
2020-12-08 11:02:57 +01:00
2021-03-03 08:27:08 +01:00
\brief Set an individual skinlet to render/display the content
2020-12-08 11:02:57 +01:00
2021-03-03 08:27:08 +01:00
Usually all skinnables of the same type are rendered by the same instance
2021-02-11 12:46:19 +01:00
of a skinlet. For rare situations it can be useful to assign a different skinlet.
2020-12-08 11:02:57 +01:00
2021-03-03 08:27:08 +01:00
When QskSkinlet::isOwnedBySkinnable() is true, the skinlet will be deleted,
2021-02-11 12:46:19 +01:00
when the skinnable is deleted or a different skinlet gets assigned.
2020-12-08 11:02:57 +01:00
2021-03-03 08:27:08 +01:00
\param skinlet Skinlet to render/layout the skinnable.
2021-02-11 12:46:19 +01:00
2021-03-03 08:27:08 +01:00
\sa skinlet(), effectiveSkinlet(), resetSkinlet(),
2021-02-11 12:46:19 +01:00
QskSkin::declareSkinlet, QskSkinlet::isOwnedBySkinnable()
2020-12-08 11:02:57 +01:00
2021-03-03 08:27:08 +01:00
\note Overriding the skinlet that has been registered in the skin
2021-02-23 12:07:08 +01:00
breaks the themeability of the skinnable.
2020-12-12 14:05:09 +01:00
*/
2020-12-08 11:02:57 +01:00
2020-12-12 14:05:09 +01:00
/*!
2021-02-11 12:46:19 +01:00
\fn QskSkinnable::skinlet
2020-12-08 11:02:57 +01:00
2021-02-11 12:46:19 +01:00
\return Skinlet, that has been assigned by setSkinlet(). Usually the skinnable
is coupled to a default skinlet from the skin and the result is a nullptr.
\sa setSkinlet(), effectiveSkinlet(), effectiveSkin()
2020-12-12 14:05:09 +01:00
*/
2020-12-08 11:02:57 +01:00
2020-12-12 14:05:09 +01:00
/*!
2021-02-11 12:46:19 +01:00
\fn QskSkinnable::updateNode
2020-12-08 11:02:57 +01:00
2021-01-25 11:06:01 +01:00
This method replaces the QQuickItem::updatePaintNode method as the
preferred paint method to override when subclassing QskControl. This allows
QskControl to perform some additional steps before calling updateNode(),
and provides a consistent parent node which subclasses can rely on.
2020-12-08 11:02:57 +01:00
2021-03-03 08:27:08 +01:00
The default implementation simply forwards the operation to the skinlet,
2020-12-08 11:02:57 +01:00
2021-01-25 11:06:01 +01:00
\param parentNode The parent of the nodes to be added in this method.
2021-02-11 12:46:19 +01:00
\note Overriding updateNode() might break the themeability and the usual
strategy to implement custom painting is to customize or replace
the skinlet.
2021-03-03 08:27:08 +01:00
\sa QskSkinlet::updateSubNode()
2021-02-11 12:46:19 +01:00
*/
/*!
\fn QskSkinnable::effectiveSkinHint
2021-03-03 08:27:08 +01:00
\brief Find the value for a specific aspect
2021-02-11 12:46:19 +01:00
2021-03-03 08:27:08 +01:00
If an animation is running for the given aspect its value will
2021-02-23 12:07:08 +01:00
be returned as hint. Then effectiveSkinHint() tries to find a hint
in the local table and finally tries to resolve the aspect from the
2021-03-03 08:27:08 +01:00
hint table of the skin.
2021-02-23 12:07:08 +01:00
2021-03-03 08:27:08 +01:00
\param aspect Initial aspect, to feed the skin hint lookup algorithm.
\param status Optional status information
\return Hint value, or an invalid QVariant if no value was found
2021-02-11 12:46:19 +01:00
2021-03-03 08:27:08 +01:00
\sa effectiveSubcontrol(), effectivePlacement()
2021-02-11 12:46:19 +01:00
*/
2021-02-16 12:19:05 +01:00
/*! \fn QskSkinnable::effectiveFont
2021-02-11 12:46:19 +01:00
2021-03-03 08:27:08 +01:00
Finds the font role for the given aspect and returns
2021-02-23 12:07:08 +01:00
the corresponding font from the font table of the skin.
2021-02-11 12:46:19 +01:00
2021-03-03 08:27:08 +01:00
\param aspect Unresolved aspect
\return Font, corresponding to the resolved aspect
2021-02-11 12:46:19 +01:00
2021-03-03 08:27:08 +01:00
\sa fontRoleHint(), effectiveSkinHint(), QskSkin::font()
2021-02-11 12:46:19 +01:00
*/
2021-02-16 12:19:05 +01:00
/*! \fn QskSkinnable::effectiveGraphicFilter
2021-02-11 12:46:19 +01:00
2021-03-03 08:27:08 +01:00
Finds the graphic role for the given aspect and returns
the corresponding color filter from the skin
2021-02-11 12:46:19 +01:00
2021-03-03 08:27:08 +01:00
\param aspect Unresolved aspect
\return Color filter, corresponding to the resolved aspect
2021-02-11 12:46:19 +01:00
2021-03-03 08:27:08 +01:00
\sa graphicRoleHint(), effectiveSkinHint(), QskSkin::graphicFilter()
2021-02-11 12:46:19 +01:00
*/
/*! \fn QskSkinnable::setAnimationHint
2021-03-03 08:27:08 +01:00
Insert an animation hint into the local hint table
2021-02-16 12:19:05 +01:00
2021-03-03 08:27:08 +01:00
\param aspect Unresolved aspect
\param hint Animation hint
2021-02-16 12:19:05 +01:00
2021-03-03 08:27:08 +01:00
\sa animationHint(), effectiveAnimation()
2021-02-11 12:46:19 +01:00
*/
/*! \fn QskSkinnable::animationHint
2021-04-23 15:15:18 +02:00
Retrieve the configuration of the animator for the current state.
\param aspect Unresolved aspect
\param status If status != nullptr additional information
about where the hint has been found is returned
\sa effectiveSkinHint()
2021-02-16 12:19:05 +01:00
*/
/*! \fn QskSkinnable::effectiveAnimation
2021-03-03 08:27:08 +01:00
Retrieve the configuration of the animator for reaching
a specific state.
2021-02-11 12:46:19 +01:00
2021-03-03 08:27:08 +01:00
\param type Metric, color or something else
\param subControl Unsubstituted subControl
\param state State bits
\param status If status != nullptr additional information
2021-02-16 12:19:05 +01:00
about where the hint has been found is returned
2021-03-03 08:27:08 +01:00
\return Value from the hint tables
\sa animationHint()
2021-02-11 12:46:19 +01:00
*/
/*! \fn QskSkinnable::setSkinHint
2021-03-03 08:27:08 +01:00
\brief Insert a hint into the local hint table
2021-02-16 12:19:05 +01:00
2021-03-03 08:27:08 +01:00
Presentation, beheviour and layout of the scene graph nodes are
2021-02-22 17:15:37 +01:00
affected by specific attributes - skin hints - that are configured
in a table of the skin. Each skinnable has its own table
2021-03-03 08:27:08 +01:00
where these attributes can be overloaded. Hints from the local
table have precedence over those from the skin.
The subControl bits of the aspect might be substituted, depending on
the implementation of effectiveSubcontrol(). By inserting the hint
directly into the hintTable() the substitution can be avoided.
\param aspect Unsubstituted aspect
\param hint Hint, might be anything that fits into a QVariant
2021-02-16 12:19:05 +01:00
and is understood by the skinlet consuming it.
2021-03-03 08:27:08 +01:00
\sa effectiveSkinHint(), resetSkinHint(), hintTable(), QskSkinHintTableEditor()
2021-02-11 12:46:19 +01:00
*/
/*! \fn QskSkinnable::resetSkinHint
2021-03-03 08:27:08 +01:00
\brief Remove a hint from the local hint table
2021-02-11 12:46:19 +01:00
2021-03-03 08:27:08 +01:00
After removing the hint from the local table the hint will
2021-02-16 12:19:05 +01:00
be resolved fro the hint table of the skin.
2021-02-11 12:46:19 +01:00
2021-03-03 08:27:08 +01:00
\param aspect Unsubstituted aspect
2021-02-16 12:19:05 +01:00
2021-03-03 08:27:08 +01:00
\sa setSkinHint(), effectiveSkinHint()
2021-02-11 12:46:19 +01:00
*/
/*! \fn QskSkinnable::effectivePlacement
2021-02-19 11:06:39 +01:00
2021-03-03 08:27:08 +01:00
The placements bits are added to an unresolved aspect when
inserting or looking up values in the hint table.
2021-02-19 11:06:39 +01:00
2021-03-03 08:27:08 +01:00
\return The default implementation returns QskAspect::NoPlacement;
2021-02-19 11:06:39 +01:00
2021-03-03 08:27:08 +01:00
\sa QskAspect::Placement, effectiveSkinHint()
2021-02-11 12:46:19 +01:00
*/
/*! \fn QskSkinnable::hintStatus
2021-03-03 08:27:08 +01:00
\param aspect Unresolved aspect
\return Informations about how the aspect would be resolved
2021-02-16 12:19:05 +01:00
2021-03-03 08:27:08 +01:00
\sa effectiveSkinHint()
2021-02-11 12:46:19 +01:00
*/
2021-02-19 11:06:39 +01:00
/*! \fn QskSkinnable::setSkinState
2021-03-03 08:27:08 +01:00
Set the state bits of the skinnable
2021-02-19 11:06:39 +01:00
2021-03-03 08:27:08 +01:00
Depending on the state a skinnable might have different hints affecting
2021-02-19 11:06:39 +01:00
its representation and/or behaviour.
2021-03-03 08:27:08 +01:00
\param newState State bits
\param animated If true, animators, that have been defined in the skin
2021-02-19 11:06:39 +01:00
for newState will be started
2021-04-23 15:15:18 +02:00
\sa QskAspect, replaceSkinState()
2021-02-19 11:06:39 +01:00
*/
/*! \fn QskSkinnable::setSkinStateFlag
2021-03-03 08:27:08 +01:00
Set/Clear a state in the state bits
2021-02-19 11:06:39 +01:00
2021-03-03 08:27:08 +01:00
\param stateFlag State bit
\param on true or false
2021-02-19 11:06:39 +01:00
2021-03-03 08:27:08 +01:00
\sa setSkinState(), skinState()
2021-02-19 11:06:39 +01:00
*/
2021-04-23 15:15:18 +02:00
/*! \fn QskSkinnable::replaceSkinState
Overwrite the state bits of the skinnable without triggering
any updates. Usually used for temporary modifications when
retrieving skin hints.
\param newState State bits
\sa QskAspect, setSkinState()
*/
2021-02-11 12:46:19 +01:00
/*! \fn QskSkinnable::skinState
2021-03-03 08:27:08 +01:00
The state bits are added to an unresolved aspect when
inserting or looking up values in the hint table.
2021-02-19 11:06:39 +01:00
2021-03-03 08:27:08 +01:00
\return Current state
\sa setSkinStateFlag(), setSkinState()
2021-02-11 12:46:19 +01:00
*/
/*! \fn QskSkinnable::skinStateAsPrintable() const
2021-03-03 08:27:08 +01:00
\return Current state as printable for debugging purposes
\sa skinStateAsPrintable( QskAspect::State ) const
2021-02-11 12:46:19 +01:00
*/
/*! \fn QskSkinnable::skinStateAsPrintable( QskAspect::State ) const
2021-03-03 08:27:08 +01:00
\param state State bits
2021-02-16 12:19:05 +01:00
\return state as printable for debugging purposes
\note A pointer to an internal buffer is returned, that might be
overwritten by subsequent calls.
2021-02-11 12:46:19 +01:00
*/
/*! \fn QskSkinnable::subControlRect
2021-03-03 08:27:08 +01:00
\brief Calculate position and size of a subControl
2021-02-16 12:19:05 +01:00
2021-03-03 08:27:08 +01:00
A convenience method that forwards the calculation to the skinlet
\param contentsRect Bounding rectangle for laying out the nodes of the skinnable
\param subControl Unsubstituted subcontrol
\return Geometry for the subControl
2021-02-16 12:19:05 +01:00
2021-03-03 08:27:08 +01:00
\sa effectiveSkinlet(), QskSkinlet::subControlRect(), QskControl::contentsRect()
2021-02-11 12:46:19 +01:00
*/
2021-02-16 12:19:05 +01:00
/*! \fn QskSkinnable::subControlContentsRect
2021-02-22 17:15:37 +01:00
2021-05-03 14:13:33 +02:00
\brief Calculate the inner rectangle for subControl
2021-02-22 17:15:37 +01:00
2021-03-03 08:27:08 +01:00
The inner rectangle a subcontrol is its geometry with paddings, indentations
2021-02-22 17:15:37 +01:00
being subtracted. F.e. the inner rectangle of QskPushButton::Panel is the
bounding rectangle for laying out the QskPushButton::Text and
QskPushButton::Graphic subcontrols.
2021-03-03 08:27:08 +01:00
\param contentsRect Bounding rectangle for laying out the nodes of the skinnable
\param subControl Unsubstituted subcontrol
\return Geometry for contents inside the subControl
2021-02-22 17:15:37 +01:00
2021-03-03 08:27:08 +01:00
\sa QskSkinlet::subControlRect(), innerBox()
2021-02-11 12:46:19 +01:00
*/
/*! \fn QskSkinnable::outerBoxSize
2021-02-22 17:15:37 +01:00
2021-03-03 08:27:08 +01:00
\brief Calculate the size, when being expanded by paddings, indentations
2021-02-22 17:15:37 +01:00
2021-03-03 08:27:08 +01:00
Paddings, indentations depend on attributes for the given aspect.
2021-02-22 17:15:37 +01:00
2021-03-03 08:27:08 +01:00
\param aspect Unresolved aspect
\param innerBoxSize Size to be expanded
\return Expanded size
2021-02-22 17:15:37 +01:00
2021-03-03 08:27:08 +01:00
The size hint for a "container" node usually depend on the hints of its
2021-02-22 17:15:37 +01:00
inner nodes. F.e the size hint for QskPushButton::Panel depends on the size hints of
2021-03-03 08:27:08 +01:00
QskPushButton::Text and QskPushButton::Graphic.
2021-02-22 17:15:37 +01:00
2021-03-03 08:27:08 +01:00
\sa innerBoxSize(), outerBox(), innerBox()
2021-02-11 12:46:19 +01:00
*/
/*! \fn QskSkinnable::innerBoxSize
2021-02-22 17:15:37 +01:00
2021-03-03 08:27:08 +01:00
\brief Calculate the size, with paddings, indentations being subtracted
2021-02-22 17:15:37 +01:00
2021-03-03 08:27:08 +01:00
Paddings, indentations depend on attributes for the given aspect.
2021-02-22 17:15:37 +01:00
2021-03-03 08:27:08 +01:00
\param aspect Unresolved aspect
\param outerBoxSize Size to be shrunk
\return Shrunk size
2021-02-22 17:15:37 +01:00
2021-03-03 08:27:08 +01:00
\sa outerBoxSize(), innerBox(), outerBox()
2021-02-11 12:46:19 +01:00
*/
/*! \fn QskSkinnable::innerBox
2021-02-22 17:15:37 +01:00
2021-03-03 08:27:08 +01:00
\brief Calculate the rectangle, whith paddings, indentations being subtracted
2021-02-22 17:15:37 +01:00
Paddings, indentations depend on attributes for the given aspect.
\param aspect Unresolved aspect
2021-02-23 12:07:08 +01:00
\param outerBox Rectangle to be shrunk
\return Shrunk rectangle
2021-02-22 17:15:37 +01:00
\sa innerBoxSize(), outerBox()
2021-02-11 12:46:19 +01:00
*/
/*! \fn QskSkinnable::outerBox
2021-02-22 17:15:37 +01:00
\brief Calculate the rectangle, when being expanded by paddings, indentations
Paddings, indentations depend on attributes for the given aspect.
\param aspect Unresolved aspect
\param innerBox Rectangle to be expanded
\return Expanded rectangle
The size hint for a "container" node usually depend on the hints of its
inner nodes. F.e the size hint for QskPushButton::Panel depends on the size hints of
QskPushButton::Text and QskPushButton::Graphic.
\sa outerBoxSize(), innerBox()
2021-02-11 12:46:19 +01:00
*/
/*! \fn QskSkinnable::innerPadding
2021-02-22 17:15:37 +01:00
2021-03-03 08:27:08 +01:00
\brief Calculate the padding from attributes for the given aspect
2021-02-22 17:15:37 +01:00
2021-03-03 08:27:08 +01:00
Beside padding hints, the radii of the shape might have an effect
2021-02-22 17:15:37 +01:00
\param aspect Unresolved aspect
\param outerBoxSize Size of the box
2021-03-03 08:27:08 +01:00
\return Effective padding
2021-02-11 12:46:19 +01:00
*/
/*! \fn QskSkinnable::effectiveSkinlet
2021-03-03 08:27:08 +01:00
\return Skinlet that has been set with setSkinlet() - or the default
2021-02-16 12:19:05 +01:00
skinlet from the skin, that had been registered for metaObject()
2021-02-11 12:46:19 +01:00
*/
2021-02-16 12:19:05 +01:00
2021-02-11 12:46:19 +01:00
/*! \fn QskSkinnable::effectiveSkin
2021-03-03 08:27:08 +01:00
\return Almost always the current skin. The only exception is when manually
2021-02-16 12:19:05 +01:00
setting a skinlet being created from a different skin.
2021-03-03 08:27:08 +01:00
\sa QskSetup::skin(), QskSkinlet::skin()
2021-02-11 12:46:19 +01:00
*/
/*! \fn QskSkinnable::startTransition
2021-02-19 11:06:39 +01:00
2021-03-03 08:27:08 +01:00
Start a transition for a specific aspect, that interpolates
between 2 values. While the transition is in process a look up for
the aspect will return the current value of the interpolation.
2021-02-19 11:06:39 +01:00
2021-03-03 08:27:08 +01:00
In most cases startTransition() is called automatically, when
the skinState() changes and am animation is found for the new
state.
2021-02-19 11:06:39 +01:00
2021-03-03 08:27:08 +01:00
\param aspect Unresolved aspect, only subcontrol substitution will be done
\param from Start value of the transition
2021-02-19 11:06:39 +01:00
2021-03-03 08:27:08 +01:00
\sa effectiveAnimation()
2021-02-11 12:46:19 +01:00
*/
/*! \fn QskSkinnable::effectiveSubcontrol
2021-02-19 11:06:39 +01:00
2021-03-03 08:27:08 +01:00
Subcontrol substitution is a mechanism, that is used when a variation of
2021-02-19 11:06:39 +01:00
an existing control needs to have skin hints, that can be configured
individually without having to reimplement a new skinlet.
F.e. a button on a toolbar is often flat with a hovering effect. In this
case a tool button could be derived from QskPushButton, where the
QskPushButton::Panel subcontrol gets substituted by a new subcontrol that
is defined for the tool button.
2021-03-03 08:27:08 +01:00
Subcontrol substitution is part of a concept that is known as
2021-02-23 12:07:08 +01:00
\ref aspect resolving "aspect resolving".
2021-02-19 11:06:39 +01:00
2021-03-03 08:27:08 +01:00
\param subControl Subcontrol
\return Substituted subcontrol
2021-02-19 11:06:39 +01:00
2021-03-03 08:27:08 +01:00
The default implementation is a no operation and does not substitute
2021-02-11 12:46:19 +01:00
*/
/*! \fn QskSkinnable::controlCast()
2021-03-03 08:27:08 +01:00
Safe casting of the skinnable to a QskControl
2021-02-11 12:46:19 +01:00
2021-03-03 08:27:08 +01:00
The operation is based on comparing metaObject()
with QskControl::staticMetaObject() ( similar to what qobject_cast() does )
2021-02-11 12:46:19 +01:00
2021-03-03 08:27:08 +01:00
\return Control if successful, or a nullptr otherwise
2021-02-11 12:46:19 +01:00
*/
2021-02-16 12:19:05 +01:00
/*! \fn QskSkinnable::controlCast() const
2021-02-11 12:46:19 +01:00
2021-03-03 08:27:08 +01:00
Safe casting of the skinnable to a QskControl
2021-02-11 12:46:19 +01:00
2021-02-16 12:19:05 +01:00
The operation is based on comparing metaObject()
with QskControl::staticMetaObject() ( similar to what qobject_cast() does )
\return Control if successful, or a nullptr otherwise
2021-02-11 12:46:19 +01:00
*/
/*! \fn QskSkinnable::owningControl
2021-03-03 08:27:08 +01:00
In most cases a skinnable is one of the base classes of QskControl and
the owning control is the derived control. But in case of a control, that
2021-02-16 12:19:05 +01:00
is built from several skinnables this pure virtual method needs to be implemented.
2021-03-03 08:27:08 +01:00
\return QskControl, that is owner of the skinnable. In most
2021-02-16 12:19:05 +01:00
cases the skinnable is inherited
2021-02-11 12:46:19 +01:00
*/
/*! \fn QskSkinnable::metaObject
2021-02-22 17:15:37 +01:00
2021-03-03 08:27:08 +01:00
\return Usually the metaObject of the owning control
\sa owningControl()
2021-02-11 12:46:19 +01:00
*/
/*! \fn QskSkinnable::debug( QskAspect ) const
2021-02-17 11:09:45 +01:00
2021-03-03 08:27:08 +01:00
Writes an aspect to qDebug() using the string conversions for metaObject()
2021-02-17 11:09:45 +01:00
2021-03-03 08:27:08 +01:00
\param aspect Aspect to be printed
\sa qskDebugAspect()
2021-02-11 12:46:19 +01:00
*/
/*! \fn QskSkinnable::debug( QskAspect::State ) const
2021-02-17 11:09:45 +01:00
2021-03-03 08:27:08 +01:00
Writes a state to qDebug() using the string conversions for metaObject()
2021-02-17 11:09:45 +01:00
\param state State to be printed
\sa qskDebugState()
2021-02-11 12:46:19 +01:00
*/
/*! \fn QskSkinnable::debug( QDebug, QskAspect ) const
2021-02-17 11:09:45 +01:00
Writes an aspect to a stream using the string conversions for metaObject()
\param debug Debug stream
\param aspect Aspect to be printed
\sa qskDebugAspect()
2021-02-11 12:46:19 +01:00
*/
/*! \fn QskSkinnable::debug( QDebug, QskAspect::State ) const
2021-02-17 11:09:45 +01:00
Writes a state to a stream using the string conversions for metaObject()
\param debug Debug stream
\param state State to be printed
\sa qskDebugState()
2021-02-11 12:46:19 +01:00
*/
/*! \fn QskSkinnable::setColor( QskAspect, Qt::GlobalColor )
2021-02-17 11:09:45 +01:00
2021-03-03 08:27:08 +01:00
\brief Sets a color hint.
2021-02-22 17:15:37 +01:00
2021-03-03 08:27:08 +01:00
QskAspect::Color will be added to aspect.
2021-02-17 11:09:45 +01:00
2021-03-03 08:27:08 +01:00
\param aspect Unresolved aspect
\param color Color hint
2021-02-17 11:09:45 +01:00
2021-03-03 08:27:08 +01:00
\sa setSkinHint(), QskAspect::Color
2021-02-11 12:46:19 +01:00
*/
/*! \fn QskSkinnable::setColor( QskAspect, QRgb )
2021-02-17 11:09:45 +01:00
2021-03-03 08:27:08 +01:00
\brief Sets a color hint.
2021-02-22 17:15:37 +01:00
2021-03-03 08:27:08 +01:00
QskAspect::Color will be added to aspect.
2021-02-17 11:09:45 +01:00
2021-03-03 08:27:08 +01:00
\param aspect Unresolved aspect
\param rgb Color hint
2021-02-22 17:15:37 +01:00
2021-03-03 08:27:08 +01:00
\sa setSkinHint(), QskAspect::Color
2021-02-11 12:46:19 +01:00
*/
/*! \fn QskSkinnable::setColor( QskAspect, const QColor& )
2021-02-17 11:09:45 +01:00
2021-03-03 08:27:08 +01:00
\brief Sets a color hint.
2021-02-22 17:15:37 +01:00
2021-03-03 08:27:08 +01:00
QskAspect::Color will be added to aspect.
2021-02-17 11:09:45 +01:00
2021-03-03 08:27:08 +01:00
\param aspect Unresolved aspect
\param color Color hint
2021-02-17 11:09:45 +01:00
2021-03-03 08:27:08 +01:00
\sa setSkinHint(), QskAspect::Color
2021-02-11 12:46:19 +01:00
*/
/*! \fn QskSkinnable::resetColor
2021-02-17 11:09:45 +01:00
2021-03-03 08:27:08 +01:00
\brief Removes a color hint from the local table
2021-02-22 17:15:37 +01:00
2021-03-03 08:27:08 +01:00
QskAspect::Color will be added to aspect.
2021-02-17 11:09:45 +01:00
2021-03-03 08:27:08 +01:00
\param aspect Unresolved aspect
\return true, if an entry in the local hint table was found and removed.
2021-02-17 11:09:45 +01:00
2021-03-03 08:27:08 +01:00
\sa resetSkinHint(), setColor()
2021-02-11 12:46:19 +01:00
*/
/*! \fn QskSkinnable::color
2021-02-22 17:15:37 +01:00
2021-03-03 08:27:08 +01:00
\brief Retrieves a color hint
2021-02-22 17:15:37 +01:00
2021-03-03 08:27:08 +01:00
QskAspect::Color will be added to aspect.
2021-02-22 17:15:37 +01:00
2021-03-03 08:27:08 +01:00
\param aspect Unresolved aspect
\param status Optional status information
\return Color hint, or QColor() if no value has been found
2021-02-22 17:15:37 +01:00
2021-03-03 08:27:08 +01:00
\sa effectiveSkinHint(), setColor()
2021-02-11 12:46:19 +01:00
*/
/*! \fn QskSkinnable::setMetric
2021-02-22 17:15:37 +01:00
\brief Sets a metric hint
2021-03-03 08:27:08 +01:00
QskAspect::Metric will be added to aspect.
2021-02-22 17:15:37 +01:00
\param aspect Unresolved aspect
\param metric Metric hint
\sa setSkinHint(), QskAspect::Metric
2021-02-11 12:46:19 +01:00
*/
/*! \fn QskSkinnable::resetMetric
2021-02-22 17:15:37 +01:00
2021-03-03 08:27:08 +01:00
\brief Removes a metric hint from the local table
2021-02-22 17:15:37 +01:00
QskAspect::Metric will be added to aspect.
\param aspect Unresolved aspect
\return true, if an entry in the local hint table was found and removed.
\sa resetSkinHint(), setMetric()
2021-02-11 12:46:19 +01:00
*/
/*! \fn QskSkinnable::metric
2021-02-22 17:15:37 +01:00
\brief Retrieves a metric hint
QskAspect::Metric will be added to aspect.
\param aspect Unresolved aspect
2021-03-03 08:27:08 +01:00
\param status Optional status information
2021-02-22 17:15:37 +01:00
2021-03-03 08:27:08 +01:00
\return Metric, or 0 if no value was found
2021-02-22 17:15:37 +01:00
\sa effectiveSkinHint(), setMetric()
2021-02-11 12:46:19 +01:00
*/
/*! \fn QskSkinnable::setFlagHint
2021-02-22 17:15:37 +01:00
\brief Sets a flag hint
\param aspect Unresolved aspect
\param flag Flag hint
\sa setSkinHint(), QskAspect::Flag
2021-02-11 12:46:19 +01:00
*/
/*! \fn QskSkinnable::resetFlagHint
2021-02-22 17:15:37 +01:00
\brief Removes a flag hint from the local table
\param aspect Unresolved aspect
\return true, if an entry in the local hint table was found and removed.
\sa resetSkinHint(), setFlag()
2021-02-11 12:46:19 +01:00
*/
/*! \fn QskSkinnable::flagHint( QskAspect ) const
2021-02-22 17:15:37 +01:00
\brief Retrieves a flag hint
\param aspect Unresolved aspect
2021-03-03 08:27:08 +01:00
\param status Optional status information
\return Flag, or an invalid QVariant in case no value was found
2021-02-22 17:15:37 +01:00
\sa effectiveSkinHint(), setFlag()
2021-02-11 12:46:19 +01:00
*/
/*! \fn template< typename T > T QskSkinnable::flagHint( QskAspect, T ) const
2021-02-22 17:15:37 +01:00
\brief Retrieves a flag hint
\param aspect Unresolved aspect
\param defaultValue Default result, when no entry can be found in the hint tables
\return Flag - or defaultValue if no value had been found
\sa resetSkinHint(), setFlag()
2021-02-11 12:46:19 +01:00
*/
2021-02-16 12:19:05 +01:00
/*! \fn QskSkinnable::setStrutSizeHint( QskAspect, const QSizeF& )
2021-02-22 17:15:37 +01:00
\brief Sets a metric hint
QskAspect::Metric | QskAspect::StrutSize will be added to aspect.
\param aspect Unresolved aspect
\param size Strut size hint
\sa setSkinHint(), QskAspect::Metric, QskAspect::StrutSize
2021-02-11 12:46:19 +01:00
*/
2021-02-22 17:15:37 +01:00
/*! \fn QskSkinnable::setStrutSizeHint( QskAspect, qreal, qreal )
\brief Sets a strut size hint
QskAspect::Metric | QskAspect::StrutSize will be added to aspect.
\param aspect Unresolved aspect
\param width Width of the strut size
\param height Height of the strut size
\sa setSkinHint(), QskAspect::Metric, QskAspect::StrutSize
2021-02-11 12:46:19 +01:00
*/
/*! \fn QskSkinnable::resetStrutSizeHint
2021-02-22 17:15:37 +01:00
\brief Removes a strut size hint from the local table
QskAspect::Metric | QskAspect::StrutSize will be added to aspect.
\param aspect Unresolved aspect
\return true, if an entry in the local hint table was found and removed.
\sa resetSkinHint(), setStrutSizeHint()
2021-02-11 12:46:19 +01:00
*/
/*! \fn QskSkinnable::strutSizeHint
2021-02-22 17:15:37 +01:00
\brief Retrieves a strut size hint
QskAspect::Metric | QskAspect::StrutSize will be added to aspect.
\param aspect Unresolved aspect
\param status Optional status information
\return Strut size, or QSizeF() if no value was found
\sa effectiveSkinHint(), setStrutSizeHint()
2021-02-11 12:46:19 +01:00
*/
/*! \fn QskSkinnable::setMarginHint( QskAspect, qreal )
2021-02-22 17:15:37 +01:00
\brief Sets a margin hint
QskAspect::Metric | QskAspect::Margin will be added to aspect.
\param aspect Unresolved aspect
\param margin Margin
\sa setSkinHint(), QskAspect::Metric, QskAspect::Margin
2021-02-11 12:46:19 +01:00
*/
/*! \fn QskSkinnable::setMarginHint( QskAspect, const QMarginsF& )
2021-02-22 17:15:37 +01:00
2021-03-03 08:27:08 +01:00
\brief Sets a margin hint
2021-02-22 17:15:37 +01:00
QskAspect::Metric | QskAspect::Margin will be added to aspect.
\param aspect Unresolved aspect
\param margin Margin
\sa setSkinHint(), QskAspect::Metric, QskAspect::Margin
2021-02-11 12:46:19 +01:00
*/
/*! \fn QskSkinnable::resetMarginHint
2021-02-22 17:15:37 +01:00
\brief Removes a margin hint from the local table
QskAspect::Metric | QskAspect::Margin will be added to aspect.
\param aspect Unresolved aspect
\return true, if an entry in the local hint table was found and removed.
\sa resetSkinHint(), setMarginHint()
2021-02-11 12:46:19 +01:00
*/
/*! \fn QskSkinnable::marginHint
2021-02-22 17:15:37 +01:00
\brief Retrieves a margin hint
QskAspect::Metric | QskAspect::Margin will be added to aspect.
\param aspect Unresolved aspect
\param status Optional status information
\return margin, or QMarginsF() if no value was found
\sa effectiveSkinHint(), setMarginHint()
2021-02-11 12:46:19 +01:00
*/
/*! \fn QskSkinnable::setPaddingHint( QskAspect, qreal )
2021-02-22 17:15:37 +01:00
2021-03-03 08:27:08 +01:00
\brief Sets a padding hint
2021-02-22 17:15:37 +01:00
QskAspect::Metric | QskAspect::Padding will be added to aspect.
\param aspect Unresolved aspect
\param padding Padding
\sa setSkinHint(), QskAspect::Metric, QskAspect::Padding
2021-02-11 12:46:19 +01:00
*/
/*! \fn QskSkinnable::setPaddingHint( QskAspect, const QMarginsF& )
2021-02-22 17:15:37 +01:00
2021-03-03 08:27:08 +01:00
\brief Sets a padding hint
2021-02-22 17:15:37 +01:00
QskAspect::Metric | QskAspect::Padding will be added to aspect.
\param aspect Unresolved aspect
\param padding Padding
\sa setSkinHint(), QskAspect::Metric, QskAspect::Padding
2021-02-11 12:46:19 +01:00
*/
/*! \fn QskSkinnable::resetPaddingHint
2021-02-22 17:15:37 +01:00
\brief Removes a padding hint from the local table
QskAspect::Metric | QskAspect::Padding will be added to aspect.
\param aspect Unresolved aspect
\return true, if an entry in the local hint table was found and removed.
\sa resetSkinHint(), setPaddingHint()
2021-02-11 12:46:19 +01:00
*/
/*! \fn QskSkinnable::paddingHint
2021-02-22 17:15:37 +01:00
2021-03-03 08:27:08 +01:00
\brief Retrieves a padding hint
2021-02-22 17:15:37 +01:00
QskAspect::Metric | QskAspect::Padding will be added to aspect.
\param aspect Unresolved aspect
\param status Optional status information
\return padding, or QMarginsF() if no value was found
\sa effectiveSkinHint(), setPaddingHint()
2021-02-11 12:46:19 +01:00
*/
/*! \fn QskSkinnable::setGradientHint
2021-02-22 17:15:37 +01:00
\brief Sets a gradient as color hint
QskAspect::Color will be added to aspect.
\param aspect Unresolved aspect
\param gradient Gradint
\sa setSkinHint(), QskAspect::Color
2021-02-11 12:46:19 +01:00
*/
/*! \fn QskSkinnable::gradientHint
2021-02-22 17:15:37 +01:00
2021-03-03 08:27:08 +01:00
\brief Retrieves a color hint as gradient
2021-02-22 17:15:37 +01:00
QskAspect::Color will be added to aspect.
\param aspect Unresolved aspect
\param status Optional status information
\return gradient, or QskGraient() if no value was found
\sa effectiveSkinHint(), setGradientHint()
2021-02-11 12:46:19 +01:00
*/
/*! \fn QskSkinnable::setBoxShapeHint
2021-02-22 17:15:37 +01:00
\brief Sets a shape hint
QskAspect::Metric | QskAspect::Shape will be added to aspect.
\param aspect Unresolved aspect
\param shape Shape
\sa setSkinHint(), QskAspect::Metric, QskAspect::Shape
2021-02-11 12:46:19 +01:00
*/
/*! \fn QskSkinnable::resetBoxShapeHint
2021-02-22 17:15:37 +01:00
\brief Removes a shape hint from the local table
QskAspect::Metric | QskAspect::Shape will be added to aspect.
\param aspect Unresolved aspect
\return true, if an entry in the local hint table was found and removed.
\sa resetSkinHint(), setBoxShapeHint()
2021-02-11 12:46:19 +01:00
*/
/*! \fn QskSkinnable::boxShapeHint
2021-02-22 17:15:37 +01:00
\brief Retrieves a shape hint
QskAspect::Metric | QskAspect::Shape will be added to aspect.
\param aspect Unresolved aspect
\param status Optional status information
\return shape, or QskBoxShapeMetrics() if no value was found
\sa effectiveSkinHint(), setBoxShapeHint()
2021-02-11 12:46:19 +01:00
*/
/*! \fn QskSkinnable::setBoxBorderMetricsHint
2021-02-22 17:15:37 +01:00
\brief Sets a border metrics hint
QskAspect::Metric | QskAspect::Border will be added to aspect.
\param aspect Unresolved aspect
\param border Border metrics
\sa setSkinHint(), QskAspect::Metric, QskAspect::Border
2021-02-11 12:46:19 +01:00
*/
/*! \fn QskSkinnable::resetBoxBorderMetricsHint
2021-02-22 17:15:37 +01:00
\brief Removes a border metrics hint from the local table
QskAspect::Metric | QskAspect::Border will be added to aspect.
\param aspect Unresolved aspect
\return true, if an entry in the local hint table was found and removed.
\sa resetSkinHint(), setBoxBorderMetricsHint()
2021-02-11 12:46:19 +01:00
*/
/*! \fn QskSkinnable::boxBorderMetricsHint
2021-02-22 17:15:37 +01:00
\brief Retrieves a border hint
QskAspect::Metric | QskAspect::Border will be added to aspect.
\param aspect Unresolved aspect
\param status Optional status information
\return border metrics, or QskBoxBorderMetrics() if no value was found
\sa effectiveSkinHint(), setBoxBorderMetricsHint()
2021-02-11 12:46:19 +01:00
*/
/*! \fn QskSkinnable::setBoxBorderColorsHint
2021-02-22 17:15:37 +01:00
\brief Sets a border colors hint
QskAspect::Color | QskAspect::Border will be added to aspect.
\param aspect Unresolved aspect
\param border Border colors
\sa setSkinHint(), QskAspect::Color, QskAspect::Border
2021-02-11 12:46:19 +01:00
*/
/*! \fn QskSkinnable::resetBoxBorderColorsHint
2021-02-22 17:15:37 +01:00
\brief Removes a border colors hint from the local table
QskAspect::Color | QskAspect::Border will be added to aspect.
\param aspect Unresolved aspect
\return true, if an entry in the local hint table was found and removed.
\sa resetSkinHint(), setBoxBorderColorsHint()
2021-02-11 12:46:19 +01:00
*/
/*! \fn QskSkinnable::boxBorderColorsHint
2021-02-22 17:15:37 +01:00
2021-03-03 08:27:08 +01:00
\brief Retrieves border colors hint
2021-02-22 17:15:37 +01:00
QskAspect::Color | QskAspect::Border will be added to aspect.
\param aspect Unresolved aspect
\param status Optional status information
\return border colors, or QskBoxBorderColors() if no value was found
\sa effectiveSkinHint(), setBoxBorderColorsHint()
2021-02-11 12:46:19 +01:00
*/
/*! \fn QskSkinnable::setSpacingHint
2021-02-22 17:15:37 +01:00
\brief Sets a spacing hint
QskAspect::Metric | QskAspect::Spacing will be added to aspect.
\param aspect Unresolved aspect
\param spacing Spacing
\sa setSkinHint(), QskAspect::Metric, QskAspect::Spacing
2021-02-11 12:46:19 +01:00
*/
/*! \fn QskSkinnable::resetSpacingHint
2021-02-22 17:15:37 +01:00
\brief Removes a spacing hint from the local table
QskAspect::Metric | QskAspect::Spacing will be added to aspect.
\param aspect Unresolved aspect
\return true, if an entry in the local hint table was found and removed.
\sa resetSkinHint(), setSpacingHint()
2021-02-11 12:46:19 +01:00
*/
/*! \fn QskSkinnable::spacingHint
2021-02-22 17:15:37 +01:00
\brief Retrieves a spacing hint
QskAspect::Metric | QskAspect::Spacing will be added to aspect.
\param aspect Unresolved aspect
\param status Optional status information
\return spacing, or 0 if no value was found
\sa effectiveSkinHint(), setSpacingHint()
2021-02-11 12:46:19 +01:00
*/
/*! \fn QskSkinnable::setAlignmentHint
2021-02-22 17:15:37 +01:00
\brief Sets an alignment hint
QskAspect::Flag | QskAspect::Alignment will be added to aspect.
\param aspect Unresolved aspect
\param alignment Alignment hint
\sa setSkinHint(), QskAspect::Flag, QskAspect::Alignment
2021-02-11 12:46:19 +01:00
*/
/*! \fn QskSkinnable::resetAlignmentHint
2021-02-22 17:15:37 +01:00
\brief Removes an alignment hint from the local table
QskAspect::Flag | QskAspect::Alignment will be added to aspect.
\param aspect Unresolved aspect
\return true, if an entry in the local hint table was found and removed.
\sa resetSkinHint(), setAlignmentHint()
2021-02-11 12:46:19 +01:00
*/
/*! \fn QskSkinnable::alignmentHint
2021-02-22 17:15:37 +01:00
2021-03-03 08:27:08 +01:00
\brief Retrieves an alignment hint
2021-02-22 17:15:37 +01:00
QskAspect::Flag | QskAspect::Alignment will be added to aspect.
\param aspect Unresolved aspect
\param defaultAlignment Default value
\return alignment, or defaultAlignment if no value was found
\sa effectiveSkinHint(), setAlignmentHint()
2021-02-11 12:46:19 +01:00
*/
/*! \fn QskSkinnable::setFontRoleHint
2021-02-22 17:15:37 +01:00
\brief Sets a font role hint
QskAspect::Flag | QskAspect::FontRole will be added to aspect.
\param aspect Unresolved aspect
\param role Font role
\sa setSkinHint(), QskAspect::Flag, QskAspect::FontRole
2021-02-11 12:46:19 +01:00
*/
/*! \fn QskSkinnable::resetFontRoleHint
2021-02-22 17:15:37 +01:00
\brief Removes a font role hint from the local table
QskAspect::Flag | QskAspect::FontRole will be added to aspect.
\param aspect Unresolved aspect
\return true, if an entry in the local hint table was found and removed.
\sa resetSkinHint(), setFontRoleHint()
2021-02-11 12:46:19 +01:00
*/
/*! \fn QskSkinnable::fontRoleHint
2021-02-22 17:15:37 +01:00
\brief Retrieves a font role hint
QskAspect::Flag | QskAspect::FontRole will be added to aspect.
\param aspect Unresolved aspect
\param status Optional status information
\return font role, or 0 if no value was found
\sa effectiveSkinHint(), setFontRoleHint()
2021-02-11 12:46:19 +01:00
*/
/*! \fn QskSkinnable::setGraphicRoleHint
2021-02-22 17:15:37 +01:00
\brief Sets a graphic role hint
QskAspect::Flag | QskAspect::GraphicRole will be added to aspect.
\param aspect Unresolved aspect
\param role Graphic role
\sa setSkinHint(), QskAspect::Flag, QskAspect::GraphicRole
2021-02-11 12:46:19 +01:00
*/
/*! \fn QskSkinnable::resetGraphicRoleHint
2021-02-22 17:15:37 +01:00
2021-03-03 08:27:08 +01:00
\brief Removes a graphic role hint from the local table
2021-02-22 17:15:37 +01:00
QskAspect::Flag | QskAspect::GraphicRole will be added to aspect.
\param aspect Unresolved aspect
\return true, if an entry in the local hint table was found and removed.
\sa resetSkinHint(), setGraphicRoleHint()
2021-02-11 12:46:19 +01:00
*/
/*! \fn QskSkinnable::graphicRoleHint
2021-02-22 17:15:37 +01:00
\brief A Retrieves a graphic role hint
QskAspect::Flag | QskAspect::GraphicRole will be added to aspect.
\param aspect Unresolved aspect
\param status Optional status information
\return graphic role, or 0 if no value was found
\sa effectiveSkinHint(), setGraphicRoleHint()
2021-02-11 12:46:19 +01:00
*/
/*! \fn QskSkinnable::isTransitionAccepted
2021-02-22 17:15:37 +01:00
2021-03-03 08:27:08 +01:00
\brief Additional check if an transition should be started
2021-02-22 17:15:37 +01:00
2021-03-03 08:27:08 +01:00
In certain situations a transition initiated from state depending hints
needs to be avoided.
2021-02-22 17:15:37 +01:00
2021-03-03 08:27:08 +01:00
\param aspect Aspect
\return true, when owningControl()->isInitiallyPainted() is true
2021-02-11 12:46:19 +01:00
*/
/*! \fn QskSkinnable::hintTable()
2021-02-23 12:07:08 +01:00
2021-03-03 08:27:08 +01:00
\brief Accessor for local skin hint table
2021-02-23 12:07:08 +01:00
2021-03-03 08:27:08 +01:00
Definitions in the local hint table have precedence over those from
the table of the skin. Initially the local table is empty.
2021-02-23 12:07:08 +01:00
2021-03-03 08:27:08 +01:00
\return Reference to the local hint table
2021-02-23 12:07:08 +01:00
2021-03-03 08:27:08 +01:00
\sa setSkinHint(), QskSkinHintTableEditor
2021-02-11 12:46:19 +01:00
*/
/*! \fn QskSkinnable::hintTable() const
2021-02-23 12:07:08 +01:00
\brief Accessor for local skin hint table
Definitions in the local hint table have precedence over those from
the table of the skin. Initially the local table is empty.
\return Reference to the local hint table
\sa setSkinHint(), QskSkinHintTableEditor
2020-12-12 14:05:09 +01:00
*/