karbon

karbon_tool_registry.h
1/*
2 Copyright (c) 2004 Boudewijn Rempt <boud@valdyas.org>
3 Copyright (c) 2005 Sven Langkamp <longamp@reallygood.de>
4
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public
7 License as published by the Free Software Foundation; either
8 version 2 of the License, or (at your option) any later version.
9
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Library General Public License for more details.
14
15 You should have received a copy of the GNU Library General Public License
16 along with this library; see the file COPYING.LIB. If not, write to
17 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 * Boston, MA 02110-1301, USA.
19*/
20
21#ifndef KARBON_TOOL_REGISTRY_H_
22#define KARBON_TOOL_REGISTRY_H_
23
24#include <tqvaluevector.h>
25#include <koffice_export.h>
26class TDEActionCollection;
27class VTool;
28class KarbonView;
29class KarbonAbstractToolFactory;
30
34class KARBONBASE_EXPORT KarbonToolRegistry : private TQValueVector<KarbonAbstractToolFactory*>
35{
36public:
37 virtual ~KarbonToolRegistry();
38
39 static KarbonToolRegistry* instance();
40
41 void createTools( TDEActionCollection * ac, KarbonView* view );
42 void add(KarbonAbstractToolFactory* factory);
43
44private:
47 KarbonToolRegistry operator=(const KarbonToolRegistry&);
48
49 static KarbonToolRegistry *m_singleton;
50};
51
52#endif // KARBON_TOOL_REGISTRY_H_
53
A registry where new tool plugins can register themselves.
The base class for all karbon tools.
Definition vtool.h:52