Warning, file /office/calligra/libs/flake/KoToolRegistry.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001 /* This file is part of the KDE project 0002 * Copyright (c) 2004 Boudewijn Rempt <boud@valdyas.org> 0003 * Copyright (C) 2006 Thomas Zander <zander@kde.org> 0004 * 0005 * This library is free software; you can redistribute it and/or 0006 * modify it under the terms of the GNU Library General Public 0007 * License as published by the Free Software Foundation; either 0008 * version 2 of the License, or (at your option) any later version. 0009 * 0010 * This library is distributed in the hope that it will be useful, 0011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 0012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 0013 * Library General Public License for more details. 0014 * 0015 * You should have received a copy of the GNU Library General Public License 0016 * along with this library; see the file COPYING.LIB. If not, write to 0017 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 0018 * Boston, MA 02110-1301, USA. 0019 */ 0020 0021 #ifndef KO_TOOL_REGISTRY_H_ 0022 #define KO_TOOL_REGISTRY_H_ 0023 0024 #include "KoGenericRegistry.h" 0025 #include <KoToolFactoryBase.h> 0026 #include "flake_export.h" 0027 0028 /** 0029 * This singleton class keeps a register of all available flake tools, 0030 * or rather, of the factories that the KoToolBox (and KoToolManager) will use 0031 * to create flake tools. 0032 */ 0033 class FLAKE_EXPORT KoToolRegistry : public KoGenericRegistry<KoToolFactoryBase*> 0034 { 0035 public: 0036 KoToolRegistry(); 0037 ~KoToolRegistry() override; 0038 0039 /** 0040 * Return an instance of the KoToolRegistry 0041 * Create a new instance on first call and return the singleton. 0042 */ 0043 static KoToolRegistry *instance(); 0044 0045 /** 0046 * Add a toolfactory from a deferred plugin. This will cause the toolFactoryAdded signal 0047 * to be emitted, which is caught by the KoToolManager which then adds the tool to all 0048 * canvases. 0049 */ 0050 void addDeferred(KoToolFactoryBase *toolFactory); 0051 0052 private: 0053 KoToolRegistry(const KoToolRegistry&); 0054 KoToolRegistry operator=(const KoToolRegistry&); 0055 void init(); 0056 0057 class Private; 0058 Private * const d; 0059 }; 0060 0061 #endif