From 87a016680e3677da3993f333561e79eb0cead7d5 Mon Sep 17 00:00:00 2001 From: tpearson Date: Wed, 29 Jun 2011 16:05:55 +0000 Subject: TQt4 port ktechlab This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/ktechlab@1238801 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- src/electronics/components/toggleswitch.cpp | 34 ++++++++++++++--------------- 1 file changed, 17 insertions(+), 17 deletions(-) (limited to 'src/electronics/components/toggleswitch.cpp') diff --git a/src/electronics/components/toggleswitch.cpp b/src/electronics/components/toggleswitch.cpp index 4efe9ab..7c877f9 100644 --- a/src/electronics/components/toggleswitch.cpp +++ b/src/electronics/components/toggleswitch.cpp @@ -16,7 +16,7 @@ #include "switch.h" #include -#include +#include //BEGIN class ECDPDT Item* ECDPDT::construct( ItemDocument *itemDocument, bool newItem, const char *id ) @@ -27,7 +27,7 @@ Item* ECDPDT::construct( ItemDocument *itemDocument, bool newItem, const char *i LibraryItem* ECDPDT::libraryItem() { return new LibraryItem( - QString("ec/dpdt_toggle"), + TQString("ec/dpdt_toggle"), i18n("DPDT"), i18n("Switches"), "dpdt.png", @@ -43,7 +43,7 @@ ECDPDT::ECDPDT( ICNDocument *icnDocument, bool newItem, const char *id ) m_desc = i18n("Double-Pole Double-Throw switch."); setSize( -16, -32, 32, 64 ); - addButton( "button", QRect( -16, 32, 32, 20 ), "", true ); + addButton( "button", TQRect( -16, 32, 32, 20 ), "", true ); createProperty( "button_text", Variant::Type::String ); property("button_text")->setCaption( i18n("Button Text") ); @@ -90,7 +90,7 @@ void ECDPDT::dataChanged() } -void ECDPDT::drawShape( QPainter &p ) +void ECDPDT::drawShape( TQPainter &p ) { initPainter(p); @@ -113,7 +113,7 @@ void ECDPDT::drawShape( QPainter &p ) deinitPainter(p); } -void ECDPDT::buttonStateChanged( const QString &, bool state ) +void ECDPDT::buttonStateChanged( const TQString &, bool state ) { pressed = state; m_switch1->setState( state ? Switch::Open : Switch::Closed ); @@ -133,7 +133,7 @@ Item* ECDPST::construct( ItemDocument *itemDocument, bool newItem, const char *i LibraryItem* ECDPST::libraryItem() { return new LibraryItem( - QString("ec/dpst_toggle"), + TQString("ec/dpst_toggle"), i18n("DPST"), i18n("Switches"), "dpst.png", @@ -148,7 +148,7 @@ ECDPST::ECDPST( ICNDocument *icnDocument, bool newItem, const char *id ) m_desc = i18n("Double-Pole Single-Throw switch."); setSize( -16, -16, 32, 32 ); - addButton( "button", QRect( -16, 16, 32, 20 ), "", true ); + addButton( "button", TQRect( -16, 16, 32, 20 ), "", true ); createProperty( "button_text", Variant::Type::String ); property("button_text")->setCaption( i18n("Button Text") ); @@ -190,7 +190,7 @@ void ECDPST::dataChanged() } -void ECDPST::drawShape( QPainter &p ) +void ECDPST::drawShape( TQPainter &p ) { initPainter(p); @@ -211,7 +211,7 @@ void ECDPST::drawShape( QPainter &p ) deinitPainter(p); } -void ECDPST::buttonStateChanged( const QString &, bool state ) +void ECDPST::buttonStateChanged( const TQString &, bool state ) { m_switch1->setState( state ? Switch::Closed : Switch::Open ); m_switch2->setState( state ? Switch::Closed : Switch::Open ); @@ -229,7 +229,7 @@ Item* ECSPDT::construct( ItemDocument *itemDocument, bool newItem, const char *i LibraryItem* ECSPDT::libraryItem() { return new LibraryItem( - QString("ec/spdt_toggle"), + TQString("ec/spdt_toggle"), i18n("SPDT"), i18n("Switches"), "spdt.png", @@ -245,7 +245,7 @@ ECSPDT::ECSPDT( ICNDocument *icnDocument, bool newItem, const char *id ) m_desc = i18n("Single-Pole Double-Throw switch."); setSize( -16, -16, 32, 32 ); - addButton( "button", QRect( -16, 16, width(), 20 ), "", true ); + addButton( "button", TQRect( -16, 16, width(), 20 ), "", true ); createProperty( "button_text", Variant::Type::String ); property("button_text")->setCaption( i18n("Button Text") ); @@ -288,7 +288,7 @@ void ECSPDT::dataChanged() } -void ECSPDT::drawShape( QPainter &p ) +void ECSPDT::drawShape( TQPainter &p ) { initPainter(p); @@ -306,7 +306,7 @@ void ECSPDT::drawShape( QPainter &p ) deinitPainter(p); } -void ECSPDT::buttonStateChanged( const QString &, bool state ) +void ECSPDT::buttonStateChanged( const TQString &, bool state ) { pressed = state; m_switch1->setState( state ? Switch::Open : Switch::Closed ); @@ -324,7 +324,7 @@ Item* ECSPST::construct( ItemDocument *itemDocument, bool newItem, const char *i LibraryItem* ECSPST::libraryItem() { return new LibraryItem( - QString("ec/spst_toggle"), + TQString("ec/spst_toggle"), i18n("SPST"), i18n("Switches"), "spst.png", @@ -342,7 +342,7 @@ ECSPST::ECSPST( ICNDocument *icnDocument, bool newItem, const char *id ) setSize( -16, -8, 32, 16 ); pressed = false; - addButton( "button", QRect( -16, 8, width(), 20 ), "", true ); + addButton( "button", TQRect( -16, 8, width(), 20 ), "", true ); createProperty( "button_text", Variant::Type::String ); property("button_text")->setCaption( i18n("Button Text") ); @@ -382,7 +382,7 @@ void ECSPST::dataChanged() } -void ECSPST::drawShape( QPainter &p ) +void ECSPST::drawShape( TQPainter &p ) { initPainter(p); @@ -398,7 +398,7 @@ void ECSPST::drawShape( QPainter &p ) deinitPainter(p); } -void ECSPST::buttonStateChanged( const QString &, bool state ) +void ECSPST::buttonStateChanged( const TQString &, bool state ) { pressed = state; m_switch->setState( state ? Switch::Closed : Switch::Open ); -- cgit v1.2.1