#include <QskSkinnable.h>
Inherited by QskControl
Name | |
---|---|
QskSkinnable() | |
virtual | ~QskSkinnable() |
void | setSkinlet(const QskSkinlet * skinlet) Set an individual skinlet to render/display the content. |
const QskSkinlet * | skinlet() const |
QFont | effectiveFont(QskAspect aspect) const |
QskColorFilter | effectiveGraphicFilter(QskAspect aspect) const |
void | setSubcontrolProxy(QskAspect::Subcontrol subControl, QskAspect::Subcontrol proxy) |
void | resetSubcontrolProxy(QskAspect::Subcontrol subcontrol) |
QskAspect::Subcontrol | subcontrolProxy(QskAspect::Subcontrol subControl) const |
bool | setAnimationHint(QskAspect aspect, QskAnimationHint hint) |
QskAnimationHint | animationHint(QskAspect aspect, QskSkinHintStatus * status =nullptr) const |
bool | setSkinHint(QskAspect aspect, const QVariant & hint) Insert a hint into the local hint table. |
bool | resetSkinHint(QskAspect aspect) Remove a hint from the local hint table. |
QskAnimationHint | effectiveAnimation(QskAspect::Type type, QskAspect::Subcontrol subControl, QskAspect::States states, QskSkinHintStatus * status =nullptr) const |
QVariant | effectiveSkinHint(QskAspect aspect, QskSkinHintStatus * status =nullptr) const Find the value for a specific aspect. |
virtual QskAspect::Placement | effectivePlacement() const |
QskSkinHintStatus | hintStatus(QskAspect aspect) const |
QRectF | subControlRect(const QRectF & contentsRect, QskAspect::Subcontrol subControl) const Calculate position and size of a subControl. |
QRectF | subControlContentsRect(const QRectF & contentsRect, QskAspect::Subcontrol subControl) const Calculate the inner rectangle for subControl. |
QSizeF | outerBoxSize(QskAspect aspect, const QSizeF & innerBoxSize) const Calculate the size, when being expanded by paddings, indentations. |
QSizeF | innerBoxSize(QskAspect aspect, const QSizeF & outerBoxSize) const Calculate the size, with paddings, indentations being subtracted. |
QRectF | innerBox(QskAspect aspect, const QRectF & outerBox) const Calculate the rectangle, whith paddings, indentations being subtracted. |
QRectF | outerBox(QskAspect aspect, const QRectF & innerBox) const Calculate the rectangle, when being expanded by paddings, indentations. |
QMarginsF | innerPadding(QskAspect aspect, const QSizeF & outerBoxSize) const Calculate the padding from attributes for the given aspect. |
const QskSkinlet * | effectiveSkinlet() const |
QskSkin * | effectiveSkin() const |
void | startTransition(QskAspect aspect, QskAnimationHint animationHint, QVariant from, QVariant to) |
QskAspect::Subcontrol | effectiveSubcontrol(QskAspect::Subcontrol subControl) const |
QskControl * | controlCast() |
const QskControl * | controlCast() const |
virtual QskControl * | owningControl() const =0 |
virtual const QMetaObject * | metaObject() const =0 |
void | debug(QskAspect aspect) const |
void | debug(QskAspect::State state) const |
void | debug(QDebug debug, QskAspect aspect) const |
void | debug(QDebug debug, QskAspect::State state) const |
void | setSkinStates(QskAspect::States newStates) |
void | setSkinStateFlag(QskAspect::State stateFlag, bool on =true) |
void | addSkinStates(QskAspect::States states) |
void | clearSkinStates(QskAspect::States states) |
void | replaceSkinStates(QskAspect::States newStates) |
bool | hasSkinState(QskAspect::State state) const |
QskAspect::States | skinStates() const |
const char * | skinStatesAsPrintable() const |
const char * | skinStatesAsPrintable(QskAspect::States states) const |
bool | setColor(QskAspect aspect, Qt::GlobalColor color) Sets a color hint. |
bool | setColor(QskAspect aspect, QRgb rgb) Sets a color hint. |
bool | setColor(QskAspect aspect, const QColor & color) Sets a color hint. |
bool | resetColor(QskAspect aspect) Removes a color hint from the local table. |
QColor | color(QskAspect aspect, QskSkinHintStatus * status =nullptr) const Retrieves a color hint. |
bool | setMetric(QskAspect aspect, qreal metric) Sets a metric hint. |
bool | resetMetric(QskAspect aspect) Removes a metric hint from the local table. |
qreal | metric(QskAspect aspect, QskSkinHintStatus * status =nullptr) const Retrieves a metric hint. |
bool | setFlagHint(QskAspect aspect, int flag) Sets a flag hint. |
bool | resetFlagHint(QskAspect aspect) Removes a flag hint from the local table. |
int | flagHint(QskAspect aspect) const Retrieves a flag hint. |
template <typename T > T |
flagHint(QskAspect aspect, T defaultValue =T()) const Retrieves a flag hint. |
bool | setStrutSizeHint(QskAspect aspect, const QSizeF & size) Sets a metric hint. |
bool | setStrutSizeHint(QskAspect aspect, qreal width, qreal height) Sets a strut size hint. |
bool | resetStrutSizeHint(QskAspect aspect) Removes a strut size hint from the local table. |
QSizeF | strutSizeHint(QskAspect aspect, QskSkinHintStatus * status =nullptr) const Retrieves a strut size hint. |
bool | setMarginHint(QskAspect aspect, qreal margins) Sets a margin hint. |
bool | setMarginHint(QskAspect aspect, const QMarginsF & margins) Sets a margin hint. |
bool | resetMarginHint(QskAspect aspect) Removes a margin hint from the local table. |
QMarginsF | marginHint(QskAspect aspect, QskSkinHintStatus * status =nullptr) const Retrieves a margin hint. |
bool | setPaddingHint(QskAspect aspect, qreal padding) Sets a padding hint. |
bool | setPaddingHint(QskAspect aspect, const QMarginsF & padding) Sets a padding hint. |
bool | resetPaddingHint(QskAspect aspect) Removes a padding hint from the local table. |
QMarginsF | paddingHint(QskAspect aspect, QskSkinHintStatus * status =nullptr) const Retrieves a padding hint. |
bool | setGradientHint(QskAspect aspect, const QskGradient & gradient) Sets a gradient as color hint. |
QskGradient | gradientHint(QskAspect aspect, QskSkinHintStatus * status =nullptr) const Retrieves a color hint as gradient. |
bool | setBoxShapeHint(QskAspect aspect, const QskBoxShapeMetrics & shape) Sets a shape hint. |
bool | resetBoxShapeHint(QskAspect aspect) Removes a shape hint from the local table. |
QskBoxShapeMetrics | boxShapeHint(QskAspect aspect, QskSkinHintStatus * status =nullptr) const Retrieves a shape hint. |
bool | setBoxBorderMetricsHint(QskAspect aspect, const QskBoxBorderMetrics & border) Sets a border metrics hint. |
bool | resetBoxBorderMetricsHint(QskAspect aspect) Removes a border metrics hint from the local table. |
QskBoxBorderMetrics | boxBorderMetricsHint(QskAspect aspect, QskSkinHintStatus * status =nullptr) const Retrieves a border hint. |
bool | setBoxBorderColorsHint(QskAspect aspect, const QskBoxBorderColors & colors) Sets a border colors hint. |
bool | resetBoxBorderColorsHint(QskAspect aspect) Removes a border colors hint from the local table. |
QskBoxBorderColors | boxBorderColorsHint(QskAspect aspect, QskSkinHintStatus * status =nullptr) const Retrieves border colors hint. |
bool | setArcMetricsHint(QskAspect aspect, const QskArcMetrics & arc) |
bool | resetArcMetricsHint(QskAspect aspect) |
QskArcMetrics | arcMetricsHint(QskAspect aspect, QskSkinHintStatus * status =nullptr) const |
bool | setSpacingHint(QskAspect aspect, qreal spacing) Sets a spacing hint. |
bool | resetSpacingHint(QskAspect aspect) Removes a spacing hint from the local table. |
qreal | spacingHint(QskAspect aspect, QskSkinHintStatus * status =nullptr) const Retrieves a spacing hint. |
bool | setAlignmentHint(QskAspect aspect, Qt::Alignment alignment) Sets an alignment hint. |
bool | resetAlignmentHint(QskAspect aspect) Removes an alignment hint from the local table. |
Qt::Alignment | alignmentHint(QskAspect aspect, Qt::Alignment defaultAlignment =Qt::Alignment()) const Retrieves an alignment hint. |
bool | setFontRoleHint(QskAspect aspect, int role) Sets a font role hint. |
bool | resetFontRoleHint(QskAspect aspect) Removes a font role hint from the local table. |
int | fontRoleHint(QskAspect aspect, QskSkinHintStatus * status =nullptr) const Retrieves a font role hint. |
bool | setGraphicRoleHint(QskAspect aspect, int role) Sets a graphic role hint. |
bool | resetGraphicRoleHint(QskAspect aspect) Removes a graphic role hint from the local table. |
int | graphicRoleHint(QskAspect aspect, QskSkinHintStatus * status =nullptr) const A Retrieves a graphic role hint. |
Name | |
---|---|
virtual void | updateNode(QSGNode * parentNode) |
virtual bool | isTransitionAccepted(QskAspect aspect) const Additional check if an transition should be started. |
virtual QskAspect::Subcontrol | substitutedSubcontrol(QskAspect::Subcontrol subControl) const |
QskSkinHintTable & | hintTable() Accessor for local skin hint table. |
const QskSkinHintTable & | hintTable() const Accessor for local skin hint table. |
class QskSkinnable;
See: QskSkin, QskSkinlet, QskControl, QskSkinHintTable
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 adding values to the local skin hint table - it is even possible to replace the skinlet individually.
In most cases a skinnable is a QskControl, but conceptually it is possible to have controls, that consist of many skinnables.
QskSkinnable()
See: effectiveSkin(), effectiveSkinlet, effectiveSkinHint
Constructs a skinnable where all settings will be resolved from the skin
virtual ~QskSkinnable()
Called when the skinnable is destroyed.
void setSkinlet(
const QskSkinlet * skinlet
)
Set an individual skinlet to render/display the content.
Parameters:
See: skinlet(), effectiveSkinlet(), resetSkinlet(), QskSkin::declareSkinlet, QskSkinlet::isOwnedBySkinnable()
Note: Overriding the skinlet that has been registered in the skin breaks the themeability of the skinnable.
Usually all skinnables of the same type are rendered by the same instance of a skinlet. For rare situations it can be useful to assign a different skinlet.
When QskSkinlet::isOwnedBySkinnable() is true, the skinlet will be deleted, when the skinnable is deleted or a different skinlet gets assigned.
const QskSkinlet * skinlet() const
See: setSkinlet(), effectiveSkinlet(), effectiveSkin()
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.
QFont effectiveFont(
QskAspect aspect
) const
Parameters:
See: fontRoleHint(), effectiveSkinHint(), QskSkin::font()
Return: Font, corresponding to the resolved aspect
Finds the font role for the given aspect and returns the corresponding font from the font table of the skin.
QskColorFilter effectiveGraphicFilter(
QskAspect aspect
) const
Parameters:
See: graphicRoleHint(), effectiveSkinHint(), QskSkin::graphicFilter()
Return: Color filter, corresponding to the resolved aspect
Finds the graphic role for the given aspect and returns the corresponding color filter from the skin
void setSubcontrolProxy(
QskAspect::Subcontrol subControl,
QskAspect::Subcontrol proxy
)
void resetSubcontrolProxy(
QskAspect::Subcontrol subcontrol
)
QskAspect::Subcontrol subcontrolProxy(
QskAspect::Subcontrol subControl
) const
bool setAnimationHint(
QskAspect aspect,
QskAnimationHint hint
)
Parameters:
See: animationHint(), effectiveAnimation()
Insert an animation hint into the local hint table
QskAnimationHint animationHint(
QskAspect aspect,
QskSkinHintStatus * status =nullptr
) const
Parameters:
See: effectiveSkinHint()
Retrieve the configuration of the animator for the current state.
bool setSkinHint(
QskAspect aspect,
const QVariant & hint
)
Insert a hint into the local hint table.
Parameters:
See: effectiveSkinHint(), resetSkinHint(), hintTable(), QskSkinHintTableEditor()
Presentation, beheviour and layout of the scene graph nodes are affected by specific attributes - skin hints - that are configured in a table of the skin. Each skinnable has its own table 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.
bool resetSkinHint(
QskAspect aspect
)
Remove a hint from the local hint table.
Parameters:
See: setSkinHint(), effectiveSkinHint()
After removing the hint from the local table the hint will be resolved fro the hint table of the skin.
QskAnimationHint effectiveAnimation(
QskAspect::Type type,
QskAspect::Subcontrol subControl,
QskAspect::States states,
QskSkinHintStatus * status =nullptr
) const
Parameters:
See: animationHint()
Return: Value from the hint tables
Retrieve the configuration of the animator for reaching a specific state.
QVariant effectiveSkinHint(
QskAspect aspect,
QskSkinHintStatus * status =nullptr
) const
Find the value for a specific aspect.
Parameters:
See: effectiveSubcontrol(), effectivePlacement()
Return: Hint value, or an invalid QVariant if no value was found
If an animation is running for the given aspect its value will be returned as hint. Then effectiveSkinHint() tries to find a hint in the local table and finally tries to resolve the aspect from the hint table of the skin.
virtual QskAspect::Placement effectivePlacement() const
See: QskAspect::Placement, effectiveSkinHint()
Return: The default implementation returns QskAspect::NoPlacement;
Reimplemented by: QskSeparator::effectivePlacement
The placements bits are added to an unresolved aspect when inserting or looking up values in the hint table.
QskSkinHintStatus hintStatus(
QskAspect aspect
) const
Parameters:
See: effectiveSkinHint()
Return: Informations about how the aspect would be resolved
QRectF subControlRect(
const QRectF & contentsRect,
QskAspect::Subcontrol subControl
) const
Calculate position and size of a subControl.
Parameters:
See: effectiveSkinlet(), QskSkinlet::subControlRect(), QskControl::contentsRect()
Return: Geometry for the subControl
A convenience method that forwards the calculation to the skinlet
QRectF subControlContentsRect(
const QRectF & contentsRect,
QskAspect::Subcontrol subControl
) const
Calculate the inner rectangle for subControl.
Parameters:
See: QskSkinlet::subControlRect(), innerBox()
Return: Geometry for contents inside the subControl
The inner rectangle a subcontrol is its geometry with paddings, indentations being subtracted. F.e. the inner rectangle of QskPushButton::Panel is the bounding rectangle for laying out the QskPushButton::Text and QskPushButton::Graphic subcontrols.
QSizeF outerBoxSize(
QskAspect aspect,
const QSizeF & innerBoxSize
) const
Calculate the size, when being expanded by paddings, indentations.
Parameters:
See: innerBoxSize(), outerBox(), innerBox()
Return: Expanded size
Paddings, indentations depend on attributes for the given aspect.
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.
QSizeF innerBoxSize(
QskAspect aspect,
const QSizeF & outerBoxSize
) const
Calculate the size, with paddings, indentations being subtracted.
Parameters:
See: outerBoxSize(), innerBox(), outerBox()
Return: Shrunk size
Paddings, indentations depend on attributes for the given aspect.
QRectF innerBox(
QskAspect aspect,
const QRectF & outerBox
) const
Calculate the rectangle, whith paddings, indentations being subtracted.
Parameters:
See: innerBoxSize(), outerBox()
Return: Shrunk rectangle
Paddings, indentations depend on attributes for the given aspect.
QRectF outerBox(
QskAspect aspect,
const QRectF & innerBox
) const
Calculate the rectangle, when being expanded by paddings, indentations.
Parameters:
See: outerBoxSize(), innerBox()
Return: Expanded rectangle
Paddings, indentations depend on attributes for the given aspect.
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.
QMarginsF innerPadding(
QskAspect aspect,
const QSizeF & outerBoxSize
) const
Calculate the padding from attributes for the given aspect.
Parameters:
Return: Effective padding
Beside padding hints, the radii of the shape might have an effect
const QskSkinlet * effectiveSkinlet() const
Return: Skinlet that has been set with setSkinlet() - or the default skinlet from the skin, that had been registered for metaObject()
QskSkin * effectiveSkin() const
See: QskSetup::skin(), QskSkinlet::skin()
Return: Almost always the current skin. The only exception is when manually setting a skinlet being created from a different skin.
void startTransition(
QskAspect aspect,
QskAnimationHint animationHint,
QVariant from,
QVariant to
)
Parameters:
See: effectiveAnimation()
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.
In most cases startTransition() is called automatically, when the skinState() changes and am animation is found for the new state.
QskAspect::Subcontrol effectiveSubcontrol(
QskAspect::Subcontrol subControl
) const
Parameters:
Return: Substituted subcontrol
Subcontrol substitution is a mechanism, that is used when a variation of 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.
Subcontrol substitution is part of a concept that is known as aspect resolving “aspect resolving”.
The default implementation is a no operation and does not substitute
QskControl * controlCast()
Return: Control if successful, or a nullptr otherwise
Safe casting of the skinnable to a QskControl
The operation is based on comparing metaObject() with QskControl::staticMetaObject() ( similar to what qobject_cast() does )
const QskControl * controlCast() const
Return: Control if successful, or a nullptr otherwise
Safe casting of the skinnable to a QskControl
The operation is based on comparing metaObject() with QskControl::staticMetaObject() ( similar to what qobject_cast() does )
virtual QskControl * owningControl() const =0
Return: QskControl, that is owner of the skinnable. In most cases the skinnable is inherited
Reimplemented by: QskControl::owningControl
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 is built from several skinnables this pure virtual method needs to be implemented.
virtual const QMetaObject * metaObject() const =0
See: owningControl()
Return: Usually the metaObject of the owning control
void debug(
QskAspect aspect
) const
Parameters:
See: qskDebugAspect()
Writes an aspect to qDebug() using the string conversions for metaObject()
void debug(
QskAspect::State state
) const
Parameters:
See: qskDebugState()
Writes a state to qDebug() using the string conversions for metaObject()
void debug(
QDebug debug,
QskAspect aspect
) const
Parameters:
See: qskDebugAspect()
Writes an aspect to a stream using the string conversions for metaObject()
void debug(
QDebug debug,
QskAspect::State state
) const
Parameters:
See: qskDebugState()
Writes a state to a stream using the string conversions for metaObject()
void setSkinStates(
QskAspect::States newStates
)
void setSkinStateFlag(
QskAspect::State stateFlag,
bool on =true
)
Parameters:
See: setSkinState(), skinState()
Set/Clear a state in the state bits
void addSkinStates(
QskAspect::States states
)
void clearSkinStates(
QskAspect::States states
)
void replaceSkinStates(
QskAspect::States newStates
)
bool hasSkinState(
QskAspect::State state
) const
QskAspect::States skinStates() const
const char * skinStatesAsPrintable() const
const char * skinStatesAsPrintable(
QskAspect::States states
) const
bool setColor(
QskAspect aspect,
Qt::GlobalColor color
)
Sets a color hint.
Parameters:
See: setSkinHint(), QskAspect::Color
QskAspect::Color will be added to aspect.
bool setColor(
QskAspect aspect,
QRgb rgb
)
Sets a color hint.
Parameters:
See: setSkinHint(), QskAspect::Color
QskAspect::Color will be added to aspect.
bool setColor(
QskAspect aspect,
const QColor & color
)
Sets a color hint.
Parameters:
See: setSkinHint(), QskAspect::Color
QskAspect::Color will be added to aspect.
inline bool resetColor(
QskAspect aspect
)
Removes a color hint from the local table.
Parameters:
See: resetSkinHint(), setColor()
Return: true, if an entry in the local hint table was found and removed.
QskAspect::Color will be added to aspect.
QColor color(
QskAspect aspect,
QskSkinHintStatus * status =nullptr
) const
Retrieves a color hint.
Parameters:
See: effectiveSkinHint(), setColor()
Return: Color hint, or QColor() if no value has been found
QskAspect::Color will be added to aspect.
bool setMetric(
QskAspect aspect,
qreal metric
)
Sets a metric hint.
Parameters:
See: setSkinHint(), QskAspect::Metric
QskAspect::Metric will be added to aspect.
inline bool resetMetric(
QskAspect aspect
)
Removes a metric hint from the local table.
Parameters:
See: resetSkinHint(), setMetric()
Return: true, if an entry in the local hint table was found and removed.
QskAspect::Metric will be added to aspect.
qreal metric(
QskAspect aspect,
QskSkinHintStatus * status =nullptr
) const
Retrieves a metric hint.
Parameters:
See: effectiveSkinHint(), setMetric()
Return: Metric, or 0 if no value was found
QskAspect::Metric will be added to aspect.
bool setFlagHint(
QskAspect aspect,
int flag
)
Sets a flag hint.
Parameters:
See: setSkinHint(), QskAspect::Flag
inline bool resetFlagHint(
QskAspect aspect
)
Removes a flag hint from the local table.
Parameters:
See: resetSkinHint(), setFlag()
Return: true, if an entry in the local hint table was found and removed.
int flagHint(
QskAspect aspect
) const
Retrieves a flag hint.
Parameters:
See: effectiveSkinHint(), setFlag()
Return: Flag, or an invalid QVariant in case no value was found
template <typename T >
inline T flagHint(
QskAspect aspect,
T defaultValue =T()
) const
Retrieves a flag hint.
Parameters:
See: resetSkinHint(), setFlag()
Return: Flag - or defaultValue if no value had been found
bool setStrutSizeHint(
QskAspect aspect,
const QSizeF & size
)
Sets a metric hint.
Parameters:
See: setSkinHint(), QskAspect::Metric, QskAspect::StrutSize
QskAspect::Metric | QskAspect::StrutSize will be added to aspect. |
bool setStrutSizeHint(
QskAspect aspect,
qreal width,
qreal height
)
Sets a strut size hint.
Parameters:
See: setSkinHint(), QskAspect::Metric, QskAspect::StrutSize
QskAspect::Metric | QskAspect::StrutSize will be added to aspect. |
bool resetStrutSizeHint(
QskAspect aspect
)
Removes a strut size hint from the local table.
Parameters:
See: resetSkinHint(), setStrutSizeHint()
Return: true, if an entry in the local hint table was found and removed.
QskAspect::Metric | QskAspect::StrutSize will be added to aspect. |
QSizeF strutSizeHint(
QskAspect aspect,
QskSkinHintStatus * status =nullptr
) const
Retrieves a strut size hint.
Parameters:
See: effectiveSkinHint(), setStrutSizeHint()
Return: Strut size, or QSizeF() if no value was found
QskAspect::Metric | QskAspect::StrutSize will be added to aspect. |
bool setMarginHint(
QskAspect aspect,
qreal margins
)
Sets a margin hint.
Parameters:
See: setSkinHint(), QskAspect::Metric, QskAspect::Margin
QskAspect::Metric | QskAspect::Margin will be added to aspect. |
bool setMarginHint(
QskAspect aspect,
const QMarginsF & margins
)
Sets a margin hint.
Parameters:
See: setSkinHint(), QskAspect::Metric, QskAspect::Margin
QskAspect::Metric | QskAspect::Margin will be added to aspect. |
bool resetMarginHint(
QskAspect aspect
)
Removes a margin hint from the local table.
Parameters:
See: resetSkinHint(), setMarginHint()
Return: true, if an entry in the local hint table was found and removed.
QskAspect::Metric | QskAspect::Margin will be added to aspect. |
QMarginsF marginHint(
QskAspect aspect,
QskSkinHintStatus * status =nullptr
) const
Retrieves a margin hint.
Parameters:
See: effectiveSkinHint(), setMarginHint()
Return: margin, or QMarginsF() if no value was found
QskAspect::Metric | QskAspect::Margin will be added to aspect. |
bool setPaddingHint(
QskAspect aspect,
qreal padding
)
Sets a padding hint.
Parameters:
See: setSkinHint(), QskAspect::Metric, QskAspect::Padding
QskAspect::Metric | QskAspect::Padding will be added to aspect. |
bool setPaddingHint(
QskAspect aspect,
const QMarginsF & padding
)
Sets a padding hint.
Parameters:
See: setSkinHint(), QskAspect::Metric, QskAspect::Padding
QskAspect::Metric | QskAspect::Padding will be added to aspect. |
bool resetPaddingHint(
QskAspect aspect
)
Removes a padding hint from the local table.
Parameters:
See: resetSkinHint(), setPaddingHint()
Return: true, if an entry in the local hint table was found and removed.
QskAspect::Metric | QskAspect::Padding will be added to aspect. |
QMarginsF paddingHint(
QskAspect aspect,
QskSkinHintStatus * status =nullptr
) const
Retrieves a padding hint.
Parameters:
See: effectiveSkinHint(), setPaddingHint()
Return: padding, or QMarginsF() if no value was found
QskAspect::Metric | QskAspect::Padding will be added to aspect. |
bool setGradientHint(
QskAspect aspect,
const QskGradient & gradient
)
Sets a gradient as color hint.
Parameters:
See: setSkinHint(), QskAspect::Color
QskAspect::Color will be added to aspect.
QskGradient gradientHint(
QskAspect aspect,
QskSkinHintStatus * status =nullptr
) const
Retrieves a color hint as gradient.
Parameters:
See: effectiveSkinHint(), setGradientHint()
Return: gradient, or QskGraient() if no value was found
QskAspect::Color will be added to aspect.
bool setBoxShapeHint(
QskAspect aspect,
const QskBoxShapeMetrics & shape
)
Sets a shape hint.
Parameters:
See: setSkinHint(), QskAspect::Metric, QskAspect::Shape
QskAspect::Metric | QskAspect::Shape will be added to aspect. |
bool resetBoxShapeHint(
QskAspect aspect
)
Removes a shape hint from the local table.
Parameters:
See: resetSkinHint(), setBoxShapeHint()
Return: true, if an entry in the local hint table was found and removed.
QskAspect::Metric | QskAspect::Shape will be added to aspect. |
QskBoxShapeMetrics boxShapeHint(
QskAspect aspect,
QskSkinHintStatus * status =nullptr
) const
Retrieves a shape hint.
Parameters:
See: effectiveSkinHint(), setBoxShapeHint()
Return: shape, or QskBoxShapeMetrics() if no value was found
QskAspect::Metric | QskAspect::Shape will be added to aspect. |
bool setBoxBorderMetricsHint(
QskAspect aspect,
const QskBoxBorderMetrics & border
)
Sets a border metrics hint.
Parameters:
See: setSkinHint(), QskAspect::Metric, QskAspect::Border
QskAspect::Metric | QskAspect::Border will be added to aspect. |
bool resetBoxBorderMetricsHint(
QskAspect aspect
)
Removes a border metrics hint from the local table.
Parameters:
See: resetSkinHint(), setBoxBorderMetricsHint()
Return: true, if an entry in the local hint table was found and removed.
QskAspect::Metric | QskAspect::Border will be added to aspect. |
QskBoxBorderMetrics boxBorderMetricsHint(
QskAspect aspect,
QskSkinHintStatus * status =nullptr
) const
Retrieves a border hint.
Parameters:
See: effectiveSkinHint(), setBoxBorderMetricsHint()
Return: border metrics, or QskBoxBorderMetrics() if no value was found
QskAspect::Metric | QskAspect::Border will be added to aspect. |
bool setBoxBorderColorsHint(
QskAspect aspect,
const QskBoxBorderColors & colors
)
Sets a border colors hint.
Parameters:
See: setSkinHint(), QskAspect::Color, QskAspect::Border
QskAspect::Color | QskAspect::Border will be added to aspect. |
bool resetBoxBorderColorsHint(
QskAspect aspect
)
Removes a border colors hint from the local table.
Parameters:
See: resetSkinHint(), setBoxBorderColorsHint()
Return: true, if an entry in the local hint table was found and removed.
QskAspect::Color | QskAspect::Border will be added to aspect. |
QskBoxBorderColors boxBorderColorsHint(
QskAspect aspect,
QskSkinHintStatus * status =nullptr
) const
Retrieves border colors hint.
Parameters:
See: effectiveSkinHint(), setBoxBorderColorsHint()
Return: border colors, or QskBoxBorderColors() if no value was found
QskAspect::Color | QskAspect::Border will be added to aspect. |
bool setArcMetricsHint(
QskAspect aspect,
const QskArcMetrics & arc
)
bool resetArcMetricsHint(
QskAspect aspect
)
QskArcMetrics arcMetricsHint(
QskAspect aspect,
QskSkinHintStatus * status =nullptr
) const
bool setSpacingHint(
QskAspect aspect,
qreal spacing
)
Sets a spacing hint.
Parameters:
See: setSkinHint(), QskAspect::Metric, QskAspect::Spacing
QskAspect::Metric | QskAspect::Spacing will be added to aspect. |
bool resetSpacingHint(
QskAspect aspect
)
Removes a spacing hint from the local table.
Parameters:
See: resetSkinHint(), setSpacingHint()
Return: true, if an entry in the local hint table was found and removed.
QskAspect::Metric | QskAspect::Spacing will be added to aspect. |
qreal spacingHint(
QskAspect aspect,
QskSkinHintStatus * status =nullptr
) const
Retrieves a spacing hint.
Parameters:
See: effectiveSkinHint(), setSpacingHint()
Return: spacing, or 0 if no value was found
QskAspect::Metric | QskAspect::Spacing will be added to aspect. |
bool setAlignmentHint(
QskAspect aspect,
Qt::Alignment alignment
)
Sets an alignment hint.
Parameters:
See: setSkinHint(), QskAspect::Flag, QskAspect::Alignment
QskAspect::Flag | QskAspect::Alignment will be added to aspect. |
bool resetAlignmentHint(
QskAspect aspect
)
Removes an alignment hint from the local table.
Parameters:
See: resetSkinHint(), setAlignmentHint()
Return: true, if an entry in the local hint table was found and removed.
QskAspect::Flag | QskAspect::Alignment will be added to aspect. |
inline Qt::Alignment alignmentHint(
QskAspect aspect,
Qt::Alignment defaultAlignment =Qt::Alignment()
) const
Retrieves an alignment hint.
Parameters:
See: effectiveSkinHint(), setAlignmentHint()
Return: alignment, or defaultAlignment if no value was found
QskAspect::Flag | QskAspect::Alignment will be added to aspect. |
bool setFontRoleHint(
QskAspect aspect,
int role
)
Sets a font role hint.
Parameters:
See: setSkinHint(), QskAspect::Flag, QskAspect::FontRole
QskAspect::Flag | QskAspect::FontRole will be added to aspect. |
bool resetFontRoleHint(
QskAspect aspect
)
Removes a font role hint from the local table.
Parameters:
See: resetSkinHint(), setFontRoleHint()
Return: true, if an entry in the local hint table was found and removed.
QskAspect::Flag | QskAspect::FontRole will be added to aspect. |
int fontRoleHint(
QskAspect aspect,
QskSkinHintStatus * status =nullptr
) const
Retrieves a font role hint.
Parameters:
See: effectiveSkinHint(), setFontRoleHint()
Return: font role, or 0 if no value was found
QskAspect::Flag | QskAspect::FontRole will be added to aspect. |
bool setGraphicRoleHint(
QskAspect aspect,
int role
)
Sets a graphic role hint.
Parameters:
See: setSkinHint(), QskAspect::Flag, QskAspect::GraphicRole
QskAspect::Flag | QskAspect::GraphicRole will be added to aspect. |
bool resetGraphicRoleHint(
QskAspect aspect
)
Removes a graphic role hint from the local table.
Parameters:
See: resetSkinHint(), setGraphicRoleHint()
Return: true, if an entry in the local hint table was found and removed.
QskAspect::Flag | QskAspect::GraphicRole will be added to aspect. |
int graphicRoleHint(
QskAspect aspect,
QskSkinHintStatus * status =nullptr
) const
A Retrieves a graphic role hint.
Parameters:
See: effectiveSkinHint(), setGraphicRoleHint()
Return: graphic role, or 0 if no value was found
QskAspect::Flag | QskAspect::GraphicRole will be added to aspect. |
virtual void updateNode(
QSGNode * parentNode
)
Parameters:
See: QskSkinlet::updateSubNode()
Note: Overriding updateNode() might break the themeability and the usual strategy to implement custom painting is to customize or replace the skinlet.
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.
The default implementation simply forwards the operation to the skinlet,
virtual bool isTransitionAccepted(
QskAspect aspect
) const
Additional check if an transition should be started.
Parameters:
Return: true, when owningControl()->isInitiallyPainted() is true
In certain situations a transition initiated from state depending hints needs to be avoided.
virtual QskAspect::Subcontrol substitutedSubcontrol(
QskAspect::Subcontrol subControl
) const
QskSkinHintTable & hintTable()
Accessor for local skin hint table.
See: setSkinHint(), QskSkinHintTableEditor
Return: Reference to the local hint table
Definitions in the local hint table have precedence over those from the table of the skin. Initially the local table is empty.
const QskSkinHintTable & hintTable() const
Accessor for local skin hint table.
See: setSkinHint(), QskSkinHintTableEditor
Return: Reference to the local hint table
Definitions in the local hint table have precedence over those from the table of the skin. Initially the local table is empty.
Updated on 28 July 2023 at 14:02:28 CEST