QSkinny 0.8.0
C++/Qt UI toolkit
Loading...
Searching...
No Matches
QskSpinBoxSkinlet.h
1/******************************************************************************
2 * QSkinny - Copyright (C) The authors
3 * SPDX-License-Identifier: BSD-3-Clause
4 *****************************************************************************/
5
6#ifndef QSK_SPIN_BOX_SKINLET_H
7#define QSK_SPIN_BOX_SKINLET_H
8
9#include <QskSkinlet.h>
10
11class QSK_EXPORT QskSpinBoxSkinlet : public QskSkinlet
12{
13 Q_GADGET
14 using Inherited = QskSkinlet;
15
16 public:
17 Q_INVOKABLE QskSpinBoxSkinlet( QskSkin* = nullptr );
18
19 enum NodeRole
20 {
21 PanelRole,
22 TextPanelRole,
23 TextRole,
24
25 UpPanelRole,
26 UpIndicatorRole,
27
28 DownPanelRole,
29 DownIndicatorRole,
30
31 RoleCount
32 };
33
34 QRectF subControlRect( const QskSkinnable*,
35 const QRectF&, QskAspect::Subcontrol ) const override;
36
37 QSizeF sizeHint( const QskSkinnable* skinnable,
38 Qt::SizeHint, const QSizeF& ) const override;
39
40 protected:
41 QSGNode* updateSubNode(
42 const QskSkinnable* skinnable, quint8 role, QSGNode* node ) const override;
43
44 private:
45 QRectF textPanelRect( const QskSkinnable*, const QRectF& ) const;
46
47 QRectF buttonRect( const QskSkinnable*,
48 const QRectF&, QskAspect::Subcontrol ) const;
49};
50
51#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
This skinlet's purpose is to draw a QskSpinBox instance.