QSkinny 0.8.0
C++/Qt UI toolkit
Loading...
Searching...
No Matches
QskSkinnable Class Referenceabstract

#include <QskSkinnable.h>

Detailed Description

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.

See also
QskSkin, QskSkinlet, QskControl, QskSkinHintTable

Definition at line 79 of file QskSkinnable.h.

Inheritance diagram for QskSkinnable:

Public Member Functions

 QskSkinnable ()
 
virtual ~QskSkinnable ()
 
void setSkinlet (const QskSkinlet *)
 Set an individual skinlet to render/display the content.
 
const QskSkinletskinlet () const
 
QFont effectiveFont (QskAspect) const
 
qreal effectiveFontHeight (QskAspect) const
 
QskColorFilter effectiveGraphicFilter (QskAspect::Subcontrol) const
 
void setSubcontrolProxy (QskAspect::Subcontrol, QskAspect::Subcontrol proxy)
 
void resetSubcontrolProxy (QskAspect::Subcontrol)
 
QskAspect::Subcontrol subcontrolProxy (QskAspect::Subcontrol) const
 
bool setAnimationHint (QskAspect, QskAnimationHint)
 
QskAnimationHint animationHint (QskAspect, QskSkinHintStatus *=nullptr) const
 
bool hasAnimationHint (QskAspect) const
 
bool setSkinHint (QskAspect, const QVariant &)
 Insert a hint into the local hint table.
 
bool resetSkinHint (QskAspect)
 Remove a hint from the local hint table.
 
bool moveSkinHint (QskAspect, const QVariant &)
 
bool moveSkinHint (QskAspect, const QVariant &, const QVariant &)
 
QskAnimationHint effectiveAnimation (QskAspect::Type, QskAspect::Subcontrol, QskAspect::States, QskSkinHintStatus *status=nullptr) const
 
QVariant effectiveSkinHint (QskAspect, QskSkinHintStatus *=nullptr) const
 Find the value for a specific aspect.
 
virtual QskAspect::Variation effectiveVariation () const
 
virtual QskAspect::Section section () const
 
QskSkinHintStatus hintStatus (QskAspect) const
 
QRectF subControlRect (const QRectF &, QskAspect::Subcontrol) const
 Calculate position and size of a subControl.
 
QRectF subControlContentsRect (const QRectF &, QskAspect::Subcontrol) const
 Calculate the inner rectangle for subControl.
 
QSizeF outerBoxSize (QskAspect, const QSizeF &innerBoxSize) const
 Calculate the size, when being expanded by paddings, indentations.
 
QSizeF innerBoxSize (QskAspect, const QSizeF &outerBoxSize) const
 Calculate the size, with paddings, indentations being subtracted.
 
QRectF innerBox (QskAspect, const QRectF &outerBox) const
 Calculate the rectangle, whith paddings, indentations being subtracted.
 
QRectF outerBox (QskAspect, const QRectF &innerBox) const
 Calculate the rectangle, when being expanded by paddings, indentations.
 
QMarginsF innerPadding (QskAspect, const QSizeF &) const
 Calculate the padding from attributes for the given aspect.
 
const QskSkinleteffectiveSkinlet () const
 
QskSkineffectiveSkin () const
 
void startTransition (QskAspect, QskAnimationHint, const QVariant &from, const QVariant &to)
 
void startTransition (QskAspect, int index, QskAnimationHint, const QVariant &from, const QVariant &to)
 
QskAspect::Subcontrol effectiveSubcontrol (QskAspect::Subcontrol) const
 
QskControlcontrolCast ()
 
const QskControlcontrolCast () const
 
virtual QQuickItem * owningItem () const =0
 
virtual const QMetaObject * metaObject () const =0
 
void debug (QskAspect) const
 
void debug (QskAspect::State) const
 
void debug (QDebug, QskAspect) const
 
void debug (QDebug, QskAspect::State) const
 
void setSkinStates (QskAspect::States)
 
void setSkinStateFlag (QskAspect::State, bool on=true)
 
void addSkinStates (QskAspect::States)
 
void clearSkinStates (QskAspect::States)
 
bool hasSkinState (QskAspect::State) const
 
QskAspect::States skinStates () const
 
const char * skinStatesAsPrintable () const
 
const char * skinStatesAsPrintable (QskAspect::States) const
 
bool setColor (QskAspect, Qt::GlobalColor)
 Sets a color hint.
 
bool setColor (QskAspect, QRgb)
 Sets a color hint.
 
bool setColor (QskAspect, const QColor &)
 Sets a color hint.
 
bool moveColor (QskAspect, Qt::GlobalColor)
 
bool moveColor (QskAspect, QRgb)
 
bool moveColor (QskAspect, const QColor &)
 
bool resetColor (QskAspect)
 Removes a color hint from the local table.
 
QColor color (QskAspect, QskSkinHintStatus *=nullptr) const
 Retrieves a color hint.
 
bool setMetric (QskAspect, qreal)
 Sets a metric hint.
 
bool moveMetric (QskAspect, qreal)
 
bool resetMetric (QskAspect)
 Removes a metric hint from the local table.
 
qreal metric (QskAspect, QskSkinHintStatus *=nullptr) const
 Retrieves a metric hint.
 
bool setFlagHint (QskAspect, int flag)
 Sets a flag hint.
 
template<typename T >
flagHint (QskAspect, T=T()) const
 Retrieves a flag hint.
 
bool setPositionHint (QskAspect, qreal)
 
bool movePositionHint (QskAspect, qreal)
 
bool movePositionHint (QskAspect, qreal from, qreal to)
 
bool resetPositionHint (QskAspect)
 
qreal positionHint (QskAspect, QskSkinHintStatus *=nullptr) const
 
bool setStrutSizeHint (QskAspect, const QSizeF &)
 Sets a metric hint.
 
bool setStrutSizeHint (QskAspect, qreal width, qreal height)
 Sets a strut size hint.
 
bool resetStrutSizeHint (QskAspect)
 Removes a strut size hint from the local table.
 
QSizeF strutSizeHint (QskAspect, QskSkinHintStatus *=nullptr) const
 Retrieves a strut size hint.
 
bool setMarginHint (QskAspect, qreal)
 Sets a margin hint.
 
bool setMarginHint (QskAspect, const QMarginsF &)
 Sets a margin hint.
 
bool resetMarginHint (QskAspect)
 Removes a margin hint from the local table.
 
QMarginsF marginHint (QskAspect, QskSkinHintStatus *=nullptr) const
 Retrieves a margin hint.
 
bool setPaddingHint (QskAspect, qreal)
 Sets a padding hint.
 
bool setPaddingHint (QskAspect, const QMarginsF &)
 Sets a padding hint.
 
bool resetPaddingHint (QskAspect)
 Removes a padding hint from the local table.
 
QMarginsF paddingHint (QskAspect, QskSkinHintStatus *=nullptr) const
 Retrieves a padding hint.
 
bool setGradientHint (QskAspect, const QskGradient &)
 Sets a gradient as color hint.
 
