kis_psd_layer_style.h 3.08 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
/*
 *  Copyright (c) 2014 Boudewijn Rempt <boud@valdyas.org>
 *
 *  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.
 */
#ifndef KIS_PSD_LAYER_STYLE_H
#define KIS_PSD_LAYER_STYLE_H

class QIODevice;
Michael Abrahams's avatar
Michael Abrahams committed
22
class QUuid;
23

24 25
#include <QVector>

26 27
#include <psd.h>

28
#include "kis_types.h"
29
#include "kritaimage_export.h"
30

31

32 33 34 35
/**
 * @brief The KisPSDLayerStyle class implements loading, saving and applying
 * the PSD layer effects.
 *
36 37
 * See http://www.tonton-pixel.com/Photoshop%20Additional%20File%20Formats/styles-file-format.html
 *
38
 */
39
class KRITAIMAGE_EXPORT KisPSDLayerStyle
40
{
41

42
public:
43 44 45
    explicit KisPSDLayerStyle();
    virtual ~KisPSDLayerStyle();
    KisPSDLayerStyle(const KisPSDLayerStyle& rhs);
46
    KisPSDLayerStyle operator=(const KisPSDLayerStyle& rhs);
47

48 49
    KisPSDLayerStyleSP clone() const;

50 51
    void clear();

52
    QString name() const;
53 54
    void setName(const QString &value);

55 56 57 58 59
    QUuid uuid() const;
    void setUuid(const QUuid &value) const;

    QString psdUuid() const;
    void setPsdUuid(const QString &value) const;
60

61 62 63 64 65
    /**
     * \return true if all the styles are disabled
     */
    bool isEmpty() const;

66 67 68
    bool isEnabled() const;
    void setEnabled(bool value);

69
    const psd_layer_effects_context* context() const;
70 71 72 73
    const psd_layer_effects_drop_shadow* dropShadow() const;
    const psd_layer_effects_inner_shadow* innerShadow() const;
    const psd_layer_effects_outer_glow* outerGlow() const;
    const psd_layer_effects_inner_glow* innerGlow() const;
Dmitry Kazakov's avatar
Dmitry Kazakov committed
74
    const psd_layer_effects_satin* satin() const;
75 76 77
    const psd_layer_effects_color_overlay* colorOverlay() const;
    const psd_layer_effects_gradient_overlay* gradientOverlay() const;
    const psd_layer_effects_pattern_overlay* patternOverlay() const;
Dmitry Kazakov's avatar
Dmitry Kazakov committed
78
    const psd_layer_effects_stroke* stroke() const;
79
    const psd_layer_effects_bevel_emboss* bevelAndEmboss() const;
80 81

    psd_layer_effects_context* context();
82 83 84 85
    psd_layer_effects_drop_shadow* dropShadow();
    psd_layer_effects_inner_shadow* innerShadow();
    psd_layer_effects_outer_glow* outerGlow();
    psd_layer_effects_inner_glow* innerGlow();
Dmitry Kazakov's avatar
Dmitry Kazakov committed
86
    psd_layer_effects_satin* satin();
87 88 89
    psd_layer_effects_color_overlay* colorOverlay();
    psd_layer_effects_gradient_overlay* gradientOverlay();
    psd_layer_effects_pattern_overlay* patternOverlay();
Dmitry Kazakov's avatar
Dmitry Kazakov committed
90
    psd_layer_effects_stroke* stroke();
91
    psd_layer_effects_bevel_emboss* bevelAndEmboss();
92

93 94 95 96 97 98
private:
    struct Private;
    Private * const d;
};

#endif // KIS_PSD_LAYER_STYLE_H