Changeset View
Changeset View
Standalone View
Standalone View
libs/libkis/VectorLayer.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_VECTORLAYER_H | ||||
19 | #define LIBKIS_VECTORLAYER_H | ||||
20 | | ||||
21 | #include <QObject> | ||||
22 | | ||||
23 | #include <kis_types.h> | ||||
24 | | ||||
25 | #include "kritalibkis_export.h" | ||||
26 | #include "libkis.h" | ||||
27 | | ||||
28 | #include <KoShapeBasedDocumentBase.h> | ||||
29 | | ||||
30 | #include "Node.h" | ||||
31 | #include "Shape.h" | ||||
32 | | ||||
33 | /** | ||||
34 | * @brief The VectorLayer class | ||||
35 | * A vector layer is a special layer that stores | ||||
36 | * and shows vector shapes. | ||||
37 | */ | ||||
38 | | ||||
39 | class KRITALIBKIS_EXPORT VectorLayer : public Node | ||||
40 | { | ||||
41 | Q_OBJECT | ||||
42 | Q_DISABLE_COPY(VectorLayer) | ||||
43 | | ||||
44 | public: | ||||
45 | explicit VectorLayer(KoShapeBasedDocumentBase* shapeController, KisImageSP image, QString name, QObject *parent = 0); | ||||
46 | explicit VectorLayer(KisShapeLayerSP layer, QObject *parent = 0); | ||||
47 | ~VectorLayer() override; | ||||
48 | public Q_SLOTS: | ||||
49 | | ||||
50 | /** | ||||
51 | * @brief type Krita has several types of nodes, split in layers and masks. Group | ||||
52 | * layers can contain other layers, any layer can contain masks. | ||||
53 | * | ||||
54 | * @return vectorlayer | ||||
55 | */ | ||||
56 | virtual QString type() const override; | ||||
57 | | ||||
58 | /** | ||||
59 | * @brief shapes | ||||
60 | * @return the list of top-level shapes in this vector layer. | ||||
61 | */ | ||||
62 | QList<Shape *> shapes() const; | ||||
63 | | ||||
64 | }; | ||||
65 | | ||||
66 | #endif // LIBKIS_VECTORLAYER_H | ||||
67 | |