diff widgets/LEDButton.cpp @ 1478:d39db4673676 by-id

Fix a number of Qt deprecation warnings
author Chris Cannam
date Wed, 03 Jul 2019 08:55:02 +0100
parents a34a2a25907c
children
line wrap: on
line diff
--- a/widgets/LEDButton.cpp	Tue Jul 02 19:05:45 2019 +0100
+++ b/widgets/LEDButton.cpp	Wed Jul 03 08:55:02 2019 +0100
@@ -49,7 +49,7 @@
     QColor col(Qt::green);
     d = new LEDButton::LEDButtonPrivate;
     d->dark_factor = 300;
-    d->offcolor = col.dark(300);
+    d->offcolor = col.darker(300);
     
     setColor(col);
 }
@@ -61,7 +61,7 @@
 {
     d = new LEDButton::LEDButtonPrivate;
     d->dark_factor = 300;
-    d->offcolor = col.dark(300);
+    d->offcolor = col.darker(300);
 
     setColor(col);
 }
@@ -72,7 +72,7 @@
 {
     d = new LEDButton::LEDButtonPrivate;
     d->dark_factor = 300;
-    d->offcolor = col.dark(300);
+    d->offcolor = col.darker(300);
 
     setColor(col);
 }
@@ -160,7 +160,7 @@
 
     // Now draw the bright spot on the LED:
     while (light_width) {
-        color = color.light( light_quote );                      // make color lighter
+        color = color.lighter( light_quote );                      // make color lighter
         pen.setColor( color );                                   // set color as pen color
         paint.setPen( pen );                                     // select the pen for drawing
         paint.drawEllipse( pos, pos, light_width, light_width ); // draw the ellipse (circle)
@@ -197,7 +197,7 @@
         int w = width - pen.width()/2;
         paint.drawArc(pen.width()/2 + 1, pen.width()/2 + 1, w - 2, w - 2, angle + arc, 240);
         paint.drawArc(pen.width()/2 + 1, pen.width()/2 + 1, w - 2, w - 2, angle - arc, 240);
-        color = color.dark(110); //FIXME: this should somehow use the contrast value
+        color = color.darker(110); //FIXME: this should somehow use the contrast value
     }        // end for ( angle = 720; angle < 6480; angle += 160 )
 
     paint.end();
@@ -238,7 +238,7 @@
 {
     if(led_color!=col) {
         led_color = col;
-        d->offcolor = col.dark(d->dark_factor);
+        d->offcolor = col.darker(d->dark_factor);
         update();
     }
 }
@@ -248,7 +248,7 @@
 {
     if (d->dark_factor != darkfactor) {
         d->dark_factor = darkfactor;
-        d->offcolor = led_color.dark(darkfactor);
+        d->offcolor = led_color.darker(darkfactor);
         update();
     }
 }