[qet] [3224] Improvement: Use anticipate class declaration instead of include header

[ Thread Index | Date Index | More lists.tuxfamily.org/qet Archives ]


Revision: 3224
Author:   blacksun
Date:     2014-07-21 22:44:32 +0200 (Mon, 21 Jul 2014)
Log Message:
-----------
Improvement: Use anticipate class declaration instead of include header

Modified Paths:
--------------
    trunk/sources/conductorautonumerotation.cpp
    trunk/sources/conductorprofile.cpp
    trunk/sources/diagram.cpp
    trunk/sources/diagramcommands.h
    trunk/sources/elementscollectioncache.cpp
    trunk/sources/elementspanel.cpp
    trunk/sources/factory/elementfactory.h
    trunk/sources/qetgraphicsitem/conductor.cpp
    trunk/sources/qetgraphicsitem/conductor.h
    trunk/sources/qetgraphicsitem/conductortextitem.cpp
    trunk/sources/qetgraphicsitem/crossrefitem.cpp
    trunk/sources/qetgraphicsitem/crossrefitem.h
    trunk/sources/qetgraphicsitem/customelement.cpp
    trunk/sources/qetgraphicsitem/customelement.h
    trunk/sources/qetgraphicsitem/diagramimageitem.cpp
    trunk/sources/qetgraphicsitem/diagramimageitem.h
    trunk/sources/qetgraphicsitem/diagramtextitem.cpp
    trunk/sources/qetgraphicsitem/diagramtextitem.h
    trunk/sources/qetgraphicsitem/element.cpp
    trunk/sources/qetgraphicsitem/element.h
    trunk/sources/qetgraphicsitem/elementtextitem.h
    trunk/sources/qetgraphicsitem/independenttextitem.h
    trunk/sources/qetgraphicsitem/masterelement.cpp
    trunk/sources/qetgraphicsitem/masterelement.h
    trunk/sources/qetgraphicsitem/qetgraphicsitem.cpp
    trunk/sources/qetgraphicsitem/qetgraphicsitem.h
    trunk/sources/qetgraphicsitem/qetshapeitem.h
    trunk/sources/qetgraphicsitem/reportelement.cpp
    trunk/sources/qetgraphicsitem/slaveelement.cpp
    trunk/sources/ui/elementselectorwidget.cpp
    trunk/sources/ui/elementselectorwidget.h
    trunk/sources/ui/linksingleelementwidget.cpp
    trunk/sources/ui/linksingleelementwidget.h
    trunk/sources/ui/masterpropertieswidget.h

Modified: trunk/sources/conductorautonumerotation.cpp
===================================================================
--- trunk/sources/conductorautonumerotation.cpp	2014-07-19 15:41:05 UTC (rev 3223)
+++ trunk/sources/conductorautonumerotation.cpp	2014-07-21 20:44:32 UTC (rev 3224)
@@ -19,6 +19,7 @@
 #include "conductorautonumerotationwidget.h"
 #include "diagramcommands.h"
 #include "numerotationcontextcommands.h"
