summaryrefslogtreecommitdiffhomepage
path: root/gui/mapping-window.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2017-02-05 11:49:06 +0100
committerStanislaw Halik <sthalik@misaki.pl>2017-02-05 11:49:06 +0100
commit87d2b5992d400239240709adc6503e500ea7e058 (patch)
tree861592d4a49b28b0084bf8162044cb0b77e6ef86 /gui/mapping-window.cpp
parent6a28df861112ae4de4d901c6f1bfa49daffde4a7 (diff)
gui, logic: allow for limiting max X on translation axis also
Diffstat (limited to 'gui/mapping-window.cpp')
-rw-r--r--gui/mapping-window.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/gui/mapping-window.cpp b/gui/mapping-window.cpp
index 7e5ad6e3..05ccddda 100644
--- a/gui/mapping-window.cpp
+++ b/gui/mapping-window.cpp
@@ -55,12 +55,15 @@ void MapWidget::load()
{ nullptr, Yaw, nullptr, false }
};
+ using a = axis_opts::max_clamp;
+
for (QComboBox* x : { ui.max_yaw_rotation, ui.max_pitch_rotation, ui.max_roll_rotation })
- {
- using a = axis_opts::max_rotation;
- for (a y : { a::r180, a::r90, a::r60, a::r45, a::r30, a::r20 })
+ for (a y : { a::r180, a::r90, a::r60, a::r45, a::r30, a::r25, a::r20, a::r15, a::r10 })
x->addItem(QString::number(y) + "°", y);
- }
+
+ for (QComboBox* x : { ui.max_x_translation, ui.max_y_translation, ui.max_z_translation })
+ for (a y : { a::t30, a::t20, a::t15, a::t10 })
+ x->addItem(QStringLiteral("%1 mm").arg(int(y)), y);
for (int i = 0; qfcs[i].qfc; i++)
{
@@ -76,7 +79,7 @@ void MapWidget::load()
static_cast<void(base_value::*)(bool) const>(&base_value::valueChanged),
this,
[&](bool f) -> void {qfc.setEnabled(f); qfc.force_redraw();});
- qfc.setEnabled(qfcs[i].checkbox->isChecked());
+ qfc.setEnabled(axis.opts.altp);
qfc.force_redraw();
}