SketcherGui: apply clang-format

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

View File

@@ -22,34 +22,34 @@
#include "PreCompiled.h"
#ifndef _PreComp_
# include <QDialog>
#include <QDialog>
#endif
#include <Gui/BitmapFactory.h>
#include <Gui/MainWindow.h>
#include "ui_SketchOrientationDialog.h"
#include "SketchOrientationDialog.h"
#include "ui_SketchOrientationDialog.h"
using namespace SketcherGui;
SketchOrientationDialog::SketchOrientationDialog()
: QDialog(Gui::getMainWindow()), ui(new Ui_SketchOrientationDialog)
: QDialog(Gui::getMainWindow())
, ui(new Ui_SketchOrientationDialog)
{
DirType = 0;
ui->setupUi(this);
onPreview();
connect(ui->Reverse_checkBox, &QCheckBox::clicked, this, &SketchOrientationDialog::onPreview);
connect(ui->XY_radioButton , &QRadioButton::clicked, this, &SketchOrientationDialog::onPreview);
connect(ui->XZ_radioButton , &QRadioButton::clicked, this, &SketchOrientationDialog::onPreview);
connect(ui->YZ_radioButton , &QRadioButton::clicked, this, &SketchOrientationDialog::onPreview);
connect(ui->XY_radioButton, &QRadioButton::clicked, this, &SketchOrientationDialog::onPreview);
connect(ui->XZ_radioButton, &QRadioButton::clicked, this, &SketchOrientationDialog::onPreview);
connect(ui->YZ_radioButton, &QRadioButton::clicked, this, &SketchOrientationDialog::onPreview);
}
SketchOrientationDialog::~SketchOrientationDialog()
{
}
{}
void SketchOrientationDialog::accept()
{
@@ -57,31 +57,32 @@ void SketchOrientationDialog::accept()
bool reverse = ui->Reverse_checkBox->isChecked();
if (ui->XY_radioButton->isChecked()) {
if (reverse) {
Pos = Base::Placement(Base::Vector3d(0,0,offset),Base::Rotation(1.0,0.0,0.0,0.0));
Pos = Base::Placement(Base::Vector3d(0, 0, offset), Base::Rotation(1.0, 0.0, 0.0, 0.0));
DirType = 1;
}
else {
Pos = Base::Placement(Base::Vector3d(0,0,offset),Base::Rotation());
Pos = Base::Placement(Base::Vector3d(0, 0, offset), Base::Rotation());
DirType = 0;
}
}
else if (ui->XZ_radioButton->isChecked()) {
if (reverse) {
Pos = Base::Placement(Base::Vector3d(0,offset,0),Base::Rotation(0.0,1.0,1.0,0.0));
Pos = Base::Placement(Base::Vector3d(0, offset, 0), Base::Rotation(0.0, 1.0, 1.0, 0.0));
DirType = 3;
}
else {
Pos = Base::Placement(Base::Vector3d(0,offset,0),Base::Rotation(1.0,0.0,0.0,1.0));
Pos = Base::Placement(Base::Vector3d(0, offset, 0), Base::Rotation(1.0, 0.0, 0.0, 1.0));
DirType = 2;
}
}
else if (ui->YZ_radioButton->isChecked()) {
if (reverse) {
Pos = Base::Placement(Base::Vector3d(offset,0,0),Base::Rotation(-1.0,1.0,1.0,-1.0));
Pos =
Base::Placement(Base::Vector3d(offset, 0, 0), Base::Rotation(-1.0, 1.0, 1.0, -1.0));
DirType = 5;
}
else {
Pos = Base::Placement(Base::Vector3d(offset,0,0),Base::Rotation(1.0,1.0,1.0,1.0));
Pos = Base::Placement(Base::Vector3d(offset, 0, 0), Base::Rotation(1.0, 1.0, 1.0, 1.0));
DirType = 4;
}
}
@@ -113,8 +114,7 @@ void SketchOrientationDialog::onPreview()
}
ui->previewLabel->setPixmap(
Gui::BitmapFactory().pixmapFromSvg(icon.c_str(),
ui->previewLabel->size()));
Gui::BitmapFactory().pixmapFromSvg(icon.c_str(), ui->previewLabel->size()));
}
#include "moc_SketchOrientationDialog.cpp"