+#include "qetdiagrameditor.h"
 
 /**
  *Constructor

Modified: trunk/sources/conductorprofile.cpp
===================================================================
--- trunk/sources/conductorprofile.cpp	2014-07-19 15:41:05 UTC (rev 3223)
+++ trunk/sources/conductorprofile.cpp	2014-07-21 20:44:32 UTC (rev 3224)
@@ -18,6 +18,7 @@
 #include "conductorprofile.h"
 #include "qetgraphicsitem/conductor.h"
 #include "conductorsegmentprofile.h"
+#include "terminal.h"
 
 /// Constructeur
 ConductorProfile::ConductorProfile() {

Modified: trunk/sources/diagram.cpp
===================================================================
--- trunk/sources/diagram.cpp	2014-07-19 15:41:05 UTC (rev 3223)
+++ trunk/sources/diagram.cpp	2014-07-21 20:44:32 UTC (rev 3224)
@@ -33,6 +33,7 @@
 #include "qetapp.h"
 #include "qetgraphicsitem/diagramimageitem.h"
 #include "qetgraphicsitem/qetshapeitem.h"
+#include "terminal.h"
 
 const int   Diagram::xGrid  = 10;
 const int   Diagram::yGrid  = 10;

Modified: trunk/sources/diagramcommands.h
===================================================================
--- trunk/sources/diagramcommands.h	2014-07-19 15:41:05 UTC (rev 3223)
+++ trunk/sources/diagramcommands.h	2014-07-21 20:44:32 UTC (rev 3224)
@@ -25,6 +25,7 @@
 #include "titleblockproperties.h"
 #include "qet.h"
 #include "qetgraphicsitem/qetshapeitem.h"
+#include "conductorprofile.h"
 class Diagram;
 class DiagramTextItem;
 class Element;

Modified: trunk/sources/elementscollectioncache.cpp
===================================================================
--- trunk/sources/elementscollectioncache.cpp	2014-07-19 15:41:05 UTC (rev 3223)
+++ trunk/sources/elementscollectioncache.cpp	2014-07-21 20:44:32 UTC (rev 3224)
@@ -20,6 +20,8 @@
 #include "elementscategory.h"
 #include "elementdefinition.h"
 #include "factory/elementfactory.h"
+#include "element.h"
+#include <QImageWriter>
 
 /**
 	Construct a cache for elements collections.

Modified: trunk/sources/elementspanel.cpp
===================================================================
--- trunk/sources/elementspanel.cpp	2014-07-19 15:41:05 UTC (rev 3223)
+++ trunk/sources/elementspanel.cpp	2014-07-21 20:44:32 UTC (rev 3224)
@@ -27,6 +27,7 @@
 #include "qeticons.h"
 #include "templatescollection.h"
 #include "treecoloranimation.h"
+#include "element.h"
 
 /*
 	Lorsque le flag ENABLE_PANEL_DND_CHECKS est defini, le panel d'elements

Modified: trunk/sources/factory/elementfactory.h
===================================================================
--- trunk/sources/factory/elementfactory.h	2014-07-19 15:41:05 UTC (rev 3223)
+++ trunk/sources/factory/elementfactory.h	2014-07-21 20:44:32 UTC (rev 3224)
@@ -19,7 +19,10 @@
 #define ELEMENTFACTORY_H
 
 #include <QMutex>
-#include "qetgraphicsitem/element.h"
+class Element;
+class ElementsLocation;
+class QGraphicsItem;
+class Diagram;
 
 /**
  * @brief The ElementFactory class

Modified: trunk/sources/qetgraphicsitem/conductor.cpp
===================================================================
--- trunk/sources/qetgraphicsitem/conductor.cpp	2014-07-19 15:41:05 UTC (rev 3223)
+++ trunk/sources/qetgraphicsitem/conductor.cpp	2014-07-21 20:44:32 UTC (rev 3224)
@@ -24,6 +24,8 @@
 #include "diagram.h"
 #include "diagramcommands.h"
 #include "conductorautonumerotation.h"
+#include "qetdiagrameditor.h"
+#include "terminal.h"
 #define PR(x) qDebug() << #x " = " << x;
 
 bool Conductor::pen_and_brush_initialized = false;

Modified: trunk/sources/qetgraphicsitem/conductor.h
===================================================================
--- trunk/sources/qetgraphicsitem/conductor.h	2014-07-19 15:41:05 UTC (rev 3223)
+++ trunk/sources/qetgraphicsitem/conductor.h	2014-07-21 20:44:32 UTC (rev 3224)
@@ -17,14 +17,17 @@
 */
 #ifndef CONDUCTOR_H
 #define CONDUCTOR_H
-#include <QtGui>
-#include "terminal.h"
-#include "conductorprofile.h"
+
 #include "conductorproperties.h"
-#include "qetdiagrameditor.h"
+
+class ConductorProfile;
+class ConductorSegmentProfile;
+class Diagram;
+class Terminal;
 class ConductorSegment;
 class ConductorTextItem;
 class Element;
