QElectroTech  0.70
Public Member Functions | Private Member Functions | Private Attributes | List of all members
PasteDiagramCommand Class Reference

#include <diagramcommands.h>

Public Member Functions

 PasteDiagramCommand (Diagram *, const DiagramContent &, QUndoCommand *=nullptr)
 PasteDiagramCommand::PasteDiagramCommand Constructor. More...
 
 ~PasteDiagramCommand () override
 PasteDiagramCommand::~PasteDiagramCommand Destructor. More...
 
void undo () override
 PasteDiagramCommand::undo Undo this command. More...
 
void redo () override
 PasteDiagramCommand::redo Redo this commnand. More...
 

Private Member Functions

 PasteDiagramCommand (const PasteDiagramCommand &)
 

Private Attributes

DiagramContent content
 pasted content More...
 
Diagramdiagram
 diagram content is pasted onto More...
 
int filter
 filter stating what kinds of items should be pasted More...
 
bool first_redo
 prevent the first call to redo() More...
 

Detailed Description

This command pastes some content onto a particular diagram.

Definition at line 85 of file diagramcommands.h.

Constructor & Destructor Documentation

◆ PasteDiagramCommand() [1/2]

PasteDiagramCommand::PasteDiagramCommand ( Diagram dia,
const DiagramContent c,
QUndoCommand *  parent = nullptr 
)

PasteDiagramCommand::PasteDiagramCommand Constructor.

Parameters
dia: diagram where we must to paste
c: content to past
parent: parent undo command

Definition at line 52 of file diagramcommands.cpp.

References content, diagram, filter, DiagramContent::items(), DiagramContent::sentence(), and QET::Icons::tr.

◆ ~PasteDiagramCommand()

PasteDiagramCommand::~PasteDiagramCommand ( )
override

◆ PasteDiagramCommand() [2/2]

PasteDiagramCommand::PasteDiagramCommand ( const PasteDiagramCommand )
private

Member Function Documentation

◆ redo()

void PasteDiagramCommand::redo ( )
override

◆ undo()

void PasteDiagramCommand::undo ( )
override

PasteDiagramCommand::undo Undo this command.

Definition at line 75 of file diagramcommands.cpp.

References content, diagram, filter, DiagramContent::items(), and Diagram::removeItem().

Member Data Documentation

◆ content

DiagramContent PasteDiagramCommand::content
private

pasted content

Definition at line 101 of file diagramcommands.h.

Referenced by PasteDiagramCommand(), redo(), undo(), and ~PasteDiagramCommand().

◆ diagram

Diagram* PasteDiagramCommand::diagram
private

diagram content is pasted onto

Definition at line 103 of file diagramcommands.h.

Referenced by PasteDiagramCommand(), redo(), undo(), and ~PasteDiagramCommand().

◆ filter

int PasteDiagramCommand::filter
private

filter stating what kinds of items should be pasted

Definition at line 105 of file diagramcommands.h.

Referenced by PasteDiagramCommand(), redo(), undo(), and ~PasteDiagramCommand().

◆ first_redo

bool PasteDiagramCommand::first_redo
private

prevent the first call to redo()

Definition at line 107 of file diagramcommands.h.

Referenced by redo().


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