summaryrefslogtreecommitdiffstats
path: root/src/electronics/components/rotoswitch.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/electronics/components/rotoswitch.cpp')
-rw-r--r--src/electronics/components/rotoswitch.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/electronics/components/rotoswitch.cpp b/src/electronics/components/rotoswitch.cpp
index 872714c..ac7f1a0 100644
--- a/src/electronics/components/rotoswitch.cpp
+++ b/src/electronics/components/rotoswitch.cpp
@@ -16,7 +16,7 @@
#include "switch.h"
#include <klocale.h>
-#include <qpainter.h>
+#include <tqpainter.h>
#include <cmath>
#include <assert.h>
@@ -31,7 +31,7 @@ Item* ECRotoSwitch::construct( ItemDocument *itemDocument, bool newItem, const c
LibraryItem* ECRotoSwitch::libraryItem()
{
return new LibraryItem(
- QString("ec/roto_switch"),
+ TQString("ec/roto_switch"),
i18n("Rotary"),
i18n("Switches"),
"rotary.png",
@@ -47,20 +47,20 @@ m_numPositions(0)
// m_name = i18n("Rotary Switch(WIP)");
m_name = i18n("Rotary Switch");
m_desc = i18n("Rotary Switch"); ///< \todo better description for rotoswitch
- QPointArray pa;
+ TQPointArray pa;
pa.makeArc( -_pinInnerRadius, -_pinInnerRadius, 2*_pinInnerRadius, 2*_pinInnerRadius , 0, 16*360 );
setItemPoints( pa );
//setSize( -64, -64, 128, 128 );
//half the side length of the buttons
int buttonRadius = 10;
- addButton( "go_left", QRect( -_pinOuterRadius/3-buttonRadius, _pinOuterRadius-3*buttonRadius, 2*buttonRadius, 2*buttonRadius ), "<", false );
- addButton( "go_right", QRect(_pinOuterRadius/3-buttonRadius, _pinOuterRadius-3*buttonRadius, 2*buttonRadius, 2*buttonRadius ), ">", false );
+ addButton( "go_left", TQRect( -_pinOuterRadius/3-buttonRadius, _pinOuterRadius-3*buttonRadius, 2*buttonRadius, 2*buttonRadius ), "<", false );
+ addButton( "go_right", TQRect(_pinOuterRadius/3-buttonRadius, _pinOuterRadius-3*buttonRadius, 2*buttonRadius, 2*buttonRadius ), ">", false );
/*Variant * v = createProperty( "button_map", Variant::Type::String );
v->setCaption( i18n("Button Map") );
v->setAdvanced(true);
- const QString defButtonMap("SSSSSSSSSSSM");
+ const TQString defButtonMap("SSSSSSSSSSSM");
v->setValue(defButtonMap);
*/
Variant * v = createProperty( "num_positions", Variant::Type::Int );
@@ -115,7 +115,7 @@ void ECRotoSwitch::dataChanged()
}
inline int roundTo10(int a){return ((a/10)+(a%10<5?0:1))*10;}
-void ECRotoSwitch::drawShape( QPainter &p )
+void ECRotoSwitch::drawShape( TQPainter &p )
{
initPainter(p);
@@ -178,7 +178,7 @@ void ECRotoSwitch::drawShape( QPainter &p )
deinitPainter(p);
}
-void ECRotoSwitch::buttonStateChanged( const QString & id, bool state )
+void ECRotoSwitch::buttonStateChanged( const TQString & id, bool state )
{
SwitchPosition& curSP = m_positions[m_curPosition];
int nextPos = m_curPosition;
@@ -245,7 +245,7 @@ void ECRotoSwitch::setUpSwitches()
for(int i=0; i<m_numPositions; i++)
{
SwitchPosition& sp = m_positions[i];
- QString pinName = QString("pin_%1").arg(i);
+ TQString pinName = TQString("pin_%1").tqarg(i);
removeNode(pinName);
removeSwitch(sp.posSwitch);
}
@@ -284,7 +284,7 @@ void ECRotoSwitch::setUpSwitches()
// kdDebug() << contactX <<", "<< contactY <<endl;
- sp.node = createPin(contactX,-contactY,sp.pinAngle,QString("pin_%1").arg(i));
+ sp.node = createPin(contactX,-contactY,sp.pinAngle,TQString("pin_%1").tqarg(i));
sp.posSwitch = createSwitch(m_inNode, sp.node, true);
sp.isMomentary = false;//(map[i] == 'M');
m_positions.push_back(sp);