mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-19 23:20:52 +01:00
Wrap code for better readability
This commit is contained in:
committed by
Laurent Trinques
parent
41b0434c20
commit
430bcae946
@@ -167,11 +167,19 @@ class Diagram : public QGraphicsScene
|
|||||||
|
|
||||||
// methods related to XML import/export
|
// methods related to XML import/export
|
||||||
QDomDocument toXml(bool = true);
|
QDomDocument toXml(bool = true);
|
||||||
bool initFromXml(QDomElement &, QPointF = QPointF(), bool = true, DiagramContent * = nullptr);
|
bool initFromXml(QDomElement &, QPointF = QPointF(),
|
||||||
bool fromXml(QDomDocument &, QPointF = QPointF(), bool = true, DiagramContent * = nullptr);
|
bool = true, DiagramContent * = nullptr);
|
||||||
bool fromXml(QDomElement &, QPointF = QPointF(), bool = true, DiagramContent * = nullptr);
|
bool fromXml(QDomDocument &, QPointF = QPointF(),
|
||||||
void folioSequentialsToXml(QHash<QString, QStringList>*, QDomElement *, const QString&, const QString&, QDomDocument *);
|
bool = true, DiagramContent * = nullptr);
|
||||||
void folioSequentialsFromXml(const QDomElement&, QHash<QString, QStringList>*, const QString&, const QString&, const QString&, const QString&);
|
bool fromXml(QDomElement &, QPointF = QPointF(),
|
||||||
|
bool = true, DiagramContent * = nullptr);
|
||||||
|
void folioSequentialsToXml(QHash<QString, QStringList>*,
|
||||||
|
QDomElement *, const QString&,
|
||||||
|
const QString&, QDomDocument *);
|
||||||
|
void folioSequentialsFromXml(const QDomElement&, QHash<QString,
|
||||||
|
QStringList>*, const QString&,
|
||||||
|
const QString&, const QString&,
|
||||||
|
const QString&);
|
||||||
|
|
||||||
void refreshContents();
|
void refreshContents();
|
||||||
|
|
||||||
@@ -196,7 +204,8 @@ class Diagram : public QGraphicsScene
|
|||||||
void setDrawColoredConductors(bool);
|
void setDrawColoredConductors(bool);
|
||||||
|
|
||||||
QString title() const;
|
QString title() const;
|
||||||
bool toPaintDevice(QPaintDevice &, int = -1, int = -1, Qt::AspectRatioMode = Qt::KeepAspectRatio);
|
bool toPaintDevice(QPaintDevice &, int = -1, int = -1,
|
||||||
|
Qt::AspectRatioMode = Qt::KeepAspectRatio);
|
||||||
QSize imageSize() const;
|
QSize imageSize() const;
|
||||||
|
|
||||||
bool isEmpty() const;
|
bool isEmpty() const;
|
||||||
@@ -225,16 +234,22 @@ class Diagram : public QGraphicsScene
|
|||||||
void setFreezeNewConductors(bool);
|
void setFreezeNewConductors(bool);
|
||||||
bool freezeNewConductors();
|
bool freezeNewConductors();
|
||||||
|
|
||||||
//methods related to insertion and loading of folio sequential
|
//methods related to insertion and loading of folio sequential
|
||||||
void insertFolioSeqHash (QHash<QString, QStringList> *hash, const QString& title, const QString& seq, NumerotationContext *nc);
|
void insertFolioSeqHash (QHash<QString, QStringList> *hash,
|
||||||
void loadFolioSeqHash (QHash<QString, QStringList> *hash, const QString& title, const QString& seq, NumerotationContext *nc);
|
const QString& title,
|
||||||
|
const QString& seq,
|
||||||
|
NumerotationContext *nc);
|
||||||
|
void loadFolioSeqHash (QHash<QString, QStringList> *hash,
|
||||||
|
const QString& title, const QString& seq,
|
||||||
|
NumerotationContext *nc);
|
||||||
void changeZValue(QET::DepthOption option);
|
void changeZValue(QET::DepthOption option);
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void adjustSceneRect ();
|
void adjustSceneRect ();
|
||||||
void titleChanged(const QString &);
|
void titleChanged(const QString &);
|
||||||
void titleBlockTemplateChanged(const QString &);
|
void titleBlockTemplateChanged(const QString &);
|
||||||
void titleBlockTemplateRemoved(const QString &, const QString & = QString());
|
void titleBlockTemplateRemoved(const QString &,
|
||||||
|
const QString & = QString());
|
||||||
void setTitleBlockTemplate(const QString &);
|
void setTitleBlockTemplate(const QString &);
|
||||||
void updateLabels();
|
void updateLabels();
|
||||||
void loadElmtFolioSeq();
|
void loadElmtFolioSeq();
|
||||||
@@ -249,15 +264,24 @@ class Diagram : public QGraphicsScene
|
|||||||
void showDiagram (Diagram *);
|
void showDiagram (Diagram *);
|
||||||
void usedTitleBlockTemplateChanged(const QString &);
|
void usedTitleBlockTemplateChanged(const QString &);
|
||||||
void diagramTitleChanged(Diagram *, const QString &);
|
void diagramTitleChanged(Diagram *, const QString &);
|
||||||
void findElementRequired(const ElementsLocation &); /// Signal emitted when users wish to locate an element from the diagram within elements collection
|
|
||||||
void editElementRequired(const ElementsLocation &); /// Signal emitted when users wish to edit an element from the diagram
|
/// Signal emitted when users wish to locate an element
|
||||||
|
/// from the diagram within elements collection
|
||||||
|
void findElementRequired(const ElementsLocation &);
|
||||||
|
|
||||||
|
/// Signal emitted when users wish to edit an element from the diagram
|
||||||
|
void editElementRequired(const ElementsLocation &);
|
||||||
|
|
||||||
void diagramActivated();
|
void diagramActivated();
|
||||||
};
|
};
|
||||||
Q_DECLARE_METATYPE(Diagram *)
|
Q_DECLARE_METATYPE(Diagram *)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Display or hide the conductor setter, i.e. a dashed conductor stub which appears when creating a conductor between two terminals.
|
@brief Diagram::setConductor
|
||||||
@param pf true pour ajouter le poseur de conducteur, false pour l'enlever
|
Display or hide the conductor setter,
|
||||||
|
i.e. a dashed conductor stub which appears
|
||||||
|
when creating a conductor between two terminals.
|
||||||
|
@param adding true add conductor ,false remove conductor
|
||||||
*/
|
*/
|
||||||
inline void Diagram::setConductor(bool adding) {
|
inline void Diagram::setConductor(bool adding) {
|
||||||
if (adding) {
|
if (adding) {
|
||||||
@@ -337,8 +361,10 @@ inline void Diagram::setBorderOptions(Diagram::BorderOptions bo) {
|
|||||||
*/
|
*/
|
||||||
inline Diagram::BorderOptions Diagram::borderOptions() {
|
inline Diagram::BorderOptions Diagram::borderOptions() {
|
||||||
BorderOptions options = EmptyBorder;
|
BorderOptions options = EmptyBorder;
|
||||||
if (border_and_titleblock.titleBlockIsDisplayed()) options = (BorderOptions)(options|TitleBlock);
|
if (border_and_titleblock.titleBlockIsDisplayed())
|
||||||
if (border_and_titleblock.columnsAreDisplayed()) options = (BorderOptions)(options|Columns);
|
options = (BorderOptions)(options|TitleBlock);
|
||||||
|
if (border_and_titleblock.columnsAreDisplayed())
|
||||||
|
options = (BorderOptions)(options|Columns);
|
||||||
return(options);
|
return(options);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -41,7 +41,9 @@ class QetGraphicsItem;
|
|||||||
template <typename QGI>
|
template <typename QGI>
|
||||||
class AddItemCommand : public QUndoCommand {
|
class AddItemCommand : public QUndoCommand {
|
||||||
public:
|
public:
|
||||||
AddItemCommand(QGI item, Diagram *diagram, const QPointF &pos = QPointF(), QUndoCommand *parent = nullptr) :
|
AddItemCommand(QGI item, Diagram *diagram,
|
||||||
|
const QPointF &pos = QPointF(),
|
||||||
|
QUndoCommand *parent = nullptr) :
|
||||||
QUndoCommand (parent),
|
QUndoCommand (parent),
|
||||||
m_item (item),
|
m_item (item),
|
||||||
m_diagram (diagram),
|
m_diagram (diagram),
|
||||||
|
|||||||
Reference in New Issue
Block a user