File indexing completed on 2024-05-12 15:56:12

0001 /*
0002  *  SPDX-FileCopyrightText: 2008 Boudewijn Rempt <boud@valdyas.org>
0003  *
0004  *  SPDX-License-Identifier: GPL-2.0-or-later
0005  */
0006 #ifndef KIS_TEXT_BRUSH_FACTORY
0007 #define KIS_TEXT_BRUSH_FACTORY
0008 
0009 #include <QString>
0010 #include <QDomElement>
0011 #include "kis_brush_factory.h"
0012 #include "kis_brush.h"
0013 
0014 /**
0015  * A brush factory can create a new brush instance based
0016  * on a properties object that contains a serialized representation
0017  * of the object.
0018  */
0019 class BRUSH_EXPORT KisTextBrushFactory : public KisBrushFactory
0020 {
0021 
0022 public:
0023 
0024     KisTextBrushFactory() {}
0025     ~KisTextBrushFactory() override {}
0026 
0027     QString id() const override {
0028         return "kis_text_brush";
0029     }
0030 
0031 
0032     /**
0033      * Create a new brush from the given data or return an existing KisBrush
0034      * object. If this call leads to the creation of a resource, it should be
0035      * added to the resource provider, too.
0036      */
0037     KoResourceLoadResult createBrush(const QDomElement& brushDefinition, KisResourcesInterfaceSP resourcesInterface) override;
0038 
0039 
0040 };
0041 
0042 #endif