Krita is a free and open source cross-platform application that offers an end-to-end solution for creating digital art files from scratch built on the KDE and Qt frameworks.
C++
/*
* SPDX-FileCopyrightText: 2019 Boudewijn Rempt <[email protected]>
*
* SPDX-License-Identifier: GPL-2.0-or-later
*/
#ifndef KISNODERENAMECOMMAND_H
#define KISNODERENAMECOMMAND_H
#include "kis_node_command.h"
#include "commands_new/KisAsynchronouslyMergeableCommandInterface.h"
/// The command for setting the node's name
class KRITAIMAGE_EXPORT KisNodeRenameCommand : public KisNodeCommand, public KisAsynchronouslyMergeableCommandInterface
{
public:
KisNodeRenameCommand(KisNodeSP node,
const QString &oldName,
const QString &newName);
void redo() override;
void undo() override;
int id() const override;
bool mergeWith(const KUndo2Command *command) override;
bool canMergeWith(const KUndo2Command *command) const override;
private:
QString m_oldName;
QString m_newName;
};
#endif // KISNODERENAMECOMMAND_H