mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-17 12:40:35 +01:00
fix compile issues
This commit is contained in:
@@ -167,7 +167,7 @@ void BorderProperties::toSettings(QSettings &settings, const QString &prefix) co
|
||||
\~ @param prefix : prefix to be added before the names of the parameters
|
||||
\~French prefixe a ajouter devant les noms des parametres
|
||||
*/
|
||||
void BorderProperties::fromSettings(const QSettings &settings, const QString &prefix) {
|
||||
void BorderProperties::fromSettings(QSettings &settings, const QString &prefix) {
|
||||
columns_count = settings.value(prefix + "cols", columns_count).toInt();
|
||||
columns_width = qRound(settings.value(prefix + "colsize", columns_width).toDouble());
|
||||
display_columns = settings.value(prefix + "displaycols", display_columns).toBool();
|
||||
|
||||
@@ -40,8 +40,8 @@ class BorderProperties : public PropertiesInterface {
|
||||
QDomElement toXml(QDomDocument &dom_doc) const override;
|
||||
bool fromXml(const QDomElement &) override;
|
||||
static bool valideXml(QDomElement& e);
|
||||
void toSettings(QSettings &, const QString & = QString()) const;
|
||||
void fromSettings(QSettings &, const QString & = QString());
|
||||
void toSettings(QSettings &, const QString & = QString()) const override;
|
||||
void fromSettings(QSettings &, const QString & = QString()) override;
|
||||
|
||||
static BorderProperties defaultProperties();
|
||||
|
||||
|
||||
@@ -391,16 +391,6 @@ bool ConductorProperties::fromXml(const QDomElement &e)
|
||||
propertyDouble(e, "horizrotatetext", &horiz_rotate_text);
|
||||
|
||||
QMetaEnum me = QMetaEnum::fromType<Qt::Alignment>();
|
||||
e.attribute(
|
||||
"horizontal-alignment",
|
||||
"AlignBottom"
|
||||
).toStdString().data()));
|
||||
m_vertical_alignment = Qt::Alignment(
|
||||
me.keyToValue(
|
||||
e.attribute(
|
||||
"vertical-alignment",
|
||||
"AlignRight"
|
||||
).toStdString().data()));
|
||||
|
||||
QString alinment_temp;
|
||||
if (propertyString(e, "horizontal-alignment", &alinment_temp) == PropertyFlags::Success)
|
||||
@@ -475,7 +465,7 @@ void ConductorProperties::toSettings(QSettings &settings, const QString &prefix)
|
||||
@param settings Parametres a lire
|
||||
@param prefix prefixe a ajouter devant les noms des parametres
|
||||
*/
|
||||
void ConductorProperties::fromSettings(const QSettings &settings, const QString &prefix)
|
||||
void ConductorProperties::fromSettings(QSettings &settings, const QString &prefix)
|
||||
{
|
||||
QColor settings_color = QColor(settings.value(prefix + "color").toString());
|
||||
color = (settings_color.isValid()? settings_color : QColor(Qt::black));
|
||||
|
||||
@@ -100,12 +100,11 @@ class ConductorProperties: public PropertiesInterface
|
||||
m_bus,
|
||||
m_cable;
|
||||
|
||||
int text_size{9},
|
||||
text_size,
|
||||
int text_size{9},
|
||||
m_dash_size = 1;
|
||||
|
||||
double cond_size{1},
|
||||
cond_size,
|
||||
double
|
||||
cond_size{1},
|
||||
verti_rotate_text,
|
||||
horiz_rotate_text;
|
||||
|
||||
@@ -114,8 +113,7 @@ class ConductorProperties: public PropertiesInterface
|
||||
m_bicolor = false;
|
||||
|
||||
Qt::Alignment
|
||||
m_horizontal_alignment = Qt::AlignBottom,
|
||||
m_horizontal_alignment = Qt::AlignBottom,
|
||||
m_horizontal_alignment = Qt::AlignBottom,
|
||||
m_vertical_alignment = Qt::AlignRight;
|
||||
|
||||
Qt::PenStyle style{Qt::PenStyle::SolidLine};
|
||||
@@ -126,8 +124,8 @@ class ConductorProperties: public PropertiesInterface
|
||||
QDomElement toXml(QDomDocument &doc) const override;
|
||||
bool fromXml(const QDomElement &) override;
|
||||
static bool valideXml(QDomElement& element);
|
||||
void toSettings(QSettings &, const QString & = QString()) const;
|
||||
void fromSettings(QSettings &, const QString & = QString());
|
||||
void toSettings(QSettings &, const QString & = QString()) const override;
|
||||
void fromSettings(QSettings &, const QString & = QString()) override;
|
||||
static QString typeToString(ConductorType);
|
||||
void applyForEqualAttributes(QList<ConductorProperties> list);
|
||||
|
||||
|
||||
@@ -987,7 +987,7 @@ void Diagram::folioSequentialsToXml(QHash<QString,
|
||||
QDomElement folioseq = doc->createElement(type);
|
||||
folioseq.setAttribute("title", i.key());
|
||||
for (int j = 0; j < i.value().size(); j++) {
|
||||
folioseq.setAttribute(seq_type + QString::number(j+1), i.value().at(j));
|
||||
folioseq.setAttribute(seq_type + QString::number(j+1),
|
||||
i.value().at(j));
|
||||
}
|
||||
domElement->appendChild(folioseq);
|
||||
@@ -1090,7 +1090,7 @@ bool Diagram::initFromXml(QDomElement &document,
|
||||
@return
|
||||
*/
|
||||
Terminal* findTerminal(int conductor_index,
|
||||
QDomElement& f,
|
||||
QDomElement& conductor,
|
||||
QHash<int,
|
||||
Terminal *>& table_adr_id,
|
||||
QList<Element *>& added_elements) {
|
||||
|
||||
@@ -209,10 +209,8 @@ void DiagramContext::toSettings(QSettings &settings, const QString &array_name)
|
||||
Read this context properties from \a settings by running through the array
|
||||
named \a array_name.
|
||||
*/
|
||||
void DiagramContext::fromSettings(const QSettings &settings, const QString &array_name) {
|
||||
void DiagramContext::fromSettings(QSettings &settings, const QString &array_name) {
|
||||
int size = settings.beginReadArray(array_name);
|
||||
QSettings& s = const_cast<QSettings&>(settings);
|
||||
int size = s.beginReadArray(array_name);
|
||||
for (int i = 0 ; i < size; ++ i) {
|
||||
settings.setArrayIndex(i);
|
||||
QString key = settings.value("name").toString();
|
||||
|
||||
@@ -102,7 +102,7 @@ void PartArc::paint(QPainter *painter, const QStyleOptionGraphicsItem *options,
|
||||
@param xml_document : Xml document to use for create the xml element.
|
||||
@return : an xml element that describe this arc
|
||||
*/
|
||||
QDomElement PartArc::toXml(QDomDocument &xml_document) const {
|
||||
QDomElement PartArc::toXml(QDomDocument &xml_document) const
|
||||
{
|
||||
QDomElement xml_element = xml_document.createElement("arc");
|
||||
QPointF top_left(sceneTopLeft());
|
||||
|
||||
@@ -54,6 +54,8 @@ class PartArc : public AbstractPartEllipse
|
||||
QDomElement toXml (QDomDocument &) const override;
|
||||
bool fromXml (const QDomElement &) override;
|
||||
static bool valideXml(QDomElement& element);
|
||||
void toSettings(QSettings &,const QString & = QString()) const override {/*TODO: implement*/}
|
||||
void fromSettings(QSettings &,const QString & = QString()) override{/*TODO: implement*/}
|
||||
|
||||
QPainterPath shape() const override;
|
||||
QPainterPath shadowShape() const override;
|
||||
|
||||
@@ -157,15 +157,13 @@ QDomElement PartDynamicTextField::toXml(QDomDocument &dom_doc) const
|
||||
@param dom_elmt
|
||||
*/
|
||||
bool PartDynamicTextField::fromXml(const QDomElement &dom_elmt)
|
||||
{
|
||||
if (dom_elmt.tagName() != xmlName()) {
|
||||
qDebug() << "PartDynamicTextField::fromXml : Wrong tagg name";
|
||||
return false;
|
||||
}
|
||||
|
||||
double x=0, y=0, z=0, rot=0;
|
||||
dom_elmt.attribute("y", QString::number(0)).toDouble()
|
||||
);
|
||||
|
||||
if (propertyDouble(dom_elmt, "x", &x) == PropertyFlags::NoValidConversion ||
|
||||
propertyDouble(dom_elmt, "y", &y) == PropertyFlags::NoValidConversion ||
|
||||
propertyDouble(dom_elmt, "z", &z) == PropertyFlags::NoValidConversion ||
|
||||
@@ -183,7 +181,6 @@ bool PartDynamicTextField::fromXml(const QDomElement &dom_elmt)
|
||||
font_.fromString(font);
|
||||
setFont(font_);
|
||||
} else { //Keep compatibility TODO remove in futur
|
||||
else {
|
||||
#if TODO_LIST
|
||||
#pragma message("@TODO remove in futur")
|
||||
#endif
|
||||
|
||||
@@ -79,6 +79,8 @@ class PartDynamicTextField : public QGraphicsTextItem, public CustomElementPart
|
||||
bool fromXml(const QDomElement &dom_elmt) override;
|
||||
void fromTextFieldXml(const QDomElement &dom_element);
|
||||
static bool valideXml(QDomElement& dom_elmt);
|
||||
void toSettings(QSettings &,const QString & = QString()) const override {/*TODO: implement*/}
|
||||
void fromSettings(QSettings &,const QString & = QString()) override{/*TODO: implement*/}
|
||||
|
||||
DynamicElementTextItem::TextFrom textFrom() const;
|
||||
void setTextFrom (DynamicElementTextItem::TextFrom text_from);
|
||||
|
||||
@@ -55,6 +55,8 @@ class PartEllipse : public AbstractPartEllipse
|
||||
QDomElement toXml (QDomDocument &) const override;
|
||||
bool fromXml (const QDomElement &) override;
|
||||
static bool valideXml(QDomElement& element);
|
||||
void toSettings(QSettings &,const QString & = QString()) const override {/*TODO: implement*/}
|
||||
void fromSettings(QSettings &,const QString & = QString()) override{/*TODO: implement*/}
|
||||
QPainterPath shape() const override;
|
||||
QPainterPath shadowShape() const override;
|
||||
void setRect(const QRectF &rect) override {AbstractPartEllipse::setRect(rect); adjusteHandlerPos();}
|
||||
|
||||
@@ -73,6 +73,8 @@ class PartLine : public CustomElementGraphicPart
|
||||
QDomElement toXml(QDomDocument &) const override;
|
||||
bool fromXml(const QDomElement &) override;
|
||||
bool valideXml(QDomElement& element) const;
|
||||
void toSettings(QSettings &,const QString & = QString()) const override {/*TODO: implement*/}
|
||||
void fromSettings(QSettings &,const QString & = QString()) override{/*TODO: implement*/}
|
||||
virtual QPointF sceneP1() const;
|
||||
virtual QPointF sceneP2() const;
|
||||
QPainterPath shape() const override;
|
||||
|
||||
@@ -64,6 +64,8 @@ class PartPolygon : public CustomElementGraphicPart
|
||||
bool fromXml(const QDomElement &) override;
|
||||
QDomElement toXml(QDomDocument &) const override;
|
||||
static bool valideXml(QDomElement& element);
|
||||
void toSettings(QSettings &,const QString & = QString()) const override {/*TODO: implement*/}
|
||||
void fromSettings(QSettings &,const QString & = QString()) override{/*TODO: implement*/}
|
||||
|
||||
|
||||
QPainterPath shape () const override;
|
||||
|
||||
@@ -63,6 +63,8 @@ class PartRectangle : public CustomElementGraphicPart
|
||||
QDomElement toXml (QDomDocument &) const override;
|
||||
bool fromXml (const QDomElement &) override;
|
||||
static bool valideXml(QDomElement& element);
|
||||
void toSettings(QSettings &,const QString & = QString()) const override {/*TODO: implement*/}
|
||||
void fromSettings(QSettings &,const QString & = QString()) override{/*TODO: implement*/}
|
||||
|
||||
QRectF rect() const;
|
||||
void setRect(const QRectF &rect);
|
||||
|
||||
@@ -56,6 +56,8 @@ class PartTerminal : public CustomElementGraphicPart {
|
||||
bool fromXml(const QDomElement &) override;
|
||||
QDomElement toXml(QDomDocument &) const override;
|
||||
static bool valideXml(QDomElement& element);
|
||||
void toSettings(QSettings &,const QString & = QString()) const override {/*TODO: implement*/}
|
||||
void fromSettings(QSettings &,const QString & = QString()) override{/*TODO: implement*/}
|
||||
void paint(
|
||||
QPainter *painter,
|
||||
const QStyleOptionGraphicsItem *,
|
||||
|
||||
@@ -67,6 +67,7 @@ PartText::~PartText()
|
||||
@param xml_element Element XML a lire
|
||||
*/
|
||||
bool PartText::fromXml(const QDomElement &xml_element)
|
||||
{
|
||||
int size;
|
||||
QString font;
|
||||
|
||||
|
||||
@@ -60,6 +60,8 @@ class PartText : public QGraphicsTextItem, public CustomElementPart {
|
||||
QString xmlName() const override { return(QString("text")); }
|
||||
bool fromXml(const QDomElement &) override;
|
||||
static bool valideXml(QDomElement& element);
|
||||
void toSettings(QSettings &,const QString & = QString()) const override {/*TODO: implement*/}
|
||||
void fromSettings(QSettings &,const QString & = QString()) override{/*TODO: implement*/}
|
||||
QDomElement toXml(QDomDocument &) const override;
|
||||
void setRotation(qreal angle) {(QGraphicsObject::setRotation(QET::correctAngle(angle)));}
|
||||
bool isUseless() const override;
|
||||
|
||||
@@ -16,8 +16,9 @@
|
||||
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include "propertiesinterface.h"
|
||||
#include <QDebug>
|
||||
|
||||
|
||||
/*!
|
||||
* Available property types
|
||||
*/
|
||||
namespace {
|
||||
|
||||
@@ -43,8 +43,8 @@ class PropertiesInterface
|
||||
befor the name of each paramètre
|
||||
@param QString
|
||||
*/
|
||||
virtual void toSettings (QSettings &settings,
|
||||
const QString = QString()) const =0;
|
||||
virtual void toSettings(QSettings &,
|
||||
const QString & = QString()) const =0;
|
||||
/**
|
||||
@brief fromSettings
|
||||
load properties to setting file.
|
||||
@@ -52,8 +52,8 @@ class PropertiesInterface
|
||||
befor the name of each paramètre
|
||||
@param QString
|
||||
*/
|
||||
virtual void fromSettings (const QSettings &settings,
|
||||
const QString = QString()) =0;
|
||||
virtual void fromSettings(QSettings &,
|
||||
const QString & = QString()) = 0;
|
||||
/**
|
||||
@brief toXml
|
||||
Save properties to xml element
|
||||
|
||||
@@ -41,7 +41,7 @@ void TerminalData::setParent(QGraphicsObject* parent)
|
||||
@param settings UNUSED
|
||||
@param prefix UNUSED
|
||||
*/
|
||||
void TerminalData::toSettings(QSettings &settings, const QString prefix) const
|
||||
void TerminalData::toSettings(QSettings &settings, const QString &prefix) const
|
||||
|
||||
{
|
||||
Q_UNUSED(settings);
|
||||
@@ -56,7 +56,7 @@ void TerminalData::toSettings(QSettings &settings, const QString prefix) const
|
||||
@param settings UNUSED
|
||||
@param prefix UNUSED
|
||||
*/
|
||||
void TerminalData::fromSettings(const QSettings &settings, const QString prefix)
|
||||
void TerminalData::fromSettings(QSettings &settings, const QString& prefix)
|
||||
{
|
||||
Q_UNUSED(settings);
|
||||
Q_UNUSED(prefix);
|
||||
@@ -134,8 +134,7 @@ bool TerminalData::fromXml (const QDomElement &xml_element) // RETURNS True
|
||||
|
||||
// read the orientation of the terminal
|
||||
// lit l'orientation de la borne
|
||||
m_orientation = Qet::orientationFromString(
|
||||
xml_element.attribute("orientation"));
|
||||
m_orientation = orientationFromString(o);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -27,9 +27,9 @@ class TerminalData : public PropertiesInterface
|
||||
|
||||
void setParent(QGraphicsObject* parent);
|
||||
void toSettings(QSettings &settings,
|
||||
const QString prefix = QString()) const override;
|
||||
void toSettings(QSettings &settings, const QString& = QString()) const override;
|
||||
void fromSettings(const QSettings &settings, const QString& = QString()) override;
|
||||
const QString& prefix = QString()) const override;
|
||||
void fromSettings(QSettings &settings,
|
||||
const QString& = QString()) override;
|
||||
QDomElement toXml(QDomDocument &xml_element) const override;
|
||||
bool fromXml(const QDomElement &xml_element) override;
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ XRefProperties::XRefProperties()
|
||||
@param prefix: prefix before properties name
|
||||
*/
|
||||
void XRefProperties::toSettings(QSettings &settings,
|
||||
const QString prefix) const
|
||||
const QString &prefix) const
|
||||
{
|
||||
settings.setValue(prefix + "showpowerctc", m_show_power_ctc);
|
||||
QString display = m_display == Cross? "cross" : "contacts";
|
||||
@@ -65,8 +65,8 @@ void XRefProperties::toSettings(QSettings &settings,
|
||||
@param settings: QSettings to use
|
||||
@param prefix: prefix before properties name
|
||||
*/
|
||||
void XRefProperties::fromSettings(const QSettings &settings,
|
||||
const QString prefix)
|
||||
void XRefProperties::fromSettings(QSettings &settings,
|
||||
const QString &prefix)
|
||||
{
|
||||
m_show_power_ctc = settings.value(prefix + "showpowerctc", true).toBool();
|
||||
QString display = settings.value(prefix + "displayhas", "cross").toString();
|
||||
@@ -147,7 +147,7 @@ bool XRefProperties::fromXml(const QDomElement &xml_element) {
|
||||
propertyString(xml_element, "slave_label", &m_slave_label);
|
||||
QString value;
|
||||
foreach (QString key, m_prefix_keys) {
|
||||
if (!propertyString(xml_element, key + "prefix", &value));
|
||||
if (!propertyString(xml_element, key + "prefix", &value))
|
||||
m_prefix.insert(key, value);
|
||||
}
|
||||
return true;
|
||||
|
||||
@@ -42,10 +42,9 @@ class XRefProperties : public PropertiesInterface
|
||||
Label
|
||||
};
|
||||
|
||||
void toSettings (QSettings &settings, const QString& = QString()) const override;
|
||||
void fromSettings (const QSettings &settings, const QString& = QString()) override;
|
||||
void fromSettings (const QSettings &settings,
|
||||
const QString = QString()) override;
|
||||
void toSettings (QSettings &settings, const QString& = QString()) const override;
|
||||
void fromSettings (QSettings &settings,
|
||||
const QString& = QString()) override;
|
||||
QDomElement toXml (QDomDocument &xml_document) const override;
|
||||
bool fromXml(const QDomElement &xml_element) override;
|
||||
|
||||
|
||||
@@ -987,6 +987,7 @@ bool Conductor::fromXml(const QDomElement &dom_element)
|
||||
}
|
||||
|
||||
// does not support legacy method
|
||||
/*!
|
||||
@brief Conductor::toXml
|
||||
Exporte les caracteristiques du conducteur sous forme d'une element XML.
|
||||
@param dom_document :
|
||||
@@ -995,6 +996,7 @@ bool Conductor::fromXml(const QDomElement &dom_element)
|
||||
Hash stockant les correspondances entre les ids des
|
||||
bornes dans le document XML et leur adresse en memoire
|
||||
@return Un element XML representant le conducteur
|
||||
*/
|
||||
QDomElement Conductor::toXml(QDomDocument & doc) const {
|
||||
QDomElement dom_element = doc.createElement("conductor");
|
||||
|
||||
|
||||
@@ -102,8 +102,9 @@ class Conductor : public QGraphicsObject, public PropertiesInterface
|
||||
public:
|
||||
static bool valideXml (QDomElement &);
|
||||
bool fromXml (const QDomElement &) override;
|
||||
//QDomElement toXml (QDomDocument &, QHash<Terminal *, int> &) const;
|
||||
QDomElement toXml (QDomDocument &doc) const override;
|
||||
void toSettings(QSettings &, const QString & = QString()) const override {}
|
||||
void fromSettings(QSettings &, const QString & = QString()) override {}
|
||||
private:
|
||||
bool pathFromXml(const QDomElement &);
|
||||
|
||||
|
||||
@@ -539,13 +539,12 @@ bool Element::buildFromXml(const QDomElement &xml_def_elmt, int *state)
|
||||
m_state = QET::GIOK;
|
||||
return(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (state)
|
||||
*state = 0;
|
||||
m_state = QET::GIOK;
|
||||
return(true);
|
||||
}
|
||||
|
||||
if (state)
|
||||
*state = 0;
|
||||
m_state = QET::GIOK;
|
||||
return(true);
|
||||
}
|
||||
|
||||
/**
|
||||
@brief Element::parseElement
|
||||
@@ -709,8 +708,7 @@ bool Element::valideXml(QDomElement &e) {
|
||||
*/
|
||||
bool Element::fromXml(
|
||||
QDomElement &e,
|
||||
QHash<int,
|
||||
Terminal *> &table_id_adr)
|
||||
QHash<int, Terminal *> &table_id_adr)
|
||||
{
|
||||
m_state = QET::GILoadingFromXml;
|
||||
/*
|
||||
@@ -778,7 +776,7 @@ bool Element::fromXml(
|
||||
}
|
||||
// copie des associations id / adr
|
||||
foreach(int id_trouve, priv_id_adr.keys()) {
|
||||
table_id_adr.insert(id_trouve, priv_id_adr.value(id_trouve));
|
||||
table_id_adr.insert(id_trouve,
|
||||
priv_id_adr.value(id_trouve));
|
||||
}
|
||||
}
|
||||
@@ -1078,6 +1076,7 @@ bool Element::fromXml(
|
||||
}
|
||||
|
||||
QPointF pos = deti->pos();
|
||||
// TODO: check
|
||||
if (m_link_type !=PreviousReport
|
||||
|| m_link_type !=NextReport)
|
||||
{
|
||||
@@ -1182,9 +1181,7 @@ bool Element::fromXml(
|
||||
\~French L'element XML representant cet element electrique
|
||||
*/
|
||||
QDomElement Element::toXml(
|
||||
QDomDocument &document,
|
||||
QHash<Terminal *,
|
||||
int> &table_adr_id) const
|
||||
QDomDocument &document) const
|
||||
{
|
||||
QDomElement element = document.createElement("element");
|
||||
|
||||
@@ -1211,7 +1208,6 @@ QDomElement Element::toXml(
|
||||
element.setAttribute("z", QString::number(this->zValue()));
|
||||
element.setAttribute("orientation", QString::number(orientation()));
|
||||
|
||||
* recupere le premier id a utiliser pour les bornes de cet element */
|
||||
// registration of device terminals
|
||||
// enregistrement des bornes de l'appareil
|
||||
QDomElement xml_terminals = document.createElement("terminals");
|
||||
|
||||
@@ -130,7 +130,7 @@ class Element : public QetGraphicsItem // TODO: derive from propertiesInterface!
|
||||
QPoint hotspot() const;
|
||||
void editProperty() override;
|
||||
static bool valideXml(QDomElement &);
|
||||
virtual bool fromXml(QDomElement &, QHash<int, Terminal *> &, bool = false);
|
||||
virtual bool fromXml(QDomElement &, QHash<int, Terminal *> &);
|
||||
virtual QDomElement toXml(QDomDocument &) const;
|
||||
QUuid uuid() const;
|
||||
int orientation() const;
|
||||
|
||||
@@ -209,6 +209,7 @@ void Terminal::setNumber(QString number)
|
||||
@param hiddenName : bool
|
||||
*/
|
||||
void Terminal::setName(QString name, bool hiddenName)
|
||||
{
|
||||
d->m_name = std::move(name);
|
||||
name_terminal_hidden = hiddenName;
|
||||
}
|
||||
@@ -798,7 +799,7 @@ QDomElement Terminal::toXml(QDomDocument &doc) const
|
||||
@param terminal Le QDomElement a analyser
|
||||
@return true si le QDomElement passe en parametre est une borne, false sinon
|
||||
*/
|
||||
bool Terminal::valideXml(const QDomElement &terminal) {
|
||||
bool Terminal::valideXml(const QDomElement &terminal)
|
||||
{
|
||||
if (terminal.tagName() != "terminal") return(false);
|
||||
|
||||
|
||||
@@ -100,6 +100,9 @@ class Terminal : public QGraphicsObject, public PropertiesInterface
|
||||
bool fromXml (const QDomElement &) override;
|
||||
QDomElement toXml (QDomDocument &) const override;
|
||||
|
||||
void toSettings(QSettings &,const QString & = QString()) const override {/*TODO: implement*/}
|
||||
void fromSettings(QSettings &,const QString & = QString()) override{/*TODO: implement*/}
|
||||
|
||||
protected:
|
||||
// methods related to events management
|
||||
void hoverEnterEvent (QGraphicsSceneHoverEvent *) override;
|
||||
@@ -132,7 +135,7 @@ class Terminal : public QGraphicsObject, public PropertiesInterface
|
||||
QGraphicsLineItem *m_help_line_a{nullptr};
|
||||
|
||||
|
||||
TerminalData* d;
|
||||
TerminalData* d{nullptr};
|
||||
|
||||
/// Parent electrical element
|
||||
Element *parent_element_{nullptr};
|
||||
@@ -185,7 +188,7 @@ inline QString Terminal::number() const
|
||||
return(number_terminal_);
|
||||
}
|
||||
|
||||
{
|
||||
|
||||
QList<Terminal *> relatedPotentialTerminal (const Terminal *terminal,
|
||||
const bool all_diagram = true);
|
||||
|
||||
|
||||
@@ -171,7 +171,7 @@ void TitleBlockProperties::toSettings(QSettings &settings, const QString &prefix
|
||||
@param settings Parametres a lire
|
||||
@param prefix prefixe a ajouter devant les noms des parametres
|
||||
*/
|
||||
void TitleBlockProperties::fromSettings(const QSettings &settings, const QString &prefix) {
|
||||
void TitleBlockProperties::fromSettings(QSettings &settings, const QString &prefix) {
|
||||
title = settings.value(prefix + "title").toString();
|
||||
author = settings.value(prefix + "author").toString();
|
||||
filename = settings.value(prefix + "filename").toString();
|
||||
|
||||
@@ -45,7 +45,7 @@ class TitleBlockProperties: public PropertiesInterface {
|
||||
void toXml(QDomElement &e) const;
|
||||
bool fromXml(const QDomElement &) override;
|
||||
void toSettings(QSettings &, const QString & = QString()) const override;
|
||||
void fromSettings(const QSettings &, const QString & = QString()) override;
|
||||
void fromSettings(QSettings &, const QString & = QString()) override;
|
||||
|
||||
void setAutoPageNum(QString autonum) {auto_page_num = autonum;}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user