File indexing completed on 2024-05-12 15:56:40
0001 /* This file is part of the KDE project 0002 * SPDX-FileCopyrightText: 2006-2007 Thomas Zander <zander@kde.org> 0003 * 0004 * SPDX-License-Identifier: LGPL-2.0-or-later 0005 */ 0006 0007 #ifndef KODOCKREGISTRY_ 0008 #define KODOCKREGISTRY_ 0009 0010 #include <QFont> 0011 0012 #include "KoGenericRegistry.h" 0013 #include <KoDockFactoryBase.h> 0014 0015 #include "kritaflake_export.h" 0016 0017 /** 0018 * This singleton class keeps a register of all available dockers, 0019 * or rather, of the factories that can create the QDockWidget instances 0020 * for the mainwindows. 0021 * Note that adding your KoDockFactoryBase to this registry will mean it will automatically be 0022 * added to an application, no extra code is required for that. 0023 * 0024 * @see KoCanvasObserverBase 0025 */ 0026 class KRITAFLAKE_EXPORT KoDockRegistry : public KoGenericRegistry<KoDockFactoryBase*> 0027 { 0028 public: 0029 KoDockRegistry(); 0030 ~KoDockRegistry() override; 0031 0032 /** 0033 * Return an instance of the KoDockRegistry 0034 * Create a new instance on first call and return the singleton. 0035 */ 0036 static KoDockRegistry *instance(); 0037 0038 private: 0039 0040 KoDockRegistry(const KoDockRegistry&); 0041 KoDockRegistry operator=(const KoDockRegistry&); 0042 void init(); 0043 0044 class Private; 0045 Private * const d; 0046 }; 0047 0048 #endif