Krita

LibKisUtils.cpp
1/*
2 * SPDX-FileCopyrightText: 2018 Boudewijn Rempt <boud@valdyas.org>
3 *
4 * SPDX-License-Identifier: LGPL-2.0-or-later
5 */
6
7#include "LibKisUtils.h"
8
9#include <kis_node.h>
10#include <kis_paint_layer.h>
11#include <kis_group_layer.h>
12#include <kis_file_layer.h>
13#include <kis_adjustment_layer.h>
14#include <kis_generator_layer.h>
15#include <kis_clone_layer.h>
16#include <kis_shape_layer.h>
17#include <kis_transparency_mask.h>
18#include <kis_filter_mask.h>
19#include <kis_transform_mask.h>
20#include <kis_selection_mask.h>
21#include <lazybrush/kis_colorize_mask.h>
22#include <kis_layer.h>
23#include <KisPart.h>
24#include <KisDocument.h>
25
26#include "Document.h"
27#include "Node.h"
28#include "GroupLayer.h"
29#include "CloneLayer.h"
30#include "FilterLayer.h"
31#include "FillLayer.h"
32#include "FileLayer.h"
33#include "VectorLayer.h"
34#include "FilterMask.h"
35#include "SelectionMask.h"
36#include "TransparencyMask.h"
37#include "TransformMask.h"
38
39
40
41QList<Node *> LibKisUtils::createNodeList(KisNodeList kisnodes, KisImageWSP image)
42{
43 QList <Node*> nodes;
44 Q_FOREACH(KisNodeSP node, kisnodes) {
45 nodes << Node::createNode(image, node);
46 }
47 return nodes;
48}
49
50Document* LibKisUtils::findNodeInDocuments(KisNodeSP kisnode) {
51 foreach(QPointer<KisDocument> doc, KisPart::instance()->documents()) {
52 if (kisnode->image()->rootLayer()->uuid() == doc->image()->rootLayer()->uuid()) return new Document(doc, false);
53 }
54
55 return 0;
56}
The Document class encapsulates a Krita Document/Image.
Definition Document.h:37
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 22 2024 12:06:52 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.