The PastePartsCommand class Undo command for paste element primitive in an element editor.
More...
#include <pastepartscommand.h>
|
| PastePartsCommand (ElementView *view, const ElementContent &content_to_paste, QUndoCommand *parent=nullptr) |
| PastePartsCommand::PastePartsCommand. More...
|
|
| ~PastePartsCommand () override |
| PastePartsCommand::~PastePartsCommand. More...
|
|
void | undo () override |
| PastePartsCommand::undo. More...
|
|
void | redo () override |
| PastePartsCommand::redo. More...
|
|
virtual void | setOffset (int old_offset_paste_count, const QPointF &old_start_top_left_corner, int new_offset_paste_count, const QPointF &new_start_top_left_corner) |
| PastePartsCommand::setOffset Describe the offset to use with this undo command. More...
|
|
Public Member Functions inherited from ElementEditionCommand |
| ElementEditionCommand (ElementScene *=nullptr, ElementView *=nullptr, QUndoCommand *=nullptr) |
| ElementEditionCommand::ElementEditionCommand Constructs an ElementEditionCommand, thus embedding the provided scene and view. More...
|
|
| ElementEditionCommand (const QString &, ElementScene *=nullptr, ElementView *=nullptr, QUndoCommand *=nullptr) |
| ElementEditionCommand::ElementEditionCommand Constructs an ElementEditionCommand, thus embedding the provided scene and view. More...
|
|
| ~ElementEditionCommand () override |
|
ElementScene * | elementScene () const |
|
void | setElementScene (ElementScene *) |
|
ElementView * | elementView () const |
|
void | setElementView (ElementView *) |
|
The PastePartsCommand class Undo command for paste element primitive in an element editor.
◆ PastePartsCommand() [1/2]
PastePartsCommand::PastePartsCommand |
( |
ElementView * |
view, |
|
|
const ElementContent & |
content_to_paste, |
|
|
QUndoCommand * |
parent = nullptr |
|
) |
| |
PastePartsCommand::PastePartsCommand.
- Parameters
-
view | : view where this command work |
content_to_paste | : content to paste |
parent | : parent undo command |
- Note
- all terminal stored in content_to_paste get a new uuid in the constructor of this class to avoid have several terminal of an element with the same uuid.
◆ ~PastePartsCommand()
PastePartsCommand::~PastePartsCommand |
( |
| ) |
|
|
override |
◆ PastePartsCommand() [2/2]
◆ redo()
void PastePartsCommand::redo |
( |
| ) |
|
|
override |
◆ setOffset()
void PastePartsCommand::setOffset |
( |
int |
old_offset_paste_count, |
|
|
const QPointF & |
old_start_top_left_corner, |
|
|
int |
new_offset_paste_count, |
|
|
const QPointF & |
new_start_top_left_corner |
|
) |
| |
|
virtual |
PastePartsCommand::setOffset Describe the offset to use with this undo command.
- Parameters
-
old_offset_paste_count | |
old_start_top_left_corner | |
new_offset_paste_count | |
new_start_top_left_corner | |
◆ undo()
void PastePartsCommand::undo |
( |
| ) |
|
|
override |
◆ m_first_redo
bool PastePartsCommand::m_first_redo = true |
|
private |
◆ m_new_offset_paste_count
int PastePartsCommand::m_new_offset_paste_count |
|
private |
◆ m_new_start_top_left_corner
QPointF PastePartsCommand::m_new_start_top_left_corner |
|
private |
◆ m_old_offset_paste_count
int PastePartsCommand::m_old_offset_paste_count |
|
private |
◆ m_old_start_top_left_corner
QPointF PastePartsCommand::m_old_start_top_left_corner |
|
private |
◆ m_pasted_content
◆ m_uses_offset
bool PastePartsCommand::m_uses_offset = false |
|
private |
The documentation for this class was generated from the following files: