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 ef997f2259
commit 9fe130cd73
2390 changed files with 154630 additions and 115818 deletions

View File

@@ -62,10 +62,12 @@ using SelectionStyle = Gui::SelectionSingleton::SelectionStyle;
TaskMeasure::TaskMeasure()
{
this->setButtonPosition(TaskMeasure::South);
auto taskbox = new Gui::TaskView::TaskBox(Gui::BitmapFactory().pixmap("umf-measurement"),
tr("Measurement"),
true,
nullptr);
auto taskbox = new Gui::TaskView::TaskBox(
Gui::BitmapFactory().pixmap("umf-measurement"),
tr("Measurement"),
true,
nullptr
);
setupShortcuts(taskbox);
@@ -94,22 +96,27 @@ TaskMeasure::TaskMeasure()
autoSaveAction->setChecked(mAutoSave);
autoSaveAction->setToolTip(
tr("Auto saving of the last measurement when starting a new "
"measurement. Use the Shift key to temporarily invert the behaviour."));
"measurement. Use the Shift key to temporarily invert the behaviour.")
);
connect(autoSaveAction, &QAction::triggered, this, &TaskMeasure::autoSaveChanged);
newMeasurementBehaviourAction = new QAction(tr("Additive Selection"));
newMeasurementBehaviourAction->setCheckable(true);
newMeasurementBehaviourAction->setChecked(Gui::Selection().getSelectionStyle()
== SelectionStyle::GreedySelection);
newMeasurementBehaviourAction->setChecked(
Gui::Selection().getSelectionStyle() == SelectionStyle::GreedySelection
);
newMeasurementBehaviourAction->setToolTip(
tr("If checked, new selection will be added to the measurement. If unchecked, the Ctrl key "
"must be "
"pressed to add a "
"selection to the current measurement otherwise a new measurement will be started"));
connect(newMeasurementBehaviourAction,
&QAction::triggered,
this,
&TaskMeasure::newMeasurementBehaviourChanged);
"selection to the current measurement otherwise a new measurement will be started")
);
connect(
newMeasurementBehaviourAction,
&QAction::triggered,
this,
&TaskMeasure::newMeasurementBehaviourChanged
);
mSettings = new QToolButton();
mSettings->setToolTip(tr("Settings"));
@@ -131,10 +138,7 @@ TaskMeasure::TaskMeasure()
}
// Connect dropdown's change signal to our onModeChange slot
connect(modeSwitch,
qOverload<int>(&QComboBox::currentIndexChanged),
this,
&TaskMeasure::onModeChanged);
connect(modeSwitch, qOverload<int>(&QComboBox::currentIndexChanged), this, &TaskMeasure::onModeChanged);
// Result widget
valueResult = new QLineEdit();
@@ -245,7 +249,8 @@ void TaskMeasure::createObject(const App::MeasureType* measureType)
else {
// Create measure object
_mMeasureObject = dynamic_cast<Measure::MeasureBase*>(
doc->addObject(measureType->measureObject.c_str(), measureType->label.c_str()));
doc->addObject(measureType->measureObject.c_str(), measureType->label.c_str())
);
}
}
@@ -275,8 +280,7 @@ void TaskMeasure::tryUpdate()
std::string mod = Base::Type::getModuleName(sub->getTypeId().getName());
if (!App::MeasureManager::hasMeasureHandler(mod.c_str())) {
Base::Console().message("No measure handler available for geometry of module: %s\n",
mod);
Base::Console().message("No measure handler available for geometry of module: %s\n", mod);
clearSelection();
return;
}
@@ -390,9 +394,11 @@ void TaskMeasure::ensureGroup(Measure::MeasureBase* measurement)
App::Document* doc = measurement->getDocument();
auto group = dynamic_cast<App::DocumentObjectGroup*>(doc->getObject(measurementGroupName));
if (!group || !group->isValid()) {
group = doc->addObject<App::DocumentObjectGroup>(measurementGroupName,
true,
"MeasureGui::ViewProviderMeasureGroup");
group = doc->addObject<App::DocumentObjectGroup>(
measurementGroupName,
true,
"MeasureGui::ViewProviderMeasureGroup"
);
}
group->addObject(measurement);