chalk

kis_paintop_registry.h
1/*
2 * Copyright (c) 2004 Boudewijn Rempt <boud@valdyas.org>
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_PAINTOP_REGISTRY_H_
20#define KIS_PAINTOP_REGISTRY_H_
21
22#include <tqobject.h>
23
24#include "kis_types.h"
25#include "kis_generic_registry.h"
26#include <koffice_export.h>
27
28class TQWidget;
29class TQStringList;
30
31class KisPaintOp;
32class KisPaintOpSettings;
33class KisPainter;
34class KisColorSpace;
35class KisInputDevice;
36
37class KRITACORE_EXPORT KisPaintOpRegistry : public TQObject, public KisGenericRegistry<KisPaintOpFactorySP>
38{
39
40 TQ_OBJECT
41
42
43public:
44 virtual ~KisPaintOpRegistry();
45
49 KisPaintOp * paintOp(const KisID& id, const KisPaintOpSettings * settings, KisPainter * painter) const;
50
54 KisPaintOp * paintOp(const TQString& id, const KisPaintOpSettings * settings, KisPainter * painter) const;
55
62 KisPaintOpSettings * settings(const KisID& id, TQWidget * parent, const KisInputDevice& inputDevice) const;
63
64 // Whether we should show this paintop in the toolchest
65 bool userVisible(const KisID & id, KisColorSpace* cs) const;
66
67 // Get the name of the icon to show in the toolchest
68 TQString pixmap(const KisID & id) const;
69
70
71public:
72 static KisPaintOpRegistry* instance();
73
74private:
75 KisPaintOpRegistry();
76 KisPaintOpRegistry(const KisPaintOpRegistry&);
77 KisPaintOpRegistry operator=(const KisPaintOpRegistry&);
78
79private:
80 static KisPaintOpRegistry *m_singleton;
81};
82
83#endif // KIS_PAINTOP_REGISTRY_H_
84
A colorspace is the definition of a certain color model in Chalk.
Base class for registry objects in Chalk.
Chalk has a large number of extensible resources.
Definition kis_id.h:57
KisPainter contains the graphics primitives necessary to draw on a KisPaintDevice.
Definition kis_painter.h:56