File indexing completed on 2024-05-19 04:26:58
0001 /* 0002 * SPDX-FileCopyrightText: 2017 Wolthera van Hövell tot Westerflier <griffinvalley@gmail.com> 0003 * 0004 * SPDX-License-Identifier: LGPL-2.0-or-later 0005 */ 0006 #ifndef LIBKIS_TRANSPARENCYMASK_H 0007 #define LIBKIS_TRANSPARENCYMASK_H 0008 0009 #include <QObject> 0010 #include "Node.h" 0011 0012 #include <kis_types.h> 0013 0014 #include "kritalibkis_export.h" 0015 #include "libkis.h" 0016 0017 /** 0018 * @brief The TransparencyMask class 0019 * A transparency mask is a mask type node that can be used 0020 * to show and hide parts of a layer. 0021 * 0022 */ 0023 class KRITALIBKIS_EXPORT TransparencyMask : public Node 0024 { 0025 Q_OBJECT 0026 Q_DISABLE_COPY(TransparencyMask) 0027 0028 public: 0029 explicit TransparencyMask(KisImageSP image, QString name, QObject *parent = 0); 0030 explicit TransparencyMask(KisImageSP image, KisTransparencyMaskSP mask, QObject *parent = 0); 0031 ~TransparencyMask() override; 0032 public Q_SLOTS: 0033 0034 /** 0035 * @brief type Krita has several types of nodes, split in layers and masks. Group 0036 * layers can contain other layers, any layer can contain masks. 0037 * 0038 * @return transparencymask 0039 * 0040 * If the Node object isn't wrapping a valid Krita layer or mask object, and 0041 * empty string is returned. 0042 */ 0043 virtual QString type() const override; 0044 0045 Selection *selection() const; 0046 0047 void setSelection(Selection *selection); 0048 }; 0049 0050 #endif // LIBKIS_TRANSPARENCYMASK_H 0051