diff options
author | Pavel Pisa <pisa@cmp.felk.cvut.cz> | 2019-06-27 21:09:43 +0200 |
---|---|---|
committer | Pavel Pisa <pisa@cmp.felk.cvut.cz> | 2019-06-27 21:09:43 +0200 |
commit | 30b15c6d1a328df5d8b0f99a5cbb1f72f25c9cdf (patch) | |
tree | b6ff12cbad9294fcb0d33582b6e363a8608ddd47 /qtmips_gui | |
parent | d218feed51015b2d5662d802bf4cc3c6d6d165c3 (diff) | |
download | qtmips-30b15c6d1a328df5d8b0f99a5cbb1f72f25c9cdf.tar.gz qtmips-30b15c6d1a328df5d8b0f99a5cbb1f72f25c9cdf.tar.bz2 qtmips-30b15c6d1a328df5d8b0f99a5cbb1f72f25c9cdf.zip |
Simulate push of dial buttons by check box.
Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
Diffstat (limited to 'qtmips_gui')
-rw-r--r-- | qtmips_gui/peripheralsview.cpp | 8 | ||||
-rw-r--r-- | qtmips_gui/peripheralsview.ui | 21 |
2 files changed, 29 insertions, 0 deletions
diff --git a/qtmips_gui/peripheralsview.cpp b/qtmips_gui/peripheralsview.cpp index 6c1208d..f90dd53 100644 --- a/qtmips_gui/peripheralsview.cpp +++ b/qtmips_gui/peripheralsview.cpp @@ -43,6 +43,14 @@ void PeripheralsView::setup(const machine::PeripSpiLed *perip_spi_led) { ui->spinBlue->setValue(val - 1); ui->spinBlue->setValue(val); + connect(ui->checkRed, SIGNAL(clicked(bool)), perip_spi_led, SLOT(red_knob_push(bool))); + connect(ui->checkGreen, SIGNAL(clicked(bool)), perip_spi_led, SLOT(green_knob_push(bool))); + connect(ui->checkBlue, SIGNAL(clicked(bool)), perip_spi_led, SLOT(blue_knob_push(bool))); + + ui->checkRed->setChecked(false); + ui->checkGreen->setChecked(false);; + ui->checkBlue->setChecked(false);; + ui->labelRgb1->setAutoFillBackground(true); ui->labelRgb2->setAutoFillBackground(true); diff --git a/qtmips_gui/peripheralsview.ui b/qtmips_gui/peripheralsview.ui index 60726a2..6aa83d6 100644 --- a/qtmips_gui/peripheralsview.ui +++ b/qtmips_gui/peripheralsview.ui @@ -114,6 +114,13 @@ <item> <layout class="QVBoxLayout" name="verticalLayout_2"> <item> + <widget class="QCheckBox" name="checkRed"> + <property name="text"> + <string/> + </property> + </widget> + </item> + <item> <widget class="QDial" name="dialRed"> <property name="maximum"> <number>255</number> @@ -161,6 +168,13 @@ <item> <layout class="QVBoxLayout" name="verticalLayout_3"> <item> + <widget class="QCheckBox" name="checkGreen"> + <property name="text"> + <string/> + </property> + </widget> + </item> + <item> <widget class="QDial" name="dialGreen"> <property name="maximum"> <number>255</number> @@ -208,6 +222,13 @@ <item> <layout class="QVBoxLayout" name="verticalLayout_4"> <item> + <widget class="QCheckBox" name="checkBlue"> + <property name="text"> + <string/> + </property> + </widget> + </item> + <item> <widget class="QDial" name="dialBlue"> <property name="maximum"> <number>255</number> |