src/analog/led.cpp

changeset 319
d1861707054c
parent 316
dcd472be9ae8
child 320
a866722d0f15
--- a/src/analog/led.cpp	Wed Jun 29 23:06:38 2022 +0200
+++ b/src/analog/led.cpp	Thu Jun 30 10:38:03 2022 +0200
@@ -58,17 +58,17 @@
   updateWithBackground(); 
 }
 
-// Maluje całą diodę - koło o kolorze bazowym a na to nakłada odblask. 
+// Paints the whole diode - a circle with a base color, and a reflection over it
 void Led::paintEvent(QPaintEvent * /* event*/ )
 {
   QPainter painter(this); 
   initCoordinateSystem(painter); 
-  // *** Draw circle */ 
+  // *** Draw circle
   int h,s,v,a; 
   QColor c,back = color(); 
   c=back; 
   
-  // Kolor diody 
+  // Color of the LED
   if (!m_checked || !isEnabled()) 
   { 
     back.getHsv(&h,&s,&v,&a);
@@ -77,9 +77,9 @@
   }
   painter.setBrush(back); 
   
-  // obwudka diody 
+  // LED circuit
   QPen pen;
-  // przyciemnienie obwudki 
+  // rim darkening
   c.getHsv(&h,&s,&v,&a); 
   s*=0.5; 
   c.setHsv(h,s,v,a);  
@@ -90,12 +90,12 @@
   painter.drawEllipse(-149,-149,299,299);
   painter.end(); 
   
-  // odblask światła diody 
-  drawBackground(); // to maluje na tym co dotychczas to co jest w bitmapce 
+  // LED reflector
+  drawBackground(); // It paints on what has been in the bitmap so far
 }
 
 
-// Rysuje odblask swiatła na diodzie 
+// Draws a reflection of the light on the diode
 void Led::paintBackground(QPainter & painter)
 {
   initCoordinateSystem(painter); 
@@ -115,7 +115,7 @@
 void Led::initCoordinateSystem(QPainter & painter)
 {
   int side = qMin(width(), height());
-  // inicjalizacja paintera
+  // painter initialization
   painter.setRenderHint(QPainter::Antialiasing);
   painter.translate(width() / 2, height() / 2);
   painter.scale(side / 330.0, side / 330.0);

mercurial