chalk

kis_custom_palette.h
1/*
2 * Copyright (c) 2005 Bart Coppens <kde@bartcoppens.be>
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program 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
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17 */
18
19#ifndef KIS_CUSTOM_PALETTE_H_
20#define KIS_CUSTOM_PALETTE_H_
21
22#include <tqobject.h>
23
24#include "wdgcustompalette.h"
25
26
27class KisResource;
28class KisView;
29class KisPalette;
30class KisResourceServerBase;
31
32class KisCustomPalette : public KisWdgCustomPalette
33{
34 TQ_OBJECT
35
36public:
37 KisCustomPalette(TQWidget *parent, const char* name, const TQString& caption, KisView* view);
38 virtual ~KisCustomPalette();
39 void setResourceServer(KisResourceServerBase* server) { m_server = server; }
40 void setEditMode(bool b);
41 bool editMode() const { return m_editMode; }
42 void setPalette(KisPalette* p);
43
44signals:
45 void activatedResource(KisResource *);
46
47private slots:
48 void slotAddPredefined();
49 void slotAddNew();
50 void slotRemoveCurrent();
51
52private:
53 bool m_ownPalette;
54 bool m_editMode;
55 KisView* m_view;
56 KisPalette* m_palette;
57 KisResourceMediator* m_mediator;
58 KisResourceServerBase* m_server;
59};
60
61
62#endif // KIS_CUSTOM_PALETTE_H_
Open Gimp, Photoshop or RIFF palette files.
Definition kis_palette.h:50
The KisResource class provides a representation of Chalk image resources.