Merge branch 'uwerat-master' into material-theme
This commit is contained in:
commit
3df987894e
|
@ -35,6 +35,8 @@ class QSK_EXPORT QskShadowMetrics
|
||||||
constexpr bool operator==( const QskShadowMetrics& ) const noexcept;
|
constexpr bool operator==( const QskShadowMetrics& ) const noexcept;
|
||||||
constexpr bool operator!=( const QskShadowMetrics& ) const noexcept;
|
constexpr bool operator!=( const QskShadowMetrics& ) const noexcept;
|
||||||
|
|
||||||
|
bool isNull() const noexcept;
|
||||||
|
|
||||||
void setSpreadRadius( qreal ) noexcept;
|
void setSpreadRadius( qreal ) noexcept;
|
||||||
constexpr qreal spreadRadius() const noexcept;
|
constexpr qreal spreadRadius() const noexcept;
|
||||||
|
|
||||||
|
@ -158,6 +160,12 @@ inline constexpr QPointF QskShadowMetrics::offset() const noexcept
|
||||||
return m_offset;
|
return m_offset;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline bool QskShadowMetrics::isNull() const noexcept
|
||||||
|
{
|
||||||
|
return m_offset.isNull() &&
|
||||||
|
( m_spreadRadius == 0.0 ) && ( m_blurRadius == 0.0 );
|
||||||
|
}
|
||||||
|
|
||||||
#ifndef QT_NO_DEBUG_STREAM
|
#ifndef QT_NO_DEBUG_STREAM
|
||||||
|
|
||||||
QSK_EXPORT QDebug operator<<( QDebug, const QskShadowMetrics& );
|
QSK_EXPORT QDebug operator<<( QDebug, const QskShadowMetrics& );
|
||||||
|
|
|
@ -520,6 +520,35 @@ QskShadowMetrics QskSkinHintTableEditor::shadowMetrics( QskAspect aspect ) const
|
||||||
return metricHint< QskShadowMetrics >( aspectShadow( aspect ) );
|
return metricHint< QskShadowMetrics >( aspectShadow( aspect ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void QskSkinHintTableEditor::setShadowColor( QskAspect aspect,
|
||||||
|
const QColor& color, QskStateCombination combination )
|
||||||
|
{
|
||||||
|
setColorHint( aspectShadow( aspect ), color, combination );
|
||||||
|
}
|
||||||
|
|
||||||
|
void QskSkinHintTableEditor::setShadowColor( QskAspect aspect,
|
||||||
|
Qt::GlobalColor color, QskStateCombination combination )
|
||||||
|
{
|
||||||
|
setColorHint( aspectShadow( aspect ), QColor( color ), combination );
|
||||||
|
}
|
||||||
|
|
||||||
|
void QskSkinHintTableEditor::setShadowColor( QskAspect aspect,
|
||||||
|
QRgb rgb, QskStateCombination combination )
|
||||||
|
{
|
||||||
|
setColorHint( aspectShadow( aspect ), QColor::fromRgba( rgb ), combination );
|
||||||
|
}
|
||||||
|
|
||||||
|
bool QskSkinHintTableEditor::removeShadowColor(
|
||||||
|
QskAspect aspect, QskStateCombination combination )
|
||||||
|
{
|
||||||
|
return removeColorHint( aspectShadow( aspect ), combination );
|
||||||
|
}
|
||||||
|
|
||||||
|
QColor QskSkinHintTableEditor::shadowColor( QskAspect aspect ) const
|
||||||
|
{
|
||||||
|
return colorHint< QColor >( aspectShadow( aspect ) );
|
||||||
|
}
|
||||||
|
|
||||||
void QskSkinHintTableEditor::setArcMetrics( QskAspect aspect, qreal width,
|
void QskSkinHintTableEditor::setArcMetrics( QskAspect aspect, qreal width,
|
||||||
qreal startAngle, qreal spanAngle, Qt::SizeMode sizeMode )
|
qreal startAngle, qreal spanAngle, Qt::SizeMode sizeMode )
|
||||||
{
|
{
|
||||||
|
|
|
@ -247,6 +247,20 @@ class QSK_EXPORT QskSkinHintTableEditor
|
||||||
|
|
||||||
QskShadowMetrics shadowMetrics( QskAspect ) const;
|
QskShadowMetrics shadowMetrics( QskAspect ) const;
|
||||||
|
|
||||||
|
// shadowColor
|
||||||
|
|
||||||
|
void setShadowColor( QskAspect,
|
||||||
|
const QColor&, QskStateCombination = QskStateCombination() );
|
||||||
|
|
||||||
|
void setShadowColor( QskAspect,
|
||||||
|
Qt::GlobalColor, QskStateCombination = QskStateCombination() );
|
||||||
|
|
||||||
|
void setShadowColor( QskAspect,
|
||||||
|
QRgb, QskStateCombination = QskStateCombination() );
|
||||||
|
|
||||||
|
bool removeShadowColor( QskAspect, QskStateCombination = QskStateCombination() );
|
||||||
|
QColor shadowColor( QskAspect ) const;
|
||||||
|
|
||||||
// arcMetrics
|
// arcMetrics
|
||||||
|
|
||||||
void setArcMetrics( QskAspect, qreal, qreal, qreal, Qt::SizeMode = Qt::AbsoluteSize );
|
void setArcMetrics( QskAspect, qreal, qreal, qreal, Qt::SizeMode = Qt::AbsoluteSize );
|
||||||
|
|
|
@ -22,6 +22,7 @@
|
||||||
#include "QskBoxShapeMetrics.h"
|
#include "QskBoxShapeMetrics.h"
|
||||||
#include "QskBoxBorderMetrics.h"
|
#include "QskBoxBorderMetrics.h"
|
||||||
#include "QskBoxBorderColors.h"
|
#include "QskBoxBorderColors.h"
|
||||||
|
#include "QskShadowMetrics.h"
|
||||||
#include "QskBoxHints.h"
|
#include "QskBoxHints.h"
|
||||||
#include "QskGradient.h"
|
#include "QskGradient.h"
|
||||||
|
|
||||||
|
@ -575,6 +576,39 @@ QskBoxBorderColors QskSkinnable::boxBorderColorsHint(
|
||||||
this, aspect | QskAspect::Border, status );
|
this, aspect | QskAspect::Border, status );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool QskSkinnable::setShadowMetricsHint(
|
||||||
|
QskAspect aspect, const QskShadowMetrics& metrics )
|
||||||
|
{
|
||||||
|
return qskSetMetric( this, aspect | QskAspect::Shadow, metrics );
|
||||||
|
}
|
||||||
|
|
||||||
|
bool QskSkinnable::resetShadowMetricsHint( QskAspect aspect )
|
||||||
|
{
|
||||||
|
return resetMetric( aspect | QskAspect::Shadow );
|
||||||
|
}
|
||||||
|
|
||||||
|
QskShadowMetrics QskSkinnable::shadowMetricsHint(
|
||||||
|
QskAspect aspect, QskSkinHintStatus* status ) const
|
||||||
|
{
|
||||||
|
return qskMetric< QskShadowMetrics >(
|
||||||
|
this, aspect | QskAspect::Shadow, status );
|
||||||
|
}
|
||||||
|
|
||||||
|
bool QskSkinnable::setShadowColorHint( QskAspect aspect, const QColor& color )
|
||||||
|
{
|
||||||
|
return qskSetColor( this, aspect | QskAspect::Shadow, color );
|
||||||
|
}
|
||||||
|
|
||||||
|
bool QskSkinnable::resetShadowColorHint( QskAspect aspect )
|
||||||
|
{
|
||||||
|
return resetColor( aspect | QskAspect::Shadow );
|
||||||
|
}
|
||||||
|
|
||||||
|
QColor QskSkinnable::shadowColorHint( QskAspect aspect, QskSkinHintStatus* status ) const
|
||||||
|
{
|
||||||
|
return qskColor< QColor >( this, aspect | QskAspect::Shadow, status );
|
||||||
|
}
|
||||||
|
|
||||||
QskBoxHints QskSkinnable::boxHints( QskAspect aspect ) const
|
QskBoxHints QskSkinnable::boxHints( QskAspect aspect ) const
|
||||||
{
|
{
|
||||||
return QskBoxHints(
|
return QskBoxHints(
|
||||||
|
|
|
@ -28,6 +28,7 @@ class QskColorFilter;
|
||||||
class QskBoxShapeMetrics;
|
class QskBoxShapeMetrics;
|
||||||
class QskBoxBorderMetrics;
|
class QskBoxBorderMetrics;
|
||||||
class QskBoxBorderColors;
|
class QskBoxBorderColors;
|
||||||
|
class QskShadowMetrics;
|
||||||
class QskBoxHints;
|
class QskBoxHints;
|
||||||
class QskGradient;
|
class QskGradient;
|
||||||
|
|
||||||
|
@ -208,6 +209,14 @@ class QSK_EXPORT QskSkinnable
|
||||||
bool resetBoxBorderColorsHint( QskAspect );
|
bool resetBoxBorderColorsHint( QskAspect );
|
||||||
QskBoxBorderColors boxBorderColorsHint( QskAspect, QskSkinHintStatus* = nullptr ) const;
|
QskBoxBorderColors boxBorderColorsHint( QskAspect, QskSkinHintStatus* = nullptr ) const;
|
||||||
|
|
||||||
|
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;
|
QskBoxHints boxHints( QskAspect ) const;
|
||||||
|
|
||||||
bool setArcMetricsHint( QskAspect, const QskArcMetrics& );
|
bool setArcMetricsHint( QskAspect, const QskArcMetrics& );
|
||||||
|
|
|
@ -100,6 +100,17 @@ QSGNode* QskSGNode::findChildNode( QSGNode* parent, quint8 role )
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool QskSGNode::removeChildNode( QSGNode* parent, quint8 role )
|
||||||
|
{
|
||||||
|
if ( auto node = findChildNode( parent, role ) )
|
||||||
|
{
|
||||||
|
qskRemoveChildNode( parent, node );
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
void QskSGNode::removeAllChildNodesAfter( QSGNode* parent, QSGNode* child )
|
void QskSGNode::removeAllChildNodesAfter( QSGNode* parent, QSGNode* child )
|
||||||
{
|
{
|
||||||
if ( parent && child && child->parent() == parent )
|
if ( parent && child && child->parent() == parent )
|
||||||
|
|
|
@ -43,6 +43,7 @@ namespace QskSGNode
|
||||||
}
|
}
|
||||||
|
|
||||||
QSK_EXPORT QSGNode* findChildNode( QSGNode* parent, quint8 role );
|
QSK_EXPORT QSGNode* findChildNode( QSGNode* parent, quint8 role );
|
||||||
|
QSK_EXPORT bool removeChildNode( QSGNode* parent, quint8 role );
|
||||||
|
|
||||||
// nodeRoles: sort order
|
// nodeRoles: sort order
|
||||||
QSK_EXPORT void replaceChildNode(
|
QSK_EXPORT void replaceChildNode(
|
||||||
|
|
Loading…
Reference in New Issue