summaryrefslogtreecommitdiffstats
path: root/src/electronics/components/pushswitch.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/electronics/components/pushswitch.cpp')
-rw-r--r--src/electronics/components/pushswitch.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/electronics/components/pushswitch.cpp b/src/electronics/components/pushswitch.cpp
index b7b38b7..8257440 100644
--- a/src/electronics/components/pushswitch.cpp
+++ b/src/electronics/components/pushswitch.cpp
@@ -14,10 +14,10 @@
#include "switch.h"
#include <klocale.h>
-#include <qpainter.h>
-#include <qpixmap.h>
-#include <qpoint.h>
-#include <qpointarray.h>
+#include <tqpainter.h>
+#include <tqpixmap.h>
+#include <tqpoint.h>
+#include <tqpointarray.h>
//BEGIN class ECPTBSwitch
Item* ECPTBSwitch::construct( ItemDocument *itemDocument, bool newItem, const char *id )
@@ -28,7 +28,7 @@ Item* ECPTBSwitch::construct( ItemDocument *itemDocument, bool newItem, const ch
LibraryItem* ECPTBSwitch::libraryItem()
{
return new LibraryItem(
- QString("ec/ptb_switch"),
+ TQString("ec/ptb_switch"),
i18n("Push-to-Break"),
i18n("Switches"),
"ptb.png",
@@ -42,7 +42,7 @@ ECPTBSwitch::ECPTBSwitch( ICNDocument *icnDocument, bool newItem, const char *id
m_name = i18n("Push to Break");
setSize( -16, -16, 32, 24 );
- addButton( "button", QRect( -16, 8, 32, 20 ), "" );
+ addButton( "button", TQRect( -16, 8, 32, 20 ), "" );
createProperty( "button_text", Variant::Type::String );
property("button_text")->setCaption( i18n("Button Text") );
@@ -80,7 +80,7 @@ void ECPTBSwitch::dataChanged()
}
-void ECPTBSwitch::drawShape( QPainter &p )
+void ECPTBSwitch::drawShape( TQPainter &p )
{
initPainter(p);
@@ -93,7 +93,7 @@ void ECPTBSwitch::drawShape( QPainter &p )
p.drawLine( _x+width()/4, _y+dy, _x+(3*width())/4, _y+dy ); // Top horizontal line
p.drawLine( _x, _y+(_height/2)-radius+dy, _x+width(), _y+(_height/2)-radius+dy ); // Bottom horizontal line
- p.drawLine( _x+width()/2, _y+dy, _x+width()/2, _y+(_height/2)-radius+dy ); // Vertical line
+ p.drawLine( _x+width()/2, _y+dy, _x+width()/2, _y+(_height/2)-radius+dy ); //Qt::Vertical line
p.drawEllipse( _x, _y+(_height/2)-radius, 2*radius, 2*radius ); // Left circle
p.drawEllipse( _x+width()-2*radius+1, _y+(_height/2)-radius, 2*radius, 2*radius ); // Right circle
@@ -101,7 +101,7 @@ void ECPTBSwitch::drawShape( QPainter &p )
deinitPainter(p);
}
-void ECPTBSwitch::buttonStateChanged( const QString &id, bool state )
+void ECPTBSwitch::buttonStateChanged( const TQString &id, bool state )
{
if ( id != "button" )
return;
@@ -120,7 +120,7 @@ Item* ECPTMSwitch::construct( ItemDocument *itemDocument, bool newItem, const ch
LibraryItem* ECPTMSwitch::libraryItem()
{
return new LibraryItem(
- QString("ec/ptm_switch"),
+ TQString("ec/ptm_switch"),
i18n("Push-to-Make"),
i18n("Switches"),
"ptm.png",
@@ -134,7 +134,7 @@ ECPTMSwitch::ECPTMSwitch( ICNDocument *icnDocument, bool newItem, const char *id
m_name = i18n("Push to Make");
setSize( -16, -16, 32, 24 );
- addButton( "button", QRect( -16, 8, 32, 20 ), "" );
+ addButton( "button", TQRect( -16, 8, 32, 20 ), "" );
createProperty( "button_text", Variant::Type::String );
property("button_text")->setCaption( i18n("Button Text") );
@@ -173,7 +173,7 @@ void ECPTMSwitch::dataChanged()
}
-void ECPTMSwitch::drawShape( QPainter &p )
+void ECPTMSwitch::drawShape( TQPainter &p )
{
initPainter(p);
@@ -186,7 +186,7 @@ void ECPTMSwitch::drawShape( QPainter &p )
p.drawLine( _x+width()/4, _y-dy, _x+(3*width())/4, _y-dy ); // Top horizontal line
p.drawLine( _x, _y+(_height/2)-radius-dy, _x+width(), _y+(_height/2)-radius-dy ); // Bottom horizontal line
- p.drawLine( _x+width()/2, _y-dy, _x+width()/2, _y+(_height/2)-radius-dy ); // Vertical line
+ p.drawLine( _x+width()/2, _y-dy, _x+width()/2, _y+(_height/2)-radius-dy ); //Qt::Vertical line
p.drawEllipse( _x, _y+(_height/2)-radius, 2*radius, 2*radius ); // Left circle
p.drawEllipse( _x+width()-2*radius+1, _y+(_height/2)-radius, 2*radius, 2*radius ); // Right circle
@@ -194,7 +194,7 @@ void ECPTMSwitch::drawShape( QPainter &p )
deinitPainter(p);
}
-void ECPTMSwitch::buttonStateChanged( const QString &id, bool state )
+void ECPTMSwitch::buttonStateChanged( const TQString &id, bool state )
{
if ( id != "button" ) return;
m_switch->setState( state ? Switch::Closed : Switch::Open );