+class QETDiagramEditor;
 typedef QPair<QPointF, Qt::Corner> ConductorBend;
 typedef QHash<Qt::Corner, ConductorProfile> ConductorProfilesGroup;
 /**

Modified: trunk/sources/qetgraphicsitem/conductortextitem.cpp
===================================================================
--- trunk/sources/qetgraphicsitem/conductortextitem.cpp	2014-07-19 15:41:05 UTC (rev 3223)
+++ trunk/sources/qetgraphicsitem/conductortextitem.cpp	2014-07-21 20:44:32 UTC (rev 3224)
@@ -18,6 +18,7 @@
 #include "conductortextitem.h"
 #include "conductor.h"
 #include "diagramcommands.h"
+#include "diagram.h"
 
 /**
 	Constructeur

Modified: trunk/sources/qetgraphicsitem/crossrefitem.cpp
===================================================================
--- trunk/sources/qetgraphicsitem/crossrefitem.cpp	2014-07-19 15:41:05 UTC (rev 3223)
+++ trunk/sources/qetgraphicsitem/crossrefitem.cpp	2014-07-21 20:44:32 UTC (rev 3224)
@@ -20,6 +20,7 @@
 #include "qetapp.h"
 #include "diagramposition.h"
 #include "elementtextitem.h"
+#include "diagram.h"
 
 //define the height of the header.
 #define header 5

Modified: trunk/sources/qetgraphicsitem/crossrefitem.h
===================================================================
--- trunk/sources/qetgraphicsitem/crossrefitem.h	2014-07-19 15:41:05 UTC (rev 3223)
+++ trunk/sources/qetgraphicsitem/crossrefitem.h	2014-07-21 20:44:32 UTC (rev 3224)
@@ -18,10 +18,12 @@
 #ifndef CROSSREFITEM_H
 #define CROSSREFITEM_H
 
-#include "qetgraphicsitem/qetgraphicsitem.h"
+#include <QGraphicsObject>
 #include"properties/xrefproperties.h"
-class element;
+#include <QPicture>
 
+class Element;
+
 /**
  * @brief The CrossRefItem class
  * This clas provide an item, for show the cross reference, like the contacts linked to a coil.

Modified: trunk/sources/qetgraphicsitem/customelement.cpp
===================================================================
--- trunk/sources/qetgraphicsitem/customelement.cpp	2014-07-19 15:41:05 UTC (rev 3223)
+++ trunk/sources/qetgraphicsitem/customelement.cpp	2014-07-21 20:44:32 UTC (rev 3224)
@@ -22,6 +22,7 @@
 #include "partline.h"
 #include "elementdefinition.h"
 #include <iostream>
+#include "terminal.h"
 
 /**
 	Constructeur de la classe CustomElement. Permet d'instancier un element

Modified: trunk/sources/qetgraphicsitem/customelement.h
===================================================================
--- trunk/sources/qetgraphicsitem/customelement.h	2014-07-19 15:41:05 UTC (rev 3223)
+++ trunk/sources/qetgraphicsitem/customelement.h	2014-07-21 20:44:32 UTC (rev 3224)
@@ -18,11 +18,13 @@
 #ifndef CUSTOM_ELEMENT_H
 #define CUSTOM_ELEMENT_H
 #include "fixedelement.h"
-#include <QtGui>
 #include "nameslist.h"
 #include "elementslocation.h"
+#include <QPicture>
+
 class ElementTextItem;
 class Terminal;
+
 /**
 	This class represents an electrical element; it may be used like a fixed
 	element, the difference being that the CustomElement reads its description

Modified: trunk/sources/qetgraphicsitem/diagramimageitem.cpp
===================================================================
--- trunk/sources/qetgraphicsitem/diagramimageitem.cpp	2014-07-19 15:41:05 UTC (rev 3223)
+++ trunk/sources/qetgraphicsitem/diagramimageitem.cpp	2014-07-21 20:44:32 UTC (rev 3224)
@@ -17,6 +17,7 @@
 */
 #include "diagramimageitem.h"
 #include "diagramcommands.h"
+#include "diagram.h"
 
 /**
  * @brief DiagramImageItem::DiagramImageItem

Modified: trunk/sources/qetgraphicsitem/diagramimageitem.h
===================================================================
--- trunk/sources/qetgraphicsitem/diagramimageitem.h	2014-07-19 15:41:05 UTC (rev 3223)
+++ trunk/sources/qetgraphicsitem/diagramimageitem.h	2014-07-21 20:44:32 UTC (rev 3224)
@@ -17,9 +17,12 @@
 */
 #ifndef DIAGRAM_IMAGE_ITEM_H
 #define DIAGRAM_IMAGE_ITEM_H
