DISPLACE  1.0
A spatial model of fisheries to help sustainable fishing and maritime spatial planning
SetNodeValueCommand Class Reference

#include <setnodevaluecommand.h>

Inheritance diagram for SetNodeValueCommand:
Command

Public Member Functions

 SetNodeValueCommand (QList< QGraphicsItem * > items, double new_value)
 
virtual ~SetNodeValueCommand ()
 
virtual bool execute ()
 Execute the command. More...
 
virtual bool undo ()
 Undo the command. More...
 
virtual bool redo ()
 Redo the command. More...
 
- Public Member Functions inherited from Command
 Command ()
 
virtual ~Command ()
 

Constructor & Destructor Documentation

◆ SetNodeValueCommand()

SetNodeValueCommand::SetNodeValueCommand ( QList< QGraphicsItem * >  items,
double  new_value 
)

◆ ~SetNodeValueCommand()

SetNodeValueCommand::~SetNodeValueCommand ( )
virtual

Member Function Documentation

◆ execute()

bool SetNodeValueCommand::execute ( )
virtual

Execute the command.

If the command executed correctly, the client will put the command in the Undo list.

Returns
true if the command executed correctly, false if an error occurred.

Implements Command.

◆ redo()

bool SetNodeValueCommand::redo ( )
virtual

Redo the command.

If the command redid correctly, the client will move it from the redo list to the undo list.

Returns
true if the command executed correctly, false if an error occurred.

Implements Command.

◆ undo()

bool SetNodeValueCommand::undo ( )
virtual

Undo the command.

If the command undid correctly, the client will move the command in the Redo list. Otherwise the entire Undo list must be cleaned.

Returns
true if the command executed correctly, false if an error occurred.

Implements Command.


The documentation for this class was generated from the following files: