qskinny/examples/iotdashboard/StorageBarSkinlet.h

33 lines
874 B
C
Raw Permalink Normal View History

2023-01-05 16:08:50 +00:00
/******************************************************************************
* Copyright (C) 2022 Edelhirsch Software GmbH
2023-04-06 08:15:03 +00:00
* SPDX-License-Identifier: BSD-3-Clause
2023-01-05 16:08:50 +00: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;
};