-#include <QtGui>
+
 #include "qetgraphicsitem.h"
 
+class QDomElement;
+class QDomDocument;
+
 /**
 	This class represents a selectable, movable and editable image on a
 	diagram.

Modified: trunk/sources/qetgraphicsitem/diagramtextitem.cpp
===================================================================
--- trunk/sources/qetgraphicsitem/diagramtextitem.cpp	2014-07-19 15:41:05 UTC (rev 3223)
+++ trunk/sources/qetgraphicsitem/diagramtextitem.cpp	2014-07-21 20:44:32 UTC (rev 3224)
@@ -19,8 +19,8 @@
 #include "diagramcommands.h"
 #include "qet.h"
 #include "qetapp.h"
-
 #include "richtext/richtexteditor_p.h"
+#include "diagram.h"
 
 /**
 	Constructeur

Modified: trunk/sources/qetgraphicsitem/diagramtextitem.h
===================================================================
--- trunk/sources/qetgraphicsitem/diagramtextitem.h	2014-07-19 15:41:05 UTC (rev 3223)
+++ trunk/sources/qetgraphicsitem/diagramtextitem.h	2014-07-21 20:44:32 UTC (rev 3224)
@@ -17,8 +17,13 @@
 */
 #ifndef DIAGRAM_TEXT_ITEM_H
 #define DIAGRAM_TEXT_ITEM_H
-#include <QtGui>
-#include "diagram.h"
+
+#include <QGraphicsTextItem>
+
+class Diagram;
+class QDomElement;
+class QDomDocument;
+
 /**
 	This class represents a selectable, movable and editable text field on a
 	diagram.

Modified: trunk/sources/qetgraphicsitem/element.cpp
===================================================================
--- trunk/sources/qetgraphicsitem/element.cpp	2014-07-19 15:41:05 UTC (rev 3223)
+++ trunk/sources/qetgraphicsitem/element.cpp	2014-07-21 20:44:32 UTC (rev 3224)
@@ -25,6 +25,7 @@
 #include <ui/elementpropertieswidget.h>
 #include "elementprovider.h"
 #include "diagramposition.h"
+#include "terminal.h"
 
 /**
 	Constructeur pour un element sans scene ni parent

Modified: trunk/sources/qetgraphicsitem/element.h
===================================================================
--- trunk/sources/qetgraphicsitem/element.h	2014-07-19 15:41:05 UTC (rev 3223)
+++ trunk/sources/qetgraphicsitem/element.h	2014-07-21 20:44:32 UTC (rev 3224)
@@ -17,14 +17,17 @@
 */
 #ifndef ELEMENT_H
 #define ELEMENT_H
-#include <QtGui>
-#include "terminal.h"
+
+#include "qet.h"
 #include "qetgraphicsitem.h"
-#include <QUuid>
+#include "diagramcontext.h"
+
 class Diagram;
 class ElementTextItem;
+class QETProject;
+class Terminal;
+class Conductor;
 
-
 /**
 	This is the base class for electrical elements.
 */

Modified: trunk/sources/qetgraphicsitem/elementtextitem.h
===================================================================
--- trunk/sources/qetgraphicsitem/elementtextitem.h	2014-07-19 15:41:05 UTC (rev 3223)
+++ trunk/sources/qetgraphicsitem/elementtextitem.h	2014-07-21 20:44:32 UTC (rev 3224)
@@ -17,10 +17,12 @@
 */
 #ifndef ELEMENT_TEXT_ITEM_H
 #define ELEMENT_TEXT_ITEM_H
+
 #include "diagramtextitem.h"
-#include <QtXml>
+
 class Diagram;
 class Element;
+
 /**
 	This class represents a text item attached to an element. Users can change its
 	value, adjust its position (defined relatively to its parent element), and

Modified: trunk/sources/qetgraphicsitem/independenttextitem.h
===================================================================
--- trunk/sources/qetgraphicsitem/independenttextitem.h	2014-07-19 15:41:05 UTC (rev 3223)
+++ trunk/sources/qetgraphicsitem/independenttextitem.h	2014-07-21 20:44:32 UTC (rev 3224)
@@ -17,8 +17,9 @@
 */
 #ifndef INDEPENDENT_TEXT_ITEM_H
 #define INDEPENDENT_TEXT_ITEM_H
