qskinny/examples/iotdashboard/StorageBarSkinlet.h

33 lines
874 B
C
Raw Normal View History

2023-01-05 17:08:50 +01:00
/******************************************************************************
* Copyright (C) 2022 Edelhirsch Software GmbH
2023-04-06 10:15:03 +02:00
* SPDX-License-Identifier: BSD-3-Clause
2023-01-05 17:08:50 +01:00
*****************************************************************************/
#pragma once
#include <QskSkinlet.h>
class StorageBarSkinlet final : public QskSkinlet
{
Q_GADGET
using Inherited = QskSkinlet;
public:
enum NodeRole
{
Pictures,
Music,
Videos,
Documents,
Others,
Free
};
Q_INVOKABLE StorageBarSkinlet( QskSkin* skin = nullptr );
private:
QRectF subControlRect( const QskSkinnable* skinnable, const QRectF& contentsRect,
QskAspect::Subcontrol subControl ) const override;
QSGNode* updateSubNode(
const QskSkinnable* skinnable, quint8 nodeRole, QSGNode* node ) const override;
};