| 31 | QTimer *realtimeUpdateTimer = new QTimer; |
| 32 | |
| 33 | MainWindow::MainWindow(QWidget *parent) |
| 34 | : QMainWindow(parent), ui(new Ui::MainWindow) { |
| 35 | ui->setupUi(this); |
| 36 | |
| 37 | connect(ui->advancedFanControlCheckBox, &QCheckBox::toggled, this, &MainWindow::setFanModeAdvanced); |
| 38 | |
| 39 | connect(ui->fan1Speed1Slider, &QSlider::valueChanged, this, [this]() { |
| 40 | ui->fan1Speed1Label->setText(QString("%1%").arg(ui->fan1Speed1Slider->value())); |
| 41 | checkFanSettingsChanged(); |
| 42 | }); |
| 43 | connect(ui->fan1Speed2Slider, &QSlider::valueChanged, this, [this]() { |
| 44 | ui->fan1Speed2Label->setText(QString("%1%").arg(ui->fan1Speed2Slider->value())); |
| 45 | checkFanSettingsChanged(); |
| 46 | }); |
| 47 | connect(ui->fan1Speed3Slider, &QSlider::valueChanged, this, [this]() { |
| 48 | ui->fan1Speed3Label->setText(QString("%1%").arg(ui->fan1Speed3Slider->value())); |
| 49 | checkFanSettingsChanged(); |
| 50 | }); |
| 51 | connect(ui->fan1Speed4Slider, &QSlider::valueChanged, this, [this]() { |
| 52 | ui->fan1Speed4Label->setText(QString("%1%").arg(ui->fan1Speed4Slider->value())); |
| 53 | checkFanSettingsChanged(); |
| 54 | }); |
| 55 | connect(ui->fan1Speed5Slider, &QSlider::valueChanged, this, [this]() { |
| 56 | ui->fan1Speed5Label->setText(QString("%1%").arg(ui->fan1Speed5Slider->value())); |
| 57 | checkFanSettingsChanged(); |
| 58 | }); |
| 59 | connect(ui->fan1Speed6Slider, &QSlider::valueChanged, this, [this]() { |
| 60 | ui->fan1Speed6Label->setText(QString("%1%").arg(ui->fan1Speed6Slider->value())); |
| 61 | checkFanSettingsChanged(); |
| 62 | }); |
| 63 | connect(ui->fan1Speed7Slider, &QSlider::valueChanged, this, [this]() { |
| 64 | ui->fan1Speed7Label->setText(QString("%1%").arg(ui->fan1Speed7Slider->value())); |
| 65 | checkFanSettingsChanged(); |
| 66 | }); |
| 67 | |
| 68 | connect(ui->fan1Speed2TempSpinBox, &QSpinBox::textChanged, this, [this]() { |
| 69 | ui->fan1Speed1TempLabel->setText(QString("< %1 °C").arg(ui->fan1Speed2TempSpinBox->value())); |
| 70 | checkFanSettingsChanged(); |
| 71 | }); |
| 72 | connect(ui->fan1Speed3TempSpinBox, &QSpinBox::textChanged, this, [this]() { |
| 73 | checkFanSettingsChanged(); |
| 74 | }); |
| 75 | connect(ui->fan1Speed4TempSpinBox, &QSpinBox::textChanged, this, [this]() { |
| 76 | checkFanSettingsChanged(); |
| 77 | }); |
| 78 | connect(ui->fan1Speed5TempSpinBox, &QSpinBox::textChanged, this, [this]() { |
| 79 | checkFanSettingsChanged(); |
| 80 | }); |
| 81 | connect(ui->fan1Speed6TempSpinBox, &QSpinBox::textChanged, this, [this]() { |
| 82 | checkFanSettingsChanged(); |
| 83 | }); |
| 84 | connect(ui->fan1Speed7TempSpinBox, &QSpinBox::textChanged, this, [this]() { |
| 85 | checkFanSettingsChanged(); |
| 86 | }); |
| 87 | |
| 88 | connect(ui->fan2Speed1Slider, &QSlider::valueChanged, this, [this]() { |
| 89 | ui->fan2Speed1Label->setText(QString("%1%").arg(ui->fan2Speed1Slider->value())); |
| 90 | checkFanSettingsChanged(); |
nothing calls this directly
no test coverage detected