File indexing completed on 2024-12-22 04:12:31
0001 /* 0002 * SPDX-FileCopyrightText: 2011 Dmitry Kazakov <dimula73@gmail.com> 0003 * 0004 * SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 #ifndef __KIS_DUMMIES_FACADE_H 0008 #define __KIS_DUMMIES_FACADE_H 0009 0010 0011 #include "kis_dummies_facade_base.h" 0012 0013 /** 0014 * The simple implementation of KisDummiesFacadeBase. It can be used 0015 * in cases when KisShapeController is not accessible, e.g. when you 0016 * need to show layers in a filter and you need to create KisNodeModel 0017 */ 0018 0019 class KRITAUI_EXPORT KisDummiesFacade : public KisDummiesFacadeBase 0020 { 0021 Q_OBJECT 0022 0023 public: 0024 KisDummiesFacade(QObject *parent = 0); 0025 ~KisDummiesFacade() override; 0026 0027 bool hasDummyForNode(KisNodeSP node) const override; 0028 KisNodeDummy* dummyForNode(KisNodeSP node) const override; 0029 KisNodeDummy* rootDummy() const override; 0030 int dummiesCount() const override; 0031 0032 private: 0033 void addNodeImpl(KisNodeSP node, KisNodeSP parent, KisNodeSP aboveThis) override; 0034 void removeNodeImpl(KisNodeSP node) override; 0035 0036 private: 0037 struct Private; 0038 Private * const m_d; 0039 }; 0040 0041 #endif /* __KIS_DUMMIES_FACADE_H */