File indexing completed on 2024-12-22 04:13:15

0001 /* This file is part of the KDE project
0002  * SPDX-FileCopyrightText: 2008 Boudewijn Rempt <boud@valdyas.org>
0003  *
0004  * SPDX-License-Identifier: LGPL-2.0-or-later
0005  */
0006 #ifndef KIS_WDG_GENERATOR_H
0007 #define KIS_WDG_GENERATOR_H
0008 
0009 #include <QWidget>
0010 #include <kis_types.h>
0011 
0012 class KisFilterConfiguration;
0013 class KisViewManager;
0014 class KoColor;
0015 
0016 /**
0017  * A widget that allows users to select a generator and
0018  * create a config object for it.
0019  *
0020  * XXX: make use of bookmarked configuration things, like
0021  *      in the filter widget.
0022  */
0023 class KisWdgGenerator : public QWidget
0024 {
0025 
0026     Q_OBJECT
0027 
0028 public:
0029 
0030     KisWdgGenerator(QWidget * parent);
0031 
0032     KisWdgGenerator(QWidget * parent, KisPaintDeviceSP dev);
0033 
0034     ~KisWdgGenerator() override;
0035 
0036     void initialize(KisViewManager *view);
0037 
0038     void setConfiguration(const KisFilterConfigurationSP  config);
0039 
0040     KisFilterConfigurationSP  configuration();
0041 
0042 Q_SIGNALS:
0043     void previewConfiguration();
0044 
0045 private Q_SLOTS:
0046     void slotGeneratorActivated(int);
0047 
0048 public Q_SLOTS:
0049     void showFilterGallery(bool);
0050 
0051 private:
0052 
0053     struct Private;
0054     Private * const d {nullptr};
0055 };
0056 
0057 #endif