Warning, file /office/calligra/libs/flake/KoDockRegistry.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) 2006-2007 Thomas Zander <zander@kde.org>
0003  *
0004  * This library is free software; you can redistribute it and/or
0005  * modify it under the terms of the GNU Library General Public
0006  * License as published by the Free Software Foundation; either
0007  * version 2 of the License, or (at your option) any later version.
0008  *
0009  * This library is distributed in the hope that it will be useful,
0010  * but WITHOUT ANY WARRANTY; without even the implied warranty of
0011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
0012  * Library General Public License for more details.
0013  *
0014  * You should have received a copy of the GNU Library General Public License
0015  * along with this library; see the file COPYING.LIB.  If not, write to
0016  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
0017  * Boston, MA 02110-1301, USA.
0018  */
0019 
0020 #ifndef KODOCKREGISTRY_
0021 #define KODOCKREGISTRY_
0022 
0023 #include <QFont>
0024 
0025 #include "KoGenericRegistry.h"
0026 #include "KoDockFactoryBase.h"
0027 
0028 #include "flake_export.h"
0029 
0030 /**
0031  * This singleton class keeps a register of all available dockers,
0032  * or rather, of the factories that can create the QDockWidget instances
0033  * for the mainwindows.
0034  * Note that adding your KoDockFactoryBase to this registry will mean it will automatically be
0035  * added to an application, no extra code is required for that.
0036  *
0037  * @see KoCanvasObserverBase
0038  */
0039 class FLAKE_EXPORT KoDockRegistry : public KoGenericRegistry<KoDockFactoryBase*>
0040 {
0041 public:
0042     KoDockRegistry();
0043     ~KoDockRegistry() override;
0044 
0045     /**
0046      * Return an instance of the KoDockRegistry
0047      * Create a new instance on first call and return the singleton.
0048      */
0049     static KoDockRegistry *instance();
0050 
0051 
0052     /**
0053      * @brief dockFontSize calculates a smallish font size for dock widgets to use
0054      * @return the point size in floating point.
0055      */
0056     static QFont dockFont();
0057 
0058 private:
0059 
0060     KoDockRegistry(const KoDockRegistry&);
0061     KoDockRegistry operator=(const KoDockRegistry&);
0062     void init();
0063 
0064     class Private;
0065     Private * const d;
0066 };
0067 
0068 #endif