Krita Source Code Documentation
Loading...
Searching...
No Matches
kis_paintop_registry.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2004 Boudewijn Rempt <boud@valdyas.org>
3 *
4 * SPDX-License-Identifier: GPL-2.0-or-later
5 */
6
7#ifndef KIS_PAINTOP_REGISTRY_H_
8#define KIS_PAINTOP_REGISTRY_H_
9
10#include <QObject>
11
12#include "KoGenericRegistry.h"
13
14#include "kis_paintop.h"
16#include "kis_types.h"
20
21#include <kritaimage_export.h>
22
23
24class KisPaintOp;
25class KisPainter;
26
30class KRITAIMAGE_EXPORT KisPaintOpRegistry : public QObject, public KoGenericRegistry<KisPaintOpFactory*>
31{
32
33 Q_OBJECT
34
35public:
37 ~KisPaintOpRegistry() override;
38
39#ifdef HAVE_THREADED_TEXT_RENDERING_WORKAROUND
40 void preinitializePaintOpIfNeeded(const KisPaintOpPresetSP preset);
41#endif /* HAVE_THREADED_TEXT_RENDERING_WORKAROUND */
42
47 KisPaintOp* paintOp(const KisPaintOpPresetSP preset, KisPainter * painter, KisNodeSP node, KisImageSP image) const;
48
49 KisInterstrokeDataFactory* createInterstrokeDataFactory(KisPaintOpPresetSP preset) const;
50
57 KisPaintOpSettingsSP createSettings(const KoID& id, KisResourcesInterfaceSP resourcesInterface) const;
58
62 KisPaintOpPresetSP defaultPreset(const KoID& id, KisResourcesInterfaceSP resourcesInterface) const;
63
64 // Get the icon to show in the user interface
65 QIcon icon(const KoID & id) const;
66
71 QList<KoID> listKeys() const;
72
73public:
74
76
77private:
78
81 void initRegistry();
82
83
84 // So the settings can get a paintop to render their sample image
85 friend class KisPaintOpSettings;
86
90 KisPaintOp * paintOp(const QString& id, const KisPaintOpSettingsSP settings, KisPainter * painter, KisNodeSP node, KisImageSP image) const;
91
92};
93
94#endif // KIS_PAINTOP_REGISTRY_H_
95
PythonPluginManager * instance
KisPaintOpRegistry(const KisPaintOpRegistry &)
KisPaintOpRegistry operator=(const KisPaintOpRegistry &)
Definition KoID.h:30