qskinny/src/controls/QskProgressBarSkinlet.h

44 lines
1.1 KiB
C
Raw Normal View History

2020-07-31 16:57:22 +02:00
/******************************************************************************
* QSkinny - Copyright (C) 2016 Uwe Rathmann
* This file may be used under the terms of the QSkinny License, Version 1.0
*****************************************************************************/
2020-08-01 17:51:45 +02:00
#ifndef QSK_PROGRESS_BAR_SKINLET_H
#define QSK_PROGRESS_BAR_SKINLET_H
2020-07-31 16:57:22 +02:00
#include "QskSkinlet.h"
2020-08-01 17:51:45 +02:00
class QskProgressBar;
2020-07-31 16:57:22 +02:00
2020-08-01 17:51:45 +02:00
class QSK_EXPORT QskProgressBarSkinlet : public QskSkinlet
2020-07-31 16:57:22 +02:00
{
Q_GADGET
using Inherited = QskSkinlet;
public:
enum NodeRole
{
GrooveRole,
2020-08-03 08:02:13 +02:00
BarRole,
2020-07-31 16:57:22 +02:00
RoleCount,
};
2020-08-01 17:51:45 +02:00
Q_INVOKABLE QskProgressBarSkinlet( QskSkin* = nullptr );
~QskProgressBarSkinlet() override;
2020-07-31 16:57:22 +02:00
QRectF subControlRect( const QskSkinnable*,
const QRectF&, QskAspect::Subcontrol ) const override;
protected:
QSGNode* updateSubNode( const QskSkinnable*,
quint8 nodeRole, QSGNode* ) const override;
private:
2020-08-03 08:02:13 +02:00
QSGNode* updateBarNode( const QskProgressBar*, QSGNode* ) const;
QRectF barRect( const QskProgressBar* ) const;
2020-07-31 16:57:22 +02:00
};
#endif