Improvement: Use anticipate class declaration instead of include header

git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@3224 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
blacksun
2014-07-21 20:44:32 +00:00
parent 3d96244949
commit 08cf153ea8
34 changed files with 80 additions and 26 deletions

View File

@@ -19,6 +19,7 @@
#include "conductorautonumerotationwidget.h"
#include "diagramcommands.h"
#include "numerotationcontextcommands.h"
#include "qetdiagrameditor.h"
/**
*Constructor

View File

@@ -18,6 +18,7 @@
#include "conductorprofile.h"
#include "qetgraphicsitem/conductor.h"
#include "conductorsegmentprofile.h"
#include "terminal.h"
/// Constructeur
ConductorProfile::ConductorProfile() {

View File

@@ -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;

View File

@@ -25,6 +25,7 @@
#include "titleblockproperties.h"
#include "qet.h"
#include "qetgraphicsitem/qetshapeitem.h"
#include "conductorprofile.h"
class Diagram;
class DiagramTextItem;
class Element;

View File

@@ -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.

View File

@@ -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

View File

@@ -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

View File

@@ -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;

View File

@@ -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;
/**

View File

@@ -18,6 +18,7 @@
#include "conductortextitem.h"
#include "conductor.h"
#include "diagramcommands.h"
#include "diagram.h"
/**
Constructeur

View File

@@ -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

View File

@@ -18,9 +18,11 @@
#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

View File

@@ -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

View File

@@ -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

View File

@@ -17,6 +17,7 @@
*/
#include "diagramimageitem.h"
#include "diagramcommands.h"
#include "diagram.h"
/**
* @brief DiagramImageItem::DiagramImageItem

View File

@@ -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.

View File

@@ -19,8 +19,8 @@
#include "diagramcommands.h"
#include "qet.h"
#include "qetapp.h"
#include "richtext/richtexteditor_p.h"
#include "diagram.h"
/**
Constructeur

View File

@@ -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.

View File

@@ -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

View File

@@ -17,13 +17,16 @@
*/
#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.

View File

@@ -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

View File

@@ -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.

View File

@@ -16,6 +16,7 @@
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
*/
#include "masterelement.h"
#include "crossrefitem.h"
/**
* @brief MasterElement::MasterElement

View File

@@ -19,7 +19,8 @@
#define MASTERELEMENT_H
#include "customelement.h"
#include "crossrefitem.h"
class CrossRefItem;
class MasterElement : public CustomElement
{

View File

@@ -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

View File

@@ -18,7 +18,9 @@
#ifndef QETGRAPHICSITEM_H
#define QETGRAPHICSITEM_H
#include "diagram.h"
#include <QGraphicsObject>
class Diagram;
class QetGraphicsItem : public QGraphicsObject {
Q_OBJECT

View File

@@ -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)

View File

@@ -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)

View File

@@ -19,6 +19,7 @@
#include "diagramposition.h"
#include "qetapp.h"
#include "elementtextitem.h"
#include "diagram.h"
/**
* @brief SlaveElement::SlaveElement

View File

@@ -19,6 +19,8 @@
#include "ui_elementselectorwidget.h"
#include "diagramposition.h"
#include "qeticons.h"
#include "diagram.h"
#include "element.h"
/**
* @brief ElementSelectorWidget::ElementSelectorWidget

View File

@@ -19,7 +19,8 @@
#define ELEMENTSELECTORWIDGET_H
#include <QWidget>
#include "qetgraphicsitem/element.h"
class Element;
class QSignalMapper;
namespace Ui {
class ElementSelectorWidget;

View File

@@ -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

View File

@@ -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;

View File

@@ -19,7 +19,9 @@
#define MASTERPROPERTIESWIDGET_H
#include <QWidget>
#include <qetgraphicsitem/element.h>
#include "element.h"
class QListWidgetItem;
namespace Ui {
class MasterPropertiesWidget;