mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-01-02 01:40:52 +01:00
fix compile issues
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user