chalk

kis_tool_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_TOOL_REGISTRY_H_
20#define KIS_TOOL_REGISTRY_H_
21
22#include <tqobject.h>
23
24#include "kis_tool_types.h"
25#include "kis_generic_registry.h"
26#include <koffice_export.h>
27
28class TDEActionCollection;
30class TQStringList;
31
38class KRITACORE_EXPORT KisToolRegistry : public TQObject, public KisGenericRegistry<KisToolFactorySP>{
39
40 TQ_OBJECT
41
42
43public:
44 virtual ~KisToolRegistry();
45
46 static KisToolRegistry* instance();
47
48 vKisTool createTools(TDEActionCollection * ac, KisCanvasSubject *subject) const;
49 KisTool * createTool(TDEActionCollection * ac, KisCanvasSubject * subject, KisID & id) const;
50
51private:
54 KisToolRegistry operator=(const KisToolRegistry&);
55
56 static KisToolRegistry *m_singleton;
57};
58
59#endif // KIS_TOOL_REGISTRY_H_
60
KisCanvasSubject is part of the Observer pattern.
Base class for registry objects in Chalk.
Chalk has a large number of extensible resources.
Definition kis_id.h:57
A registry, similar to the tool and colormodel registry where new tool plugins can register themselve...