graphicRole property added
This commit is contained in:
parent
f037297620
commit
e7d03e2ddd
@ -157,7 +157,24 @@ void QskStatusIndicator::setGraphic( int status, const QskGraphic& graphic )
|
|||||||
QskColorFilter QskStatusIndicator::graphicFilter( int status ) const
|
QskColorFilter QskStatusIndicator::graphicFilter( int status ) const
|
||||||
{
|
{
|
||||||
Q_UNUSED( status )
|
Q_UNUSED( status )
|
||||||
return effectiveGraphicFilter( QskStatusIndicator::Graphic );
|
return effectiveGraphicFilter( Graphic );
|
||||||
|
}
|
||||||
|
|
||||||
|
void QskStatusIndicator::setGraphicRole( int role )
|
||||||
|
{
|
||||||
|
if ( setGraphicRoleHint( Graphic, role ) )
|
||||||
|
Q_EMIT graphicRoleChanged( role );
|
||||||
|
}
|
||||||
|
|
||||||
|
void QskStatusIndicator::resetGraphicRole()
|
||||||
|
{
|
||||||
|
if ( resetGraphicRoleHint( Graphic ) )
|
||||||
|
Q_EMIT graphicRoleChanged( graphicRoleHint( Graphic ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
int QskStatusIndicator::graphicRole() const
|
||||||
|
{
|
||||||
|
return graphicRoleHint( Graphic );
|
||||||
}
|
}
|
||||||
|
|
||||||
int QskStatusIndicator::status() const
|
int QskStatusIndicator::status() const
|
||||||
|
@ -17,6 +17,8 @@ class QSK_EXPORT QskStatusIndicator : public QskControl
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
Q_PROPERTY( int status READ status() WRITE setStatus NOTIFY statusChanged )
|
Q_PROPERTY( int status READ status() WRITE setStatus NOTIFY statusChanged )
|
||||||
|
Q_PROPERTY( int graphicRole READ graphicRole
|
||||||
|
WRITE setGraphicRole RESET resetGraphicRole NOTIFY graphicRoleChanged )
|
||||||
|
|
||||||
using Inherited = QskControl;
|
using Inherited = QskControl;
|
||||||
|
|
||||||
@ -32,6 +34,10 @@ class QSK_EXPORT QskStatusIndicator : public QskControl
|
|||||||
QskGraphic graphic( int status ) const;
|
QskGraphic graphic( int status ) const;
|
||||||
void setGraphic( int status, const QskGraphic& );
|
void setGraphic( int status, const QskGraphic& );
|
||||||
|
|
||||||
|
void setGraphicRole( int role );
|
||||||
|
void resetGraphicRole();
|
||||||
|
int graphicRole() const;
|
||||||
|
|
||||||
virtual QskColorFilter graphicFilter( int status ) const;
|
virtual QskColorFilter graphicFilter( int status ) const;
|
||||||
virtual QskGraphic loadSource( const QUrl& ) const;
|
virtual QskGraphic loadSource( const QUrl& ) const;
|
||||||
|
|
||||||
@ -45,6 +51,7 @@ class QSK_EXPORT QskStatusIndicator : public QskControl
|
|||||||
|
|
||||||
Q_SIGNALS:
|
Q_SIGNALS:
|
||||||
void statusChanged( int status );
|
void statusChanged( int status );
|
||||||
|
void graphicRoleChanged( int );
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void changeEvent( QEvent* ) override;
|
void changeEvent( QEvent* ) override;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user