1 /*
2  *  Copyright (c) 2007 Boudewijn Rempt <boud@kde.org>
3  *  Copyright (c) 2011 Dmitry Kazakov <dimula73@gmail.com>
4  *
5  *  This program is free software; you can redistribute it and/or modify
6  *  it under the terms of the GNU General Public License as published by
7  *  the Free Software Foundation; either version 2 of the License, or
8  *  (at your option) any later version.
9  *
10  *  This program is distributed in the hope that it will be useful,
11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  *  GNU General Public License for more details.
14  *
15  *  You should have received a copy of the GNU General Public License
16  *  along with this program; if not, write to the Free Software
17  *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18  */
19 #ifndef KIS_SET_LAYER_STYLE_COMMAND_H
20 #define KIS_SET_LAYER_STYLE_COMMAND_H
21 
22 #include <klocalizedstring.h>
23 #include "kundo2command.h"
24 #include "kritaimage_export.h"
25 #include "kis_types.h"
26 #include "kis_psd_layer_style.h"
27 
28 class KRITAIMAGE_EXPORT KisSetLayerStyleCommand : public KUndo2Command
29 {
30 public:
31     KisSetLayerStyleCommand(KisLayerSP layer, KisPSDLayerStyleSP oldStyle, KisPSDLayerStyleSP newStyle, KUndo2Command *parent = 0);
32 
33     void undo() override;
34     void redo() override;
35 
36     static void updateLayerStyle(KisLayerSP layer, KisPSDLayerStyleSP style);
37 
38 private:
39     KisLayerSP m_layer;
40     KisPSDLayerStyleSP m_oldStyle;
41     KisPSDLayerStyleSP m_newStyle;
42 };
43 
44 #endif
45