32 #include <QHBoxLayout> 33 #include <QPushButton> 34 #include <QScrollArea> 41 setSizePolicy(QSizePolicy::Expanding, QSizePolicy::MinimumExpanding);
57 QHBoxLayout* menu_layout =
new QHBoxLayout;
60 QPushButton* new_scope_btn =
new QPushButton(tr(
"Add Scope"));
61 new_scope_btn->setMaximumWidth(100);
63 QFont font = new_scope_btn->font();
64 font.setPointSize(10);
65 new_scope_btn->setFont(font);
66 connect(new_scope_btn, &QPushButton::clicked, [
this](
bool) {
addScope(); });
68 menu_layout->addWidget(new_scope_btn);
70 menu_layout->addStretch();
74 tfs_edit->setMaximumWidth(130);
75 auto tfs_edit_changed = [tfs_edit,
this]() {
87 connect(tfs_edit->
widgetLineEdit(), &QLineEdit::editingFinished, tfs_edit_changed);
88 menu_layout->addWidget(tfs_edit);
93 slider->setMaximumWidth(80);
96 connect(slider, &SliderCenterStuck::valueChanged,
this, [slider, tfs_edit,
this](
int value) {
109 double dt = (double)speed * (
double)
std::abs(speed) * 0.0001;
110 dt = std::trunc(dt * 100) / 100;
121 tfs_edit->
setText(QString::number(time));
128 menu_layout->addWidget(slider);
130 menu_layout->addSpacing(20);
133 QCheckBox* inherit_signals =
new QCheckBox(tr(
"Inherit Signals"));
134 inherit_signals->setChecked(
true);
135 inherit_signals->setToolTip(tr(
"If selected, the signal-to-scope association is remembered for future tasks."));
136 connect(inherit_signals, &QCheckBox::toggled, [
this](
bool checked) {
_inherit_signals = checked; });
138 menu_layout->addWidget(inherit_signals);
142 QFrame* hline =
new QFrame;
143 hline->setFrameShape(QFrame::HLine);
144 hline->setFrameShadow(QFrame::Sunken);
145 hline->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Maximum);
156 QScrollArea* scroll_area =
new QScrollArea;
158 QWidget* group =
new QWidget;
161 scroll_area->setWidgetResizable(
true);
162 scroll_area->setWidget(group);
204 delete item->widget();
void setStuckToCenter(int abs_distance)
std::shared_ptr< const SignalHelper > ConstPtr
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const AbsReturnType abs() const
std::shared_ptr< const Measurement > ConstPtr
bool ok()
global method to check whether to proceed or cancel the current action