Changeset View
Changeset View
Standalone View
Standalone View
libs/libkis/CloneLayer.h
- This file was added.
1 | /* | ||||
---|---|---|---|---|---|
2 | * Copyright (c) 2017 Wolthera van Hövell tot Westerflier <griffinvalley@gmail.com> | ||||
3 | * | ||||
4 | * This program is free software; you can redistribute it and/or modify | ||||
5 | * it under the terms of the GNU Lesser General Public License as published by | ||||
6 | * the Free Software Foundation; either version 2 of the License, or | ||||
7 | * (at your option) any later version. | ||||
8 | * | ||||
9 | * This program is distributed in the hope that it will be useful, | ||||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||||
12 | * GNU General Public License for more details. | ||||
13 | * | ||||
14 | * You should have received a copy of the GNU Lesser General Public License | ||||
15 | * along with this program; if not, write to the Free Software | ||||
16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||||
17 | */ | ||||
18 | #ifndef LIBKIS_CLONELAYER_H | ||||
19 | #define LIBKIS_CLONELAYER_H | ||||
20 | | ||||
21 | #include <QObject> | ||||
22 | #include "Node.h" | ||||
23 | | ||||
24 | #include <kis_types.h> | ||||
25 | | ||||
26 | #include "kritalibkis_export.h" | ||||
27 | #include "libkis.h" | ||||
28 | | ||||
29 | /** | ||||
30 | * @brief The CloneLayer class | ||||
31 | * A clone layer is a layer that takes a reference inside the image | ||||
32 | * and shows the exact same pixeldata. | ||||
33 | * | ||||
34 | * If the original is updated, the clone layer will update too. | ||||
35 | */ | ||||
36 | | ||||
37 | class KRITALIBKIS_EXPORT CloneLayer : public Node | ||||
38 | { | ||||
39 | Q_OBJECT | ||||
40 | Q_DISABLE_COPY(CloneLayer) | ||||
41 | | ||||
42 | public: | ||||
43 | explicit CloneLayer(KisImageSP image, QString name, KisLayerSP source, QObject *parent = 0); | ||||
44 | | ||||
45 | /** | ||||
46 | * @brief CloneLayer | ||||
47 | * function for wrapping a preexisting node into a clonelayer object. | ||||
48 | * @param clone | ||||
49 | * @param parent | ||||
50 | */ | ||||
51 | explicit CloneLayer(KisCloneLayerSP layer, QObject *parent = 0); | ||||
52 | ~CloneLayer() override; | ||||
53 | public Q_SLOTS: | ||||
54 | | ||||
55 | /** | ||||
56 | * @brief type Krita has several types of nodes, split in layers and masks. Group | ||||
57 | * layers can contain other layers, any layer can contain masks. | ||||
58 | * | ||||
59 | * @return clonelayer | ||||
60 | */ | ||||
61 | virtual QString type() const override; | ||||
62 | }; | ||||
63 | | ||||
64 | #endif // LIBKIS_PAINTLAYER_H | ||||
65 | |