Krita Source Code Documentation
Loading...
Searching...
No Matches
kis_layer_manager.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2006 Boudewijn Rempt <boud@valdyas.org>
3 *
4 * SPDX-License-Identifier: GPL-2.0-or-later
5 */
6#ifndef KIS_LAYER_MANAGER
7#define KIS_LAYER_MANAGER
8
9#include <QObject>
10#include <QPointer>
11
13#include "kis_generator_layer.h"
14#include "kis_types.h"
15#include "KisView.h"
17
18class KisViewManager;
20class KisAction;
23
29class KisLayerManager : public QObject
30{
31
32 Q_OBJECT
33
34public:
35
37 ~KisLayerManager() override;
38 void setView(QPointer<KisView>view);
39
40Q_SIGNALS:
41
42private:
43
44 friend class KisNodeManager;
45
49 void activateLayer(KisLayerSP layer);
50
53
54
55 void setup(KisActionManager *actionManager);
56
57 void updateGUI();
58
59private Q_SLOTS:
60
61 void mergeLayer();
62
64 void trimToImage();
65
66 void layerProperties();
68
69 void flattenImage();
70
71 void flattenLayer();
72
73 void layersUpdated();
74
75 void saveGroupLayers();
77
80
82
85
87
89
91 KisAdjustmentLayerSP addAdjustmentLayer(KisNodeSP activeNode, const QString & name, KisFilterConfigurationSP filter, KisSelectionSP selection, KisProcessingApplicator *applicator);
92
94 KisGeneratorLayerSP addGeneratorLayer(KisNodeSP activeNode, const QString &name, KisFilterConfigurationSP filter, KisSelectionSP selection, KisProcessingApplicator *applicator);
95
97
98 void layerStyle();
99
100 void changeCloneSource();
101
102 void copyLayerStyle();
103
104 void pasteLayerStyle();
105
106private:
107 void adjustLayerPosition(KisNodeSP node, KisNodeSP activeNode, KisNodeSP &parent, KisNodeSP &above);
108 void addLayerCommon(KisNodeSP activeNode, KisNodeSP layer, bool updateImage = true, KisProcessingApplicator *applicator = 0);
109
110private:
111
114
123
127
129};
130
131#endif
KisMagneticGraph::vertex_descriptor source(typename KisMagneticGraph::edge_descriptor e, KisMagneticGraph g)
A KisActionManager class keeps track of KisActions. These actions are always associated with the GUI....
void addLayerCommon(KisNodeSP activeNode, KisNodeSP layer, bool updateImage=true, KisProcessingApplicator *applicator=0)
KisNodeSP addShapeLayer(KisNodeSP activeNode)
KisNodeSP addGeneratorLayer(KisNodeSP activeNode)
void setView(QPointer< KisView >view)
KisNodeSP addFileLayer(KisNodeSP activeNode)
KisAction * m_imageResizeToLayer
void activateLayer(KisLayerSP layer)
KisLayerManager(KisViewManager *view)
void adjustLayerPosition(KisNodeSP node, KisNodeSP activeNode, KisNodeSP &parent, KisNodeSP &above)
KisPaintDeviceSP activeDevice()
KisAction * m_rasterizeLayer
KisAction * m_copyLayerStyle
KisLayerSP activeLayer()
KisAction * m_layerStyle
void setup(KisActionManager *actionManager)
void convertLayerToFileLayer(KisNodeSP source)
KisLayerSP addPaintLayer(KisNodeSP activeNode)
KisAction * m_flattenLayer
KisAction * m_convertGroupAnimated
KisNodeSP addGroupLayer(KisNodeSP activeNode)
KisNodeSP addCloneLayer(KisNodeList nodes)
KisAction * m_imageFlatten
QPointer< KisView > m_imageView
void convertNodeToPaintLayer(KisNodeSP source)
KisAction * m_pasteLayerStyle
KisViewManager * m_view
KisAction * m_imageMergeLayer
KisAction * m_groupLayersSave
~KisLayerManager() override
KisNodeSP addAdjustmentLayer(KisNodeSP activeNode)
KisNodeCommandsAdapter * m_commandsAdapter