File indexing completed on 2024-06-16 04:12:09

0001 /*
0002  *  SPDX-FileCopyrightText: 2015 Dmitry Kazakov <dimula73@gmail.com>
0003  *
0004  *  SPDX-License-Identifier: GPL-2.0-or-later
0005  */
0006 
0007 #ifndef __KIS_SWITCH_CURRENT_TIME_COMMAND_H
0008 #define __KIS_SWITCH_CURRENT_TIME_COMMAND_H
0009 
0010 #include "kritaimage_export.h"
0011 #include "kis_types.h"
0012 
0013 #include <kundo2command.h>
0014 
0015 class KisImageAnimationInterface;
0016 
0017 
0018 class KRITAIMAGE_EXPORT KisSwitchCurrentTimeCommand : public KUndo2Command
0019 {
0020 public:
0021     KisSwitchCurrentTimeCommand(KisImageAnimationInterface *animation, int oldTime, int newTime, KUndo2Command *parent = 0);
0022     ~KisSwitchCurrentTimeCommand() override;
0023 
0024     void redo() override;
0025     void undo() override;
0026 
0027     int id() const override;
0028     bool mergeWith(const KUndo2Command* command) override;
0029 
0030 private:
0031     KisImageAnimationInterface *m_animation;
0032     int m_oldTime;
0033     int m_newTime;
0034 };
0035 
0036 #endif /* __KIS_SWITCH_CURRENT_TIME_COMMAND_H */