-#include <QtGui>
+
 #include "diagramtextitem.h"
+
 /**
 	This class represents an independent text field on a particular diagram.
 	It may be moved, edited, and rotated.

Modified: trunk/sources/qetgraphicsitem/masterelement.cpp
===================================================================
--- trunk/sources/qetgraphicsitem/masterelement.cpp	2014-07-19 15:41:05 UTC (rev 3223)
+++ trunk/sources/qetgraphicsitem/masterelement.cpp	2014-07-21 20:44:32 UTC (rev 3224)
@@ -16,6 +16,7 @@
 	along with QElectroTech.  If not, see <http://www.gnu.org/licenses/>.
 */
 #include "masterelement.h"
+#include "crossrefitem.h"
 
 /**
  * @brief MasterElement::MasterElement

Modified: trunk/sources/qetgraphicsitem/masterelement.h
===================================================================
--- trunk/sources/qetgraphicsitem/masterelement.h	2014-07-19 15:41:05 UTC (rev 3223)
+++ trunk/sources/qetgraphicsitem/masterelement.h	2014-07-21 20:44:32 UTC (rev 3224)
@@ -19,8 +19,9 @@
 #define MASTERELEMENT_H
 
 #include "customelement.h"
-#include "crossrefitem.h"
 
+class CrossRefItem;
+
 class MasterElement : public CustomElement
 {
 	Q_OBJECT

Modified: trunk/sources/qetgraphicsitem/qetgraphicsitem.cpp
===================================================================
--- trunk/sources/qetgraphicsitem/qetgraphicsitem.cpp	2014-07-19 15:41:05 UTC (rev 3223)
+++ trunk/sources/qetgraphicsitem/qetgraphicsitem.cpp	2014-07-21 20:44:32 UTC (rev 3224)
@@ -16,6 +16,7 @@
 	along with QElectroTech.  If not, see <http://www.gnu.org/licenses/>.
 */
 #include "qetgraphicsitem.h"
