File indexing completed on 2024-12-22 04:10:06

0001 /*
0002  *  SPDX-FileCopyrightText: 2008 Boudewijn Rempt <boud@valdyas.org>
0003  *
0004  *  SPDX-License-Identifier: GPL-2.0-or-later
0005  */
0006 
0007 #ifndef KIS_GENERATOR_REGISTRY_H_
0008 #define KIS_GENERATOR_REGISTRY_H_
0009 
0010 #include <QObject>
0011 
0012 #include "kis_generator.h"
0013 #include "kis_types.h"
0014 #include "KoGenericRegistry.h"
0015 
0016 #include <kritaimage_export.h>
0017 
0018 class QString;
0019 class KisFilterConfiguration;
0020 
0021 /**
0022  * XXX_DOCS
0023  */
0024 class KRITAIMAGE_EXPORT KisGeneratorRegistry : public QObject, public KoGenericRegistry<KisGeneratorSP>
0025 {
0026 
0027     Q_OBJECT
0028 
0029 public:
0030     ~KisGeneratorRegistry() override;
0031 
0032     static KisGeneratorRegistry* instance();
0033     void add(KisGeneratorSP item);
0034     void add(const QString &id, KisGeneratorSP item);
0035 
0036 Q_SIGNALS:
0037 
0038     void generatorAdded(QString id);
0039 
0040 private:
0041 
0042     KisGeneratorRegistry(QObject *parent);
0043     KisGeneratorRegistry(const KisGeneratorRegistry&);
0044     KisGeneratorRegistry operator=(const KisGeneratorRegistry&);
0045 };
0046 
0047 #endif // KIS_GENERATOR_REGISTRY_H_