Krita Source Code Documentation
Loading...
Searching...
No Matches
kis_change_projection_color_command.cpp
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
8
9#include "kis_image.h"
11#include "kis_command_ids.h"
12
13
15 : KUndo2Command(kundo2_noi18n("CHANGE_PROJECTION_COLOR_COMMAND"), parent),
16 m_image(image),
17 m_oldColor(image->defaultProjectionColor()),
18 m_newColor(newColor)
19{
20}
21
25
30
32{
34 dynamic_cast<const KisChangeProjectionColorCommand*>(command);
35
36 if (!other) {
37 return false;
38 }
39
40 m_newColor = other->m_newColor;
41 return true;
42}
43
45{
47 dynamic_cast<const KisChangeProjectionColorCommand*>(command);
48
49 return other;
50}
51
61
bool mergeWith(const KUndo2Command *command) override
bool canMergeWith(const KUndo2Command *command) const override
KisChangeProjectionColorCommand(KisImageSP image, const KoColor &newColor, KUndo2Command *parent=0)
void setDefaultProjectionColor(const KoColor &color)
KisImageAnimationInterface * animationInterface() const
void setDefaultProjectionColor(const KoColor &color)
KisSharedPtr< T > toStrongRef() const
toStrongRef returns a KisSharedPtr which may be dereferenced.
KUndo2MagicString kundo2_noi18n(const QString &text)