Krita Source Code Documentation
Loading...
Searching...
No Matches
KisImageAnimSettingCommand.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2025 Emmet O 'Neill <emmetoneill.pdx@gmail.com>
3 *
4 * SPDX-License-Identifier: GPL-2.0-or-later
5 */
6
7#ifndef KISIMAGEANIMSETTINGCOMMAND_H
8#define KISIMAGEANIMSETTINGCOMMAND_H
9
10#include "kundo2command.h"
13
14/*
15 * Undo-able command for setting various animation-related
16 * image settings, like FPS, start/end frame, etc.
17 */
19{
20public:
21 struct Settings {
22 int FPS = 0;
23 int startFrame = 0;
24 int endFrame = 24;
25 };
26
30
31 KisImageAnimSettingCommand(KisImageAnimationInterface *const p_animInterface, Settings p_after, KUndo2Command *parent = nullptr);
32
33 void redo() override; // SET image animation settings to after values..
34 void undo() override; // RESET image animation settings back to before values..
35
36 int id() const override; // Used for merging commands.
37 bool canMergeWith(const KUndo2Command *command) const override;
38 bool mergeWith(const KUndo2Command *p_next) override;
39
40private:
42
45};
46
47#endif // KISIMAGEANIMSETTINGCOMMAND_H
virtual bool mergeWith(const KUndo2Command *other)
virtual void undo()
virtual void redo()
virtual int id() const
virtual bool canMergeWith(const KUndo2Command *command) const =0
KisImageAnimationInterface * m_animInterface
KisImageAnimSettingCommand & operator=(const KisImageAnimSettingCommand &)=delete
KisImageAnimSettingCommand(const KisImageAnimSettingCommand &)=delete