Further doubel suggestions from Jan

Moved Gui/InputVector,Placement,Transform from float to double
Moved Sketcher from float to double
more suggestions for moving float -> double
This commit is contained in:
jriegel
2013-09-22 22:00:19 +02:00
parent 664c1d4862
commit 66ee73f54b
16 changed files with 163 additions and 163 deletions

View File

@@ -22,7 +22,7 @@
#include "PreCompiled.h"
#include <QSignalMapper>
#include <QSignalMapper>
#include <QDockWidget>
#include "Placement.h"
@@ -314,7 +314,7 @@ void Placement::directionActivated(int index)
}
}
Base::Vector3f Placement::getDirection() const
Base::Vector3d Placement::getDirection() const
{
return ui->getDirection();
}
@@ -343,11 +343,11 @@ void Placement::setPlacementData(const Base::Placement& p)
Base::Vector3d axis;
p.getRotation().getValue(axis, angle);
ui->angle->setValue(angle*180.0/D_PI);
Base::Vector3f dir((float)axis.x,(float)axis.y,(float)axis.z);
Base::Vector3d dir(axis.x,axis.y,axis.z);
for (int i=0; i<ui->direction->count()-1; i++) {
QVariant data = ui->direction->itemData (i);
if (data.canConvert<Base::Vector3f>()) {
const Base::Vector3f val = data.value<Base::Vector3f>();
if (data.canConvert<Base::Vector3d>()) {
const Base::Vector3d val = data.value<Base::Vector3d>();
if (val == dir) {
ui->direction->setCurrentIndex(i);
newitem = false;
@@ -363,7 +363,7 @@ void Placement::setPlacementData(const Base::Placement& p)
.arg(dir.y)
.arg(dir.z);
ui->direction->insertItem(ui->direction->count()-1, display,
QVariant::fromValue<Base::Vector3f>(dir));
QVariant::fromValue<Base::Vector3d>(dir));
ui->direction->setCurrentIndex(ui->direction->count()-2);
}
signalMapper->blockSignals(false);
@@ -386,7 +386,7 @@ Base::Placement Placement::getPlacementData() const
cnt = Base::Vector3d(ui->xCnt->value(),ui->yCnt->value(),ui->zCnt->value());
if (index == 0) {
Base::Vector3f dir = getDirection();
Base::Vector3d dir = getDirection();
rot.setValue(Base::Vector3d(dir.x,dir.y,dir.z),ui->angle->value()*D_PI/180.0);
}
else if (index == 1) {
@@ -416,11 +416,11 @@ void Placement::changeEvent(QEvent *e)
DockablePlacement::DockablePlacement(QWidget* parent, Qt::WFlags fl) : Placement(parent, fl)
{
Gui::DockWindowManager* pDockMgr = Gui::DockWindowManager::instance();
Gui::DockWindowManager* pDockMgr = Gui::DockWindowManager::instance();
QDockWidget* dw = pDockMgr->addDockWindow(QT_TR_NOOP("Placement"),
this, Qt::BottomDockWidgetArea);
dw->setFeatures(QDockWidget::DockWidgetMovable|QDockWidget::DockWidgetFloatable);
dw->show();
dw->setFeatures(QDockWidget::DockWidgetMovable|QDockWidget::DockWidgetFloatable);
dw->show();
}
DockablePlacement::~DockablePlacement()
@@ -429,17 +429,17 @@ DockablePlacement::~DockablePlacement()
void DockablePlacement::accept()
{
// closes the dock window
Gui::DockWindowManager* pDockMgr = Gui::DockWindowManager::instance();
pDockMgr->removeDockWindow(this);
// closes the dock window
Gui::DockWindowManager* pDockMgr = Gui::DockWindowManager::instance();
pDockMgr->removeDockWindow(this);
Placement::accept();
}
void DockablePlacement::reject()
{
// closes the dock window
Gui::DockWindowManager* pDockMgr = Gui::DockWindowManager::instance();
pDockMgr->removeDockWindow(this);
// closes the dock window
Gui::DockWindowManager* pDockMgr = Gui::DockWindowManager::instance();
pDockMgr->removeDockWindow(this);
Placement::reject();
}