Krita

GroupLayer.cpp
1/*
2 * SPDX-FileCopyrightText: 2017 Wolthera van Hövell tot Westerflier <griffinvalley@gmail.com>
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
10GroupLayer::GroupLayer(KisImageSP image, QString name, QObject *parent) :
11 Node(image, new KisGroupLayer(image, name, OPACITY_OPAQUE_U8), parent)
12{
13
14}
15
16GroupLayer::GroupLayer(KisGroupLayerSP layer, QObject *parent):
17 Node(layer->image(), layer, parent)
18{
19
20}
21
22GroupLayer::~GroupLayer()
23{
24
25}
26
27void GroupLayer::setPassThroughMode(bool passthrough)
28{
29 KisGroupLayer *group = dynamic_cast<KisGroupLayer*>(this->node().data());
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}
bool passThroughMode() const
passThroughMode
void setPassThroughMode(bool passthrough)
setPassThroughMode This changes the way how compositing works.
virtual QString type() const override
type Krita has several types of nodes, split in layers and masks.
Node represents a layer or mask in a Krita image's Node hierarchy.
Definition Node.h:22
QString name(StandardShortcut id)
T qobject_cast(QObject *object)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sun Feb 25 2024 18:47:29 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.