Krita

GroupLayer.cpp
1 /*
2  * SPDX-FileCopyrightText: 2017 Wolthera van Hövell tot Westerflier <[email protected]>
3  *
4  * SPDX-License-Identifier: LGPL-2.0-or-later
5  */
6 #include "GroupLayer.h"
7 #include <kis_group_layer.h>
8 #include <kis_image.h>
9 
10 GroupLayer::GroupLayer(KisImageSP image, QString name, QObject *parent) :
11  Node(image, new KisGroupLayer(image, name, OPACITY_OPAQUE_U8), parent)
12 {
13 
14 }
15 
16 GroupLayer::GroupLayer(KisGroupLayerSP layer, QObject *parent):
17  Node(layer->image(), layer, parent)
18 {
19 
20 }
21 
22 GroupLayer::~GroupLayer()
23 {
24 
25 }
26 
27 void GroupLayer::setPassThroughMode(bool passthrough)
28 {
29  KisGroupLayer *group = dynamic_cast<KisGroupLayer*>(this->node().data());
30  group->setPassThroughMode(passthrough);
31 }
32 
34 {
35  const KisGroupLayer *group = qobject_cast<const KisGroupLayer*>(this->node());
36  return group->passThroughMode();
37 }
38 
40 {
41  return "grouplayer";
42 }
virtual QString type() const override
type Krita has several types of nodes, split in layers and masks.
Definition: GroupLayer.cpp:39
void setPassThroughMode(bool passthrough)
setPassThroughMode This changes the way how compositing works.
Definition: GroupLayer.cpp:27
Node represents a layer or mask in a Krita image's Node hierarchy.
Definition: Node.h:21
QString name(StandardShortcut id)
bool passThroughMode() const
passThroughMode
Definition: GroupLayer.cpp:33
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Wed Sep 28 2022 04:09:30 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.