Gui: [skip ci] rename Location classes

This commit is contained in:
wmayer
2020-01-10 21:19:36 +01:00
parent fa6513d7c7
commit 8d1e1e4072
9 changed files with 81 additions and 56 deletions

View File

@@ -68,6 +68,7 @@ void CmdPartSimpleCylinder::activated(int iMsg)
PartGui::DlgPartCylinderImp dlg(Gui::getMainWindow());
if (dlg.exec()== QDialog::Accepted) {
Base::Vector3d dir = dlg.getDirection();
Base::Vector3d pos = dlg.getPosition();
openCommand("Create Part Cylinder");
doCommand(Doc,"from FreeCAD import Base");
doCommand(Doc,"import Part");
@@ -75,11 +76,9 @@ void CmdPartSimpleCylinder::activated(int iMsg)
".Shape=Part.makeCylinder(%f,%f,"
"Base.Vector(%f,%f,%f),"
"Base.Vector(%f,%f,%f))"
,dlg.radius->value().getValue()
,dlg.length->value().getValue()
,dlg.xPos->value().getValue()
,dlg.yPos->value().getValue()
,dlg.zPos->value().getValue()
,dlg.getRadius()
,dlg.getLength()
,pos.x,pos.y,pos.z
,dir.x,dir.y,dir.z);
commitCommand();
updateActive();

View File

@@ -37,7 +37,7 @@ using namespace PartGui;
* true to construct a modal dialog.
*/
DlgPartBoxImp::DlgPartBoxImp(QWidget* parent, Qt::WindowFlags fl)
: Gui::LocationInterface<Ui_DlgPartBox>(parent, fl)
: Gui::LocationDialogUi<Ui_DlgPartBox>(parent, fl)
{
}

View File

@@ -28,7 +28,7 @@
namespace PartGui {
class DlgPartBoxImp : public Gui::LocationInterface<Ui_DlgPartBox>
class DlgPartBoxImp : public Gui::LocationDialogUi<Ui_DlgPartBox>
{
Q_OBJECT

View File

@@ -22,7 +22,7 @@
#include "PreCompiled.h"
#ifndef _PreComp_
#ifndef _PreComp_
#endif
#include "DlgPartCylinderImp.h"
@@ -37,7 +37,7 @@ using namespace PartGui;
* true to construct a modal dialog.
*/
DlgPartCylinderImp::DlgPartCylinderImp(QWidget* parent, Qt::WindowFlags fl)
: Gui::LocationInterface<Ui_DlgPartCylinder>(parent, fl)
: Gui::LocationDialogUi<Ui_DlgPartCylinder>(parent, fl)
{
}
@@ -49,4 +49,14 @@ DlgPartCylinderImp::~DlgPartCylinderImp()
// no need to delete child widgets, Qt does it all for us
}
double DlgPartCylinderImp::getRadius() const
{
return this->radius->value().getValue();
}
double DlgPartCylinderImp::getLength() const
{
return this->length->value().getValue();
}
#include "moc_DlgPartCylinderImp.cpp"

View File

@@ -28,13 +28,16 @@
namespace PartGui {
class DlgPartCylinderImp : public Gui::LocationInterface<Ui_DlgPartCylinder>
class DlgPartCylinderImp : public Gui::LocationDialogUi<Ui_DlgPartCylinder>
{
Q_OBJECT
public:
DlgPartCylinderImp(QWidget* parent = 0, Qt::WindowFlags fl = 0);
~DlgPartCylinderImp();
double getRadius() const;
double getLength() const;
};
} // namespace PartGui

View File

@@ -76,7 +76,6 @@ private:
void autoSolid();
private:
//typedef Gui::LocationInterfaceComp<Ui_DlgRevolution> Ui_RevolutionComp;
Ui_DlgRevolution* ui;
class EdgeSelection;
EdgeSelection* filter;