46class DiagramFolioList;
137 QGraphicsSceneMouseEvent *event)
override;
141 QGraphicsSceneMouseEvent *event)
override;
142 void wheelEvent (QGraphicsSceneWheelEvent *event)
override;
170 QDomDocument
toXml(
bool =
true);
200 virtual void addItem (QGraphicsItem *item);
201 virtual void removeItem (QGraphicsItem *item);
219 QString
title()
const;
221 Qt::AspectRatioMode = Qt::KeepAspectRatio);
252 const QString&
title,
256 const QString&
title,
const QString& seq,
265 const QString & = QString());
296inline
void Diagram::setConductor(
bool adding) {
298 if (!conductor_setter_ -> scene()) addItem(conductor_setter_);
300 if (conductor_setter_ -> scene()) removeItem(conductor_setter_);
The BorderTitleBlock class This class represents the border and the titleblock which frame a particul...
Definition bordertitleblock.h:38
bool titleBlockIsDisplayed() const
Definition bordertitleblock.h:139
void displayColumns(bool)
BorderTitleBlock::displayColumns.
Definition bordertitleblock.cpp:459
void displayTitleBlock(bool)
BorderTitleBlock::displayTitleBlock.
Definition bordertitleblock.cpp:448
bool columnsAreDisplayed() const
Definition bordertitleblock.h:143
void displayBorder(bool)
BorderTitleBlock::displayBorder.
Definition bordertitleblock.cpp:485
Definition conductor.h:43
The ConductorProperties class This class represents the functional properties of a particular conduct...
Definition conductorproperties.h:68
Definition diagramcontent.h:47
The DiagramEventInterface class isRunning() return true if action is running (do something)....
Definition diagrameventinterface.h:47
The Diagram class This class represents an electric diagram. It manages its various child elements,...
Definition diagram.h:56
DiagramPosition convertPosition(const QPointF &)
Diagram::convertPosition.
Definition diagram.cpp:2277
void setDisplayGrid(bool)
Diagram::setDisplayGrid Set whether the diagram grid should be drawn.
Definition diagram.h:329
void loadFolioSeqHash(QHash< QString, QStringList > *hash, const QString &title, const QString &seq, NumerotationContext *nc)
Diagram::loadFolioSeqHash This class loads all folio sequential variables related to the current auto...
Definition diagram.cpp:1804
bool draw_colored_conductors_
Definition diagram.h:123
ElementTextsMover m_element_texts_mover
Definition diagram.h:112
void unfreezeElements()
Diagram::unfreezeElements Unfreeze every existent element label.
Definition diagram.cpp:2165
static bool clipboardMayContainDiagram()
Diagram::clipboardMayContainDiagram.
Definition diagram.cpp:2367
QSize imageSize() const
Diagram::imageSize Allows you to know the dimensions that the image generated by the toImage() method...
Definition diagram.cpp:674
QDomDocument xml_document_
Definition diagram.h:116
virtual void removeItem(QGraphicsItem *item)
Diagram::removeItem Reimplemented from QGraphicsScene::removeItem(QGraphicsItem *item) Do some specif...
Definition diagram.cpp:1617
void freezeElements(bool freeze)
Diagram::freezeElements Freeze every existent element label.
Definition diagram.cpp:2155
void drawBackground(QPainter *, const QRectF &) override
Diagram::drawBackground Draw the background of the diagram, ie the grid.
Definition diagram.cpp:172
bool freezeNewConductors()
Diagram::freezeNewConductors.
Definition diagram.cpp:2211
ElementsMover m_elements_mover
Definition diagram.h:111
void freezeConductors(bool freeze)
Diagram::freezeConductors Freeze every existent conductor label.
Definition diagram.cpp:2193
friend QETProject
Definition diagram.h:58
bool displayGrid()
Diagram::displayGrid.
Definition diagram.h:337
void setConductorStop(QPointF)
Diagram::setConductorStop Set the end point of the conductor setter.
Definition diagram.h:320
QSet< Conductor * > selectedConductors() const
Diagram::selectedConductors.
Definition diagram.cpp:2351
void keyPressEvent(QKeyEvent *event) override
Diagram::keyPressEvent This event is managed by diagram event interface if any. Else move selected el...
Definition diagram.cpp:338
QHash< QString, QStringList > m_elmt_unitfolio_max
Hash containing max values for folio sequential autonums in this diagram.
Definition diagram.h:101
void keyReleaseEvent(QKeyEvent *) override
Diagram::keyReleaseEvent This event is managed by diagram event interface if any. Else move selected ...
Definition diagram.cpp:500
void setFreezeNewConductors(bool)
Diagram::setfreezeNewConductors Set new conductor label to be frozen.
Definition diagram.cpp:2203
DiagramEventInterface * m_event_interface
Definition diagram.h:126
void setBorderOptions(BorderOptions)
Diagram::setBorderOptions Set the rendering options for the diagram border (including rows/columns he...
Definition diagram.h:369
void setDrawTerminals(bool)
Diagram::setDrawTerminals Defines whether or not to display the terminals.
Definition diagram.cpp:2325
bool draw_grid_
Definition diagram.h:120
void setDrawColoredConductors(bool)
Diagram::setDrawColoredConductors Defines whether or not to respect the colors of the conductors....
Definition diagram.cpp:2342
void folioSequentialsToXml(QHash< QString, QStringList > *, QDomElement *, const QString &, const QString &, QDomDocument *)
Diagram::folioSequentialsToXml Add folio sequential to QDomElement.
Definition diagram.cpp:1017
void titleChanged()
Diagram::titleChanged emit(diagramTitleChanged(this, title));.
Definition diagram.cpp:1647
bool useBorder()
Diagram::useBorder.
Definition diagram.h:358
void showDiagram(Diagram *)
BorderOptions borderOptions()
Diagram::borderOptions.
Definition diagram.h:380
bool canRotateSelection() const
Diagram::canRotateSelection.
Definition diagram.cpp:2436
void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event) override
Diagram::mouseDoubleClickEvent This event is managed by diagram event interface if any.
Definition diagram.cpp:242
bool m_freeze_new_conductors_
Definition diagram.h:129
bool drawTerminals() const
Diagram::drawTerminals.
Definition diagram.h:409
void folioSequentialsFromXml(const QDomElement &, QHash< QString, QStringList > *, const QString &, const QString &, const QString &, const QString &)
Diagram::folioSequentialsFromXml Load folio sequential from QDomElement.
Definition diagram.cpp:1522
void clearEventInterface()
Diagram::clearEventInterface Clear the current event interface.
Definition diagram.cpp:573
void loadElmtFolioSeq()
Diagram::loadElmtFolioSeq This class loads all folio sequential variables related to the current auto...
Definition diagram.cpp:1901
bool toPaintDevice(QPaintDevice &, int=-1, int=-1, Qt::AspectRatioMode=Qt::KeepAspectRatio)
Definition diagram.cpp:603
bool fromXml(QDomDocument &, QPointF=QPointF(), bool=true, DiagramContent *=nullptr)
Diagram::fromXml Imports the described schema into an XML document. If a position is specified,...
Definition diagram.cpp:1070
void deselectAll()
Diagram::deselectAll Deselects all selected objects.
Definition diagram.cpp:1729
QDomDocument toXml(bool=true)
Diagram::toXml Exports all or part of the schema.
Definition diagram.cpp:747
void setUseBorder(bool)
Diagram::setUseBorder Set whether the diagram border (including rows/columns headers and the title bl...
Definition diagram.h:349
QETProject * m_project
Definition diagram.h:114
void invertSelection()
Diagram::invertSelection Reverses the selection state of all schema objects Inverse l'etat de selecti...
Definition diagram.cpp:1741
NumerotationType
Represents available option of Numerotation type.
Definition diagram.h:79
@ Conductors
Definition diagram.h:79
bool drawColoredConductors() const
Diagram::drawColoredConductors.
Definition diagram.h:418
bool usesTitleBlockTemplate(const QString &)
Diagram::usesTitleBlockTemplate.
Definition diagram.cpp:2147
static int xKeyGrid
Key grid x step size.
Definition diagram.h:89
BorderOptions
The BorderOptions enum Represents available options when rendering a particular diagram: EmptyBorder:...
Definition diagram.h:77
@ TitleBlock
Definition diagram.h:77
@ EmptyBorder
Definition diagram.h:77
@ Columns
Definition diagram.h:77
ConductorProperties defaultConductorProperties
Default properties for new conductors.
Definition diagram.h:81
void adjustSceneRect()
Diagram::adjustSceneRect Recalcul and adjust the size of the scene.
Definition diagram.cpp:2220
QList< QSet< Conductor * > > potentials()
Diagram::potential.
Definition diagram.cpp:715
QList< Conductor * > conductors() const
Diagram::conductors.
Definition diagram.cpp:2092
bool initFromXml(QDomElement &, QPointF=QPointF(), bool=true, DiagramContent *=nullptr)
Diagram::initFromXml Imports the described schema in an XML element. This method delegates its work t...
Definition diagram.cpp:1108
void mousePressEvent(QGraphicsSceneMouseEvent *event) override
Diagram::mousePressEvent This event is managed by diagram event interface if any.
Definition diagram.cpp:261
int folioIndex() const
Diagram::folioIndex.
Definition diagram.cpp:2392
static int xKeyGridFine
Key grid fine x step size.
Definition diagram.h:93
void changeZValue(QET::DepthOption option)
Diagram::changeZValue Change the Z value of the current selected item, according to option.
Definition diagram.cpp:1828
void insertFolioSeqHash(QHash< QString, QStringList > *hash, const QString &title, const QString &seq, NumerotationContext *nc)
Diagram::insertFolioSeqHash This class inserts a stringlist containing all sequential variables relat...
Definition diagram.cpp:1777
void setEventInterface(DiagramEventInterface *event_interface)
Diagram::setEventInterface Set event_interface has current interface. Diagram become the ownership of...
Definition diagram.cpp:553
ExportProperties applyProperties(const ExportProperties &)
Diagram::applyProperties This method allows you to apply new rendering options while accessing the cu...
Definition diagram.cpp:2240
qreal diagram_qet_version_
Definition diagram.h:118
QString m_conductors_autonum_name
Definition diagram.h:125
QString conductorsAutonumName() const
Diagram::conductorsAutonumName.
Definition diagram.cpp:586
void wheelEvent(QGraphicsSceneWheelEvent *event) override
Diagram::wheelEvent This event is managed by diagram event interface if any.
Definition diagram.cpp:318
QHash< QString, QStringList > m_cnd_tenfolio_max
Definition diagram.h:106
QETProject * project() const
Diagram::project.
Definition diagram.cpp:2382
void titleBlockTemplateChanged(const QString &)
Diagram::titleBlockTemplateChanged This slot may be used to inform the diagram object that the given ...
Definition diagram.cpp:1658
static int xGrid
abscissa grid step size
Definition diagram.h:85
void loadCndFolioSeq()
Diagram::loadCndFolioSeq This class loads all conductor folio sequential variables related to the cur...
Definition diagram.cpp:1987
void findElementRequired(const ElementsLocation &)
QHash< QString, QStringList > m_cnd_unitfolio_max
Hash containing max values for folio sequential autonums in this diagram.
Definition diagram.h:105
bool freezeNewElements()
Diagram::freezeNewElements.
Definition diagram.cpp:2184
DiagramContent content() const
Diagram::content.
Definition diagram.cpp:2415
void setFreezeNewElements(bool)
Diagram::freezeNewElements Set new element label to be frozen.
Definition diagram.cpp:2176
QGraphicsLineItem * conductor_setter_
Definition diagram.h:110
QGIManager * qgi_manager_
Definition diagram.h:113
QUndoStack & undoStack()
Diagram::undoStack.
Definition diagram.h:393
QUuid m_uuid
Definition diagram.h:130
void titleBlockTemplateRemoved(const QString &, const QString &=QString())
Diagram::titleBlockTemplateRemoved This slot has to be be used to inform this class that the given ti...
Definition diagram.cpp:1675
QHash< QString, QStringList > m_elmt_hundredfolio_max
Definition diagram.h:103
bool m_freeze_new_elements
Definition diagram.h:128
bool isReadOnly() const
Diagram::isReadOnly.
Definition diagram.cpp:2403
void diagramTitleChanged(Diagram *)
QUuid uuid()
Diagram::uuid.
Definition diagram.cpp:540
bool draw_terminals_
Definition diagram.h:122
static int yKeyGrid
Key grid y step size.
Definition diagram.h:91
static int yGrid
ordinate grid step size
Definition diagram.h:87
ElementsMover & elementsMover()
Diagram::elementsMover.
Definition diagram.cpp:2106
QGIManager & qgiManager()
Diagram::qgiManager.
Definition diagram.h:401
virtual void addItem(QGraphicsItem *item)
Diagram::addItem Réimplemented from QGraphicsScene::addItem(QGraphicsItem *item) Do some specific ope...
Definition diagram.cpp:1586
static QPointF snapToGrid(const QPointF &p)
Diagram::snapToGrid Return a nearest snap point of p.
Definition diagram.cpp:2294
void setConductorStart(QPointF)
Diagram::setConductorStart Set the start point of the conductor setter.
Definition diagram.h:310
BorderTitleBlock border_and_titleblock
Diagram dimensions and title block.
Definition diagram.h:83
bool isEmpty() const
Diagram::isEmpty An empty schema contains no element, conductor, or text field.
Definition diagram.cpp:704
static QColor background_color
background color of diagram
Definition diagram.h:99
friend DiagramFolioList
Definition diagram.h:57
void setConductorsAutonumName(const QString &name)
Diagram::setConductorsAutonumName.
Definition diagram.cpp:595
QHash< QString, QStringList > m_cnd_hundredfolio_max
Definition diagram.h:107
ElementTextsMover & elementTextsMover()
Diagram::elementTextsMover.
Definition diagram.cpp:2115
void setConductor(bool)
Diagram::setConductor Display or hide the conductor setter, i.e. a dashed conductor stub which appear...
Definition diagram.h:296
bool use_border_
Definition diagram.h:121
void mouseMoveEvent(QGraphicsSceneMouseEvent *event) override
Diagram::mouseMoveEvent This event is managed by diagram event interface if any.
Definition diagram.cpp:280
QHash< QString, QStringList > m_elmt_tenfolio_max
Definition diagram.h:102
void refreshContents()
Diagram::refreshContents refresh all content of diagram.
Definition diagram.cpp:1557
void usedTitleBlockTemplateChanged(const QString &)
QString title() const
Diagram::title.
Definition diagram.cpp:2069
QList< Element * > elements() const
Diagram::elements.
Definition diagram.cpp:2078
Diagram(const Diagram &diagram)
void showMe()
Definition diagram.h:160
~Diagram() override
Diagram::~Diagram Destructor.
Definition diagram.cpp:129
void mouseReleaseEvent(QGraphicsSceneMouseEvent *event) override
Diagram::mouseReleaseEvent This event is managed by diagram event interface if any.
Definition diagram.cpp:299
void setTitleBlockTemplate(const QString &)
Diagram::setTitleBlockTemplate Set the template to use to render the title block of this diagram.
Definition diagram.cpp:1692
static int yKeyGridFine
Key grid fine y step size.
Definition diagram.h:95
static const qreal margin
margin around the diagram
Definition diagram.h:97
void diagramInformationChanged()
void selectAll()
Diagram::selectAll Select all schema objects.
Definition diagram.cpp:1714
bool usesElement(const ElementsLocation &)
Diagram::usesElement Used to find out if an element is used on a schema.
Definition diagram.cpp:2131
Definition diagramimageitem.h:31
Definition diagramposition.h:28
Definition diagramtextitem.h:34
Definition elementtextsmover.h:36
The ElementsLocation class This class represents the location, the location of an element or of a cat...
Definition elementslocation.h:47
Definition elementsmover.h:41
Definition exportproperties.h:27
Definition numerotationcontext.h:31
Definition qetproject.h:62
QUndoStack * undoStack()
Definition qetproject.h:183
Definition qgimanager.h:30
The Terminal class This class represents a terminal of an electrical element, i.e....
Definition terminal.h:36
Q_DECLARE_METATYPE(NamesList)
DepthOption
List the various kind of changes for the zValue.
Definition qet.h:41