2013-12-20 20:30:55 +00:00
|
|
|
/*
|
2015-02-20 14:56:22 +00:00
|
|
|
Copyright 2006-2015 The QElectroTech Team
|
2013-12-20 20:30:55 +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 REPORTELEMENT_H
|
|
|
|
#define REPORTELEMENT_H
|
|
|
|
|
|
|
|
#include "customelement.h"
|
|
|
|
|
2014-12-18 10:51:08 +00:00
|
|
|
class ElementTextItem;
|
|
|
|
|
2013-12-20 20:30:55 +00:00
|
|
|
/**
|
|
|
|
* @brief The ReportElement class
|
|
|
|
*this class represent an element that can be linked to an other ReportElement
|
|
|
|
* a folio report in a diagram is a element that show a wire go on an other folio
|
|
|
|
*/
|
|
|
|
class ReportElement : public CustomElement {
|
|
|
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public :
|
2014-12-14 13:06:21 +00:00
|
|
|
explicit ReportElement(const ElementsLocation &,QString link_type, QGraphicsItem * = 0, int * = 0);
|
2014-01-01 16:28:19 +00:00
|
|
|
~ReportElement();
|
2013-12-29 18:37:34 +00:00
|
|
|
virtual void linkToElement(Element *);
|
2014-01-01 16:28:19 +00:00
|
|
|
virtual void unlinkAllElements();
|
2014-01-07 20:11:28 +00:00
|
|
|
virtual void unlinkElement(Element *elmt);
|
2013-12-20 20:30:55 +00:00
|
|
|
|
2013-12-29 22:47:31 +00:00
|
|
|
private:
|
2014-12-18 10:51:08 +00:00
|
|
|
int inverse_report;
|
|
|
|
QString label_;
|
|
|
|
ElementTextItem *m_text_field;
|
2013-12-29 22:47:31 +00:00
|
|
|
|
2013-12-20 20:30:55 +00:00
|
|
|
signals:
|
|
|
|
|
2013-12-29 22:47:31 +00:00
|
|
|
private slots:
|
2014-01-18 19:04:39 +00:00
|
|
|
void setLabel (QString label);
|
2013-12-29 22:47:31 +00:00
|
|
|
void updateLabel();
|
2013-12-20 20:30:55 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // REPORTELEMENT_H
|