chalk

kis_custom_brush.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_BRUSH_H_
20#define KIS_CUSTOM_BRUSH_H_
21
22#include <tqobject.h>
23
24#include "wdgcustombrush.h"
25
26
27class KisResource;
28class KisView;
29class KisResourceServerBase;
30
31class KisCustomBrush : public KisWdgCustomBrush
32{
33 TQ_OBJECT
34
35public:
36 KisCustomBrush(TQWidget *parent, const char* name, const TQString& caption, KisView* view);
37 virtual ~KisCustomBrush();
38 void setResourceServer(KisResourceServerBase* server) { m_server = server; }
39
40public slots:
41 void slotUseBrush();
42
43signals:
44 void activatedResource(KisResource *);
45
46protected:
47 virtual void showEvent(TQShowEvent *);
48
49private slots:
50 void slotExport();
51 void slotAddPredefined();
52 void slotUpdateCurrentBrush(int); // To connect with activated(int)
53
54private:
55 void createBrush();
56 KisView* m_view;
57 KisBrush* m_brush;
58 KisResourceMediator* m_mediator;
59 KisResourceServerBase* m_server;
60};
61
62
63#endif // KIS_CUSTOM_BRUSH_H_
The KisResource class provides a representation of Chalk image resources.