|
QElectroTech
0.8-dev
|
Go to the documentation of this file.
18 #ifndef LINKELEMENTCOMMAND_H
19 #define LINKELEMENTCOMMAND_H
21 #include <QUndoCommand>
36 int id()
const override {
return 2;}
37 bool mergeWith(
const QUndoCommand *other)
override;
41 void setLink (
const QList<Element *>& element_list);
43 void unlink (QList<Element *> element_list);
50 void setUpNewLink (
const QList<Element *> &element_list,
bool already_link);
51 void makeLink (
const QList <Element *> &element_list);
60 #endif // LINKELEMENTCOMMAND_H
@ Terminale
Definition: element.h:57
virtual kind linkType() const
Definition: element.h:159
The LinkElementCommand class This undo class manage link between elements. In the same instance of th...
Definition: linkelementcommand.h:32
bool m_first_redo
Definition: linkelementcommand.h:55
int id() const override
Definition: linkelementcommand.h:36
QList< Element * > linkedElements()
Element::linkedElements.
Definition: element.h:258
Diagram * diagram() const
Definition: qetgraphicsitem.cpp:40
@ NextReport
Definition: element.h:52
void showMe()
Definition: diagram.h:161
virtual void linkToElement(Element *)
Definition: element.h:154
@ Simple
Definition: element.h:51
@ Slave
Definition: element.h:56
QList< Element * > m_linked_after
Definition: linkelementcommand.h:57
Element * m_element
Definition: linkelementcommand.h:54
bool eachStrIsEqual(const QStringList &qsl)
QET::eachStrIsEqual.
Definition: qet.cpp:624
void undo() override
LinkElementCommand::undo Undo this command.
Definition: linkelementcommand.cpp:174
void unlinkAll()
LinkElementCommand::unlinkAll Unlink all element of the edited element.
Definition: linkelementcommand.cpp:166
QList< Element * > m_linked_before
Definition: linkelementcommand.h:56
void makeLink(const QList< Element * > &element_list)
LinkElementCommand::makeLink Make the link between m_element and element_list; This method unlink ele...
Definition: linkelementcommand.cpp:263
void setUpNewLink(const QList< Element * > &element_list, bool already_link)
LinkElementCommand::setUpNewLink Update the content of m_link_after with the content of element_list....
Definition: linkelementcommand.cpp:233
@ Master
Definition: element.h:55
void setLink(const QList< Element * > &element_list)
LinkElementCommand::setLink Replace all linked elements of edited element by elements stored in eleme...
Definition: linkelementcommand.cpp:133
bool mergeWith(const QUndoCommand *other) override
LinkElementCommand::mergeWith.
Definition: linkelementcommand.cpp:45
LinkElementCommand(Element *element_, QUndoCommand *parent=nullptr)
LinkElementCommand::LinkElementCommand Constructor.
Definition: linkelementcommand.cpp:31
bool isFree() const
Definition: element.h:230
void unlink(QList< Element * > element_list)
LinkElementCommand::unlink Unlink all elements of element_list from the edited element.
Definition: linkelementcommand.cpp:156
@ AllReport
Definition: element.h:54
virtual void unlinkAllElements()
Definition: element.h:155
virtual void unlinkElement(Element *)
Definition: element.h:156
The PotentialSelectorDialog class This dialog is used when user try to connect two existing potential...
Definition: potentialselectordialog.h:69
void redo() override
LinkElementCommand::redo Redo this command.
Definition: linkelementcommand.cpp:185
static bool isLinkable(Element *element_a, Element *element_b, bool already_linked=false)
LinkElementCommand::isLinkable.
Definition: linkelementcommand.cpp:66
QList< Conductor * > conductors() const
Element::conductors.
Definition: element.cpp:146
Definition: conductor.h:43
QIcon tr
Definition: qeticons.cpp:206
@ PreviousReport
Definition: element.h:53