QSkinny 0.8.0
C++/Qt UI toolkit
Loading...
Searching...
No Matches
QskListViewSkinlet.h
1/******************************************************************************
2 * QSkinny - Copyright (C) The authors
3 * SPDX-License-Identifier: BSD-3-Clause
4 *****************************************************************************/
5
6#ifndef QSK_LIST_VIEW_SKINLET_H
7#define QSK_LIST_VIEW_SKINLET_H
8
9#include "QskScrollViewSkinlet.h"
10
11class QskListView;
12
13class QMarginsF;
14class QSizeF;
15class QRectF;
16class QSGTransformNode;
17
19{
20 Q_GADGET
21
23
24 public:
25 enum NodeRole
26 {
27 TextRole = Inherited::RoleCount,
28 GraphicRole,
29
30 RoleCount
31 };
32
33 Q_INVOKABLE QskListViewSkinlet( QskSkin* = nullptr );
34 ~QskListViewSkinlet() override;
35
36 QSizeF sizeHint( const QskSkinnable*,
37 Qt::SizeHint, const QSizeF& ) const override;
38
39 QRectF sampleRect( const QskSkinnable*,
40 const QRectF&, QskAspect::Subcontrol, int index ) const override;
41
42 QskAspect::States sampleStates( const QskSkinnable*,
43 QskAspect::Subcontrol, int index ) const override;
44
45 protected:
46 QSGNode* updateContentsNode(
47 const QskScrollView*, QSGNode* ) const override;
48
49 private:
50 void updateForegroundNodes( const QskListView*, QSGNode* ) const;
51 void updateBackgroundNodes( const QskListView*, QSGNode* ) const;
52
53 void updateVisibleForegroundNodes(
54 const QskListView*, QSGNode*,
55 int rowMin, int rowMax, const QMarginsF& margin ) const;
56
57 QSGTransformNode* updateForegroundNode( const QskListView*,
58 QSGNode* parentNode, QSGTransformNode* cellNode,
59 int row, int col, const QSizeF& ) const;
60
61 QSGNode* updateCellNode( const QskListView*,
62 QSGNode*, const QRectF&, int row, int col ) const;
63};
64
65#endif
Subcontrol
For use within the rendering or lay-outing of a specific QskSkinnable.
Definition QskAspect.h:104