QskGradient gradientHint (QskAspect, QskSkinHintStatus *=nullptr) const
 Retrieves a color hint as gradient.
 
bool setBoxShapeHint (QskAspect, const QskBoxShapeMetrics &)
 Sets a shape hint.
 
bool resetBoxShapeHint (QskAspect)
 Removes a shape hint from the local table.
 
QskBoxShapeMetrics boxShapeHint (QskAspect, QskSkinHintStatus *=nullptr) const
 Retrieves a shape hint.
 
bool setBoxBorderMetricsHint (QskAspect, const QskBoxBorderMetrics &)
 Sets a border metrics hint.
 
bool resetBoxBorderMetricsHint (QskAspect)
 Removes a border metrics hint from the local table.
 
QskBoxBorderMetrics boxBorderMetricsHint (QskAspect, QskSkinHintStatus *=nullptr) const
 Retrieves a border hint.
 
bool setBoxBorderColorsHint (QskAspect, const QskBoxBorderColors &)
 Sets a border colors hint.
 
bool resetBoxBorderColorsHint (QskAspect)
 Removes a border colors hint from the local table.
 
QskBoxBorderColors boxBorderColorsHint (QskAspect, QskSkinHintStatus *=nullptr) const
 Retrieves border colors hint.
 
bool setShadowMetricsHint (QskAspect, const QskShadowMetrics &)
 
bool resetShadowMetricsHint (QskAspect)
 
QskShadowMetrics shadowMetricsHint (QskAspect, QskSkinHintStatus *=nullptr) const
 
bool setShadowColorHint (QskAspect, const QColor &)
 
bool resetShadowColorHint (QskAspect)
 
QColor shadowColorHint (QskAspect, QskSkinHintStatus *=nullptr) const
 
QskBoxHints boxHints (QskAspect) const
 
bool setArcMetricsHint (QskAspect, const QskArcMetrics &)
 
bool resetArcMetricsHint (QskAspect)
 
QskArcMetrics arcMetricsHint (QskAspect, QskSkinHintStatus *=nullptr) const
 
bool setStippleMetricsHint (QskAspect, const QskStippleMetrics &)
 
bool resetStippleMetricsHint (QskAspect)
 
QskStippleMetrics stippleMetricsHint (QskAspect, QskSkinHintStatus *=nullptr) const
 
bool setSpacingHint (QskAspect, qreal)
 Sets a spacing hint.
 
bool resetSpacingHint (QskAspect)
 Removes a spacing hint from the local table.
 
qreal spacingHint (QskAspect, QskSkinHintStatus *=nullptr) const
 Retrieves a spacing hint.
 
bool setAlignmentHint (QskAspect, Qt::Alignment)
 Sets an alignment hint.
 
bool resetAlignmentHint (QskAspect)
 Removes an alignment hint from the local table.
 
Qt::Alignment alignmentHint (QskAspect, Qt::Alignment=Qt::Alignment()) const
 Retrieves an alignment hint.
 
bool setTextOptionsHint (QskAspect, const QskTextOptions &)
 
bool resetTextOptionsHint (QskAspect)
 
QskTextOptions textOptionsHint (QskAspect, QskSkinHintStatus *=nullptr) const
 
bool setFontRoleHint (QskAspect, const QskFontRole &)
 Sets a font role hint.
 
bool resetFontRoleHint (QskAspect)
 Removes a font role hint from the local table.
 
QskFontRole fontRoleHint (QskAspect, QskSkinHintStatus *=nullptr) const
 Retrieves a font role hint.
 
bool setGraphicRoleHint (QskAspect, int role)
 Sets a graphic role hint.
 
bool resetGraphicRoleHint (QskAspect)
 Removes a graphic role hint from the local table.
 
int graphicRoleHint (QskAspect, QskSkinHintStatus *=nullptr) const
 A Retrieves a graphic role hint.
 
bool setSymbolHint (const QskAspect, const QskGraphic &)
 
bool resetSymbolHint (const QskAspect)
 
QskGraphic symbolHint (const QskAspect, QskSkinHintStatus *=nullptr) const
 
const QskSkinHintTablehintTable () const
 Accessor for local skin hint table.
 
bool startHintTransitions (QskAspect::States, QskAspect::States, int index=-1)
 
bool startHintTransitions (const QVector< QskAspect::Subcontrol > &, QskAspect::States, QskAspect::States, int index=-1)
 
const QskHintAnimatorrunningHintAnimator (QskAspect, int index=-1) const
 

Protected Member Functions

virtual void updateNode (QSGNode *)
 
virtual bool isTransitionAccepted (QskAspect) const
 Additional check if an transition should be started.
 
virtual QskAspect::Subcontrol substitutedSubcontrol (QskAspect::Subcontrol) const
 
QskSkinHintTablehintTable ()
 Accessor for local skin hint table.
 

Constructor & Destructor Documentation

◆ QskSkinnable()

QskSkinnable::QskSkinnable ( )

Constructs a skinnable where all settings will be resolved from the skin

See also
effectiveSkin(), effectiveSkinlet, effectiveSkinHint

Definition at line 263 of file QskSkinnable.cpp.

◆ ~QskSkinnable()

QskSkinnable::~QskSkinnable ( )
virtual

Called when the skinnable is destroyed.

Definition at line 268 of file QskSkinnable.cpp.

Member Function Documentation

◆ addSkinStates()

void QskSkinnable::addSkinStates ( QskAspect::States  states)

Definition at line 1403 of file QskSkinnable.cpp.

◆ alignmentHint()

Qt::Alignment QskSkinnable::alignmentHint ( QskAspect  aspect,
Qt::Alignment  defaultAlignment = Qt::Alignment() 
) const
inline

Retrieves an alignment hint.

QskAspect::Flag | QskAspect::Alignment will be added to aspect.

Parameters
aspectUnresolved aspect
defaultAlignmentDefault value
Returns
alignment, or defaultAlignment if no value was found
See also
effectiveSkinHint(), setAlignmentHint()

Definition at line 304 of file QskSkinnable.h.

◆ animationHint()

QskAnimationHint QskSkinnable::animationHint ( QskAspect  aspect,
QskSkinHintStatus status = nullptr 
) const

Retrieve the configuration of the animator for the current state.

Parameters
aspectUnresolved aspect
statusIf status != nullptr additional information about where the hint has been found is returned
See also
effectiveSkinHint()

Definition at line 863 of file QskSkinnable.cpp.

◆ arcMetricsHint()

QskArcMetrics QskSkinnable::arcMetricsHint ( QskAspect  aspect,
QskSkinHintStatus status = nullptr 
) const

Definition at line 648 of file QskSkinnable.cpp.

◆ boxBorderColorsHint()

QskBoxBorderColors QskSkinnable::boxBorderColorsHint ( QskAspect  aspect,
QskSkinHintStatus status = nullptr 
) const

Retrieves border colors hint.

QskAspect::Color | QskAspect::Border will be added to aspect.

