mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-01-10 07:59:58 +01:00
correct more indentations / whitespace
This commit is contained in:
@@ -1765,29 +1765,29 @@ void Conductor::setSequenceNum(const autonum::sequentialNumbers& sn)
|
||||
*/
|
||||
void Conductor::setUpConnectionForFormula(QString old_formula, QString new_formula)
|
||||
{
|
||||
Diagram *diagram_ {diagram()};
|
||||
if (!diagram_) {
|
||||
diagram_ = terminal1->diagram();
|
||||
}
|
||||
if (diagram_)
|
||||
Diagram *diagram_ {diagram()};
|
||||
if (!diagram_) {
|
||||
diagram_ = terminal1->diagram();
|
||||
}
|
||||
if (diagram_)
|
||||
{
|
||||
//Because the variable %F is a reference to another text which can contain variables,
|
||||
//we must replace %F by the real text, to check if the real text contains the variable %id
|
||||
if (old_formula.contains("%F"))
|
||||
old_formula.replace("%F", diagram_->border_and_titleblock.folio());
|
||||
old_formula.replace("%F", diagram_->border_and_titleblock.folio());
|
||||
|
||||
if (old_formula.contains("%id"))
|
||||
disconnect(diagram_->project(), &QETProject::projectDiagramsOrderChanged, this, &Conductor::refreshText);
|
||||
disconnect(diagram_->project(), &QETProject::projectDiagramsOrderChanged, this, &Conductor::refreshText);
|
||||
|
||||
//Label is frozen, so we don't update it.
|
||||
if (m_freeze_label == true)
|
||||
return;
|
||||
|
||||
if (new_formula.contains("%F"))
|
||||
new_formula.replace("%F", diagram_->border_and_titleblock.folio());
|
||||
new_formula.replace("%F", diagram_->border_and_titleblock.folio());
|
||||
|
||||
if (new_formula.contains("%id"))
|
||||
connect(diagram_->project(), &QETProject::projectDiagramsOrderChanged, this, &Conductor::refreshText);
|
||||
connect(diagram_->project(), &QETProject::projectDiagramsOrderChanged, this, &Conductor::refreshText);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -137,7 +137,7 @@ class Conductor : public QGraphicsObject
|
||||
{return m_autoNum_seq;}
|
||||
void setSequenceNum(const autonum::sequentialNumbers& sn);
|
||||
|
||||
QList<QPointF> junctions() const;
|
||||
QList<QPointF> junctions() const;
|
||||
|
||||
private:
|
||||
void setUpConnectionForFormula(
|
||||
@@ -227,7 +227,7 @@ class Conductor : public QGraphicsObject
|
||||
static int getCoeff(const qreal &, const qreal &);
|
||||
static int getSign(const qreal &);
|
||||
QHash<ConductorSegmentProfile *, qreal> shareOffsetBetweenSegments(const qreal &offset, const QList<ConductorSegmentProfile *> &, const qreal & = 0.01) const;
|
||||
static QPointF extendTerminal(const QPointF &, Qet::Orientation, qreal = 10);
|
||||
static QPointF extendTerminal(const QPointF &, Qet::Orientation, qreal = 10);
|
||||
static Qt::Corner movementType(const QPointF &, const QPointF &);
|
||||
static QPointF movePointIntoPolygon(const QPointF &, const QPainterPath &);
|
||||
};
|
||||
|
||||
@@ -427,17 +427,17 @@ bool Element::buildFromXml(const QDomElement &xml_def_elmt, int *state)
|
||||
return(false);
|
||||
}
|
||||
|
||||
//Check if the current version can read the xml description
|
||||
const auto elmt_version = QetVersion::fromXmlAttribute(xml_def_elmt);
|
||||
if (!elmt_version.isNull()
|
||||
&& QetVersion::currentVersion() < elmt_version)
|
||||
{
|
||||
std::cerr << qPrintable(
|
||||
QObject::tr("Avertissement : l'élément "
|
||||
" a été enregistré avec une version"
|
||||
" ultérieure de QElectroTech.")
|
||||
) << std::endl;
|
||||
}
|
||||
//Check if the current version can read the xml description
|
||||
const auto elmt_version = QetVersion::fromXmlAttribute(xml_def_elmt);
|
||||
if (!elmt_version.isNull()
|
||||
&& QetVersion::currentVersion() < elmt_version)
|
||||
{
|
||||
std::cerr << qPrintable(
|
||||
QObject::tr("Avertissement : l'élément "
|
||||
" a été enregistré avec une version"
|
||||
" ultérieure de QElectroTech.")
|
||||
) << std::endl;
|
||||
}
|
||||
|
||||
//This attribute must be present and valid
|
||||
int w = 0, h = 0, hot_x = 0, hot_y = 0;
|
||||
|
||||
Reference in New Issue
Block a user