File indexing completed on 2025-01-26 04:08:20

0001 /*
0002  *  SPDX-FileCopyrightText: 2012 Dmitry Kazakov <dimula73@gmail.com>
0003  *
0004  *  SPDX-License-Identifier: GPL-2.0-or-later
0005  */
0006 
0007 #ifndef __KIS_OPERATION_H
0008 #define __KIS_OPERATION_H
0009 
0010 #include <QString>
0011 #include <kundo2magicstring.h>
0012 #include <kritaui_export.h>
0013 #include "kis_properties_configuration.h"
0014 #include "operations/kis_operation_configuration.h"
0015 
0016 class KisViewManager;
0017 class KisProcessingApplicator;
0018 
0019 class KRITAUI_EXPORT KisOperation
0020 {
0021 public:
0022     KisOperation(const QString &id);
0023     virtual ~KisOperation();
0024 
0025     QString id() const;
0026 
0027     virtual void runFromXML(KisViewManager *view, const KisOperationConfiguration &config);
0028 
0029 protected:
0030     KisProcessingApplicator* beginAction(KisViewManager *view, const KUndo2MagicString &actionName);
0031     void endAction(KisProcessingApplicator *applicator, const QString &xmlData);
0032 private:
0033     const QString m_id;
0034 };
0035 
0036 #endif /* __KIS_OPERATION_H */