![Peter Hartmann](/assets/img/avatar_default.png)
* add QskArcNode and QskArcRenderer * IOT example: Use QskArcNode instead of own arc node * move some functionality to the arc renderer * add QskArcMetrics * add methods to QskSkinlet * remove circular bar graph node We can now use updateArcNode() and don't need our own method. * support linear gradients in the arc renderer * clean up * incorporate Uwe's changes * add overloads for updateArcNode() when the angles are set dynamically The angles don't always come from the style, so we need overloads in QskSkinlet to set them dynamically.
37 lines
893 B
C++
37 lines
893 B
C++
/******************************************************************************
|
|
* QSkinny - Copyright (C) 2021 Uwe Rathmann
|
|
* This file may be used under the terms of the QSkinny License, Version 1.0
|
|
*****************************************************************************/
|
|
|
|
#pragma once
|
|
|
|
#include <QskSkinlet.h>
|
|
|
|
class CircularProgressBar;
|
|
|
|
class CircularProgressBarSkinlet : public QskSkinlet
|
|
{
|
|
Q_GADGET
|
|
|
|
using Inherited = QskSkinlet;
|
|
|
|
public:
|
|
enum NodeRole
|
|
{
|
|
GrooveRole,
|
|
BarRole,
|
|
|
|
RoleCount,
|
|
};
|
|
|
|
Q_INVOKABLE CircularProgressBarSkinlet( QskSkin* = nullptr );
|
|
~CircularProgressBarSkinlet() override;
|
|
|
|
QRectF subControlRect( const QskSkinnable*,
|
|
const QRectF&, QskAspect::Subcontrol ) const override;
|
|
|
|
protected:
|
|
QSGNode* updateSubNode( const QskSkinnable*,
|
|
quint8 nodeRole, QSGNode* ) const override;
|
|
};
|