chalk

kis_custom_pattern.h
1/*
2 * Copyright (c) 2006 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_PATTERN_H_
20#define KIS_CUSTOM_PATTERN_H_
21
22#include <tqobject.h>
23
24#include "wdgcustompattern.h"
25
26
27class KisResource;
28class KisView;
29class KisResourceServerBase;
30
31class KisCustomPattern : public KisWdgCustomPattern
32{
33 TQ_OBJECT
34
35public:
36 KisCustomPattern(TQWidget *parent, const char* name, const TQString& caption, KisView* view);
37 virtual ~KisCustomPattern();
38 void setResourceServer(KisResourceServerBase* server) { m_server = server; }
39
40signals:
41 void activatedResource(KisResource *);
42
43protected:
44 virtual void showEvent(TQShowEvent *);
45
46private slots:
47 void slotExport();
48 void slotAddPredefined();
49 void slotUsePattern();
50 void slotUpdateCurrentPattern(int);
51
52private:
53 void createPattern();
54 KisView* m_view;
55 KisPattern* m_pattern;
56 KisResourceMediator* m_mediator;
57 KisResourceServerBase* m_server;
58};
59
60
61#endif // KIS_CUSTOM_PATTERN_H_
The KisResource class provides a representation of Chalk image resources.