Swiftray  1.0
Commands::AddShapeCmd Class Reference

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

#include <command.h>

Inheritance diagram for Commands::AddShapeCmd:
Commands::BaseCmd

Public Member Functions

 AddShapeCmd (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 adding shapes. The command needs to manage shapes' lifecycle, but doesn't need to manage layers' lifecycle.

Constructor & Destructor Documentation

◆ AddShapeCmd()

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

Member Function Documentation

◆ redo()

void AddShapeCmd::redo ( Document doc)
overridevirtual

Reimplemented from Commands::BaseCmd.

◆ undo()

void AddShapeCmd::undo ( Document doc)
overridevirtual

Reimplemented from Commands::BaseCmd.

Member Data Documentation

◆ layer_

Layer* Commands::AddShapeCmd::layer_

◆ shape_

ShapePtr Commands::AddShapeCmd::shape_

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