qskinny/src/controls/QskPageIndicatorSkinlet.h

52 lines
1.4 KiB
C
Raw Normal View History

2017-07-21 16:21:34 +00:00
/******************************************************************************
2024-01-17 13:31:45 +00:00
* QSkinny - Copyright (C) The authors
2023-04-06 07:23:37 +00:00
* SPDX-License-Identifier: BSD-3-Clause
2017-07-21 16:21:34 +00:00
*****************************************************************************/
#ifndef QSK_PAGE_INDICATOR_SKINLET_H
#define QSK_PAGE_INDICATOR_SKINLET_H
#include "QskSkinlet.h"
class QSK_EXPORT QskPageIndicatorSkinlet : public QskSkinlet
{
Q_GADGET
using Inherited = QskSkinlet;
2018-08-03 06:15:28 +00:00
public:
2024-12-09 13:53:59 +00:00
enum NodeRole : quint8
2017-07-21 16:21:34 +00:00
{
PanelRole,
BulletsRole,
RoleCount
2017-07-21 16:21:34 +00:00
};
Q_INVOKABLE QskPageIndicatorSkinlet( QskSkin* = nullptr );
2018-07-31 15:32:25 +00:00
~QskPageIndicatorSkinlet() override;
2017-07-21 16:21:34 +00:00
2018-08-03 06:15:28 +00:00
QRectF subControlRect( const QskSkinnable*,
const QRectF&, QskAspect::Subcontrol ) const override;
2017-07-21 16:21:34 +00:00
QSizeF sizeHint( const QskSkinnable*,
Qt::SizeHint, const QSizeF& ) const override;
2022-01-04 12:58:34 +00:00
int sampleCount( const QskSkinnable*, QskAspect::Subcontrol ) const override;
QRectF sampleRect( const QskSkinnable*,
const QRectF&, QskAspect::Subcontrol, int index ) const override;
int sampleIndexAt( const QskSkinnable*,
const QRectF&, QskAspect::Subcontrol, const QPointF& ) const override;
2018-08-03 06:15:28 +00:00
protected:
2018-07-31 15:32:25 +00:00
QSGNode* updateSubNode( const QskSkinnable*,
2017-07-21 16:21:34 +00:00
quint8 nodeRole, QSGNode* ) const override;
2022-01-04 12:58:34 +00:00
QSGNode* updateSampleNode( const QskSkinnable*,
QskAspect::Subcontrol, int index, QSGNode* ) const override;
2017-07-21 16:21:34 +00:00
};
#endif