Changeset View
Changeset View
Standalone View
Standalone View
libs/libkis/FillLayer.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_FILLLAYER_H | ||||
19 | #define LIBKIS_FILLLAYER_H | ||||
20 | | ||||
21 | #include <QObject> | ||||
22 | #include "Node.h" | ||||
23 | #include <InfoObject.h> | ||||
24 | #include <Selection.h> | ||||
25 | | ||||
26 | #include <kis_types.h> | ||||
27 | | ||||
28 | #include "kritalibkis_export.h" | ||||
29 | #include "libkis.h" | ||||
30 | /** | ||||
31 | * @brief The FillLayer class | ||||
32 | * A fill layer is much like a filter layer in that it takes a name | ||||
33 | * and filter. It however specialises in filters that fill the whole canvas, | ||||
34 | * such as a pattern or full color fill. | ||||
35 | */ | ||||
36 | class KRITALIBKIS_EXPORT FillLayer : public Node | ||||
37 | { | ||||
38 | Q_OBJECT | ||||
39 | Q_DISABLE_COPY(FillLayer) | ||||
40 | | ||||
41 | public: | ||||
42 | explicit FillLayer(KisImageSP image, QString name,KisFilterConfigurationSP filter, Selection &selection, QObject *parent = 0); | ||||
43 | explicit FillLayer(KisGeneratorLayerSP layer, QObject *parent = 0); | ||||
44 | ~FillLayer() override; | ||||
45 | public Q_SLOTS: | ||||
46 | | ||||
47 | /** | ||||
48 | * @brief type Krita has several types of nodes, split in layers and masks. Group | ||||
49 | * layers can contain other layers, any layer can contain masks. | ||||
50 | * | ||||
51 | * @return The type of the node. Valid types are: | ||||
52 | * <ul> | ||||
53 | * <li>paintlayer | ||||
54 | * <li>grouplayer | ||||
55 | * <li>filelayer | ||||
56 | * <li>filterlayer | ||||
57 | * <li>filllayer | ||||
58 | * <li>clonelayer | ||||
59 | * <li>vectorlayer | ||||
60 | * <li>transparencymask | ||||
61 | * <li>filtermask | ||||
62 | * <li>transformmask | ||||
63 | * <li>selectionmask | ||||
64 | * <li>colorizemask | ||||
65 | * </ul> | ||||
66 | * | ||||
67 | * If the Node object isn't wrapping a valid Krita layer or mask object, and | ||||
68 | * empty string is returned. | ||||
69 | */ | ||||
70 | virtual QString type() const override; | ||||
71 | | ||||
72 | void setFilter(QString &filterName, InfoObject *filterConfig); | ||||
73 | | ||||
74 | QString filterName(); | ||||
75 | InfoObject * filterConfig(); | ||||
76 | }; | ||||
77 | | ||||
78 | #endif // LIBKIS_FILLLAYER_H |