reverted some unwanted changes

This commit is contained in:
plc-user
2023-12-09 13:50:03 +01:00
parent 72092300ed
commit 74d022328e
5 changed files with 7 additions and 21 deletions

View File

@@ -217,8 +217,7 @@ void CustomElementGraphicPart::stylesToXml(QDomElement &qde) const
{HTMLYellowYellowFilling, "HTMLYellowYellow"}, {HTMLYellowYellowFilling, "HTMLYellowYellow"},
{HTMLYellowLightYellowFilling, "HTMLYellowLightYellow"}, {HTMLYellowLightYellowFilling, "HTMLYellowLightYellow"},
{HTMLYellowLemonChiffonFilling, "HTMLYellowLemonChiffon"}, {HTMLYellowLemonChiffonFilling, "HTMLYellowLemonChiffon"},
{HTMLYellowLightGoldenrodYellowFilling, {HTMLYellowLightGoldenrodYellowFilling, "HTMLYellowLightGoldenrodYellow"},
"HTMLYellowLightGoldenrodYellow"},
{HTMLYellowPapayaWhipFilling, "HTMLYellowPapayaWhip"}, {HTMLYellowPapayaWhipFilling, "HTMLYellowPapayaWhip"},
{HTMLYellowMoccasinFilling, "HTMLYellowMoccasin"}, {HTMLYellowMoccasinFilling, "HTMLYellowMoccasin"},
{HTMLYellowPeachPuffFilling, "HTMLYellowPeachPuff"}, {HTMLYellowPeachPuffFilling, "HTMLYellowPeachPuff"},
@@ -595,8 +594,7 @@ void CustomElementGraphicPart::stylesFromXml(const QDomElement &qde)
{"HTMLYellowYellow", HTMLYellowYellowFilling}, {"HTMLYellowYellow", HTMLYellowYellowFilling},
{"HTMLYellowLightYellow", HTMLYellowLightYellowFilling}, {"HTMLYellowLightYellow", HTMLYellowLightYellowFilling},
{"HTMLYellowLemonChiffon", HTMLYellowLemonChiffonFilling}, {"HTMLYellowLemonChiffon", HTMLYellowLemonChiffonFilling},
{"HTMLYellowLightGoldenrodYellow", {"HTMLYellowLightGoldenrodYellow", HTMLYellowLightGoldenrodYellowFilling},
HTMLYellowLightGoldenrodYellowFilling},
{"HTMLYellowPapayaWhip", HTMLYellowPapayaWhipFilling}, {"HTMLYellowPapayaWhip", HTMLYellowPapayaWhipFilling},
{"HTMLYellowMoccasin", HTMLYellowMoccasinFilling}, {"HTMLYellowMoccasin", HTMLYellowMoccasinFilling},
{"HTMLYellowPeachPuff", HTMLYellowPeachPuffFilling}, {"HTMLYellowPeachPuff", HTMLYellowPeachPuffFilling},
@@ -631,8 +629,7 @@ void CustomElementGraphicPart::stylesFromXml(const QDomElement &qde)
{"HTMLGreenChartreuse", HTMLGreenChartreuseFilling}, {"HTMLGreenChartreuse", HTMLGreenChartreuseFilling},
{"HTMLGreenGreenYellow", HTMLGreenGreenYellowFilling}, {"HTMLGreenGreenYellow", HTMLGreenGreenYellowFilling},
{"HTMLGreenSpringGreen", HTMLGreenSpringGreenFilling}, {"HTMLGreenSpringGreen", HTMLGreenSpringGreenFilling},
{"HTMLGreenMediumSpringGreen", {"HTMLGreenMediumSpringGreen", HTMLGreenMediumSpringGreenFilling},
HTMLGreenMediumSpringGreenFilling},
{"HTMLGreenLightGreen", HTMLGreenLightGreenFilling}, {"HTMLGreenLightGreen", HTMLGreenLightGreenFilling},
{"HTMLGreenPaleGreen", HTMLGreenPaleGreenFilling}, {"HTMLGreenPaleGreen", HTMLGreenPaleGreenFilling},
{"HTMLGreenDarkSeaGreen", HTMLGreenDarkSeaGreenFilling}, {"HTMLGreenDarkSeaGreen", HTMLGreenDarkSeaGreenFilling},
@@ -762,8 +759,7 @@ void CustomElementGraphicPart::stylesFromXml(const QDomElement &qde)
{"HTMLYellowYellow", HTMLYellowYellowColor}, {"HTMLYellowYellow", HTMLYellowYellowColor},
{"HTMLYellowLightYellow", HTMLYellowLightYellowColor}, {"HTMLYellowLightYellow", HTMLYellowLightYellowColor},
{"HTMLYellowLemonChiffon", HTMLYellowLemonChiffonColor}, {"HTMLYellowLemonChiffon", HTMLYellowLemonChiffonColor},
{"HTMLYellowLightGoldenrodYellow", {"HTMLYellowLightGoldenrodYellow", HTMLYellowLightGoldenrodYellowColor},
HTMLYellowLightGoldenrodYellowColor},
{"HTMLYellowPapayaWhip", HTMLYellowPapayaWhipColor}, {"HTMLYellowPapayaWhip", HTMLYellowPapayaWhipColor},
{"HTMLYellowMoccasin", HTMLYellowMoccasinColor}, {"HTMLYellowMoccasin", HTMLYellowMoccasinColor},
{"HTMLYellowPeachPuff", HTMLYellowPeachPuffColor}, {"HTMLYellowPeachPuff", HTMLYellowPeachPuffColor},

