2 #include "ui_scale_transform.h" 5 _widget(new QWidget()),
12 connect(
ui->buttonDegRad, &QPushButton::clicked,
14 const double deg_rad = 3.14159265359 / 180;
15 ui->lineEditValueScale->setText( QString::number(deg_rad,
'g', 5));
16 emit parametersChanged();
19 connect(
ui->buttonRadDeg, &QPushButton::clicked,
21 const double rad_deg = 180.0 / 3.14159265359;
22 ui->lineEditValueScale->setText( QString::number(rad_deg,
'g', 5));
23 emit parametersChanged();
26 connect(
ui->lineEditTimeOffset, &QLineEdit::editingFinished,
27 this, [=](){ emit parametersChanged(); } );
28 connect(
ui->lineEditValueOffset, &QLineEdit::editingFinished,
29 this, [=](){ emit parametersChanged(); } );
30 connect(
ui->lineEditValueScale, &QLineEdit::editingFinished,
31 this, [=](){ emit parametersChanged(); } );
41 return "Scale/Offset";
51 QDomElement widget_el = doc.createElement(
"options");
52 widget_el.setAttribute(
"time_offset",
ui->lineEditTimeOffset->text() );
53 widget_el.setAttribute(
"value_offset",
ui->lineEditValueOffset->text() );
54 widget_el.setAttribute(
"value_scale",
ui->lineEditValueScale->text() );
55 parent_element.appendChild( widget_el );
62 QDomElement widget_el = parent_element.firstChildElement(
"options");
63 ui->lineEditTimeOffset->setText( widget_el.attribute(
"time_offset") );
64 ui->lineEditValueOffset->setText( widget_el.attribute(
"value_offset") );
65 ui->lineEditValueScale->setText( widget_el.attribute(
"value_scale") );
71 double off_x =
ui->lineEditTimeOffset->text().toDouble();
72 double off_y =
ui->lineEditValueOffset->text().toDouble();
73 double scale =
ui->lineEditValueScale->text().toDouble();
const Point & at(size_t index) const
typename PlotDataBase< Value >::Point Point