The RemoveDiagramCommand class Undo/redo support for removing a folio (diagram) from a project. redo() detaches the diagram from the project (and, reactively, its ProjectView tab) without destroying it; undo() reinserts it at its original position. The diagram is only actually destroyed when this command itself is destroyed while the diagram is detached (i.e. while the removal is still in effect).
More...
#include <removediagramcommand.h>
Inherits QUndoCommand.
The RemoveDiagramCommand class Undo/redo support for removing a folio (diagram) from a project. redo() detaches the diagram from the project (and, reactively, its ProjectView tab) without destroying it; undo() reinserts it at its original position. The diagram is only actually destroyed when this command itself is destroyed while the diagram is detached (i.e. while the removal is still in effect).
◆ RemoveDiagramCommand()
| RemoveDiagramCommand::RemoveDiagramCommand |
( |
QETProject * | project, |
|
|
Diagram * | diagram, |
|
|
QUndoCommand * | parent = nullptr ) |
◆ ~RemoveDiagramCommand()
| RemoveDiagramCommand::~RemoveDiagramCommand |
( |
| ) |
|
|
override |
RemoveDiagramCommand::~RemoveDiagramCommand Destroy the diagram only if it is currently detached from the project (i.e. the removal is currently in effect) – otherwise the project owns it and will destroy it itself.
◆ redo()
| void RemoveDiagramCommand::redo |
( |
| ) |
|
|
override |
◆ undo()
| void RemoveDiagramCommand::undo |
( |
| ) |
|
|
override |
◆ m_diagram
| Diagram* RemoveDiagramCommand::m_diagram |
|
private |
◆ m_owns_diagram
| bool RemoveDiagramCommand::m_owns_diagram = false |
|
private |
true while the diagram is detached from the project (i.e. the removal is in effect)
◆ m_position
| int RemoveDiagramCommand::m_position |
|
private |
◆ m_project
| QPointer<QETProject> RemoveDiagramCommand::m_project |
|
private |
The documentation for this class was generated from the following files: