summaryrefslogtreecommitdiffstats
path: root/src/electronics/components/ecpotentiometer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/electronics/components/ecpotentiometer.cpp')
-rw-r--r--src/electronics/components/ecpotentiometer.cpp30
1 files changed, 15 insertions, 15 deletions
diff --git a/src/electronics/components/ecpotentiometer.cpp b/src/electronics/components/ecpotentiometer.cpp
index db0fedd..8f55ff5 100644
--- a/src/electronics/components/ecpotentiometer.cpp
+++ b/src/electronics/components/ecpotentiometer.cpp
@@ -15,8 +15,8 @@
#include "resistance.h"
#include <klocale.h>
-#include <qpainter.h>
-#include <qstyle.h>
+#include <tqpainter.h>
+#include <tqstyle.h>
Item* ECPotentiometer::construct( ItemDocument *itemDocument, bool newItem, const char *id )
{
@@ -48,16 +48,16 @@ ECPotentiometer::ECPotentiometer( ICNDocument *icnDocument, bool newItem, const
m_r1 = createResistance( createPin( -8, -24, 90, "n1" ), m_p1, 1. );
m_r2 = createResistance( createPin( -8, 24, 270, "n2" ), m_p1, 1. );
- Slider * s = addSlider( "slider", 0, 100, 5, 50, Qt::Vertical, QRect( 0, -16, 16, 32 ) );
- m_pSlider = static_cast<QSlider*>(s->widget());
+ Slider * s = addSlider( "slider", 0, 100, 5, 50, Qt::Vertical, TQRect( 0, -16, 16, 32 ) );
+ m_pSlider = static_cast<TQSlider*>(s->widget());
createProperty( "resistance", Variant::Type::Double );
property("resistance")->setCaption( i18n("Resistance") );
- property("resistance")->setUnit( QChar(0x3a9) );
+ property("resistance")->setUnit( TQChar(0x3a9) );
property("resistance")->setMinValue(1e-6);
property("resistance")->setValue(1e5);
- addDisplayText( "res", QRect( -56, -8, 40, 16 ), "" );
+ addDisplayText( "res", TQRect( -56, -8, 40, 16 ), "" );
}
ECPotentiometer::~ECPotentiometer()
@@ -68,13 +68,13 @@ void ECPotentiometer::dataChanged()
{
m_resistance = dataDouble("resistance");
- QString display = QString::number( m_resistance / getMultiplier(m_resistance), 'g', 3 ) + getNumberMag(m_resistance) + QChar(0x3a9);
+ TQString display = TQString::number( m_resistance / getMultiplier(m_resistance), 'g', 3 ) + getNumberMag(m_resistance) + TQChar(0x3a9);
setDisplayText( "res", display );
sliderValueChanged( "slider", slider("slider")->value() );
}
-void ECPotentiometer::sliderValueChanged( const QString &id, int newValue )
+void ECPotentiometer::sliderValueChanged( const TQString &id, int newValue )
{
if ( id != "slider" )
return;
@@ -85,7 +85,7 @@ void ECPotentiometer::sliderValueChanged( const QString &id, int newValue )
m_r2->setResistance( m_resistance*(double)(100.-newValue)/100. );
}
-void ECPotentiometer::drawShape( QPainter &p )
+void ECPotentiometer::drawShape( TQPainter &p )
{
initPainter(p);
int _x = int(x());
@@ -93,17 +93,17 @@ void ECPotentiometer::drawShape( QPainter &p )
p.drawRect( _x-14, _y-16, 12, 32 );
- QPointArray pa(3);
- pa[0] = QPoint( 0, 0 );
- pa[1] = QPoint( 4, -3 );
- pa[2] = QPoint( 4, 3 );
+ TQPointArray pa(3);
+ pa[0] = TQPoint( 0, 0 );
+ pa[1] = TQPoint( 4, -3 );
+ pa[2] = TQPoint( 4, 3 );
- int space = m_pSlider->style().pixelMetric( QStyle::PM_SliderSpaceAvailable, m_pSlider );
+ int space = m_pSlider->tqstyle().tqpixelMetric( TQStyle::PM_SliderSpaceAvailable, m_pSlider );
int base_y = _y + (( angleDegrees() == 0 || angleDegrees() == 270 ) ? 1 : -1) * int( space * m_sliderProp );
pa.translate( _x+16, base_y );
- QColor c = m_p1->isSelected() ? m_selectedCol : black;
+ TQColor c = m_p1->isSelected() ? m_selectedCol : black;
p.setPen(c);
p.setBrush(c);