19#ifndef KIS_POPULATE_VISITOR_H
20#define KIS_POPULATE_VISITOR_H
22#include <kiconloader.h>
25#include "kis_group_layer.h"
26#include "kis_paint_layer.h"
27#include "kis_part_layer.h"
28#include "kis_adjustment_layer.h"
29#include "kis_layerlist.h"
45 : m_widget(parent->listView())
51 if (!layer->temporary())
58 add(layer)->setPixmap(0, SmallIcon( "gear", 16));
64 add(layer)->setPixmap(0, SmallIcon( "tool_filter", 16));
70 KisLayerItem* item = add(layer);
73 for (KisLayerSP l = layer-> firstChild(); l; l = l->nextSibling())
76 vKisLayerSP childLayersAdded = visitor.layersAdded();
78 for (vKisLayerSP::iterator it = childLayersAdded.begin(); it != childLayersAdded.end(); ++it) {
79 m_layersAdded.append(*it);
92 KisLayerItem* m_parent;
99 KisImageSP img = layer->image();
104 item = new KisLayerItem(m_parent, layer);
107 item = new KisLayerItem(m_widget, layer);
109 if (layer == img->activeLayer()) {
112 m_layersAdded.append(layer);
Class that contains a KisFilter and optionally a KisSelection.
A KisLayer that bundles child layers into a single layer.
virtual KisLayerSP firstChild() const Returns the first child layer of this layer (if it supports that).
Abstract class that represents the concept of a Layer in Chalk.
This layer is of a type that can be painted on.
An interface for the Part Layer so that we can use it in core/, but can implement it in ui/.
This visitor walks over the layer tree to fill the layer box.
|