summaryrefslogtreecommitdiffstats
path: root/src/gui/kdeext/RGLed.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/kdeext/RGLed.cpp')
-rw-r--r--src/gui/kdeext/RGLed.cpp86
1 files changed, 43 insertions, 43 deletions
diff --git a/src/gui/kdeext/RGLed.cpp b/src/gui/kdeext/RGLed.cpp
index c5e5934..9d34dcb 100644
--- a/src/gui/kdeext/RGLed.cpp
+++ b/src/gui/kdeext/RGLed.cpp
@@ -4,7 +4,7 @@
KDE libraries. The modifications (for "brute-force" antialiasing)
were carried out by Chris Cannam, April 2004.
- Copyright (C) 1998 J�rg Habenicht ([email protected])
+ Copyright (C) 1998 J�rg Habenicht ([email protected])
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
@@ -59,7 +59,7 @@
*
* Revision 1.19 2001/08/08 14:35:12 hausmann
* - removed empty KActionCollection::childEvent
- * - added sizeHint() and minimumSizeHint() methods to KLed, as advised by
+ * - added tqsizeHint() and tqminimumSizeHint() methods to KLed, as advised by
* Rik in the comment in kled.h
* - removed unused mousePressEvent, mouseMoveEvent and mouseReleaseEvent
* handlers from KPassDlg
@@ -81,7 +81,7 @@
*
* Revision 1.14 2000/06/03 01:04:42 gehrmab
* * Made drawing routines available for overriding
- * * Added a parent/name constructor
+ * * Added a tqparent/name constructor
* * Propertyfication
*
* Revision 1.13 2000/05/08 19:38:49 sschiman
@@ -119,7 +119,7 @@
* It does not yet work reliably.
*
* Revision 1.6 1999/03/01 23:34:49 kulow
- * CVS_SILENT ported to Qt 2.0
+ * CVS_SILENT ported to TQt 2.0
*
* Revision 1.5 1999/02/19 08:52:42 habenich
* ID und LOG tags included
@@ -156,11 +156,11 @@ class KLed::KLedPrivate
-KLed::KLed(TQWidget *parent, const char *name)
- : TQWidget( parent, name),
+KLed::KLed(TQWidget *tqparent, const char *name)
+ : TQWidget( tqparent, name),
led_state(On),
led_look(Raised),
- led_shape(Circular)
+ led_tqshape(Circular)
{
TQColor col(green);
d = new KLed::KLedPrivate;
@@ -173,11 +173,11 @@ KLed::KLed(TQWidget *parent, const char *name)
}
-KLed::KLed(const TQColor& col, TQWidget *parent, const char *name)
- : TQWidget( parent, name),
+KLed::KLed(const TQColor& col, TQWidget *tqparent, const char *name)
+ : TQWidget( tqparent, name),
led_state(On),
led_look(Raised),
- led_shape(Circular)
+ led_tqshape(Circular)
{
d = new KLed::KLedPrivate;
d->dark_factor = 300;
@@ -190,11 +190,11 @@ KLed::KLed(const TQColor& col, TQWidget *parent, const char *name)
}
KLed::KLed(const TQColor& col, KLed::State state,
- KLed::Look look, KLed::Shape shape, TQWidget *parent, const char *name )
- : TQWidget(parent, name),
+ KLed::Look look, KLed::Shape tqshape, TQWidget *tqparent, const char *name )
+ : TQWidget(tqparent, name),
led_state(state),
led_look(look),
- led_shape(shape)
+ led_tqshape(tqshape)
{
d = new KLed::KLedPrivate;
d->dark_factor = 300;
@@ -202,7 +202,7 @@ KLed::KLed(const TQColor& col, KLed::State state,
d->off_map = 0;
d->on_map = 0;
- //setShape(shape);
+ //setShape(tqshape);
setColor(col);
}
@@ -223,7 +223,7 @@ KLed::paintEvent(TQPaintEvent *)
t.start();
for (int i = 0; i < rounds; i++) {
#endif
- switch (led_shape) {
+ switch (led_tqshape) {
case Rectangular:
switch (led_look) {
case Sunken :
@@ -236,7 +236,7 @@ KLed::paintEvent(TQPaintEvent *)
paintRect();
break;
default :
- qWarning("%s: in class KLed: no KLed::Look set", qApp->argv()[0]);
+ qWarning("%s: in class KLed: no KLed::Look set", tqApp->argv()[0]);
}
break;
case Circular:
@@ -251,11 +251,11 @@ KLed::paintEvent(TQPaintEvent *)
paintSunken();
break;
default:
- qWarning("%s: in class KLed: no KLed::Look set", qApp->argv()[0]);
+ qWarning("%s: in class KLed: no KLed::Look set", tqApp->argv()[0]);
}
break;
default:
- qWarning("%s: in class KLed: no KLed::Shape set", qApp->argv()[0]);
+ qWarning("%s: in class KLed: no KLed::Shape set", tqApp->argv()[0]);
break;
}
#ifdef PAINT_BENCH
@@ -294,11 +294,11 @@ KLed::paintFlat() // paint a ROUND FLAT led lamp
// Set the brush to SolidPattern, this fills the entire area
// of the ellipse which is drawn with a thin grey "border" (pen)
- brush.setStyle( TQBrush::SolidPattern );
+ brush.setStyle( Qt::SolidPattern );
brush.setColor( color );
pen.setWidth( 1 );
- color = colorGroup().dark();
+ color = tqcolorGroup().dark();
pen.setColor( color ); // Set the pen accordingly
paint.setPen( pen ); // Select pen for drawing
@@ -339,7 +339,7 @@ KLed::paintRound() // paint a ROUND RAISED led lamp
// Set the brush to SolidPattern, this fills the entire area
// of the ellipse which is drawn first
- brush.setStyle( TQBrush::SolidPattern );
+ brush.setStyle( Qt::SolidPattern );
brush.setColor( color );
paint.setBrush( brush ); // Assign the brush to the painter
@@ -347,7 +347,7 @@ KLed::paintRound() // paint a ROUND RAISED led lamp
paint.drawEllipse( 1, 1, width, width );
// Draw the bright light spot of the LED now, using modified "old"
- // painter routine taken from KDEUI�s KLed widget:
+ // painter routine taken from KDEUI�s KLed widget:
// Setting the new width of the pen is essential to avoid "pixelized"
// shadow like it can be observed with the old LED code
@@ -359,7 +359,7 @@ KLed::paintRound() // paint a ROUND RAISED led lamp
light_width *= 2;
light_width /= 3;
- // Calculate the LED�s "light factor":
+ // Calculate the LED�s "light factor":
int light_quote = (130 * 2 / (light_width ? light_width : 1)) + 100;
// Now draw the bright spot on the LED:
@@ -386,10 +386,10 @@ KLed::paintRound() // paint a ROUND RAISED led lamp
// avoid that the border can be erased by the bright spot of the LED
pen.setWidth( 1 );
- color = colorGroup().dark();
+ color = tqcolorGroup().dark();
pen.setColor( color ); // Set the pen accordingly
paint.setPen( pen ); // Select pen for drawing
- brush.setStyle( TQBrush::NoBrush ); // Switch off the brush
+ brush.setStyle( Qt::NoBrush ); // Switch off the brush
paint.setBrush( brush ); // This avoids filling of the ellipse
paint.drawEllipse( 1, 1, width, width );
@@ -459,7 +459,7 @@ KLed::paintSunken() // paint a ROUND SUNKEN led lamp
// Set the brush to SolidPattern, this fills the entire area
// of the ellipse which is drawn first
- brush.setStyle( TQBrush::SolidPattern );
+ brush.setStyle( Qt::SolidPattern );
brush.setColor( color );
paint.setBrush( brush ); // Assign the brush to the painter
@@ -467,7 +467,7 @@ KLed::paintSunken() // paint a ROUND SUNKEN led lamp
paint.drawEllipse( scale, scale, width - scale*2, width - scale*2 );
// Draw the bright light spot of the LED now, using modified "old"
- // painter routine taken from KDEUI�s KLed widget:
+ // painter routine taken from KDEUI�s KLed widget:
// Setting the new width of the pen is essential to avoid "pixelized"
// shadow like it can be observed with the old LED code
@@ -479,7 +479,7 @@ KLed::paintSunken() // paint a ROUND SUNKEN led lamp
light_width *= 2;
light_width /= 3;
- // Calculate the LED�s "light factor":
+ // Calculate the LED�s "light factor":
int light_quote = (130 * 2 / (light_width ? light_width : 1)) + 100;
// Now draw the bright spot on the LED:
@@ -506,14 +506,14 @@ KLed::paintSunken() // paint a ROUND SUNKEN led lamp
// from the upper left.
pen.setWidth( 2 * scale + 1 ); // ### shouldn't this value be smaller for smaller LEDs?
- brush.setStyle( TQBrush::NoBrush ); // Switch off the brush
+ brush.setStyle( Qt::NoBrush ); // Switch off the brush
paint.setBrush( brush ); // This avoids filling of the ellipse
- // Set the initial color value to colorGroup().light() (bright) and start
- // drawing the shadow border at 45� (45*16 = 720).
+ // Set the initial color value to tqcolorGroup().light() (bright) and start
+ // drawing the shadow border at 45� (45*16 = 720).
int angle = -720;
- color = colorGroup().light();
+ color = tqcolorGroup().light();
for ( int arc = 120; arc < 2880; arc += 240 )
{
@@ -582,8 +582,8 @@ KLed::paintRectFrame(bool raised)
TQBrush darkBrush(d->offcolor);
int w = width();
int h = height();
- TQColor black = Qt::black;
- TQColor white = Qt::white;
+ TQColor black = TQt::black;
+ TQColor white = TQt::white;
// -----
if (raised) {
painter.setPen(white);
@@ -612,12 +612,12 @@ KLed::state() const
}
KLed::Shape
-KLed::shape() const
+KLed::tqshape() const
{
- return led_shape;
+ return led_tqshape;
}
-QColor
+TQColor
KLed::color() const
{
return led_color;
@@ -649,8 +649,8 @@ KLed::toggleState()
void
KLed::setShape(KLed::Shape s)
{
- if (led_shape != s) {
- led_shape = s;
+ if (led_tqshape != s) {
+ led_tqshape = s;
update();
}
}
@@ -712,14 +712,14 @@ KLed::off()
setState(Off);
}
-QSize
-KLed::sizeHint() const
+TQSize
+KLed::tqsizeHint() const
{
return TQSize(16, 16);
}
-QSize
-KLed::minimumSizeHint() const
+TQSize
+KLed::tqminimumSizeHint() const
{
return TQSize(16, 16 );
}