krita
kis_layerlist.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef KIS_LAYERLIST_H
00021 #define KIS_LAYERLIST_H
00022
00023 #include <qimage.h>
00024 #include "layerlist.h"
00025
00026 class KoPartSelectAction;
00027 class KoDocumentEntry;
00028 class KisLayer;
00029
00030 class KisLayerList: public LayerList
00031 {
00032 Q_OBJECT
00033 typedef LayerList super;
00034
00035 signals:
00036 void requestNewObjectLayer( LayerItem *parent, LayerItem *after, const KoDocumentEntry &entry );
00037 void requestNewObjectLayer( int parentID, int afterID, const KoDocumentEntry &entry );
00038 void requestNewAdjustmentLayer( LayerItem *parent, LayerItem *after );
00039 void requestNewAdjustmentLayer( int parentID, int afterID );
00040
00041 public:
00042 KisLayerList( QWidget *parent = 0, const char *name = 0 );
00043
00044 virtual void constructMenu( LayerItem *layer );
00045 virtual void menuActivated( int id, LayerItem *layer );
00046
00047 KoPartSelectAction *partLayerAction() const { return m_partLayerAction; }
00048
00049 private:
00050 KoPartSelectAction *m_partLayerAction;
00051 };
00052
00053 class KisLayerItem: public LayerItem
00054 {
00055 typedef LayerItem super;
00056
00057 public:
00058 KisLayerItem( LayerList* parent, KisLayer* layer );
00059 KisLayerItem( LayerItem* parent, KisLayer* layer );
00060
00061 KisLayer* layer() const;
00062
00063 void sync();
00064
00066 bool updatePreview();
00067
00068 virtual QString tooltip() const;
00069 virtual QImage tooltipPreview() const;
00070
00071
00072
00073 private:
00074 void init();
00075 QImage m_preview;
00076 KisLayer *m_layer;
00077 };
00078
00079 #endif
|