aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--qtmips_gui/peripheralsview.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/qtmips_gui/peripheralsview.cpp b/qtmips_gui/peripheralsview.cpp
index 5a8ec70..231de90 100644
--- a/qtmips_gui/peripheralsview.cpp
+++ b/qtmips_gui/peripheralsview.cpp
@@ -21,7 +21,21 @@ PeripheralsView::~PeripheralsView()
}
void PeripheralsView::setup(const machine::PeripSpiLed *perip_spi_led) {
+ int val;
+
connect(ui->spinRed, SIGNAL(valueChanged(int)), perip_spi_led, SLOT(red_knob_update(int)));
connect(ui->spinGreen, SIGNAL(valueChanged(int)), perip_spi_led, SLOT(green_knob_update(int)));
connect(ui->spinBlue, SIGNAL(valueChanged(int)), perip_spi_led, SLOT(blue_knob_update(int)));
+
+ val = ui->spinRed->value();
+ ui->spinRed->setValue(val - 1);
+ ui->spinRed->setValue(val);
+
+ val = ui->spinGreen->value();
+ ui->spinGreen->setValue(val - 1);
+ ui->spinGreen->setValue(val);
+
+ val = ui->spinBlue->value();
+ ui->spinBlue->setValue(val - 1);
+ ui->spinBlue->setValue(val);
}