131 void wheelEvent (QGraphicsSceneWheelEvent *event)
override;
160 QDomDocument
toXml(
bool =
true);
164 void folioSequentialsToXml(QHash<QString, QStringList>*, QDomElement *,
const QString&,
const QString&, QDomDocument *);
165 void folioSequentialsFromXml(
const QDomElement&, QHash<QString, QStringList>*,
const QString&,
const QString&,
const QString&,
const QString&);
170 virtual void addItem (QGraphicsItem *item);
171 virtual void removeItem (QGraphicsItem *item);
189 QString
title()
const;
190 bool toPaintDevice(QPaintDevice &,
int = -1,
int = -1, Qt::AspectRatioMode = Qt::KeepAspectRatio);
253 inline
void Diagram::setConductor(
bool adding) {
255 if (!conductor_setter_ -> scene()) addItem(conductor_setter_);
257 if (conductor_setter_ -> scene()) removeItem(conductor_setter_);
void setTitleBlockTemplate(const QString &)
void showDiagram(Diagram *)
static int yGrid
ordinate grid step size
void displayColumns(bool)
void setDisplayGrid(bool)
void setProject(QETProject *)
Diagram::setProject Set parent project of this diagram, project also become the parent QObject of thi...
void changeZValue(QET::DepthOption option)
Diagram::changeZValue Change the Z value of the current selected item, according to ...
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...
ElementTextsMover m_element_texts_mover
void adjustSceneRect()
Diagram::adjustSceneRect Recalcul and adjust the size of the scene.
void setConductorsAutonumName(const QString &name)
Diagram::setConductorsAutonumName.
QHash< QString, QStringList > m_cnd_unitfolio_max
Hash containing max values for folio sequential autonums in this diagram.
void folioSequentialsToXml(QHash< QString, QStringList > *, QDomElement *, const QString &, const QString &, QDomDocument *)
Diagram::folioSequentialsToXml.
static const qreal margin
margin around the diagram
void diagramActivated()
Signal emitted when users wish to edit an element from the diagram.
bool m_freeze_new_elements
bool usesTitleBlockTemplate(const QString &)
QHash< QString, QStringList > m_cnd_hundredfolio_max
void titleChanged(const QString &)
QSet< Conductor * > selectedConductors() const
QHash< QString, QStringList > m_cnd_tenfolio_max
void setDrawTerminals(bool)
QHash< QString, QStringList > m_elmt_unitfolio_max
Hash containing max values for folio sequential autonums in this diagram.
void mouseMoveEvent(QGraphicsSceneMouseEvent *event) override
Diagram::mouseMoveEvent This event is managed by diagram event interface if any.
static int yKeyGridFine
Key grid fine y step size.
bool isReadOnly() const
Diagram::isReadOnly.
NumerotationType
Represents available option of Numerotation type.
void freezeElements(bool freeze)
Diagram::freezeElements Freeze every existent element label.
void displayTitleBlock(bool)
QList< Conductor * > conductors() const
Diagram::conductors Return the list containing all conductors.
qreal diagram_qet_version_
Diagram(QETProject *project)
Diagram::Diagram Constructor.
void editElementRequired(const ElementsLocation &)
Signal emitted when users wish to locate an element from the diagram within elements collection...
bool draw_colored_conductors_
BorderOptions borderOptions()
static int xGrid
abscissa grid step size
QList< QSet< Conductor * > > potentials()
Diagram::potential.
bool drawTerminals() const
QDomDocument toXml(bool=true)
void usedTitleBlockTemplateChanged(const QString &)
DiagramEventInterface * m_event_interface
ElementsMover & elementsMover()
ElementTextsMover & elementTextsMover()
void titleBlockTemplateChanged(const QString &)
void setConductorStop(QPointF)
virtual void removeItem(QGraphicsItem *item)
Diagram::removeItem Réimplemented from QGraphicsScene::removeItem(QGraphicsItem *item) Do some specif...
bool initFromXml(QDomElement &, QPointF=QPointF(), bool=true, DiagramContent *=nullptr)
static int xKeyGridFine
Key grid fine x step size.
QString conductorsAutonumName() const
Diagram::conductorsAutonumName.
qreal declaredQElectroTechVersion(bool=true) const
bool columnsAreDisplayed() const
bool freezeNewConductors()
Diagram::freezeNewConductors.
ExportProperties applyProperties(const ExportProperties &)
QGIManager & qgiManager()
QGraphicsLineItem * conductor_setter_
bool toPaintDevice(QPaintDevice &, int=-1, int=-1, Qt::AspectRatioMode=Qt::KeepAspectRatio)
void mouseReleaseEvent(QGraphicsSceneMouseEvent *event) override
Diagram::mouseReleaseEvent This event is managed by diagram event interface if any.
DepthOption
List the various kind of changes for the zValue.
static int yKeyGrid
Key grid y step size.
void setEventInterface(DiagramEventInterface *event_interface)
Diagram::setEventInterface Set event_interface has current interface. Diagram become the ownership of...
DiagramContent content() const
DiagramPosition convertPosition(const QPointF &)
void updateLabels()
Diagram::updateLabels Update elements and conductors that reference folio field in their labels...
bool drawColoredConductors() const
void freezeConductors(bool freeze)
Diagram::freezeConductors Freeze every existent conductor label.
bool titleBlockIsDisplayed() const
void keyReleaseEvent(QKeyEvent *) override
Diagram::keyReleaseEvent This event is managed by diagram event interface if any. Else move selected ...
void keyPressEvent(QKeyEvent *event) override
Diagram::keyPressEvent This event is managed by diagram event interface if any. Else move selected el...
void setDrawColoredConductors(bool)
QString m_conductors_autonum_name
static QColor background_color
background color of diagram
void drawBackground(QPainter *, const QRectF &) override
void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event) override
Diagram::mouseDoubleClickEvent This event is managed by diagram event interface if any...
bool fromXml(QDomDocument &, QPointF=QPointF(), bool=true, DiagramContent *=nullptr)
bool freezeNewElements()
Diagram::freezeNewElements.
QHash< QString, QStringList > m_elmt_hundredfolio_max
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...
bool m_freeze_new_conductors_
static QPointF snapToGrid(const QPointF &p)
Diagram::snapToGrid Return a nearest snap point of p.
QGIManager * qgi_manager_
QHash< QString, QStringList > m_elmt_tenfolio_max
static bool clipboardMayContainDiagram()
void unfreezeElements()
Diagram::unfreezeElements Unfreeze every existent element label.
void diagramTitleChanged(Diagram *, const QString &)
static int xKeyGrid
Key grid x step size.
void setFreezeNewElements(bool)
Diagram::freezeNewElements Set new element label to be frozen.
ElementsMover m_elements_mover
The DiagramEventInterface class isRunning() return true if action is running (do something). By default return false.
void loadCndFolioSeq()
Diagram::loadCndFolioSeq This class loads all conductor folio sequential variables related to the cur...
QList< Element * > elements() const
void findElementRequired(const ElementsLocation &)
void setConductorStart(QPointF)
void loadElmtFolioSeq()
Diagram::loadElmtFolioSeq This class loads all folio sequential variables related to the current auto...
void setBorderOptions(BorderOptions)
void setFreezeNewConductors(bool)
Diagram::setfreezeNewConductors Set new conductor label to be frozen.
virtual void addItem(QGraphicsItem *item)
Diagram::addItem Réimplemented from QGraphicsScene::addItem(QGraphicsItem *item) Do some specific ope...
QDomDocument xml_document_
~Diagram() override
Diagram::~Diagram Destructor.
Q_DECLARE_METATYPE(NamesList)
void refreshContents()
Diagram::refreshContents refresh all content of diagram.
void clearEventInterface()
Diagram::clearEventInterface Clear the current event interface.
BorderTitleBlock border_and_titleblock
Diagram dimensions and title block.
void titleBlockTemplateRemoved(const QString &, const QString &=QString())
QETProject * project() const
void folioSequentialsFromXml(const QDomElement &, QHash< QString, QStringList > *, const QString &, const QString &, const QString &, const QString &)
Diagram::folioSequentialsFromXml Load folio sequential from QDomElement.
bool canRotateSelection() const
Diagram::canRotateSelection.
ConductorProperties defaultConductorProperties
Default properties for new conductors.
void mousePressEvent(QGraphicsSceneMouseEvent *event) override
Diagram::mousePressEvent This event is managed by diagram event interface if any. ...
void wheelEvent(QGraphicsSceneWheelEvent *event) override
Diagram::wheelEvent This event is managed by diagram event interface if any.
bool usesElement(const ElementsLocation &)