SILICON
Loading...
Searching...
No Matches
ModifyPropertyCommand Class Reference

#include <undoCommands.hpp>

Inheritance diagram for ModifyPropertyCommand:
Collaboration diagram for ModifyPropertyCommand:

Classes

struct  PropertyChange

Public Member Functions

 ModifyPropertyCommand (std::string key, QUndoCommand *parent=nullptr)
void addPropertyChange (GraphicalComponent *component, const PropertyValue &oldValue, const PropertyValue &newValue)
bool isEmpty () const
void undo () override
void redo () override

Private Member Functions

void apply (bool useNewValue)

Private Attributes

std::string key
std::string documentPath
std::vector< PropertyChange > changes

Detailed Description

Definition at line 206 of file undoCommands.hpp.

Constructor & Destructor Documentation

◆ ModifyPropertyCommand()

ModifyPropertyCommand ( std::string key,
QUndoCommand * parent = nullptr )
explicit

Definition at line 329 of file undoCommands.cpp.

Member Function Documentation

◆ addPropertyChange()

void addPropertyChange ( GraphicalComponent * component,
const PropertyValue & oldValue,
const PropertyValue & newValue )

Definition at line 335 of file undoCommands.cpp.

◆ apply()

void apply ( bool useNewValue)
private

Definition at line 348 of file undoCommands.cpp.

◆ isEmpty()

bool isEmpty ( ) const
inlinenodiscard

Definition at line 212 of file undoCommands.hpp.

◆ redo()

void redo ( )
override

Definition at line 370 of file undoCommands.cpp.

◆ undo()

void undo ( )
override

Definition at line 365 of file undoCommands.cpp.

Member Data Documentation

◆ changes

std::vector<PropertyChange> changes
private

Definition at line 229 of file undoCommands.hpp.

◆ documentPath

std::string documentPath
private

Definition at line 228 of file undoCommands.hpp.

◆ key

std::string key
private

Definition at line 227 of file undoCommands.hpp.


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