Editor API
UnigineEditor public API
Editor::RenameNodeAction Class Reference

This class is used to represent any user's action changing node's name. More...

#include <Actions.h>

Inheritance diagram for Editor::RenameNodeAction:
Editor::Action

Public Member Functions

 RenameNodeAction (const Unigine::NodePtr &node, const QString &new_name)
 Creates a new rename action for the specified node. More...
 
 ~RenameNodeAction () override
 
void apply () override
 Applies the rename node action. More...
 
void undo () override
 Reverts the rename node action. More...
 
void redo () override
 Redoes the previously undone rename node action (reverses the undo method). More...
 
bool validate () override
 This method allows action to do some internal cleanup. Return value indicates whether the action is still sane. Whenever it returns false asset system will delete invalid action for good. More...
 
- Public Member Functions inherited from Editor::Action
 Action ()
 
virtual ~Action ()
 
virtual bool modifiesWorld () const
 Indicates whether the action brings any changes to the scene. Actions like selection, for example, change nothing and shouldn't set world‘s "dirty state". For such actions this method would return 'false’. More...
 

Detailed Description

This class is used to represent any user's action changing node's name.

Constructor & Destructor Documentation

◆ RenameNodeAction()

Editor::RenameNodeAction::RenameNodeAction ( const Unigine::NodePtr &  node,
const QString &  new_name 
)

Creates a new rename action for the specified node.

Parameters
nodeNode affected by the rename action.
new_nameNew name of the node.

◆ ~RenameNodeAction()

Editor::RenameNodeAction::~RenameNodeAction ( )
override

Member Function Documentation

◆ apply()

void Editor::RenameNodeAction::apply ( )
overridevirtual

Applies the rename node action.

Implements Editor::Action.

◆ redo()

void Editor::RenameNodeAction::redo ( )
overridevirtual

Redoes the previously undone rename node action (reverses the undo method).

Implements Editor::Action.

◆ undo()

void Editor::RenameNodeAction::undo ( )
overridevirtual

Reverts the rename node action.

Implements Editor::Action.

◆ validate()

bool Editor::RenameNodeAction::validate ( )
overridevirtual

This method allows action to do some internal cleanup. Return value indicates whether the action is still sane. Whenever it returns false asset system will delete invalid action for good.

Reimplemented from Editor::Action.