qskinny/src/controls/QskSwitchButtonSkinlet.h

39 lines
1022 B
C
Raw Normal View History

2021-08-02 17:17:04 +00:00
/******************************************************************************
* QSkinny - Copyright (C) 2016 Uwe Rathmann
* This file may be used under the terms of the QSkinny License, Version 1.0
*****************************************************************************/
2021-08-02 11:22:37 +00:00
#ifndef QSK_SWITCH_BUTTON_SKINLET_H
#define QSK_SWITCH_BUTTON_SKINLET_H
#include "QskSkinlet.h"
class QSK_EXPORT QskSwitchButtonSkinlet : public QskSkinlet
{
Q_GADGET
using Inherited = QskSkinlet;
public:
enum NodeRole
{
2021-08-02 17:17:04 +00:00
GrooveRole,
HandleRole
2021-08-02 11:22:37 +00:00
};
Q_INVOKABLE QskSwitchButtonSkinlet( QskSkin* parent = nullptr );
~QskSwitchButtonSkinlet() override;
QRectF subControlRect( const QskSkinnable*,
const QRectF& rect, QskAspect::Subcontrol ) const override;
QSizeF sizeHint( const QskSkinnable*,
Qt::SizeHint, const QSizeF& ) const override;
protected:
QSGNode* updateSubNode( const QskSkinnable*,
quint8 nodeRole, QSGNode* ) const override;
};
2021-08-02 17:17:04 +00:00
2021-08-02 11:22:37 +00:00
#endif