QSkinny 0.8.0
C++/Qt UI toolkit
Loading...
Searching...
No Matches
QskGraphicLabelSkinlet.h
1/******************************************************************************
2 * QSkinny - Copyright (C) The authors
3 * SPDX-License-Identifier: BSD-3-Clause
4 *****************************************************************************/
5
6#ifndef QSK_GRAPHIC_LABEL_SKINLET_H
7#define QSK_GRAPHIC_LABEL_SKINLET_H
8
9#include "QskSkinlet.h"
10
11class QskGraphicLabel;
12
13class QSK_EXPORT QskGraphicLabelSkinlet : public QskSkinlet
14{
15 Q_GADGET
16
17 using Inherited = QskSkinlet;
18
19 public:
20 enum NodeRole
21 {
22 PanelRole,
23 GraphicRole,
24
25 RoleCount
26 };
27
28 Q_INVOKABLE QskGraphicLabelSkinlet( QskSkin* = nullptr );
29 ~QskGraphicLabelSkinlet() override;
30
31 QRectF subControlRect( const QskSkinnable*,
32 const QRectF&, QskAspect::Subcontrol ) const override;
33
34 QSizeF sizeHint( const QskSkinnable*,
35 Qt::SizeHint, const QSizeF& ) const override;
36
37 protected:
38 QSGNode* updateSubNode( const QskSkinnable*,
39 quint8 nodeRole, QSGNode* ) const override;
40
41 private:
42 QRect graphicRect( const QskGraphicLabel*, const QRectF& ) const;
43 QSGNode* updateGraphicNode( const QskGraphicLabel*, QSGNode* ) const;
44};
45
46#endif
Subcontrol
For use within the rendering or lay-outing of a specific QskSkinnable.
Definition QskAspect.h:104
Describes the rendering interface of a QskControl. Change the skinlet to change the appearance of the...
Definition QskSkinlet.h:34