Krita is a free and open source cross-platform application that offers an end-to-end solution for creating digital art files from scratch built on the KDE and Qt frameworks.
C++
/* This file is part of the KDE project
* SPDX-FileCopyrightText: 2006-2007 Thomas Zander <[email protected]>
*
* SPDX-License-Identifier: LGPL-2.0-or-later
*/
#ifndef KODOCKREGISTRY_
#define KODOCKREGISTRY_
#include "KoGenericRegistry.h"
#include <KoDockFactoryBase.h>
#include "kritaflake_export.h"
/**
* This singleton class keeps a register of all available dockers,
* or rather, of the factories that can create the QDockWidget instances
* for the mainwindows.
* Note that adding your KoDockFactoryBase to this registry will mean it will automatically be
* added to an application, no extra code is required for that.
*
* @see KoCanvasObserverBase
*/
class KRITAFLAKE_EXPORT KoDockRegistry : public KoGenericRegistry<KoDockFactoryBase*>
{
public:
KoDockRegistry();
~KoDockRegistry() override;
/**
* Returns the registered docks in a predictable order: first sorted by
* priority, then sorted case-insensitively by their id.
*/
QList<KoDockFactoryBase *> sortedDockWidgetFactories();
/**
* Return an instance of the KoDockRegistry
* Create a new instance on first call and return the singleton.
*/
static KoDockRegistry *instance();
private:
KoDockRegistry(const KoDockRegistry&);
KoDockRegistry operator=(const KoDockRegistry&);
void init();
class Private;
Private * const d;
};
#endif