30#include "kis_colorspace.h"
44class KisLayerBox :
public TQFrame {
45 typedef TQFrame super;
50 KisLayerBox(KisCanvasSubject *subject, TQWidget *parent = 0,
const char *name = 0);
51 virtual ~KisLayerBox();
54 void setUpdatesAndSignalsEnabled(
bool enable);
55 void setImage(KisImageSP image);
59 void slotLayerActivated(KisLayerSP layer);
60 void slotLayerAdded(KisLayerSP layer);
61 void slotLayerRemoved(KisLayerSP layer, KisGroupLayerSP wasParent, KisLayerSP wasAboveThis);
62 void slotLayerMoved(KisLayerSP layer, KisGroupLayerSP wasParent, KisLayerSP wasAboveThis);
63 void slotLayerPropertiesChanged(KisLayerSP layer);
64 void slotLayersChanged(KisGroupLayerSP rootLayer);
65 void slotLayerUpdated(KisLayerSP layer, TQRect rc);
67 void slotSetCompositeOp(
const KisCompositeOp& compositeOp);
68 void slotSetOpacity(
int opacity);
69 void slotSetColorSpace(
const KisColorSpace * colorSpace);
72 void sigRequestLayer(KisGroupLayerSP parent, KisLayerSP above);
73 void sigRequestGroupLayer(KisGroupLayerSP parent, KisLayerSP above);
74 void sigRequestAdjustmentLayer(KisGroupLayerSP parent, KisLayerSP above);
75 void sigRequestPartLayer(KisGroupLayerSP parent, KisLayerSP above,
const KoDocumentEntry& entry);
76 void sigRequestLayerProperties(KisLayerSP layer);
78 void sigOpacityChanged(
int opacity,
bool withSlider);
79 void sigOpacityFinishedChanging(
int previous,
int opacity);
80 void sigItemComposite(
const KisCompositeOp&);
83 enum LayerTypes { PAINT_LAYER, GROUP_LAYER, ADJUSTMENT_LAYER, OBJECT_LAYER };
87 void slotLayerActivated(LayerItem* layer);
88 void slotLayerDisplayNameChanged(LayerItem* layer,
const TQString& displayName);
89 void slotLayerPropertyChanged(LayerItem* layer,
const TQString& name,
bool on);
90 void slotLayerMoved(LayerItem* layer, LayerItem* parent, LayerItem* after);
91 void slotRequestNewLayer(LayerItem* parent, LayerItem* after);
92 void slotRequestNewFolder(LayerItem* parent, LayerItem* after);
93 void slotRequestNewAdjustmentLayer(LayerItem* parent, LayerItem* after);
94 void slotRequestNewObjectLayer(LayerItem* parent, LayerItem* item,
const KoDocumentEntry& entry);
95 void slotRequestRemoveLayer(LayerItem* layer);
96 void slotRequestLayerProperties(LayerItem* layer);
98 void slotAboutToShow();
99 void slotAddMenuActivated(
int type = OBJECT_LAYER);
100 void slotRmClicked();
101 void slotRaiseClicked();
102 void slotLowerClicked();
103 void slotPropertiesClicked();
105 void updateThumbnails();
109 TQPixmap loadPixmap(
const TQString& filename,
const TDEIconLoader& il,
int size);
110 KisLayerList* list()
const;
111 void markModified(KisLayer *layer);
113 TDEPopupMenu *m_newLayerMenu;
114 KoPartSelectAction *m_partLayerAction;
116 TQValueList<int> m_modified;
119 void printChalkLayers()
const;
120 void printLayerboxLayers()
const;
KisCanvasSubject is part of the Observer pattern.