Parameters
aspectUnresolved aspect
statusOptional status information
Returns
border colors, or QskBoxBorderColors() if no value was found
See also
effectiveSkinHint(), setBoxBorderColorsHint()

Definition at line 589 of file QskSkinnable.cpp.

◆ boxBorderMetricsHint()

QskBoxBorderMetrics QskSkinnable::boxBorderMetricsHint ( QskAspect  aspect,
QskSkinHintStatus status = nullptr 
) const

Retrieves a border hint.

QskAspect::Metric | QskAspect::Border will be added to aspect.

Parameters
aspectUnresolved aspect
statusOptional status information
Returns
border metrics, or QskBoxBorderMetrics() if no value was found
See also
effectiveSkinHint(), setBoxBorderMetricsHint()

Definition at line 571 of file QskSkinnable.cpp.

◆ boxHints()

QskBoxHints QskSkinnable::boxHints ( QskAspect  aspect) const

Definition at line 629 of file QskSkinnable.cpp.

◆ boxShapeHint()

QskBoxShapeMetrics QskSkinnable::boxShapeHint ( QskAspect  aspect,
QskSkinHintStatus status = nullptr 
) const

Retrieves a shape hint.

QskAspect::Metric | QskAspect::Shape will be added to aspect.

Parameters
aspectUnresolved aspect
statusOptional status information
Returns
shape, or QskBoxShapeMetrics() if no value was found
See also
effectiveSkinHint(), setBoxShapeHint()

Definition at line 553 of file QskSkinnable.cpp.

◆ clearSkinStates()

void QskSkinnable::clearSkinStates ( QskAspect::States  states)

Definition at line 1408 of file QskSkinnable.cpp.

◆ color()

QColor QskSkinnable::color ( QskAspect  aspect,
QskSkinHintStatus status = nullptr 
) const

Retrieves a color hint.

QskAspect::Color will be added to aspect.

Parameters
aspectUnresolved aspect
statusOptional status information
Returns
Color hint, or QColor() if no value has been found
See also
effectiveSkinHint(), setColor()

Definition at line 420 of file QskSkinnable.cpp.

◆ controlCast() [1/2]

QskControl * QskSkinnable::controlCast ( )

Safe casting of the skinnable to a QskControl

The operation is based on comparing metaObject() with QskControl::staticMetaObject() ( similar to what qobject_cast() does )

Returns
Control if successful, or a nullptr otherwise

Definition at line 1592 of file QskSkinnable.cpp.

◆ controlCast() [2/2]

const QskControl * QskSkinnable::controlCast ( ) const

Safe casting of the skinnable to a QskControl

The operation is based on comparing metaObject() with QskControl::staticMetaObject() ( similar to what qobject_cast() does )

Returns
Control if successful, or a nullptr otherwise

Definition at line 1598 of file QskSkinnable.cpp.

◆ debug() [1/4]

void QskSkinnable::debug ( QDebug  debug,
QskAspect  aspect 
) const

Writes an aspect to a stream using the string conversions for metaObject()

Parameters
debugDebug stream
aspectAspect to be printed
See also
qskDebugAspect()

Definition at line 1604 of file QskSkinnable.cpp.

◆ debug() [2/4]

void QskSkinnable::debug ( QDebug  debug,
QskAspect::State  state 
) const

Writes a state to a stream using the string conversions for metaObject()

Parameters
debugDebug stream
stateState to be printed
See also
qskDebugState()

Definition at line 1609 of file QskSkinnable.cpp.

◆ debug() [3/4]

void QskSkinnable::debug ( QskAspect  aspect) const

Writes an aspect to qDebug() using the string conversions for metaObject()

Parameters
aspectAspect to be printed
See also
qskDebugAspect()

Definition at line 1614 of file QskSkinnable.cpp.

◆ debug() [4/4]

void QskSkinnable::debug ( QskAspect::State  state) const

Writes a state to qDebug() using the string conversions for metaObject()

Parameters
stateState to be printed
See also
qskDebugState()

Definition at line 1619 of file QskSkinnable.cpp.

◆ effectiveAnimation()

QskAnimationHint QskSkinnable::effectiveAnimation ( QskAspect::Type  type,
QskAspect::Subcontrol  subControl,
QskAspect::States  states,
QskSkinHintStatus status = nullptr 
) const

Retrieve the configuration of the animator for reaching a specific state.

Parameters
typeMetric, color or something else
subControlUnsubstituted subControl
stateState bits
statusIf status != nullptr additional information about where the hint has been found is returned
Returns
Value from the hint tables
See also
animationHint()

Definition at line 875 of file QskSkinnable.cpp.

◆ effectiveFont()

QFont QskSkinnable::effectiveFont ( QskAspect  aspect) const

Finds the font role for the given aspect and returns the corresponding font from the font table of the skin.

Parameters
aspectUnresolved aspect
Returns
Font, corresponding to the resolved aspect
See also
fontRoleHint(), effectiveSkinHint(), QskSkin::font()

Definition at line 727 of file QskSkinnable.cpp.

◆ effectiveFontHeight()

qreal QskSkinnable::effectiveFontHeight ( QskAspect  aspect) const

Definition at line 759 of file QskSkinnable.cpp.

◆ effectiveGraphicFilter()

QskColorFilter QskSkinnable::effectiveGraphicFilter ( QskAspect::Subcontrol  subControl) const

Finds the graphic role for the given aspect and returns the corresponding color filter from the skin

Parameters
aspectUnresolved aspect
Returns
Color filter, corresponding to the resolved aspect
See also
graphicRoleHint(), effectiveSkinHint(), QskSkin::graphicFilter()

Definition at line 801 of file QskSkinnable.cpp.

◆ effectiveSkin()

QskSkin * QskSkinnable::effectiveSkin ( ) const
Returns
Almost always the current skin. The only exception is when manually setting a skinlet being created from a different skin.
See also
QskSetup::skin(), QskSkinlet::skin()

Definition at line 1541 of file QskSkinnable.cpp.

◆ effectiveSkinHint()

QVariant QskSkinnable::effectiveSkinHint ( QskAspect  aspect,
QskSkinHintStatus status = nullptr 
) const

Find the value for a specific aspect.

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.

Parameters
aspectInitial aspect, to feed the skin hint lookup algorithm.
statusOptional status information
Returns
Hint value, or an invalid QVariant if no value was found
See also
effectiveSubcontrol(), effectivePlacement()

Definition at line 953 of file QskSkinnable.cpp.

◆ effectiveSkinlet()

const QskSkinlet * QskSkinnable::effectiveSkinlet ( ) const
Returns
Skinlet that has been set with setSkinlet() - or the default skinlet from the skin, that had been registered for metaObject()

Definition at line 307 of file QskSkinnable.cpp.

◆ effectiveSubcontrol()

QskAspect::Subcontrol QskSkinnable::effectiveSubcontrol ( QskAspect::Subcontrol  subControl) const

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".

Parameters
subControlSubcontrol
Returns
Substituted subcontrol

