Krita

SelectionMask.h
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 #ifndef LIBKIS_SELECTIONMASK_H
7 #define LIBKIS_SELECTIONMASK_H
8 
9 #include <QObject>
10 #include "Node.h"
11 
12 #include <kis_types.h>
13 
14 #include "kritalibkis_export.h"
15 #include "libkis.h"
16 
17 /**
18  * @brief The SelectionMask class
19  * A selection mask is a mask type node that can be used
20  * to store selections. In the gui, these are referred to
21  * as local selections.
22  *
23  * A selection mask can hold both raster and vector selections, though
24  * the API only supports raster selections.
25  */
26 class KRITALIBKIS_EXPORT SelectionMask : public Node
27 {
28  Q_OBJECT
30 
31 public:
32  explicit SelectionMask(KisImageSP image, QString name, QObject *parent = 0);
33  explicit SelectionMask(KisImageSP image, KisSelectionMaskSP mask, QObject *parent = 0);
34  ~SelectionMask() override;
35 public Q_SLOTS:
36 
37  /**
38  * @brief type Krita has several types of nodes, split in layers and masks. Group
39  * layers can contain other layers, any layer can contain masks.
40  *
41  * @return selectionmask
42  *
43  * If the Node object isn't wrapping a valid Krita layer or mask object, and
44  * empty string is returned.
45  */
46  virtual QString type() const override;
47 
48  Selection *selection() const;
49 
50  void setSelection(Selection *selection);
51 };
52 
53 #endif // LIBKIS_SELECTIONMASK_H
54 
virtual QString type() const
type Krita has several types of nodes, split in layers and masks.
Definition: Node.cpp:456
Q_SLOTSQ_SLOTS
Selection represents a selection on Krita.
Definition: Selection.h:30
The SelectionMask class A selection mask is a mask type node that can be used to store selections.
Definition: SelectionMask.h:26
Node represents a layer or mask in a Krita image's Node hierarchy.
Definition: Node.h:21
Q_DISABLE_COPY(Class)
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Thu Oct 6 2022 04:17:36 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.