Changeset View
Changeset View
Standalone View
Standalone View
src/widgets/movementwidget.cpp
Show All 26 Lines | |||||
27 | { | 27 | { | ||
28 | auto mainLayout = new QVBoxLayout; | 28 | auto mainLayout = new QVBoxLayout; | ||
29 | auto hBoxLayout = new QHBoxLayout; | 29 | auto hBoxLayout = new QHBoxLayout; | ||
30 | auto newButton = new QPushButton; | 30 | auto newButton = new QPushButton; | ||
31 | 31 | | |||
32 | if (showHomeAndDisableWidgets) { | 32 | if (showHomeAndDisableWidgets) { | ||
33 | newButton = new QPushButton(tr("Home All")); | 33 | newButton = new QPushButton(tr("Home All")); | ||
34 | hBoxLayout->addWidget(newButton); | 34 | hBoxLayout->addWidget(newButton); | ||
35 | connect(newButton, &QPushButton::clicked, [this] { | 35 | connect(newButton, &QPushButton::clicked, this, [this] { | ||
36 | emit(homeAllPressed()); | 36 | emit(homeAllPressed()); | ||
37 | }); | 37 | }); | ||
38 | 38 | | |||
39 | newButton = new QPushButton(tr("Home X")); | 39 | newButton = new QPushButton(tr("Home X")); | ||
40 | hBoxLayout->addWidget(newButton); | 40 | hBoxLayout->addWidget(newButton); | ||
41 | connect(newButton, &QPushButton::clicked, [this] { | 41 | connect(newButton, &QPushButton::clicked, this, [this] { | ||
42 | emit(homeXPressed()); | 42 | emit(homeXPressed()); | ||
43 | }); | 43 | }); | ||
44 | 44 | | |||
45 | newButton = new QPushButton(tr("Home Y")); | 45 | newButton = new QPushButton(tr("Home Y")); | ||
46 | hBoxLayout->addWidget(newButton); | 46 | hBoxLayout->addWidget(newButton); | ||
47 | connect(newButton, &QPushButton::clicked, [this] { | 47 | connect(newButton, &QPushButton::clicked, this, [this] { | ||
48 | emit(homeYPressed()); | 48 | emit(homeYPressed()); | ||
49 | }); | 49 | }); | ||
50 | 50 | | |||
51 | newButton = new QPushButton(tr("Home Z")); | 51 | newButton = new QPushButton(tr("Home Z")); | ||
52 | hBoxLayout->addWidget(newButton); | 52 | hBoxLayout->addWidget(newButton); | ||
53 | connect(newButton, &QPushButton::clicked, [this] { | 53 | connect(newButton, &QPushButton::clicked, this, [this] { | ||
54 | emit(homeZPressed()); | 54 | emit(homeZPressed()); | ||
55 | }); | 55 | }); | ||
56 | mainLayout->addLayout(hBoxLayout); | 56 | mainLayout->addLayout(hBoxLayout); | ||
57 | 57 | | |||
58 | newButton = new QPushButton(tr("Disable Motors")); | 58 | newButton = new QPushButton(tr("Disable Motors")); | ||
59 | mainLayout->addWidget(newButton); | 59 | mainLayout->addWidget(newButton); | ||
60 | connect(newButton, &QPushButton::clicked, [this] { | 60 | connect(newButton, &QPushButton::clicked, this, [this] { | ||
61 | emit(disableMotorsPressed()); | 61 | emit(disableMotorsPressed()); | ||
62 | }); | 62 | }); | ||
63 | 63 | | |||
64 | } | 64 | } | ||
65 | comboMoveAxis = new QComboBox; | 65 | comboMoveAxis = new QComboBox; | ||
66 | comboMoveAxis->addItem(tr("Move X Axis to")); | 66 | comboMoveAxis->addItem(tr("Move X Axis to")); | ||
67 | comboMoveAxis->addItem(tr("Move Y Axis to")); | 67 | comboMoveAxis->addItem(tr("Move Y Axis to")); | ||
68 | comboMoveAxis->addItem(tr("Move Z Axis to")); | 68 | comboMoveAxis->addItem(tr("Move Z Axis to")); | ||
Show All 30 Lines |