The default implementation is a no operation and does not substitute

Definition at line 1572 of file QskSkinnable.cpp.

◆ effectiveVariation()

QskAspect::Variation QskSkinnable::effectiveVariation ( ) const
virtual

The variation bits are added to an unresolved aspect when inserting or looking up values in the hint table.

Returns
The default implementation returns QskAspect::NoVariation;
See also
QskAspect::Variation, effectiveSkinHint()

Reimplemented in QskPageIndicator, QskProgressBar, QskProgressRing, QskPushButton, QskSegmentedBar, QskSeparator, QskSlider, QskSwitchButton, QskTabBar, QskTabButton, and QskTabView.

Definition at line 1557 of file QskSkinnable.cpp.

◆ flagHint()

template<typename T >
T QskSkinnable::flagHint ( QskAspect  aspect,
defaultValue = T() 
) const
inline

Retrieves a flag hint.

Parameters
aspectUnresolved aspect
statusOptional status information
Returns
Flag, or an invalid QVariant in case no value was found
See also
effectiveSkinHint(), setFlag()
Parameters
aspectUnresolved aspect
defaultValueDefault result, when no entry can be found in the hint tables
Returns
Flag - or defaultValue if no value had been found
See also
resetSkinHint(), setFlag()

Definition at line 295 of file QskSkinnable.h.

◆ fontRoleHint()

QskFontRole QskSkinnable::fontRoleHint ( QskAspect  aspect,
QskSkinHintStatus status = nullptr 
) const

Retrieves a font role hint.

QskAspect::Flag | QskAspect::FontRole will be added to aspect.

Parameters
aspectUnresolved aspect
statusOptional status information
Returns
font role, or 0 if no value was found
See also
effectiveSkinHint(), setFontRoleHint()

Definition at line 720 of file QskSkinnable.cpp.

◆ gradientHint()

QskGradient QskSkinnable::gradientHint ( QskAspect  aspect,
QskSkinHintStatus status = nullptr 
) const

Retrieves a color hint as gradient.

QskAspect::Color will be added to aspect.

Parameters
aspectUnresolved aspect
statusOptional status information
Returns
gradient, or QskGraient() if no value was found
See also
effectiveSkinHint(), setGradientHint()

Definition at line 536 of file QskSkinnable.cpp.

◆ graphicRoleHint()

int QskSkinnable::graphicRoleHint ( QskAspect  aspect,
QskSkinHintStatus status = nullptr 
) const

A Retrieves a graphic role hint.

QskAspect::Flag | QskAspect::GraphicRole will be added to aspect.

Parameters
aspectUnresolved aspect
statusOptional status information
Returns
graphic role, or 0 if no value was found
See also
effectiveSkinHint(), setGraphicRoleHint()

Definition at line 775 of file QskSkinnable.cpp.

◆ hasAnimationHint()

bool QskSkinnable::hasAnimationHint ( QskAspect  aspect) const

Definition at line 870 of file QskSkinnable.cpp.

◆ hasSkinState()

bool QskSkinnable::hasSkinState ( QskAspect::State  state) const

Definition at line 1187 of file QskSkinnable.cpp.

◆ hintStatus()

QskSkinHintStatus QskSkinnable::hintStatus ( QskAspect  aspect) const
Parameters
aspectUnresolved aspect
Returns
Informations about how the aspect would be resolved
See also
effectiveSkinHint()

Definition at line 988 of file QskSkinnable.cpp.

◆ hintTable() [1/2]

QskSkinHintTable & QskSkinnable::hintTable ( )
protected

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.

Returns
Reference to the local hint table
See also
setSkinHint(), QskSkinHintTableEditor

Definition at line 365 of file QskSkinnable.cpp.

◆ hintTable() [2/2]

const QskSkinHintTable & QskSkinnable::hintTable ( ) const

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.

Returns
Reference to the local hint table
See also
setSkinHint(), QskSkinHintTableEditor

Definition at line 370 of file QskSkinnable.cpp.

◆ innerBox()

QRectF QskSkinnable::innerBox ( QskAspect  aspect,
const QRectF &  outerBox 
) const

Calculate the rectangle, whith paddings, indentations being subtracted.

Paddings, indentations depend on attributes for the given aspect.

Parameters
aspectUnresolved aspect
outerBoxRectangle to be shrunk
Returns
Shrunk rectangle
See also
innerBoxSize(), outerBox()

Definition at line 1273 of file QskSkinnable.cpp.

◆ innerBoxSize()

QSizeF QskSkinnable::innerBoxSize ( QskAspect  aspect,
const QSizeF &  outerBoxSize 
) const

Calculate the size, with paddings, indentations being subtracted.

Paddings, indentations depend on attributes for the given aspect.

Parameters
aspectUnresolved aspect
outerBoxSizeSize to be shrunk
Returns
Shrunk size
See also
outerBoxSize(), innerBox(), outerBox()

Definition at line 1264 of file QskSkinnable.cpp.

◆ innerPadding()

QMarginsF QskSkinnable::innerPadding ( QskAspect  aspect,
const QSizeF &  outerBoxSize 
) const

Calculate the padding from attributes for the given aspect.

Beside padding hints, the radii of the shape might have an effect

Parameters
aspectUnresolved aspect
outerBoxSizeSize of the box
Returns
Effective padding

Definition at line 1258 of file QskSkinnable.cpp.

◆ isTransitionAccepted()

bool QskSkinnable::isTransitionAccepted ( QskAspect  aspect) const
protectedvirtual

Additional check if an transition should be started.

In certain situations a transition initiated from state depending hints needs to be avoided.

Parameters
aspectAspect
Returns
true, when owningControl()->isInitiallyPainted() is true

Reimplemented in QskPopup.

Definition at line 1306 of file QskSkinnable.cpp.

◆ marginHint()

QMarginsF QskSkinnable::marginHint ( QskAspect  aspect,
QskSkinHintStatus status = nullptr 
) const

Retrieves a margin hint.

QskAspect::Metric | QskAspect::Margin will be added to aspect.

Parameters
aspectUnresolved aspect
statusOptional status information
Returns
margin, or QMarginsF() if no value was found
See also
effectiveSkinHint(), setMarginHint()

Definition at line 503 of file QskSkinnable.cpp.

◆ metaObject()

QskSkinnable::metaObject ( ) const
pure virtual
Returns
Usually the metaObject of the owning control
See also
owningControl()

◆ metric()

qreal QskSkinnable::metric ( QskAspect  aspect,
QskSkinHintStatus status = nullptr 
) const

Retrieves a metric hint.

QskAspect::Metric will be added to aspect.

Parameters
aspectUnresolved aspect
statusOptional status information
Returns
Metric, or 0 if no value was found
See also
effectiveSkinHint(), setMetric()

Definition at line 435 of file QskSkinnable.cpp.

◆ moveColor() [1/3]

bool QskSkinnable::moveColor ( QskAspect  aspect,
const QColor &  color 
)

