2014-02-22 17:24:20 +00:00
|
|
|
/*
|
2017-01-20 10:55:49 +00:00
|
|
|
Copyright 2006-2017 The QElectroTech Team
|
2014-02-22 17:24:20 +00:00
|
|
|
This file is part of QElectroTech.
|
|
|
|
|
|
|
|
QElectroTech is free software: you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation, either version 2 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
QElectroTech is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
#ifndef SLAVEELEMENT_H
|
|
|
|
#define SLAVEELEMENT_H
|
|
|
|
|
|
|
|
#include "customelement.h"
|
2016-05-21 20:28:25 +00:00
|
|
|
#include"properties/xrefproperties.h"
|
2014-02-22 17:24:20 +00:00
|
|
|
|
|
|
|
class SlaveElement : public CustomElement
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
2017-08-05 02:06:59 +00:00
|
|
|
explicit SlaveElement (const ElementsLocation &, QGraphicsItem * = nullptr, int * = nullptr);
|
2017-08-05 02:10:01 +00:00
|
|
|
~SlaveElement() override;
|
|
|
|
void linkToElement(Element *elmt) override;
|
|
|
|
void unlinkAllElements() override;
|
|
|
|
void unlinkElement(Element *elmt) override;
|
2014-02-22 17:24:20 +00:00
|
|
|
|
|
|
|
signals:
|
|
|
|
|
2014-03-21 14:40:33 +00:00
|
|
|
private slots:
|
|
|
|
void updateLabel();
|
|
|
|
|
|
|
|
private:
|
2017-01-29 13:57:17 +00:00
|
|
|
QGraphicsTextItem *m_xref_item;
|
2017-08-29 14:54:27 +00:00
|
|
|
QList<QMetaObject::Connection> m_connections;
|
2014-02-22 17:24:20 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // SLAVEELEMENT_H
|