QSkinny 0.8.0
C++/Qt UI toolkit
Loading...
Searching...
No Matches
QskCheckBoxSkinlet.h
1/******************************************************************************
2 * QSkinny - Copyright (C) The authors
3 * SPDX-License-Identifier: BSD-3-Clause
4 *****************************************************************************/
5
6#ifndef QSK_CHECK_BOX_SKINLET_H
7#define QSK_CHECK_BOX_SKINLET_H
8
9#include "QskSkinlet.h"
10
11class QskCheckBox;
12
13class QSK_EXPORT QskCheckBoxSkinlet : public QskSkinlet
14{
15 Q_GADGET
16
17 using Inherited = QskSkinlet;
18
19 public:
20 enum NodeRole
21 {
22 PanelRole,
23 BoxRole,
24 IndicatorRole,
25 TextRole,
26
27 RoleCount
28 };
29
30 Q_INVOKABLE QskCheckBoxSkinlet( QskSkin* = nullptr );
31 ~QskCheckBoxSkinlet() override;
32
33 QRectF subControlRect( const QskSkinnable*,
34 const QRectF&, QskAspect::Subcontrol ) const override;
35
36 QSizeF sizeHint( const QskSkinnable*,
37 Qt::SizeHint, const QSizeF& ) const override;
38
39 protected:
40 QSGNode* updateSubNode( const QskSkinnable*,
41 quint8 nodeRole, QSGNode* ) const override;
42
43 private:
44 QRectF textRect( const QskCheckBox*, const QRectF& ) const;
45 QRectF boxRect( const QskCheckBox*, const QRectF& ) const;
46
47 QSGNode* updateTextNode( const QskCheckBox*, QSGNode* ) const;
48};
49
50#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