Definition at line 405 of file QskSkinnable.cpp.

◆ moveColor() [2/3]

bool QskSkinnable::moveColor ( QskAspect  aspect,
QRgb  rgb 
)

Definition at line 415 of file QskSkinnable.cpp.

◆ moveColor() [3/3]

bool QskSkinnable::moveColor ( QskAspect  aspect,
Qt::GlobalColor  color 
)

Definition at line 410 of file QskSkinnable.cpp.

◆ moveMetric()

bool QskSkinnable::moveMetric ( QskAspect  aspect,
qreal  metric 
)

Definition at line 430 of file QskSkinnable.cpp.

◆ movePositionHint() [1/2]

bool QskSkinnable::movePositionHint ( QskAspect  aspect,
qreal  from,
qreal  to 
)

Definition at line 450 of file QskSkinnable.cpp.

◆ movePositionHint() [2/2]

bool QskSkinnable::movePositionHint ( QskAspect  aspect,
qreal  position 
)

Definition at line 445 of file QskSkinnable.cpp.

◆ moveSkinHint() [1/2]

bool QskSkinnable::moveSkinHint ( QskAspect  aspect,
const QVariant &  value 
)

Definition at line 1017 of file QskSkinnable.cpp.

◆ moveSkinHint() [2/2]

bool QskSkinnable::moveSkinHint ( QskAspect  aspect,
const QVariant &  oldValue,
const QVariant &  newValue 
)

Definition at line 996 of file QskSkinnable.cpp.

◆ outerBox()

QRectF QskSkinnable::outerBox ( QskAspect  aspect,
const QRectF &  innerBox 
) const

Calculate the rectangle, when being expanded by paddings, indentations.

Paddings, indentations depend on attributes for the given aspect.

Parameters
aspectUnresolved aspect
innerBoxRectangle to be expanded
Returns
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.

See also
outerBoxSize(), innerBox()

Definition at line 1287 of file QskSkinnable.cpp.

◆ outerBoxSize()

QSizeF QskSkinnable::outerBoxSize ( QskAspect  aspect,
const QSizeF &  innerBoxSize 
) const

Calculate the size, when being expanded by paddings, indentations.

Paddings, indentations depend on attributes for the given aspect.

Parameters
aspectUnresolved aspect
innerBoxSizeSize to be expanded
Returns
Expanded size

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.

See also
innerBoxSize(), outerBox(), innerBox()

Definition at line 1280 of file QskSkinnable.cpp.

◆ paddingHint()

QMarginsF QskSkinnable::paddingHint ( QskAspect  aspect,
QskSkinHintStatus status = nullptr 
) const

Retrieves a padding hint.

QskAspect::Metric | QskAspect::Padding will be added to aspect.

Parameters
aspectUnresolved aspect
statusOptional status information
Returns
padding, or QMarginsF() if no value was found
See also
effectiveSkinHint(), setPaddingHint()

Definition at line 524 of file QskSkinnable.cpp.

◆ positionHint()

qreal QskSkinnable::positionHint ( QskAspect  aspect,
QskSkinHintStatus status = nullptr 
) const

Definition at line 461 of file QskSkinnable.cpp.

◆ resetAlignmentHint()

bool QskSkinnable::resetAlignmentHint ( QskAspect  aspect)

Removes an alignment hint from the local table.

QskAspect::Flag | QskAspect::Alignment will be added to aspect.

Parameters
aspectUnresolved aspect
Returns
true, if an entry in the local hint table was found and removed.
See also
resetSkinHint(), setAlignmentHint()

Definition at line 385 of file QskSkinnable.cpp.

◆ resetArcMetricsHint()

bool QskSkinnable::resetArcMetricsHint ( QskAspect  aspect)

Definition at line 643 of file QskSkinnable.cpp.

◆ resetBoxBorderColorsHint()

bool QskSkinnable::resetBoxBorderColorsHint ( QskAspect  aspect)

Removes a border colors hint from the local table.

QskAspect::Color | QskAspect::Border will be added to aspect.

Parameters
aspectUnresolved aspect
Returns
true, if an entry in the local hint table was found and removed.
See also
resetSkinHint(), setBoxBorderColorsHint()

Definition at line 584 of file QskSkinnable.cpp.

◆ resetBoxBorderMetricsHint()

bool QskSkinnable::resetBoxBorderMetricsHint ( QskAspect  aspect)

Removes a border metrics hint from the local table.

QskAspect::Metric | QskAspect::Border will be added to aspect.

Parameters
aspectUnresolved aspect
Returns
true, if an entry in the local hint table was found and removed.
See also
resetSkinHint(), setBoxBorderMetricsHint()

Definition at line 566 of file QskSkinnable.cpp.

◆ resetBoxShapeHint()

bool QskSkinnable::resetBoxShapeHint ( QskAspect  aspect)

Removes a shape hint from the local table.

QskAspect::Metric | QskAspect::Shape will be added to aspect.

Parameters
aspectUnresolved aspect
Returns
true, if an entry in the local hint table was found and removed.
See also
resetSkinHint(), setBoxShapeHint()

Definition at line 548 of file QskSkinnable.cpp.

◆ resetColor()

bool QskSkinnable::resetColor ( QskAspect  aspect)
inline

Removes a color hint from the local table.

QskAspect::Color will be added to aspect.

Parameters
aspectUnresolved aspect
Returns
true, if an entry in the local hint table was found and removed.
See also
resetSkinHint(), setColor()

Definition at line 310 of file QskSkinnable.h.

◆ resetFontRoleHint()

bool QskSkinnable::resetFontRoleHint ( QskAspect  aspect)

Removes a font role hint from the local table.

QskAspect::Flag | QskAspect::FontRole will be added to aspect.

Parameters
aspectUnresolved aspect
Returns
true, if an entry in the local hint table was found and removed.
See also
resetSkinHint(), setFontRoleHint()

Definition at line 715 of file QskSkinnable.cpp.

◆ resetGraphicRoleHint()

bool QskSkinnable::resetGraphicRoleHint ( QskAspect  aspect)

Removes a graphic role hint from the local table.

QskAspect::Flag | QskAspect::GraphicRole will be added to aspect.

Parameters
aspectUnresolved aspect
Returns
true, if an entry in the local hint table was found and removed.
See also
resetSkinHint(), setGraphicRoleHint()

Definition at line 770 of file QskSkinnable.cpp.

◆ resetMarginHint()

bool QskSkinnable::resetMarginHint ( QskAspect  aspect)

Removes a margin hint from the local table.

QskAspect::Metric | QskAspect::Margin will be added to aspect.

Parameters
aspectUnresolved aspect
Returns
true, if an entry in the local hint table was found and removed.
See also
resetSkinHint(), setMarginHint()

Definition at line 498 of file QskSkinnable.cpp.

◆ resetMetric()

bool QskSkinnable::resetMetric ( QskAspect  aspect)
inline

Removes a metric hint from the local table.

QskAspect::Metric will be added to aspect.

