[qet] qet/qet: [5280] Remove the class fixed element |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/qet Archives
]
Revision: 5280
Author: blacksun
Date: 2018-03-25 20:56:16 +0200 (Sun, 25 Mar 2018)
Log Message:
-----------
Remove the class fixed element
Modified Paths:
--------------
trunk/sources/qetgraphicsitem/customelement.cpp
trunk/sources/qetgraphicsitem/customelement.h
trunk/sources/qetgraphicsitem/element.h
Removed Paths:
-------------
trunk/sources/qetgraphicsitem/fixedelement.cpp
trunk/sources/qetgraphicsitem/fixedelement.h
Modified: trunk/sources/qetgraphicsitem/customelement.cpp
===================================================================
--- trunk/sources/qetgraphicsitem/customelement.cpp 2018-03-25 18:42:18 UTC (rev 5279)
+++ trunk/sources/qetgraphicsitem/customelement.cpp 2018-03-25 18:56:16 UTC (rev 5280)
@@ -47,7 +47,7 @@
- 8 : Aucune partie du dessin n'a pu etre chargee
*/
CustomElement::CustomElement(const ElementsLocation &location, QGraphicsItem *qgi, int *state) :
- FixedElement(qgi),
+ Element(qgi),
location_(location),
forbid_antialiasing(false)
{
@@ -282,13 +282,6 @@
}
/**
- @return Le nombre de bornes que l'element possede
-*/
-int CustomElement::terminalsCount() const {
- return(m_terminals.size());
-}
-
-/**
Dessine le composant sur le Diagram
@param qp Le QPainter a utiliser pour dessiner l'element
@param options Les options graphiques
Modified: trunk/sources/qetgraphicsitem/customelement.h
===================================================================
--- trunk/sources/qetgraphicsitem/customelement.h 2018-03-25 18:42:18 UTC (rev 5279)
+++ trunk/sources/qetgraphicsitem/customelement.h 2018-03-25 18:56:16 UTC (rev 5280)
@@ -17,7 +17,7 @@
*/
#ifndef CUSTOM_ELEMENT_H
#define CUSTOM_ELEMENT_H
-#include "fixedelement.h"
+#include "element.h"
#include "nameslist.h"
#include "elementslocation.h"
#include <QPicture>
@@ -29,7 +29,7 @@
element, the difference being that the CustomElement reads its description
(names, drawing, behavior) from an XML document.
*/
-class CustomElement : public FixedElement
+class CustomElement : public Element
{
Q_OBJECT
@@ -68,7 +68,6 @@
QList<QRectF *> circles() const override;
QList<QVector<QPointF> *> polygons() const override;
QList<QVector<qreal> *> arcs() const override;
- int terminalsCount() const override;
void paint(QPainter *, const QStyleOptionGraphicsItem *) override;
QString typeId() const override;
ElementsLocation location() const;
Modified: trunk/sources/qetgraphicsitem/element.h
===================================================================
--- trunk/sources/qetgraphicsitem/element.h 2018-03-25 18:42:18 UTC (rev 5279)
+++ trunk/sources/qetgraphicsitem/element.h 2018-03-25 18:56:16 UTC (rev 5280)
@@ -90,12 +90,6 @@
virtual QList<QVector<QPointF> *> polygons() const = 0;
/// @return the list of arcs in this element
virtual QList<QVector<qreal> *> arcs() const = 0;
- /// @return the current number of terminals of this element
- virtual int terminalsCount() const = 0;
- /// @return the minimum number of terminals for this element
- virtual int minTerminalsCount() const = 0;
- /// @return the maximum number of terminals for this element
- virtual int maxTerminalsCount() const = 0;
QList <QPair <Terminal *, Terminal *> > AlignedFreeTerminals () const;
Deleted: trunk/sources/qetgraphicsitem/fixedelement.cpp
===================================================================
--- trunk/sources/qetgraphicsitem/fixedelement.cpp 2018-03-25 18:42:18 UTC (rev 5279)
+++ trunk/sources/qetgraphicsitem/fixedelement.cpp 2018-03-25 18:56:16 UTC (rev 5280)
@@ -1,43 +0,0 @@
-/*
- Copyright 2006-2017 The QElectroTech Team
- 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/>.
-*/
-#include "fixedelement.h"
-/**
- Constructeur
-*/
-FixedElement::FixedElement(QGraphicsItem *parent) : Element(parent) {
-}
-
-/**
- Destructeur
-*/
-FixedElement::~FixedElement() {
-}
-
-/**
- @return Le nombre minimal de bornes que l'element peut avoir
-*/
-int FixedElement::minTerminalsCount() const {
- return(terminalsCount());
-}
-
-/**
- @return Le nombre maximal de bornes que l'element peut avoir
-*/
-int FixedElement::maxTerminalsCount() const {
- return(terminalsCount());
-}
Deleted: trunk/sources/qetgraphicsitem/fixedelement.h
===================================================================
--- trunk/sources/qetgraphicsitem/fixedelement.h 2018-03-25 18:42:18 UTC (rev 5279)
+++ trunk/sources/qetgraphicsitem/fixedelement.h 2018-03-25 18:56:16 UTC (rev 5280)
@@ -1,44 +0,0 @@
-/*
- Copyright 2006-2017 The QElectroTech Team
- 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 ELEMENTFIXE_H
-#define ELEMENTFIXE_H
-
-#include "element.h"
-
-/**
- This class represents an element having a fixed number of terminals.
-*/
-class FixedElement : public Element {
-
- Q_OBJECT
-
- // constructors, destructor
- public:
- FixedElement(QGraphicsItem * = nullptr);
- ~FixedElement() override;
-
- // methods
- public:
- int minTerminalsCount() const override;
- int maxTerminalsCount() const override;
- int terminalsCount() const override = 0;
- void paint(QPainter *, const QStyleOptionGraphicsItem *) override = 0;
- QString typeId() const override = 0;
- QString name() const override = 0;
-};
-#endif