7 legend_enable,
double y_min,
double y_max,
double w_time,
double 8 refresh_freq, QDialog *) :
12 refresh_freq_(refresh_freq),
13 scale_auto_(scale_auto),
14 window_time_enable_(window_time_enable),
15 legend_enable_(legend_enable),
16 y_min_double_spin_box_(new QDoubleSpinBox),
17 y_max_double_spin_box_(new QDoubleSpinBox),
18 w_time_double_spin_box_(new QDoubleSpinBox),
19 refresh_frequency_spin_box_(new QComboBox),
20 legend_enable_button_(new QCheckBox(
"Enable legend"))
22 setWindowTitle(
"Settings");
23 QVBoxLayout *main_layout =
new QVBoxLayout;
24 setLayout(main_layout);
26 QGroupBox *general_groupbox =
new QGroupBox(
"General");
27 QVBoxLayout *general_layout =
new QVBoxLayout;
28 QLabel *title_combo_box =
new QLabel(
"Refresh frequency");
29 general_layout->addWidget(title_combo_box);
30 QStringList frequency_list = {
"1 Hz",
"2 Hz",
"5 Hz",
"10 Hz",
"20 Hz",
"40 Hz",
"60 Hz",
"100 Hz"};
60 general_groupbox->setLayout(general_layout);
61 main_layout->addWidget(general_groupbox);
63 QGroupBox *y_axis_groupbox =
new QGroupBox(
"Y axis");
64 QFormLayout *y_axis_layout =
new QFormLayout;
65 QCheckBox *y_axis_autoscale =
new QCheckBox(
"Y auto");
66 y_axis_layout->addWidget(y_axis_autoscale);
72 y_axis_autoscale->setChecked(
true);
78 y_axis_autoscale->setChecked(
false);
87 y_axis_groupbox->setLayout(y_axis_layout);
88 main_layout->addWidget(y_axis_groupbox);
90 QGroupBox *x_axis_groupbox =
new QGroupBox(
"X axis");
91 QFormLayout *x_axis_layout =
new QFormLayout;
92 QCheckBox *x_axis_window_time_button =
new QCheckBox(
"Window time");
93 x_axis_layout->addWidget(x_axis_window_time_button);
99 x_axis_window_time_button->setChecked(
false);
104 x_axis_window_time_button->setChecked(
true);
110 x_axis_groupbox->setLayout(x_axis_layout);
111 main_layout->addWidget(x_axis_groupbox);
115 QDialogButtonBox *button_box =
new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel);
116 main_layout->addWidget(button_box);
119 connect(button_box, &QDialogButtonBox::rejected,
this, &QDialog::reject);
130 if (checked ==
false)
146 if (checked ==
false)
void yAxisAutoscale(bool checked)
QDoubleSpinBox * w_time_double_spin_box_
Settings(bool scale_auto, bool window_time_enable, bool legend_enable, double y_min, double y_max, double w_time, double refresh_freq, QDialog *parent=0)
QComboBox * refresh_frequency_spin_box_
void xAxisWindowTime(bool checked)
QCheckBox * legend_enable_button_
void yMaxChanged(double y_max)
void yMinChanged(double y_min)
QDoubleSpinBox * y_min_double_spin_box_
QDoubleSpinBox * y_max_double_spin_box_