Parameters
aspectUnresolved aspect
Returns
true, if an entry in the local hint table was found and removed.
See also
resetSkinHint(), setMetric()

Definition at line 315 of file QskSkinnable.h.

◆ resetPaddingHint()

bool QskSkinnable::resetPaddingHint ( QskAspect  aspect)

Removes a padding hint from the local table.

QskAspect::Metric | QskAspect::Padding will be added to aspect.

Parameters
aspectUnresolved aspect
Returns
true, if an entry in the local hint table was found and removed.
See also
resetSkinHint(), setPaddingHint()

Definition at line 519 of file QskSkinnable.cpp.

◆ resetPositionHint()

bool QskSkinnable::resetPositionHint ( QskAspect  aspect)

Definition at line 456 of file QskSkinnable.cpp.

◆ resetShadowColorHint()

bool QskSkinnable::resetShadowColorHint ( QskAspect  aspect)

Definition at line 619 of file QskSkinnable.cpp.

◆ resetShadowMetricsHint()

bool QskSkinnable::resetShadowMetricsHint ( QskAspect  aspect)

Definition at line 602 of file QskSkinnable.cpp.

◆ resetSkinHint()

bool QskSkinnable::resetSkinHint ( QskAspect  aspect)

Remove a hint from the local hint table.

After removing the hint from the local table the hint will be resolved fro the hint table of the skin.

Parameters
aspectUnsubstituted aspect
See also
setSkinHint(), effectiveSkinHint()

Definition at line 940 of file QskSkinnable.cpp.

◆ resetSpacingHint()

bool QskSkinnable::resetSpacingHint ( QskAspect  aspect)

Removes a spacing hint from the local table.

QskAspect::Metric | QskAspect::Spacing will be added to aspect.

Parameters
aspectUnresolved aspect
Returns
true, if an entry in the local hint table was found and removed.
See also
resetSkinHint(), setSpacingHint()

Definition at line 678 of file QskSkinnable.cpp.

◆ resetStippleMetricsHint()

bool QskSkinnable::resetStippleMetricsHint ( QskAspect  aspect)

Definition at line 661 of file QskSkinnable.cpp.

◆ resetStrutSizeHint()

bool QskSkinnable::resetStrutSizeHint ( QskAspect  aspect)

Removes a strut size hint from the local table.

QskAspect::Metric | QskAspect::StrutSize will be added to aspect.

Parameters
aspectUnresolved aspect
Returns
true, if an entry in the local hint table was found and removed.
See also
resetSkinHint(), setStrutSizeHint()

Definition at line 477 of file QskSkinnable.cpp.

◆ resetSubcontrolProxy()

void QskSkinnable::resetSubcontrolProxy ( QskAspect::Subcontrol  subcontrol)

Definition at line 336 of file QskSkinnable.cpp.

◆ resetSymbolHint()

bool QskSkinnable::resetSymbolHint ( const QskAspect  aspect)

Definition at line 788 of file QskSkinnable.cpp.

◆ resetTextOptionsHint()

bool QskSkinnable::resetTextOptionsHint ( QskAspect  aspect)

Definition at line 696 of file QskSkinnable.cpp.

◆ runningHintAnimator()

const QskHintAnimator * QskSkinnable::runningHintAnimator ( QskAspect  aspect,
int  index = -1 
) const

Definition at line 1022 of file QskSkinnable.cpp.

◆ section()

QskAspect::Section QskSkinnable::section ( ) const
virtual

Definition at line 1562 of file QskSkinnable.cpp.

◆ setAlignmentHint()

bool QskSkinnable::setAlignmentHint ( QskAspect  aspect,
Qt::Alignment  alignment 
)

Sets an alignment hint.

QskAspect::Flag | QskAspect::Alignment will be added to aspect.

Parameters
aspectUnresolved aspect
alignmentAlignment hint
See also
setSkinHint(), QskAspect::Flag, QskAspect::Alignment

Definition at line 380 of file QskSkinnable.cpp.

◆ setAnimationHint()

bool QskSkinnable::setAnimationHint ( QskAspect  aspect,
QskAnimationHint  hint 
)

Insert an animation hint into the local hint table

Parameters
aspectUnresolved aspect
hintAnimation hint
See also
animationHint(), effectiveAnimation()

Definition at line 856 of file QskSkinnable.cpp.

◆ setArcMetricsHint()

bool QskSkinnable::setArcMetricsHint ( QskAspect  aspect,
const QskArcMetrics arc 
)

Definition at line 637 of file QskSkinnable.cpp.

◆ setBoxBorderColorsHint()

bool QskSkinnable::setBoxBorderColorsHint ( QskAspect  aspect,
const QskBoxBorderColors colors 
)

Sets a border colors hint.

QskAspect::Color | QskAspect::Border will be added to aspect.

Parameters
aspectUnresolved aspect
borderBorder colors
See also
setSkinHint(), QskAspect::Color, QskAspect::Border

Definition at line 578 of file QskSkinnable.cpp.

◆ setBoxBorderMetricsHint()

bool QskSkinnable::setBoxBorderMetricsHint ( QskAspect  aspect,
const QskBoxBorderMetrics border 
)

Sets a border metrics hint.

QskAspect::Metric | QskAspect::Border will be added to aspect.

Parameters
aspectUnresolved aspect
borderBorder metrics
See also
setSkinHint(), QskAspect::Metric, QskAspect::Border

Definition at line 560 of file QskSkinnable.cpp.

◆ setBoxShapeHint()

bool QskSkinnable::setBoxShapeHint ( QskAspect  aspect,
const QskBoxShapeMetrics shape 
)

Sets a shape hint.

QskAspect::Metric | QskAspect::Shape will be added to aspect.

Parameters
aspectUnresolved aspect
shapeShape
See also
setSkinHint(), QskAspect::Metric, QskAspect::Shape

Definition at line 542 of file QskSkinnable.cpp.

◆ setColor() [1/3]

bool QskSkinnable::setColor ( QskAspect  aspect,
const QColor &  color 
)

Sets a color hint.

QskAspect::Color will be added to aspect.

Parameters
aspectUnresolved aspect
colorColor hint
See also
setSkinHint(), QskAspect::Color

Definition at line 390 of file QskSkinnable.cpp.

◆ setColor() [2/3]

bool QskSkinnable::setColor ( QskAspect  aspect,
QRgb  rgb 
)

Sets a color hint.

QskAspect::Color will be added to aspect.

Parameters
aspectUnresolved aspect
rgbColor hint
See also
setSkinHint(), QskAspect::Color

Definition at line 400 of file QskSkinnable.cpp.

◆ setColor() [3/3]

bool QskSkinnable::setColor ( QskAspect  aspect,
Qt::GlobalColor  color 
)

Sets a color hint.

QskAspect::Color will be added to aspect.

Parameters
aspectUnresolved aspect
colorColor hint
See also
setSkinHint(), QskAspect::Color

Definition at line 395 of file QskSkinnable.cpp.

◆ setFlagHint()

