7#ifndef __KIS_SAVED_COMMANDS_H
8#define __KIS_SAVED_COMMANDS_H
33 void runStroke(
bool undo);
47 int id()
const override;
53 void setTime(
const QTime &time)
override;
55 QTime
time()
const override;
66 template <
typename Command,
typename Func>
67 static auto unwrap(Command *cmd, Func &&func)
68 ->
decltype(func(
static_cast<Command*
>(
nullptr))) {
72 SavedCommand *savedCommand =
73 dynamic_cast<SavedCommand*
>(cmd);
76 std::forward<Func>(func)(savedCommand->m_command.data()) :
77 std::forward<Func>(func)(cmd);
81 void addCommands(
KisStrokeId id,
bool undo)
override;
93 int id()
const override;
97 void setMacroId(
int value);
107 void addCommands(
KisStrokeId id,
bool undo)
override;
float value(const T *src, size_t ch)
virtual bool mergeWith(const KUndo2Command *other)
virtual void setTimedID(int timedID)
virtual bool timedMergeWith(KUndo2Command *other)
virtual QTime time() const
virtual QTime endTime() const
virtual bool canAnnihilateWith(const KUndo2Command *other) const
virtual QVector< KUndo2Command * > mergeCommandsVector() const
virtual bool isMerged() const
virtual int timedId() const
KisStrokesFacade * m_strokesFacade
virtual void addCommands(KisStrokeId id, bool undo)=0
static auto unwrap(Command *cmd, Func &&func) -> decltype(func(static_cast< Command * >(nullptr)))
KUndo2CommandSP m_command
typename copy_const< Src, Dst >::type copy_const_t