mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-01-04 03:20:53 +01:00
Terminal element can be removed from a terminal strip
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/*
|
||||
/*
|
||||
Copyright 2006-2021 The QElectroTech Team
|
||||
This file is part of QElectroTech.
|
||||
|
||||
@@ -57,4 +57,23 @@ class AddTerminalToStripCommand : public QUndoCommand
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief The RemoveTerminalFromStripCommand class
|
||||
* Remove a terminal from a terminal strip.
|
||||
* The removed terminal become free.
|
||||
*/
|
||||
class RemoveTerminalFromStripCommand : public QUndoCommand
|
||||
{
|
||||
public:
|
||||
RemoveTerminalFromStripCommand (TerminalElement *terminal, TerminalStrip *strip, QUndoCommand *parent = nullptr);
|
||||
~RemoveTerminalFromStripCommand() override {}
|
||||
|
||||
void undo() override;
|
||||
void redo() override;
|
||||
|
||||
private:
|
||||
QPointer<TerminalElement> m_terminal;
|
||||
QPointer<TerminalStrip> m_strip;
|
||||
};
|
||||
|
||||
#endif // ADDTERMINALTOSTRIPCOMMAND_H
|
||||
|
||||
Reference in New Issue
Block a user