Changeset View
Changeset View
Standalone View
Standalone View
plugins/filters/colors/kis_luminositytoalpha_filter.h
- This file was added.
1 | /* | ||||
---|---|---|---|---|---|
2 | * This file is part of Krita | ||||
3 | * | ||||
4 | * Copyright (c) 2004 Cyrille Berger <cberger@cberger.net> | ||||
5 | * | ||||
6 | * This program is free software; you can redistribute it and/or modify | ||||
7 | * it under the terms of the GNU General Public License as published by | ||||
8 | * the Free Software Foundation; either version 2 of the License, or | ||||
9 | * (at your option) any later version. | ||||
10 | * | ||||
11 | * This program is distributed in the hope that it will be useful, | ||||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||||
14 | * GNU General Public License for more details. | ||||
15 | * | ||||
16 | * You should have received a copy of the GNU General Public License | ||||
17 | * along with this program; if not, write to the Free Software | ||||
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ | ||||
19 | | ||||
20 | #ifndef KIS_LUMINOSITYTOALPHA_FILTER_H | ||||
21 | #define KIS_LUMINOSITYTOALPHA_FILTER_H | ||||
22 | | ||||
23 | #include <QObject> | ||||
24 | #include <QVariant> | ||||
25 | | ||||
26 | #include <kis_config_widget.h> | ||||
27 | #include <filter/kis_color_transformation_filter.h> | ||||
28 | | ||||
29 | #include "ui_wdg_luminositytoalpha.h" | ||||
30 | | ||||
31 | | ||||
32 | class KoColorSpace; | ||||
33 | class KoColorTransformation; | ||||
34 | | ||||
35 | class KisLuminosityToAlphaFilter : public KisColorTransformationFilter | ||||
36 | { | ||||
37 | public: | ||||
38 | KisLuminosityToAlphaFilter(); | ||||
39 | ~KisLuminosityToAlphaFilter() override; | ||||
40 | public: | ||||
41 | | ||||
42 | KisConfigWidget * createConfigurationWidget(QWidget* parent, const KisPaintDeviceSP dev) const override; | ||||
43 | | ||||
44 | KoColorTransformation* createTransformation(const KoColorSpace* cs, const KisFilterConfigurationSP config) const override; | ||||
45 | | ||||
46 | static inline KoID id() { | ||||
47 | return KoID("luminositytoalpha", i18n("Luminosity To Alpha")); | ||||
48 | } | ||||
49 | | ||||
50 | KisFilterConfigurationSP factoryConfiguration() const override; | ||||
51 | | ||||
52 | }; | ||||
53 | | ||||
54 | | ||||
55 | class KisLuminosityToAlphaConfigWidget : public KisConfigWidget | ||||
56 | { | ||||
57 | | ||||
58 | Q_OBJECT | ||||
59 | | ||||
60 | public: | ||||
61 | KisLuminosityToAlphaConfigWidget(QWidget * parent, Qt::WindowFlags f = 0); | ||||
62 | ~KisLuminosityToAlphaConfigWidget() override; | ||||
63 | | ||||
64 | KisPropertiesConfigurationSP configuration() const override; | ||||
65 | void setConfiguration(const KisPropertiesConfigurationSP config) override; | ||||
66 | Ui_WdgLuminosityToAlpha *m_page; | ||||
67 | QButtonGroup *m_group; | ||||
68 | }; | ||||
69 | | ||||
70 | | ||||
71 | #endif |