All: Reformat according to new standard

This commit is contained in:
pre-commit-ci[bot]
2025-11-11 13:49:01 +01:00
committed by Kacper Donat
parent eafd18dac0
commit 25c3ba7338
2390 changed files with 154630 additions and 115818 deletions

View File

@@ -77,26 +77,34 @@ ViewProviderMeasureBase::ViewProviderMeasureBase()
{
static const char* agroup = "Appearance";
// NOLINTBEGIN
ADD_PROPERTY_TYPE(TextColor,
(Preferences::defaultTextColor()),
agroup,
App::Prop_None,
"Color for the measurement text");
ADD_PROPERTY_TYPE(TextBackgroundColor,
(Preferences::defaultTextBackgroundColor()),
agroup,
App::Prop_None,
"Color for the measurement text background");
ADD_PROPERTY_TYPE(LineColor,
(Preferences::defaultLineColor()),
agroup,
App::Prop_None,
"Color for the measurement lines");
ADD_PROPERTY_TYPE(FontSize,
(Preferences::defaultFontSize()),
agroup,
App::Prop_None,
"Size of measurement text");
ADD_PROPERTY_TYPE(
TextColor,
(Preferences::defaultTextColor()),
agroup,
App::Prop_None,
"Color for the measurement text"
);
ADD_PROPERTY_TYPE(
TextBackgroundColor,
(Preferences::defaultTextBackgroundColor()),
agroup,
App::Prop_None,
"Color for the measurement text background"
);
ADD_PROPERTY_TYPE(
LineColor,
(Preferences::defaultLineColor()),
agroup,
App::Prop_None,
"Color for the measurement lines"
);
ADD_PROPERTY_TYPE(
FontSize,
(Preferences::defaultFontSize()),
agroup,
App::Prop_None,
"Size of measurement text"
);
// NOLINTEND
pGlobalSeparator = new SoSeparator();
@@ -401,10 +409,12 @@ void ViewProviderMeasureBase::connectToSubject(App::DocumentObject* subject)
}
// NOLINTBEGIN
auto bndVisibility = std::bind(&ViewProviderMeasureBase::onSubjectVisibilityChanged,
this,
std::placeholders::_1,
std::placeholders::_2);
auto bndVisibility = std::bind(
&ViewProviderMeasureBase::onSubjectVisibilityChanged,
this,
std::placeholders::_1,
std::placeholders::_2
);
// NOLINTEND
_mVisibilityChangedConnection = subject->signalChanged.connect(bndVisibility);
}
@@ -439,8 +449,7 @@ Measure::MeasureBase* ViewProviderMeasureBase::getMeasureObject()
//! layout of the elements and relationship with the cardinal axes and the view direction.
//! elementDirection is expected to be a normalized vector. an example of an elementDirection would
//! be the vector from the start of a line to the end.
Base::Vector3d ViewProviderMeasureBase::getTextDirection(Base::Vector3d elementDirection,
double tolerance)
Base::Vector3d ViewProviderMeasureBase::getTextDirection(Base::Vector3d elementDirection, double tolerance)
{
// TODO: this can fail if the active view is not a 3d view (spreadsheet, techdraw page) and
// something causes a measure to try to update we need to search through the mdi views for a 3d
@@ -454,8 +463,7 @@ Base::Vector3d ViewProviderMeasureBase::getTextDirection(Base::Vector3d elementD
view = dynamic_cast<Gui::View3DInventor*>(this->getActiveView());
}
catch (const Base::RuntimeError&) {
Base::Console().log(
"ViewProviderMeasureBase::getTextDirection: Could not get active view\n");
Base::Console().log("ViewProviderMeasureBase::getTextDirection: Could not get active view\n");
}
if (view) {
@@ -518,8 +526,10 @@ bool ViewProviderMeasureBase::isSubjectVisible()
//! gets called when the subject object issues a signalChanged (ie a property change). We are only
//! interested in the subject's Visibility property
void ViewProviderMeasureBase::onSubjectVisibilityChanged(const App::DocumentObject& docObj,
const App::Property& prop)
void ViewProviderMeasureBase::onSubjectVisibilityChanged(
const App::DocumentObject& docObj,
const App::Property& prop
)
{
if (docObj.isRemoving()) {
return;
@@ -603,9 +613,10 @@ ViewProviderMeasure::ViewProviderMeasure()
lineSep->addChild(pCoords);
lineSep->addChild(pLines);
auto points = new SoMarkerSet();
points->markerIndex =
Gui::Inventor::MarkerBitmaps::getMarkerIndex("CROSS",
Gui::ViewParams::instance()->getMarkerSize());
points->markerIndex = Gui::Inventor::MarkerBitmaps::getMarkerIndex(
"CROSS",
Gui::ViewParams::instance()->getMarkerSize()
);
points->numPoints = 1;
lineSep->addChild(points);
@@ -615,8 +626,7 @@ ViewProviderMeasure::ViewProviderMeasure()
view = dynamic_cast<Gui::View3DInventor*>(this->getActiveView());
}
catch (const Base::RuntimeError&) {
Base::Console().log(
"ViewProviderMeasure::ViewProviderMeasure: Could not get active view\n");
Base::Console().log("ViewProviderMeasure::ViewProviderMeasure: Could not get active view\n");
}
if (view) {
@@ -703,8 +713,7 @@ Base::Vector3d ViewProviderMeasure::getTextPosition()
Gui::View3DInventor* view = dynamic_cast<Gui::View3DInventor*>(this->getActiveView());
if (!view) {
Base::Console().log(
"ViewProviderMeasureBase::getTextPosition: Could not get active view\n");
Base::Console().log("ViewProviderMeasureBase::getTextPosition: Could not get active view\n");
return Base::Vector3d();
}