Swiftray  1.0
Commands::RemoveShapeCmd Class Reference

Command for removing shapes. The command needs to manage shapes' lifecycle, but doesn't need to manage layers' lifecycle. More...

#include <command.h>

Inheritance diagram for Commands::RemoveShapeCmd:
Commands::BaseCmd

Public Member Functions

 RemoveShapeCmd (const ShapePtr &shape)
 
 RemoveShapeCmd (Layer *layer, const ShapePtr &shape)
 
void redo (Document *doc) override
 
void undo (Document *doc) override
 
- Public Member Functions inherited from Commands::BaseCmd
 BaseCmd ()=default
 

Public Attributes

Layerlayer_
 
ShapePtr shape_
 

Detailed Description

Command for removing shapes. The command needs to manage shapes' lifecycle, but doesn't need to manage layers' lifecycle.

Constructor & Destructor Documentation

◆ RemoveShapeCmd() [1/2]

Commands::RemoveShapeCmd::RemoveShapeCmd ( const ShapePtr shape)
inlineexplicit

◆ RemoveShapeCmd() [2/2]

Commands::RemoveShapeCmd::RemoveShapeCmd ( Layer layer,
const ShapePtr shape 
)
inline

Member Function Documentation

◆ redo()

void RemoveShapeCmd::redo ( Document doc)
overridevirtual

Reimplemented from Commands::BaseCmd.

◆ undo()

void RemoveShapeCmd::undo ( Document doc)
overridevirtual

Reimplemented from Commands::BaseCmd.

Member Data Documentation

◆ layer_

Layer* Commands::RemoveShapeCmd::layer_

◆ shape_

ShapePtr Commands::RemoveShapeCmd::shape_

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