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  KIS_SAFE_ASSERT_RECOVER_RETURN(group);
31  group->setPassThroughMode(passthrough);
32 }
33 
35 {
36  const KisGroupLayer *group = qobject_cast<const KisGroupLayer*>(this->node());
37  return group->passThroughMode();
38 }
39 
41 {
42  return "grouplayer";
43 }
virtual QString type() const override
type Krita has several types of nodes, split in layers and masks.
Definition: GroupLayer.cpp:40
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:34
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Fri Sep 29 2023 04:08:11 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.