View File

@@ -176,7 +176,6 @@ qreal PartTerminal::rotation() const {
case Qet::South : return 180; case Qet::South : return 180;
case Qet::West : return 270; case Qet::West : return 270;
} }
return 0;
} }
/** /**

View File

@@ -362,7 +362,6 @@ QString ElementData::masterTypeToString(ElementData::MasterType type)
case ElementData::Commutator: case ElementData::Commutator:
return QStringLiteral("commutator"); return QStringLiteral("commutator");
} }
return QStringLiteral("coil");
} }
ElementData::MasterType ElementData::masterTypeFromString(const QString &string) ElementData::MasterType ElementData::masterTypeFromString(const QString &string)
@@ -395,7 +394,6 @@ QString ElementData::slaveTypeToString(ElementData::SlaveType type)
case ElementData::delayOnOff: case ElementData::delayOnOff:
return QStringLiteral("delayOnOff"); return QStringLiteral("delayOnOff");
} }
return QStringLiteral("simple");
} }
ElementData::SlaveType ElementData::slaveTypeFromString(const QString &string) ElementData::SlaveType ElementData::slaveTypeFromString(const QString &string)
@@ -430,7 +428,6 @@ QString ElementData::slaveStateToString(ElementData::SlaveState type)
case Other: case Other:
return QStringLiteral("Other"); return QStringLiteral("Other");
} }
return QStringLiteral("Other");
} }
ElementData::SlaveState ElementData::slaveStateFromString(const QString &string) ElementData::SlaveState ElementData::slaveStateFromString(const QString &string)
@@ -465,7 +462,6 @@ QString ElementData::terminalTypeToString(ElementData::TerminalType type)
case ElementData::TTGround: case ElementData::TTGround:
return QStringLiteral("ground"); return QStringLiteral("ground");
} }
return QStringLiteral("generic");
} }
ElementData::TerminalType ElementData::terminalTypeFromString(const QString &string) ElementData::TerminalType ElementData::terminalTypeFromString(const QString &string)
@@ -502,7 +498,6 @@ QString ElementData::translatedTerminalType(ElementData::TerminalType type)
case ElementData::TTGround: case ElementData::TTGround:
return QObject::tr("Terre", "ground terminal element type"); return QObject::tr("Terre", "ground terminal element type");
} }
return QObject::tr("Générique", "generic terminal element type");
} }
QString ElementData::terminalFunctionToString(ElementData::TerminalFunction function) QString ElementData::terminalFunctionToString(ElementData::TerminalFunction function)
@@ -515,7 +510,6 @@ QString ElementData::terminalFunctionToString(ElementData::TerminalFunction func
case ElementData::TFNeutral: case ElementData::TFNeutral:
return QStringLiteral("neutral"); return QStringLiteral("neutral");
} }
return QStringLiteral("generic");
} }
ElementData::TerminalFunction ElementData::terminalFunctionFromString(const QString &string) ElementData::TerminalFunction ElementData::terminalFunctionFromString(const QString &string)
@@ -541,7 +535,6 @@ QString ElementData::translatedTerminalFunction(ElementData::TerminalFunction fu
case TFPhase : return QObject::tr("Phase", "phase terminal element function" ); case TFPhase : return QObject::tr("Phase", "phase terminal element function" );
case TFNeutral : return QObject::tr("Neutre", "neutral terminal element function"); case TFNeutral : return QObject::tr("Neutre", "neutral terminal element function");
} }
return QObject::tr("Générique", "generic terminal element function");
} }
void ElementData::kindInfoFromXml(const QDomElement &xml_element) void ElementData::kindInfoFromXml(const QDomElement &xml_element)

View File

@@ -970,12 +970,10 @@ bool QetShapeItem::toDXF(const QString &filepath,const QPen &pen)
Createdxf::dxfColor(pen)); Createdxf::dxfColor(pen));
return true; return true;
case Polygon: case Polygon:
if(m_polygon.isClosed()) { if(m_polygon.isClosed())
Createdxf::drawPolygon(filepath,m_polygon,Createdxf::dxfColor(pen)); Createdxf::drawPolygon(filepath,m_polygon,Createdxf::dxfColor(pen));
} else
else {
Createdxf::drawPolyline(filepath,m_polygon,Createdxf::dxfColor(pen)); Createdxf::drawPolyline(filepath,m_polygon,Createdxf::dxfColor(pen));
}
return true; return true;
default: default:
return false; return false;

View File

@@ -17,7 +17,7 @@
*/ */
#include "macosxopenevent.h" #include "macosxopenevent.h"
#include "../singleapplication.h" #include "singleapplication.h"
#include <QFileOpenEvent> #include <QFileOpenEvent>