PartDesign: Prepare for clang-format (#16048)
* PartDesign: Prepare for clang-format * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
@@ -24,9 +24,9 @@
|
||||
#include "PreCompiled.h"
|
||||
|
||||
#ifndef _PreComp_
|
||||
# include <QAction>
|
||||
# include <QListWidget>
|
||||
# include <QMessageBox>
|
||||
#include <QAction>
|
||||
#include <QListWidget>
|
||||
#include <QMessageBox>
|
||||
#endif
|
||||
|
||||
#include <Base/Interpreter.h>
|
||||
@@ -45,7 +45,7 @@ using namespace Gui;
|
||||
|
||||
/* TRANSLATOR PartDesignGui::TaskFilletParameters */
|
||||
|
||||
TaskFilletParameters::TaskFilletParameters(ViewProviderDressUp *DressUpView, QWidget *parent)
|
||||
TaskFilletParameters::TaskFilletParameters(ViewProviderDressUp* DressUpView, QWidget* parent)
|
||||
: TaskDressUpParameters(DressUpView, true, true, parent)
|
||||
, ui(new Ui_TaskFilletParameters)
|
||||
{
|
||||
@@ -68,12 +68,13 @@ TaskFilletParameters::TaskFilletParameters(ViewProviderDressUp *DressUpView, QWi
|
||||
ui->filletRadius->bind(pcFillet->Radius);
|
||||
QMetaObject::invokeMethod(ui->filletRadius, "setFocus", Qt::QueuedConnection);
|
||||
std::vector<std::string> strings = pcFillet->Base.getSubValues();
|
||||
for (const auto & string : strings) {
|
||||
for (const auto& string : strings) {
|
||||
ui->listWidgetReferences->addItem(QString::fromStdString(string));
|
||||
}
|
||||
|
||||
QMetaObject::connectSlotsByName(this);
|
||||
|
||||
// clang-format off
|
||||
connect(ui->filletRadius, qOverload<double>(&Gui::QuantitySpinBox::valueChanged),
|
||||
this, &TaskFilletParameters::onLengthChanged);
|
||||
connect(ui->buttonRefSel, &QToolButton::toggled,
|
||||
@@ -94,11 +95,14 @@ TaskFilletParameters::TaskFilletParameters(ViewProviderDressUp *DressUpView, QWi
|
||||
this, &TaskFilletParameters::setSelection);
|
||||
connect(ui->listWidgetReferences, &QListWidget::itemDoubleClicked,
|
||||
this, &TaskFilletParameters::doubleClicked);
|
||||
// clang-format on
|
||||
|
||||
if (strings.empty())
|
||||
if (strings.empty()) {
|
||||
setSelectionMode(refSel);
|
||||
else
|
||||
}
|
||||
else {
|
||||
hideOnError();
|
||||
}
|
||||
}
|
||||
|
||||
void TaskFilletParameters::onSelectionChanged(const Gui::SelectionChanges& msg)
|
||||
@@ -167,17 +171,17 @@ TaskFilletParameters::~TaskFilletParameters()
|
||||
Gui::Selection().rmvSelectionGate();
|
||||
}
|
||||
catch (const Py::Exception&) {
|
||||
Base::PyException e; // extract the Python error text
|
||||
Base::PyException e; // extract the Python error text
|
||||
e.ReportException();
|
||||
}
|
||||
}
|
||||
|
||||
bool TaskFilletParameters::event(QEvent *e)
|
||||
bool TaskFilletParameters::event(QEvent* e)
|
||||
{
|
||||
return TaskDressUpParameters::KeyEvent(e);
|
||||
}
|
||||
|
||||
void TaskFilletParameters::changeEvent(QEvent *e)
|
||||
void TaskFilletParameters::changeEvent(QEvent* e)
|
||||
{
|
||||
TaskBox::changeEvent(e);
|
||||
if (e->type() == QEvent::LanguageChange) {
|
||||
@@ -201,10 +205,10 @@ void TaskFilletParameters::apply()
|
||||
// TaskDialog
|
||||
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
|
||||
TaskDlgFilletParameters::TaskDlgFilletParameters(ViewProviderFillet *DressUpView)
|
||||
TaskDlgFilletParameters::TaskDlgFilletParameters(ViewProviderFillet* DressUpView)
|
||||
: TaskDlgDressUpParameters(DressUpView)
|
||||
{
|
||||
parameter = new TaskFilletParameters(DressUpView);
|
||||
parameter = new TaskFilletParameters(DressUpView);
|
||||
|
||||
Content.push_back(parameter);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user