35 #include <QFileDialog> 42 m_parent(parent), m_renderWindow(window)
45 QDialog* dialog =
new QDialog(parent->treeWidget());
47 m_dialogUI->setupUi(dialog);
52 m_dialogUI->sliderXRot->setValue(
m_pose.
r * 100000.0);
53 m_dialogUI->sliderYRot->setValue(
m_pose.
t * 100000.0);
54 m_dialogUI->sliderZRot->setValue(
m_pose.
p * 100000.0);
55 m_dialogUI->spinBoxXRot->setValue(
m_pose.
r);
56 m_dialogUI->spinBoxYRot->setValue(
m_pose.
t);
57 m_dialogUI->spinBoxZRot->setValue(
m_pose.
p);
58 m_dialogUI->spinBoxXTrans->setValue(
m_pose.
x);
59 m_dialogUI->spinBoxYTrans->setValue(
m_pose.
y);
60 m_dialogUI->spinBoxZTrans->setValue(
m_pose.
z);
65 dialog->activateWindow();
77 QObject::connect(
m_dialogUI->buttonReset, SIGNAL(clicked()),
81 QObject::connect(
m_dialogUI->sliderXRot, SIGNAL(sliderMoved(
int)),
84 QObject::connect(
m_dialogUI->spinBoxXRot, SIGNAL(valueChanged(
double)),
88 QObject::connect(
m_dialogUI->sliderYRot, SIGNAL(sliderMoved(
int)),
91 QObject::connect(
m_dialogUI->spinBoxYRot, SIGNAL(valueChanged(
double)),
95 QObject::connect(
m_dialogUI->sliderZRot, SIGNAL(sliderMoved(
int)),
98 QObject::connect(
m_dialogUI->spinBoxZRot, SIGNAL(valueChanged(
double)),
102 QObject::connect(
m_dialogUI->spinBoxXTrans, SIGNAL(valueChanged(
double)),
105 QObject::connect(
m_dialogUI->spinBoxYTrans, SIGNAL(valueChanged(
double)),
108 QObject::connect(
m_dialogUI->spinBoxZTrans, SIGNAL(valueChanged(
double)),
111 QObject::connect(
m_dialogUI->spinBoxStep, SIGNAL(valueChanged(
double)),
114 QObject::connect(
m_dialogUI->buttonSave, SIGNAL(clicked()),
this, SLOT(
save()));
121 m_dialogUI->spinBoxXTrans->setSingleStep(value);
122 m_dialogUI->spinBoxYTrans->setSingleStep(value);
123 m_dialogUI->spinBoxZTrans->setSingleStep(value);
128 QString
filename = QFileDialog::getSaveFileName(
m_parent->treeWidget(),
"Save transformation to pose file",
"",
"*.pose");
130 ofstream out(filename.toStdString().c_str());
237 double new_rot = (double)value / 100000.0;
248 double new_rot = (double)value / 100000.0;
258 double new_rot = (double)value / 100000.0;
void setPose(const Pose &pose)