QSkinny 0.8.0
C++/Qt UI toolkit
Loading...
Searching...
No Matches
QskTreeNode.h
1/******************************************************************************
2 * QSkinny - Copyright (C) The authors
3 * SPDX-License-Identifier: BSD-3-Clause
4 *****************************************************************************/
5
6#ifndef QSK_TREE_NODE_H
7#define QSK_TREE_NODE_H
8
9#include "QskGlobal.h"
10#include <qsgnode.h>
11
12/*
13 Used as paintNode in all QskControls ( see QskControl::updateItemPaintNode )
14 */
15class QSK_EXPORT QskTreeNode final : public QSGNode
16{
17 public:
19 virtual ~QskTreeNode();
20
21 void setSubtreeBlocked( bool on, bool notify = true );
22 bool isSubtreeBlocked() const override;
23
24 protected:
25 QskTreeNode( QSGNodePrivate& );
26
27 private:
28 bool m_isBlocked = false;;
29};
30
31QSK_EXPORT QskTreeNode* qskTreeNodeCast( QSGNode* );
32QSK_EXPORT const QskTreeNode* qskTreeNodeCast( const QSGNode* );
33
34/*
35 Used by QskItem as root node ( = itemNode ) of its subtree
36 ( see qskItemNode in QskQuick.h )
37 */
38class QSK_EXPORT QskItemNode final : public QSGTransformNode
39{
40 public:
42 virtual ~QskItemNode();
43
44 void setSubtreeBlocked( bool on, bool notify = true );
45 bool isSubtreeBlocked() const override;
46
47 private:
48 bool m_isBlocked = false;;
49};
50
51QSK_EXPORT QskItemNode* qskItemNodeCast( QSGNode* );
52QSK_EXPORT const QskItemNode* qskItemNodeCast( const QSGNode* );
53
54QSK_EXPORT bool qskIsBlockableNode( const QSGNode* );
55QSK_EXPORT bool qskTryBlockNode( QSGNode*, bool on, bool notify = true );
56
57QSK_EXPORT void qskTryBlockTree( QSGNode*, bool on, bool notify = true );
58
59// un/block a node and all its successors in the rendering pipeline
60QSK_EXPORT void qskTryBlockTrailingNodes(
61 QSGNode*, const QSGNode* ancestorNode, bool on, bool notify = true );
62
63#endif