kis_wdg_convert_height_to_normal_map.h 1.84 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
/*
 * Copyright (c) 2017 Wolthera van Hövell tot Westerflier <griffinvalley@gmail.com>
 *
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 2 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program; if not, write to the Free Software
 *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 */
18 19
#ifndef KIS_WDG_CONVERT_HEIGHT_TO_NORMAL_MAP_H
#define KIS_WDG_CONVERT_HEIGHT_TO_NORMAL_MAP_H
20 21 22 23
#include <kis_config_widget.h>
#include <QWidget>
#include <KoColorSpace.h>
#include "ui_wdg_convert_height_to_normal_map.h"
24

25
class Ui_WidgetConvertHeightToNormalMap;
26

27
class KisWdgConvertHeightToNormalMap : public KisConfigWidget
28
{
29
    Q_OBJECT
30
public:
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
    KisWdgConvertHeightToNormalMap(QWidget *parent, const KoColorSpace *cs);
    ~KisWdgConvertHeightToNormalMap();

    KisPropertiesConfigurationSP configuration() const override;
    void setConfiguration(const KisPropertiesConfigurationSP config) override;

    enum swizzle {
        xPlus,
        xMin,
        yPlus,
        yMin,
        zPlus,
        zMin
    };

private:
    Ui_WidgetConvertHeightToNormalMap *ui;
    QStringList m_types;
    QStringList m_types_translatable;
    const KoColorSpace *m_cs;
private Q_SLOTS:
    void horizontalRadiusChanged(qreal r);
    void verticalRadiusChanged(qreal r);
    void aspectLockChanged(bool v);
55 56
};

57
#endif // KIS_WDG_CONVERT_HEIGHT_TO_NORMAL_MAP_H