Krita Source Code Documentation
Loading...
Searching...
No Matches
kis_switch_current_time_command.h
Go to the documentation of this file.
1
/*
2
* SPDX-FileCopyrightText: 2015 Dmitry Kazakov <dimula73@gmail.com>
3
*
4
* SPDX-License-Identifier: GPL-2.0-or-later
5
*/
6
7
#ifndef __KIS_SWITCH_CURRENT_TIME_COMMAND_H
8
#define __KIS_SWITCH_CURRENT_TIME_COMMAND_H
9
10
#include "kritaimage_export.h"
11
#include "
kis_types.h
"
12
#include "
KoID.h
"
13
14
#include <
kundo2command.h
>
15
16
class
KisImageAnimationInterface
;
17
18
19
class
KRITAIMAGE_EXPORT
KisSwitchCurrentTimeCommand
:
public
KUndo2Command
20
{
21
public
:
22
KisSwitchCurrentTimeCommand
(
KisImageAnimationInterface
*animation,
int
oldTime,
int
newTime,
KUndo2Command
*parent = 0);
23
~KisSwitchCurrentTimeCommand
()
override
;
24
25
void
redo
()
override
;
26
void
undo
()
override
;
27
28
int
id
()
const override
;
29
bool
mergeWith
(
const
KUndo2Command
* command)
override
;
30
31
private
:
32
KisImageAnimationInterface
*
m_animation
;
33
int
m_oldTime
;
34
int
m_newTime
;
35
};
36
37
class
KRITAIMAGE_EXPORT
KisSwitchCurrentTimeToKeyframeCommand
:
public
KUndo2Command
38
{
39
public
:
40
KisSwitchCurrentTimeToKeyframeCommand
(
KisImageAnimationInterface
*animation,
int
oldTime,
KisNodeSP
node,
KoID
channelId,
KisKeyframeSP
targetKeyframe,
KUndo2Command
*parent = 0);
41
~KisSwitchCurrentTimeToKeyframeCommand
()
override
;
42
43
void
redo
()
override
;
44
void
undo
()
override
;
45
46
int
id
()
const override
;
47
bool
mergeWith
(
const
KUndo2Command
* command)
override
;
48
49
private
:
50
KisImageAnimationInterface
*
m_animation
;
51
int
m_oldTime
;
52
KisNodeSP
m_node
;
53
KoID
m_channelId
;
54
KisKeyframeSP
m_targetKeyframe
;
55
};
56
57
#endif
/* __KIS_SWITCH_CURRENT_TIME_COMMAND_H */
KoID.h
KUndo2Command
Definition
kundo2stack.h:87
KUndo2Command::mergeWith
virtual bool mergeWith(const KUndo2Command *other)
Definition
kundo2stack.cpp:205
KUndo2Command::undo
virtual void undo()
Definition
kundo2stack.cpp:240
KUndo2Command::redo
virtual void redo()
Definition
kundo2stack.cpp:222
KUndo2Command::id
virtual int id() const
Definition
kundo2stack.cpp:181
KisImageAnimationInterface
Definition
kis_image_animation_interface.h:28
KisSharedPtr< KisNode >
KisSwitchCurrentTimeCommand
Definition
kis_switch_current_time_command.h:20
KisSwitchCurrentTimeCommand::m_oldTime
int m_oldTime
Definition
kis_switch_current_time_command.h:33
KisSwitchCurrentTimeCommand::m_animation
KisImageAnimationInterface * m_animation
Definition
kis_switch_current_time_command.h:32
KisSwitchCurrentTimeCommand::m_newTime
int m_newTime
Definition
kis_switch_current_time_command.h:34
KisSwitchCurrentTimeToKeyframeCommand
Definition
kis_switch_current_time_command.h:38
KisSwitchCurrentTimeToKeyframeCommand::m_targetKeyframe
KisKeyframeSP m_targetKeyframe
Definition
kis_switch_current_time_command.h:54
KisSwitchCurrentTimeToKeyframeCommand::m_animation
KisImageAnimationInterface * m_animation
Definition
kis_switch_current_time_command.h:50
KisSwitchCurrentTimeToKeyframeCommand::m_channelId
KoID m_channelId
Definition
kis_switch_current_time_command.h:53
KisSwitchCurrentTimeToKeyframeCommand::m_oldTime
int m_oldTime
Definition
kis_switch_current_time_command.h:51
KisSwitchCurrentTimeToKeyframeCommand::m_node
KisNodeSP m_node
Definition
kis_switch_current_time_command.h:52
KoID
Definition
KoID.h:30
QSharedPointer< KisKeyframe >
kis_types.h
kundo2command.h
libs
image
commands_new
kis_switch_current_time_command.h
Generated at
2025-11-04 02:30:02+01:00
from
Krita
branch
master
, commit
c9dde2e79561a8aea4a7e8d9ac99c98a7bac9e52