File indexing completed on 2024-05-12 15:56:40
0001 /* This file is part of the KDE project 0002 * SPDX-FileCopyrightText: 2009 Jan Hambrecht <jaham@gmx.net> 0003 * 0004 * SPDX-License-Identifier: LGPL-2.1-or-later 0005 */ 0006 0007 #ifndef KOFILTEREFFECTFACTORY_H 0008 #define KOFILTEREFFECTFACTORY_H 0009 0010 #include "kritaflake_export.h" 0011 0012 class KoFilterEffect; 0013 class KoFilterEffectConfigWidgetBase; 0014 class QString; 0015 0016 /// API docs go here 0017 class KRITAFLAKE_EXPORT KoFilterEffectFactoryBase 0018 { 0019 public: 0020 0021 /** 0022 * Create the new factory 0023 * @param id a string that will be used internally for referencing the filter effect 0024 * @param name the user visible name of the filter effect this factory creates 0025 */ 0026 KoFilterEffectFactoryBase(const QString &id, const QString &name); 0027 virtual ~KoFilterEffectFactoryBase(); 0028 0029 /** 0030 * Returns the id for the filter this factory creates. 0031 * @return the id for the filter this factory creates 0032 */ 0033 QString id() const; 0034 0035 /** 0036 * Returns the user visible (and translated) name to be seen by the user. 0037 * @return the user visible (and translated) name to be seen by the user 0038 */ 0039 QString name() const; 0040 0041 /** 0042 * This method should be implemented by factories to create a filter effect. 0043 * @return a new filter effect 0044 */ 0045 virtual KoFilterEffect *createFilterEffect() const = 0; 0046 0047 /** 0048 * This method should be implemented by factories to create a filter effect config widget. 0049 * @return the filter effect options widget 0050 */ 0051 virtual KoFilterEffectConfigWidgetBase *createConfigWidget() const = 0; 0052 0053 private: 0054 class Private; 0055 Private * const d; 0056 }; 0057 0058 #endif // KOFILTEREFFECTFACTORY_H