SketcherGui: apply clang-format

This commit is contained in:
Abdullah Tahiri
2023-05-25 15:09:30 +02:00
committed by abdullahtahiriyo
parent dc2d861bf0
commit 78ae9c1d7d
98 changed files with 17648 additions and 13572 deletions

View File

@@ -31,7 +31,10 @@ using namespace SketcherGui;
//**************** VisualClassConfig **************************************//
VisualLayer::VisualLayer(unsigned int linePattern, float lineWidth, bool visible): linePattern(linePattern), lineWidth(lineWidth), visible(visible)
VisualLayer::VisualLayer(unsigned int linePattern, float lineWidth, bool visible)
: linePattern(linePattern)
, lineWidth(lineWidth)
, visible(visible)
{}
unsigned int VisualLayer::getLinePattern() const
@@ -64,23 +67,22 @@ void VisualLayer::setVisible(bool show)
visible = show;
}
void VisualLayer::Save(Base::Writer &writer) const
void VisualLayer::Save(Base::Writer& writer) const
{
writer.Stream() << writer.ind()
<< "<VisualLayer " <<
"visible=\"" << (visible?std::string("true"):std::string("false")).c_str() <<
"\" linePattern=\"" << linePattern <<
"\" lineWidth=\"" << lineWidth << "\"/>" << std::endl;
writer.Stream() << writer.ind() << "<VisualLayer "
<< "visible=\""
<< (visible ? std::string("true") : std::string("false")).c_str()
<< "\" linePattern=\"" << linePattern << "\" lineWidth=\"" << lineWidth
<< "\"/>" << std::endl;
}
void VisualLayer::Restore(Base::XMLReader &reader)
void VisualLayer::Restore(Base::XMLReader& reader)
{
reader.readElement("VisualLayer");
std::string str = reader.getAttribute("visible");
visible = ( str == "true");
visible = (str == "true");
linePattern = reader.getAttributeAsUnsigned("linePattern");
lineWidth = reader.getAttributeAsFloat("lineWidth");
}