bool QskSkinnable::setFlagHint ( QskAspect  aspect,
int  flag 
)

Sets a flag hint.

Parameters
aspectUnresolved aspect
flagFlag hint
See also
setSkinHint(), QskAspect::Flag

Definition at line 375 of file QskSkinnable.cpp.

◆ setFontRoleHint()

bool QskSkinnable::setFontRoleHint ( QskAspect  aspect,
const QskFontRole role 
)

Sets a font role hint.

QskAspect::Flag | QskAspect::FontRole will be added to aspect.

Parameters
aspectUnresolved aspect
roleFont role
See also
setSkinHint(), QskAspect::Flag, QskAspect::FontRole

Definition at line 708 of file QskSkinnable.cpp.

◆ setGradientHint()

bool QskSkinnable::setGradientHint ( QskAspect  aspect,
const QskGradient gradient 
)

Sets a gradient as color hint.

QskAspect::Color will be added to aspect.

Parameters
aspectUnresolved aspect
gradientGradint
See also
setSkinHint(), QskAspect::Color

Definition at line 530 of file QskSkinnable.cpp.

◆ setGraphicRoleHint()

bool QskSkinnable::setGraphicRoleHint ( QskAspect  aspect,
int  role 
)

Sets a graphic role hint.

QskAspect::Flag | QskAspect::GraphicRole will be added to aspect.

Parameters
aspectUnresolved aspect
roleGraphic role
See also
setSkinHint(), QskAspect::Flag, QskAspect::GraphicRole

Definition at line 765 of file QskSkinnable.cpp.

◆ setMarginHint() [1/2]

bool QskSkinnable::setMarginHint ( QskAspect  aspect,
const QMarginsF &  margins 
)

Sets a margin hint.

QskAspect::Metric | QskAspect::Margin will be added to aspect.

Parameters
aspectUnresolved aspect
marginMargin
See also
setSkinHint(), QskAspect::Metric, QskAspect::Margin

Definition at line 493 of file QskSkinnable.cpp.

◆ setMarginHint() [2/2]

bool QskSkinnable::setMarginHint ( QskAspect  aspect,
qreal  margins 
)

Sets a margin hint.

QskAspect::Metric | QskAspect::Margin will be added to aspect.

Parameters
aspectUnresolved aspect
marginMargin
See also
setSkinHint(), QskAspect::Metric, QskAspect::Margin

Definition at line 488 of file QskSkinnable.cpp.

◆ setMetric()

bool QskSkinnable::setMetric ( QskAspect  aspect,
qreal  metric 
)

Sets a metric hint.

QskAspect::Metric will be added to aspect.

Parameters
aspectUnresolved aspect
metricMetric hint
See also
setSkinHint(), QskAspect::Metric

Definition at line 425 of file QskSkinnable.cpp.

◆ setPaddingHint() [1/2]

bool QskSkinnable::setPaddingHint ( QskAspect  aspect,
const QMarginsF &  padding 
)

Sets a padding hint.

QskAspect::Metric | QskAspect::Padding will be added to aspect.

Parameters
aspectUnresolved aspect
paddingPadding
See also
setSkinHint(), QskAspect::Metric, QskAspect::Padding

Definition at line 514 of file QskSkinnable.cpp.

◆ setPaddingHint() [2/2]

bool QskSkinnable::setPaddingHint ( QskAspect  aspect,
qreal  padding 
)

Sets a padding hint.

QskAspect::Metric | QskAspect::Padding will be added to aspect.

Parameters
aspectUnresolved aspect
paddingPadding
See also
setSkinHint(), QskAspect::Metric, QskAspect::Padding

Definition at line 509 of file QskSkinnable.cpp.

◆ setPositionHint()

bool QskSkinnable::setPositionHint ( QskAspect  aspect,
qreal  position 
)

Definition at line 440 of file QskSkinnable.cpp.

◆ setShadowColorHint()

bool QskSkinnable::setShadowColorHint ( QskAspect  aspect,
const QColor &  color 
)

Definition at line 614 of file QskSkinnable.cpp.

◆ setShadowMetricsHint()

bool QskSkinnable::setShadowMetricsHint ( QskAspect  aspect,
const QskShadowMetrics metrics 
)

Definition at line 596 of file QskSkinnable.cpp.

◆ setSkinHint()

bool QskSkinnable::setSkinHint ( QskAspect  aspect,
const QVariant &  hint 
)

Insert a hint into the local hint table.

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.

Parameters
aspectUnsubstituted aspect
hintHint, might be anything that fits into a QVariant and is understood by the skinlet consuming it.
See also
effectiveSkinHint(), resetSkinHint(), hintTable(), QskSkinHintTableEditor()

Definition at line 927 of file QskSkinnable.cpp.

◆ setSkinlet()

void QskSkinnable::setSkinlet ( const QskSkinlet skinlet)

Set an individual skinlet to render/display the content.

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.

Parameters
skinletSkinlet to render/layout the skinnable.
See also
skinlet(), effectiveSkinlet(), resetSkinlet(), QskSkin::declareSkinlet, QskSkinlet::isOwnedBySkinnable()
Note
Overriding the skinlet that has been registered in the skin breaks the themeability of the skinnable.

Definition at line 272 of file QskSkinnable.cpp.

◆ setSkinStateFlag()

void QskSkinnable::setSkinStateFlag ( QskAspect::State  stateFlag,
bool  on = true 
)

Set/Clear a state in the state bits

Parameters
stateFlagState bit
ontrue or false
See also
setSkinState(), skinState()

Definition at line 1378 of file QskSkinnable.cpp.

◆ setSkinStates()

void QskSkinnable::setSkinStates ( QskAspect::States  newStates)

Definition at line 1413 of file QskSkinnable.cpp.

◆ setSpacingHint()

bool QskSkinnable::setSpacingHint ( QskAspect  aspect,
qreal  spacing 
)

Sets a spacing hint.

QskAspect::Metric | QskAspect::Spacing will be added to aspect.

Parameters
aspectUnresolved aspect
spacingSpacing
See also
setSkinHint(), QskAspect::Metric, QskAspect::Spacing

Definition at line 673 of file QskSkinnable.cpp.

◆ setStippleMetricsHint()

bool QskSkinnable::setStippleMetricsHint ( QskAspect  aspect,
const QskStippleMetrics metrics 
)

Definition at line 655 of file QskSkinnable.cpp.

◆ setStrutSizeHint() [1/2]

bool QskSkinnable::setStrutSizeHint ( QskAspect  aspect,
const QSizeF &  size 
)

Sets a metric hint.

QskAspect::Metric | QskAspect::StrutSize will be added to aspect.

Parameters
aspectUnresolved aspect
sizeStrut size hint
See also
setSkinHint(), QskAspect::Metric, QskAspect::StrutSize

Definition at line 472 of file QskSkinnable.cpp.

◆ setStrutSizeHint() [2/2]

bool QskSkinnable::setStrutSizeHint ( QskAspect  aspect,
qreal  width,
qreal  height 
)

