Krita

CloneLayer.h
1/*
2 * SPDX-FileCopyrightText: 2017 Wolthera van Hövell tot Westerflier <griffinvalley@gmail.com>
3 *
4 * SPDX-License-Identifier: LGPL-2.0-or-later
5 */
6#ifndef LIBKIS_CLONELAYER_H
7#define LIBKIS_CLONELAYER_H
8
9#include <QObject>
10#include "Node.h"
11
12#include <kis_types.h>
13
14#include "kritalibkis_export.h"
15#include "libkis.h"
16
17/**
18 * @brief The CloneLayer class
19 * A clone layer is a layer that takes a reference inside the image
20 * and shows the exact same pixeldata.
21 *
22 * If the original is updated, the clone layer will update too.
23 */
24
25class KRITALIBKIS_EXPORT CloneLayer : public Node
26{
27 Q_OBJECT
29
30public:
31 explicit CloneLayer(KisImageSP image, QString name, KisLayerSP source, QObject *parent = 0);
32
33 /**
34 * @brief CloneLayer
35 * function for wrapping a preexisting node into a clonelayer object.
36 * @param layer the clone layer
37 * @param parent the parent QObject
38 */
39 explicit CloneLayer(KisCloneLayerSP layer, QObject *parent = 0);
40 ~CloneLayer() override;
41public Q_SLOTS:
42
43 /**
44 * @brief type Krita has several types of nodes, split in layers and masks. Group
45 * layers can contain other layers, any layer can contain masks.
46 *
47 * @return clonelayer
48 */
49 virtual QString type() const override;
50
51 /**
52 * @brief sourceNode
53 * @return the node the clone layer is based on.
54 */
55 Node* sourceNode() const;
56
57 /**
58 * @brief setSourceNode
59 * @param node the node to use as the source of the clone layer.
60 */
61 void setSourceNode(Node* node);
62};
63
64#endif // LIBKIS_PAINTLAYER_H
65
The CloneLayer class A clone layer is a layer that takes a reference inside the image and shows the e...
Definition CloneLayer.h:26
Node represents a layer or mask in a Krita image's Node hierarchy.
Definition Node.h:22
virtual QString type() const
type Krita has several types of nodes, split in layers and masks.
Definition Node.cpp:456
Q_SLOTSQ_SLOTS
T qobject_cast(QObject *object)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:20:53 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.