aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomas Prochazka <tomas.prochazka@cvut.cz>2019-02-27 12:20:36 +0100
committerPavel Pisa <pisa@cmp.felk.cvut.cz>2019-03-30 20:12:35 +0100
commit8de3836bee7b844b75564f12b700c323c4f3d53b (patch)
treeb725a64d59f7f65077945910aa24229ebd2f1d6f
parent3758632917987c842edf57d855de9b515754a5f9 (diff)
downloadqtmips-8de3836bee7b844b75564f12b700c323c4f3d53b.tar.gz
qtmips-8de3836bee7b844b75564f12b700c323c4f3d53b.tar.bz2
qtmips-8de3836bee7b844b75564f12b700c323c4f3d53b.zip
Setting background color dial
Setting the background color of the graphical component dial, which the color it representing (RGB)
-rw-r--r--qtmips_gui/peripheralsview.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/qtmips_gui/peripheralsview.cpp b/qtmips_gui/peripheralsview.cpp
index 8ce82fc..6c1208d 100644
--- a/qtmips_gui/peripheralsview.cpp
+++ b/qtmips_gui/peripheralsview.cpp
@@ -7,6 +7,10 @@ PeripheralsView::PeripheralsView(QWidget *parent) :
{
ui->setupUi(this);
+ ui->dialRed->setStyleSheet("QDial { background-color: red }");
+ ui->dialGreen->setStyleSheet("QDial { background-color: green }");
+ ui->dialBlue->setStyleSheet("QDial { background-color: blue }");
+
connect(ui->dialRed, SIGNAL(valueChanged(int)), ui->spinRed, SLOT(setValue(int)));
connect(ui->dialGreen, SIGNAL(valueChanged(int)), ui->spinGreen, SLOT(setValue(int)));
connect(ui->dialBlue, SIGNAL(valueChanged(int)), ui->spinBlue, SLOT(setValue(int)));