QElectroTech 0.100.0-dev
Loading...
Searching...
No Matches
masterelement.h
Go to the documentation of this file.
1/*
2 Copyright 2006-2024 The QElectroTech Team
3 This file is part of QElectroTech.
4
5 QElectroTech is free software: you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation, either version 2 of the License, or
8 (at your option) any later version.
9
10 QElectroTech is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
17*/
18#ifndef MASTERELEMENT_H
19#define MASTERELEMENT_H
20
21#include "element.h"
22
23class CrossRefItem;
24
31class MasterElement : public Element
32{
33 Q_OBJECT
34
35 public:
36 explicit MasterElement(
37 const ElementsLocation &,
38 QGraphicsItem * = nullptr,
39 int * = nullptr);
40 ~MasterElement() override;
41
42 void linkToElement (Element *elmt) override;
43 void unlinkAllElements () override;
44 void unlinkElement (Element *elmt) override;
45 void initLink (QETProject *project) override;
46 QRectF XrefBoundingRect() const;
47
48 protected:
49 QVariant itemChange(
50 GraphicsItemChange change,
51 const QVariant &value) override;
52
53 private:
55 void aboutDeleteXref ();
56
57 private:
60};
61
62#endif // MASTERELEMENT_H
The CrossRefItem class This clas provide an item, for show the cross reference, like the contacts lin...
Definition crossrefitem.h:47
Definition element.h:43
The ElementsLocation class This class represents the location, the location of an element or of a cat...
Definition elementslocation.h:47
The MasterElement class This class is a custom element, with extended behavior to be a master element...
Definition masterelement.h:32
~MasterElement() override
MasterElement::~MasterElement default destructor.
Definition masterelement.cpp:44
void initLink(QETProject *project) override
MasterElement::initLink.
Definition masterelement.cpp:112
QVariant itemChange(GraphicsItemChange change, const QVariant &value) override
Definition masterelement.cpp:130
bool m_first_scene_change
Definition masterelement.h:59
void unlinkElement(Element *elmt) override
MasterElement::unlinkElement Unlink the given element in parameter.
Definition masterelement.cpp:92
QRectF XrefBoundingRect() const
MasterElement::XrefBoundingRect.
Definition masterelement.cpp:122
void linkToElement(Element *elmt) override
MasterElement::linkToElement Link this master to another element For this class element must be a sla...
Definition masterelement.cpp:55
void xrefPropertiesChanged()
Definition masterelement.cpp:140
CrossRefItem * m_Xref_item
Definition masterelement.h:58
void unlinkAllElements() override
MasterElement::unlinkAllElements Unlink all of the element in the QList connected_elements.
Definition masterelement.cpp:76
void aboutDeleteXref()
MasterElement::aboutDeleteXref Check if Xref item must be displayed, if not, delete it....
Definition masterelement.cpp:166
Definition qetproject.h:62