qskinny/examples/iot-dashboard/PieChartPainted.h

35 lines
881 B
C
Raw Normal View History

#ifndef PIECHARTPAINTED_H
#define PIECHARTPAINTED_H
#include <QskControl.h>
#include "CircularProgressBar.h"
2020-09-30 15:38:51 +00:00
class ProgressBarAnimator;
class QskTextLabel;
class QQuickPaintedItem;
class PieChartPainted : public QskControl
{
2020-09-23 15:45:06 +00:00
public:
QSK_SUBCONTROLS( Panel )
2021-03-31 08:25:50 +00:00
PieChartPainted( const QColor& color, const QskGradient& gradient, int progress, int value, QQuickItem* parent = nullptr );
2020-09-23 15:45:06 +00:00
QskAspect::Subcontrol effectiveSubcontrol(
QskAspect::Subcontrol subControl ) const override final;
virtual QSizeF contentsSizeHint( Qt::SizeHint, const QSizeF& ) const override;
void updateLayout() override;
private:
QColor m_color;
2021-03-31 08:25:50 +00:00
QskGradient m_gradient;
2020-09-23 15:45:06 +00:00
CircularProgressBar* m_progressBar;
QskTextLabel* m_progressLabel;
2020-09-30 15:38:51 +00:00
ProgressBarAnimator* m_animator;
};
#endif // PIECHARTPAINTED_H