Sets a strut size hint.

QskAspect::Metric | QskAspect::StrutSize will be added to aspect.

Parameters
aspectUnresolved aspect
widthWidth of the strut size
heightHeight of the strut size
See also
setSkinHint(), QskAspect::Metric, QskAspect::StrutSize

Definition at line 466 of file QskSkinnable.cpp.

◆ setSubcontrolProxy()

void QskSkinnable::setSubcontrolProxy ( QskAspect::Subcontrol  subControl,
QskAspect::Subcontrol  proxy 
)

Definition at line 318 of file QskSkinnable.cpp.

◆ setSymbolHint()

bool QskSkinnable::setSymbolHint ( const QskAspect  aspect,
const QskGraphic symbol 
)

Definition at line 781 of file QskSkinnable.cpp.

◆ setTextOptionsHint()

bool QskSkinnable::setTextOptionsHint ( QskAspect  aspect,
const QskTextOptions options 
)

Definition at line 689 of file QskSkinnable.cpp.

◆ shadowColorHint()

QColor QskSkinnable::shadowColorHint ( QskAspect  aspect,
QskSkinHintStatus status = nullptr 
) const

Definition at line 624 of file QskSkinnable.cpp.

◆ shadowMetricsHint()

QskShadowMetrics QskSkinnable::shadowMetricsHint ( QskAspect  aspect,
QskSkinHintStatus status = nullptr 
) const

Definition at line 607 of file QskSkinnable.cpp.

◆ skinlet()

const QskSkinlet * QskSkinnable::skinlet ( ) const
Returns
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.
See also
setSkinlet(), effectiveSkinlet(), effectiveSkin()

Definition at line 302 of file QskSkinnable.cpp.

◆ skinStates()

QskAspect::States QskSkinnable::skinStates ( ) const

Definition at line 1192 of file QskSkinnable.cpp.

◆ skinStatesAsPrintable() [1/2]

const char * QskSkinnable::skinStatesAsPrintable ( ) const

Definition at line 1197 of file QskSkinnable.cpp.

◆ skinStatesAsPrintable() [2/2]

const char * QskSkinnable::skinStatesAsPrintable ( QskAspect::States  states) const

Definition at line 1202 of file QskSkinnable.cpp.

◆ spacingHint()

qreal QskSkinnable::spacingHint ( QskAspect  aspect,
QskSkinHintStatus status = nullptr 
) const

Retrieves a spacing hint.

QskAspect::Metric | QskAspect::Spacing will be added to aspect.

Parameters
aspectUnresolved aspect
statusOptional status information
Returns
spacing, or 0 if no value was found
See also
effectiveSkinHint(), setSpacingHint()

Definition at line 683 of file QskSkinnable.cpp.

◆ startHintTransitions() [1/2]

bool QskSkinnable::startHintTransitions ( const QVector< QskAspect::Subcontrol > &  subControls,
QskAspect::States  oldStates,
QskAspect::States  newStates,
int  index = -1 
)

Definition at line 1462 of file QskSkinnable.cpp.

◆ startHintTransitions() [2/2]

bool QskSkinnable::startHintTransitions ( QskAspect::States  oldStates,
QskAspect::States  newStates,
int  index = -1 
)

Definition at line 1451 of file QskSkinnable.cpp.

◆ startTransition() [1/2]

void QskSkinnable::startTransition ( QskAspect  aspect,
int  index,
QskAnimationHint  animationHint,
const QVariant &  from,
const QVariant &  to 
)

Definition at line 1333 of file QskSkinnable.cpp.

◆ startTransition() [2/2]

void QskSkinnable::startTransition ( QskAspect  aspect,
QskAnimationHint  animationHint,
const QVariant &  from,
const QVariant &  to 
)

Definition at line 1327 of file QskSkinnable.cpp.

◆ stippleMetricsHint()

QskStippleMetrics QskSkinnable::stippleMetricsHint ( QskAspect  aspect,
QskSkinHintStatus status = nullptr 
) const

Definition at line 666 of file QskSkinnable.cpp.

◆ strutSizeHint()

QSizeF QskSkinnable::strutSizeHint ( QskAspect  aspect,
QskSkinHintStatus status = nullptr 
) const

Retrieves a strut size hint.

QskAspect::Metric | QskAspect::StrutSize will be added to aspect.

Parameters
aspectUnresolved aspect
statusOptional status information
Returns
Strut size, or QSizeF() if no value was found
See also
effectiveSkinHint(), setStrutSizeHint()

Definition at line 482 of file QskSkinnable.cpp.

◆ subControlContentsRect()

QRectF QskSkinnable::subControlContentsRect ( const QRectF &  contentsRect,
QskAspect::Subcontrol  subControl 
) const

Calculate the inner rectangle for 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.

Parameters
contentsRectBounding rectangle for laying out the nodes of the skinnable
subControlUnsubstituted subcontrol
Returns
Geometry for contents inside the subControl
See also
QskSkinlet::subControlRect(), innerBox()

Definition at line 1300 of file QskSkinnable.cpp.

◆ subcontrolProxy()

QskAspect::Subcontrol QskSkinnable::subcontrolProxy ( QskAspect::Subcontrol  subControl) const

Definition at line 353 of file QskSkinnable.cpp.

◆ subControlRect()

QRectF QskSkinnable::subControlRect ( const QRectF &  contentsRect,
QskAspect::Subcontrol  subControl 
) const

Calculate position and size of a subControl.

A convenience method that forwards the calculation to the skinlet

Parameters
contentsRectBounding rectangle for laying out the nodes of the skinnable
subControlUnsubstituted subcontrol
Returns
Geometry for the subControl
See also
effectiveSkinlet(), QskSkinlet::subControlRect(), QskControl::contentsRect()

Definition at line 1294 of file QskSkinnable.cpp.

◆ substitutedSubcontrol()

QskAspect::Subcontrol QskSkinnable::substitutedSubcontrol ( QskAspect::Subcontrol  subControl) const
protectedvirtual

Definition at line 1585 of file QskSkinnable.cpp.

◆ symbolHint()

QskGraphic QskSkinnable::symbolHint ( const QskAspect  aspect,
QskSkinHintStatus status = nullptr 
) const

Definition at line 793 of file QskSkinnable.cpp.

◆ textOptionsHint()

QskTextOptions QskSkinnable::textOptionsHint ( QskAspect  aspect,
QskSkinHintStatus status = nullptr 
) const

Definition at line 701 of file QskSkinnable.cpp.

◆ updateNode()

void QskSkinnable::updateNode ( QSGNode *  parentNode)
protectedvirtual

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,

Parameters
parentNodeThe parent of the nodes to be added in this method.
Note
Overriding updateNode() might break the themeability and the usual strategy to implement custom painting is to customize or replace the skinlet.
See also
QskSkinlet::updateSubNode()

Reimplemented in QskDrawer, QskMenu, and QskTextInput.

Definition at line 1567 of file QskSkinnable.cpp.