QElectroTech 0.100.0-dev
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
AddTerminalToStripCommand Class Reference

The AddTerminalToStripCommand class Add a terminal element to a terminal strip Two cases are handled : Add free terminal to strip, Move terminal from strip to another strip. More...

#include <addterminaltostripcommand.h>

Inherits QUndoCommand.

Collaboration diagram for AddTerminalToStripCommand:
Collaboration graph

Public Member Functions

 AddTerminalToStripCommand (QSharedPointer< RealTerminal > terminal, TerminalStrip *strip, QUndoCommand *parent=nullptr)
 AddTerminalToStripCommand::AddTerminalToStripCommand Add terminal to strip.
 
 AddTerminalToStripCommand (QVector< QSharedPointer< RealTerminal > > terminals, TerminalStrip *strip, QUndoCommand *parent=nullptr)
 
 ~AddTerminalToStripCommand () override
 
void undo () override
 AddTerminalToStripCommand::undo Reimplemented from QUndoCommand.
 
void redo () override
 AddTerminalToStripCommand::redo Reimplemented from QUndoCommand.
 

Private Attributes

QVector< QSharedPointer< RealTerminal > > m_terminal
 
QPointer< TerminalStripm_new_strip
 

Detailed Description

The AddTerminalToStripCommand class Add a terminal element to a terminal strip Two cases are handled : Add free terminal to strip, Move terminal from strip to another strip.

Constructor & Destructor Documentation

◆ AddTerminalToStripCommand() [1/2]

AddTerminalToStripCommand::AddTerminalToStripCommand ( QSharedPointer< RealTerminal terminal,
TerminalStrip strip,
QUndoCommand *  parent = nullptr 
)

AddTerminalToStripCommand::AddTerminalToStripCommand Add terminal to strip.

Parameters
terminal: terminal to add to strip
strip: terminal strip where terminal must be added
parent: parent undo command
Here is the call graph for this function:

◆ AddTerminalToStripCommand() [2/2]

AddTerminalToStripCommand::AddTerminalToStripCommand ( QVector< QSharedPointer< RealTerminal > >  terminals,
TerminalStrip strip,
QUndoCommand *  parent = nullptr 
)
Here is the call graph for this function:

◆ ~AddTerminalToStripCommand()

AddTerminalToStripCommand::~AddTerminalToStripCommand ( )
override

Member Function Documentation

◆ redo()

void AddTerminalToStripCommand::redo ( )
override

AddTerminalToStripCommand::redo Reimplemented from QUndoCommand.

◆ undo()

void AddTerminalToStripCommand::undo ( )
override

AddTerminalToStripCommand::undo Reimplemented from QUndoCommand.

Member Data Documentation

◆ m_new_strip

QPointer<TerminalStrip> AddTerminalToStripCommand::m_new_strip
private

◆ m_terminal

QVector<QSharedPointer<RealTerminal> > AddTerminalToStripCommand::m_terminal
private

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