support for QskIntervalF added
This commit is contained in:
parent
c4006f655b
commit
606a3e2ce2
@ -13,6 +13,7 @@
|
||||
#include "QskBoxShapeMetrics.h"
|
||||
#include "QskGradient.h"
|
||||
#include "QskMargins.h"
|
||||
#include "QskIntervalF.h"
|
||||
|
||||
#include <qcolor.h>
|
||||
#include <qvariant.h>
|
||||
@ -53,6 +54,9 @@ class QSK_EXPORT QskSkinHintTable
|
||||
void setBoxBorderColors( QskAspect::Aspect, const QskBoxBorderColors& );
|
||||
QskBoxBorderColors boxBorderColors( QskAspect::Aspect ) const;
|
||||
|
||||
void setInterval( QskAspect::Aspect, const QskIntervalF& );
|
||||
QskIntervalF interval( QskAspect::Aspect ) const;
|
||||
|
||||
void setAnimation( QskAspect::Aspect, QskAnimationHint animation );
|
||||
QskAnimationHint animation( QskAspect::Aspect ) const;
|
||||
|
||||
@ -223,6 +227,19 @@ inline QskBoxBorderColors QskSkinHintTable::boxBorderColors( QskAspect::Aspect a
|
||||
return hint( aspect | Border | Color ).value< QskBoxBorderColors >();
|
||||
}
|
||||
|
||||
inline void QskSkinHintTable::setInterval(
|
||||
QskAspect::Aspect aspect, const QskIntervalF& interval )
|
||||
{
|
||||
using namespace QskAspect;
|
||||
setHint( aspect | Metric, QVariant::fromValue( interval ) );
|
||||
}
|
||||
|
||||
inline QskIntervalF QskSkinHintTable::interval( QskAspect::Aspect aspect ) const
|
||||
{
|
||||
using namespace QskAspect;
|
||||
return hint( aspect | Metric ).value< QskIntervalF >();
|
||||
}
|
||||
|
||||
inline QskAnimationHint QskSkinHintTable::animation( QskAspect::Aspect aspect ) const
|
||||
{
|
||||
aspect.setAnimator( true );
|
||||
|
@ -291,6 +291,18 @@ QskBoxBorderColors QskSkinnable::boxBorderColorsHint(
|
||||
return effectiveHint( aspect | Color | Border, status ).value< QskBoxBorderColors >();
|
||||
}
|
||||
|
||||
void QskSkinnable::setIntervalHint(
|
||||
QskAspect::Aspect aspect, const QskIntervalF& interval )
|
||||
{
|
||||
m_data->hintTable.setInterval( aspect, interval );
|
||||
}
|
||||
|
||||
QskIntervalF QskSkinnable::intervalHint(
|
||||
QskAspect::Aspect aspect, QskSkinHintStatus* status ) const
|
||||
{
|
||||
return effectiveHint( aspect | QskAspect::Metric, status ).value< QskIntervalF >();
|
||||
}
|
||||
|
||||
void QskSkinnable::setFontRole( QskAspect::Aspect aspect, int role )
|
||||
{
|
||||
m_data->hintTable.setFontRole( aspect, role );
|
||||
@ -739,7 +751,7 @@ QSizeF QskSkinnable::outerBoxSize(
|
||||
QRectF QskSkinnable::outerBox(
|
||||
QskAspect::Aspect aspect, const QRectF& innerBox ) const
|
||||
{
|
||||
const QMarginsF m = qskEffectivePadding( this, aspect, innerBox.size(), false );
|
||||
const auto m = qskEffectivePadding( this, aspect, innerBox.size(), false );
|
||||
return innerBox.marginsAdded( m );
|
||||
}
|
||||
|
||||
@ -764,7 +776,7 @@ void QskSkinnable::startTransition( QskAspect::Aspect aspect,
|
||||
if ( animationHint.duration <= 0 || ( from == to ) )
|
||||
return;
|
||||
|
||||
QskControl* control = this->owningControl();
|
||||
auto control = this->owningControl();
|
||||
if ( control->window() == nullptr || !isTransitionAccepted( aspect ) )
|
||||
return;
|
||||
|
||||
|
@ -28,6 +28,7 @@ class QskBoxShapeMetrics;
|
||||
class QskBoxBorderMetrics;
|
||||
class QskBoxBorderColors;
|
||||
class QskGradient;
|
||||
class QskIntervalF;
|
||||
|
||||
class QskSkin;
|
||||
class QskSkinlet;
|
||||
@ -94,6 +95,9 @@ class QSK_EXPORT QskSkinnable
|
||||
void setBoxBorderColorsHint( QskAspect::Aspect, const QskBoxBorderColors& );
|
||||
QskBoxBorderColors boxBorderColorsHint( QskAspect::Aspect, QskSkinHintStatus* = nullptr ) const;
|
||||
|
||||
void setIntervalHint( QskAspect::Aspect, const QskIntervalF & );
|
||||
QskIntervalF intervalHint( QskAspect::Aspect, QskSkinHintStatus* = nullptr ) const;
|
||||
|
||||
void setFlagHint( QskAspect::Aspect, int flag );
|
||||
int flagHint( QskAspect::Aspect ) const;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user