+#include "diagram.h"
 
 /**
  * @brief QetGraphicsItem::QetGraphicsItem Default constructor

Modified: trunk/sources/qetgraphicsitem/qetgraphicsitem.h
===================================================================
--- trunk/sources/qetgraphicsitem/qetgraphicsitem.h	2014-07-19 15:41:05 UTC (rev 3223)
+++ trunk/sources/qetgraphicsitem/qetgraphicsitem.h	2014-07-21 20:44:32 UTC (rev 3224)
@@ -18,8 +18,10 @@
 #ifndef QETGRAPHICSITEM_H
 #define QETGRAPHICSITEM_H
 
-#include "diagram.h"
+#include <QGraphicsObject>
 
+class Diagram;
+
 class QetGraphicsItem : public QGraphicsObject {
 	Q_OBJECT
 
@@ -29,7 +31,7 @@
 	virtual ~QetGraphicsItem() = 0;
 
 	//public methode
-	Diagram* diagram() const;
+	Diagram * diagram() const;
 	virtual void setPos(const QPointF &p);
 	virtual void setPos(qreal x, qreal y);
 	virtual void rotateBy(const qreal &);

Modified: trunk/sources/qetgraphicsitem/qetshapeitem.h
===================================================================
--- trunk/sources/qetgraphicsitem/qetshapeitem.h	2014-07-19 15:41:05 UTC (rev 3223)
+++ trunk/sources/qetgraphicsitem/qetshapeitem.h	2014-07-21 20:44:32 UTC (rev 3224)
@@ -20,6 +20,9 @@
 
 #include "qetgraphicsitem.h"
 
+class QDomElement;
+class QDomDocument;
+
 /**
  * @brief The QetShapeItem class
  * this class is used to draw a basic shape (line, rectangle, ellipse)

Modified: trunk/sources/qetgraphicsitem/reportelement.cpp
===================================================================
--- trunk/sources/qetgraphicsitem/reportelement.cpp	2014-07-19 15:41:05 UTC (rev 3223)
+++ trunk/sources/qetgraphicsitem/reportelement.cpp	2014-07-21 20:44:32 UTC (rev 3224)
@@ -19,6 +19,7 @@
 #include "elementtextitem.h"
 #include "diagramposition.h"
 #include "qetproject.h"
+#include "diagram.h"
 
 ReportElement::ReportElement(const ElementsLocation &location, QString link_type,QGraphicsItem *qgi, Diagram *s, int *state) :
 	CustomElement(location, qgi, s, state)

Modified: trunk/sources/qetgraphicsitem/slaveelement.cpp
===================================================================
--- trunk/sources/qetgraphicsitem/slaveelement.cpp	2014-07-19 15:41:05 UTC (rev 3223)
+++ trunk/sources/qetgraphicsitem/slaveelement.cpp	2014-07-21 20:44:32 UTC (rev 3224)
@@ -19,6 +19,7 @@
 #include "diagramposition.h"
 #include "qetapp.h"
 #include "elementtextitem.h"
+#include "diagram.h"
 
 /**
  * @brief SlaveElement::SlaveElement

Modified: trunk/sources/ui/elementselectorwidget.cpp
===================================================================
--- trunk/sources/ui/elementselectorwidget.cpp	2014-07-19 15:41:05 UTC (rev 3223)
+++ trunk/sources/ui/elementselectorwidget.cpp	2014-07-21 20:44:32 UTC (rev 3224)
@@ -19,6 +19,8 @@
 #include "ui_elementselectorwidget.h"
 #include "diagramposition.h"
 #include "qeticons.h"
+#include "diagram.h"
+#include "element.h"
 
 /**
  * @brief ElementSelectorWidget::ElementSelectorWidget

Modified: trunk/sources/ui/elementselectorwidget.h
===================================================================
--- trunk/sources/ui/elementselectorwidget.h	2014-07-19 15:41:05 UTC (rev 3223)
+++ trunk/sources/ui/elementselectorwidget.h	2014-07-21 20:44:32 UTC (rev 3224)
@@ -19,7 +19,8 @@
 #define ELEMENTSELECTORWIDGET_H
 
 #include <QWidget>
-#include "qetgraphicsitem/element.h"
+class Element;
+class QSignalMapper;
 
 namespace Ui {
 	class ElementSelectorWidget;

Modified: trunk/sources/ui/linksingleelementwidget.cpp
===================================================================
--- trunk/sources/ui/linksingleelementwidget.cpp	2014-07-19 15:41:05 UTC (rev 3223)
+++ trunk/sources/ui/linksingleelementwidget.cpp	2014-07-21 20:44:32 UTC (rev 3224)
@@ -18,9 +18,9 @@
 #include "linksingleelementwidget.h"
 #include "ui_linksingleelementwidget.h"
 #include "diagram.h"
-#include "element.h"
 #include "elementprovider.h"
 #include "diagramcommands.h"
+#include "elementselectorwidget.h"
 
 /**
  * @brief LinkSingleElementWidget::LinkSingleElementWidget

Modified: trunk/sources/ui/linksingleelementwidget.h
===================================================================
--- trunk/sources/ui/linksingleelementwidget.h	2014-07-19 15:41:05 UTC (rev 3223)
+++ trunk/sources/ui/linksingleelementwidget.h	2014-07-21 20:44:32 UTC (rev 3224)
@@ -19,10 +19,11 @@
 #define LINKSINGLEELEMENTWIDGET_H
 
 #include <QWidget>
-#include "elementselectorwidget.h"
+#include "element.h"
 
-class Element;
 class Diagram;
+class QLineEdit;
+class ElementSelectorWidget;
 
 namespace Ui {
 	class LinkSingleElementWidget;

Modified: trunk/sources/ui/masterpropertieswidget.h
===================================================================
--- trunk/sources/ui/masterpropertieswidget.h	2014-07-19 15:41:05 UTC (rev 3223)
+++ trunk/sources/ui/masterpropertieswidget.h	2014-07-21 20:44:32 UTC (rev 3224)
@@ -19,8 +19,10 @@
 #define MASTERPROPERTIESWIDGET_H
 
 #include <QWidget>
-#include <qetgraphicsitem/element.h>
+#include "element.h"
 
+class QListWidgetItem;
+
 namespace Ui {
 	class MasterPropertiesWidget;
 }


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/