chalk

kis_layerlist.h
1/*
2 Copyright (c) 2005 Gábor Lehel <illissius@gmail.com>
3
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public
6 License as published by the Free Software Foundation; either
7 version 2 of the License, or (at your option) any later version.
8
9 This library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Library General Public License for more details.
13
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to
16 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 Boston, MA 02110-1301, USA.
18*/
19
20#ifndef KIS_LAYERLIST_H
21#define KIS_LAYERLIST_H
22
23#include <tqimage.h>
24#include "layerlist.h"
25
26class KoPartSelectAction;
27class KoDocumentEntry;
28class KisLayer;
29
30class KisLayerList: public LayerList
31{
32 TQ_OBJECT
33
34 typedef LayerList super;
35
36signals:
37 void requestNewObjectLayer( LayerItem *parent, LayerItem *after, const KoDocumentEntry &entry );
38 void requestNewObjectLayer( int parentID, int afterID, const KoDocumentEntry &entry );
39 void requestNewAdjustmentLayer( LayerItem *parent, LayerItem *after );
40 void requestNewAdjustmentLayer( int parentID, int afterID );
41
42public:
43 KisLayerList( TQWidget *parent = 0, const char *name = 0 );
44
45 virtual void constructMenu( LayerItem *layer );
46 virtual void menuActivated( int id, LayerItem *layer );
47
48 KoPartSelectAction *partLayerAction() const { return m_partLayerAction; }
49
50private:
51 KoPartSelectAction *m_partLayerAction;
52};
53
54class KisLayerItem: public LayerItem
55{
56 typedef LayerItem super;
57
58public:
59 KisLayerItem( LayerList* parent, KisLayer* layer );
60 KisLayerItem( LayerItem* parent, KisLayer* layer );
61
62 KisLayer* layer() const;
63
64 void sync();
65
67 bool updatePreview();
68
69 virtual TQString tooltip() const;
70 virtual TQImage tooltipPreview() const;
71
72 //virtual void paintCell( TQPainter *p, const TQColorGroup &cg, int column, int width, int align );
73
74private:
75 void init();
76 TQImage m_preview;
77 KisLayer *m_layer;
78};
79
80#endif
Abstract class that represents the concept of a Layer in Chalk.
Definition kis_layer.h:42