summaryrefslogtreecommitdiffstats
path: root/kjsembed/bindings/painter_imp.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kjsembed/bindings/painter_imp.cpp')
-rw-r--r--kjsembed/bindings/painter_imp.cpp66
1 files changed, 33 insertions, 33 deletions
diff --git a/kjsembed/bindings/painter_imp.cpp b/kjsembed/bindings/painter_imp.cpp
index 184529df..9a8d36a9 100644
--- a/kjsembed/bindings/painter_imp.cpp
+++ b/kjsembed/bindings/painter_imp.cpp
@@ -38,15 +38,15 @@ namespace Bindings {
{
PainterRef * p = new PainterRef();
/*
- TTQWidget *w = extractTQWidget(exec, args, 0);
- TTQPixmap pix = extractTQPixmap(exec, args, 0);
+ TQWidget *w = extractTQWidget(exec, args, 0);
+ TQPixmap pix = extractTQPixmap(exec, args, 0);
if( w )
{
p->setDevice(w);
p->setCanDelete(false);
}
else if( !pix.isNull() )
- p->setDevice( new TTQPixmap(pix) );
+ p->setDevice( new TQPixmap(pix) );
*/
JSOpaqueProxy *prx = new JSOpaqueProxy( p, "Painter" );
prx->setOwner( JSProxy::JavaScript );
@@ -63,7 +63,7 @@ namespace Bindings {
PainterRef::PainterRef()
{
m_device = 0L;
- m_painter = new TTQPainter;
+ m_painter = new TQPainter;
m_canDelete = true;
}
PainterRef::~PainterRef()
@@ -74,17 +74,17 @@ PainterRef::~PainterRef()
delete m_painter;
}
-TTQPainter *PainterRef::painter()
+TQPainter *PainterRef::painter()
{
return m_painter;
}
-TTQPaintDevice *PainterRef::device()
+TQPaintDevice *PainterRef::device()
{
return m_device;
}
-void PainterRef::setDevice(TTQPaintDevice *d)
+void PainterRef::setDevice(TQPaintDevice *d)
{
if( m_device && m_canDelete)
{
@@ -162,17 +162,17 @@ KJS::Value Painter::call( KJS::ExecState *exec, KJS::Object &self, const KJS::Li
}
else
{
- TTQString msg = i18n( "Paintdevice was not a valid widget." );
+ TQString msg = i18n( "Paintdevice was not a valid widget." );
throwError(exec,msg);
retValue = KJS::Boolean(false);
}
}
else if ( vp )
{
- TTQPixmap *p = new TTQPixmap(vp->toVariant().toPixmap());
+ TQPixmap *p = new TQPixmap(vp->toVariant().toPixmap());
if( p->isNull() )
{
- TTQString msg = i18n( "Cannto paint to a null pixmap." ).arg( op->typeName() );
+ TQString msg = i18n( "Cannto paint to a null pixmap." ).arg( op->typeName() );
throwError(exec,msg);
retValue = KJS::Boolean(false);
}
@@ -183,22 +183,22 @@ KJS::Value Painter::call( KJS::ExecState *exec, KJS::Object &self, const KJS::Li
retValue = KJS::Boolean( begin() );
}
}
- else if ( op && op->typeName() == "TTQPaintDevice" )
+ else if ( op && op->typeName() == "TQPaintDevice" )
{
- pr->setDevice( op->toNative<TTQPaintDevice>() );
+ pr->setDevice( op->toNative<TQPaintDevice>() );
pr->setCanDelete(false);
retValue = KJS::Boolean( begin() );
}
else
{
- TTQString msg = i18n( "Paintdevice of type '%1' is not supported." ).arg( op->typeName() );
+ TQString msg = i18n( "Paintdevice of type '%1' is not supported." ).arg( op->typeName() );
throwError(exec,msg);
retValue = KJS::Boolean(false);
}
}
else
{
- TTQString msg = i18n( "Incorrect number of arguements '%1'." ).arg( args.size() );
+ TQString msg = i18n( "Incorrect number of arguements '%1'." ).arg( args.size() );
throwError(exec,msg);
retValue = KJS::Boolean(false);
}
@@ -216,7 +216,7 @@ KJS::Value Painter::call( KJS::ExecState *exec, KJS::Object &self, const KJS::Li
break;
case MethodsetPen:
{
- TTQPen pn = extractTQPen(exec, args, 0);
+ TQPen pn = extractTQPen(exec, args, 0);
setPen(pn);
break;
}
@@ -367,7 +367,7 @@ bool Painter::begin()
{
return pr->painter()->begin(pr->device());
}
-bool Painter::begin(TTQPaintDevice *dev)
+bool Painter::begin(TQPaintDevice *dev)
{
return pr->painter()->begin(dev);
}
@@ -377,29 +377,29 @@ bool Painter::end()
return pr->painter()->end();
}
-TTQPixmap Painter::pixmap() const
+TQPixmap Painter::pixmap() const
{
- TTQPixmap *pix = dynamic_cast<TTQPixmap *>(pr->device());
+ TQPixmap *pix = dynamic_cast<TQPixmap *>(pr->device());
if( pix )
{
return *pix;
}
- return TTQPixmap();
+ return TQPixmap();
}
-void Painter::setPen( const TTQPen& pn )
+void Painter::setPen( const TQPen& pn )
{
pr->painter()->setPen(pn);
}
-TTQPen Painter::pen() const
+TQPen Painter::pen() const
{
return pr->painter()->pen();
}
-TTQRect Painter::textBox(const TTQString &text)
+TQRect Painter::textBox(const TQString &text)
{
- TTQFontMetrics fnt = pr->painter()->fontMetrics();
+ TQFontMetrics fnt = pr->painter()->fontMetrics();
return fnt.boundingRect(text);
}
@@ -438,7 +438,7 @@ void Painter::drawEllipse( int x, int y, int w, int h )
pr->painter()->drawEllipse( x, y, w, h );
}
-void Painter::drawText( int x, int y, const TTQString &txt )
+void Painter::drawText( int x, int y, const TQString &txt )
{
pr->painter()->drawText( x, y, txt );
}
@@ -451,15 +451,15 @@ void Painter::drawPie ( int x, int y, int w, int h, int a, int alen )
{
pr->painter()->drawPie( x, y, w, h, a, alen);
}
-void Painter::drawPixmap ( int x, int y, const TTQPixmap & pixmap, int sx, int sy, int sw, int sh )
+void Painter::drawPixmap ( int x, int y, const TQPixmap & pixmap, int sx, int sy, int sw, int sh )
{
pr->painter()->drawPixmap( x, y, pixmap, sx, sy, sw, sh );
}
-void Painter::drawImage ( int x, int y, const TTQImage &image, int sx , int sy, int sw , int sh, int conversionFlags)
+void Painter::drawImage ( int x, int y, const TQImage &image, int sx , int sy, int sw , int sh, int conversionFlags)
{
pr->painter()->drawImage( x, y, image, sx, sy, sw, sh, conversionFlags );
}
-void Painter::drawTiledPixmap ( int x, int y, int w, int h, const TTQPixmap & pixmap, int sx, int sy )
+void Painter::drawTiledPixmap ( int x, int y, int w, int h, const TQPixmap & pixmap, int sx, int sy )
{
pr->painter()->drawTiledPixmap( x, y, w, h, pixmap, sx, sy );
}
@@ -481,22 +481,22 @@ void Painter::translate ( double dx, double dy )
pr->painter()->translate( dx, dy );
}
-void KJSEmbed::Bindings::Painter::setFont( const TTQFont & font )
+void KJSEmbed::Bindings::Painter::setFont( const TQFont & font )
{
pr->painter()->setFont(font);
}
-TTQFont KJSEmbed::Bindings::Painter::font( ) const
+TQFont KJSEmbed::Bindings::Painter::font( ) const
{
return pr->painter()->font();
}
-TTQColor KJSEmbed::Bindings::Painter::backgroundColor( ) const
+TQColor KJSEmbed::Bindings::Painter::backgroundColor( ) const
{
return pr->painter()->backgroundColor();
}
-void KJSEmbed::Bindings::Painter::setBackgroundColor( const TTQColor & color )
+void KJSEmbed::Bindings::Painter::setBackgroundColor( const TQColor & color )
{
pr->painter()->setBackgroundColor(color);
}
@@ -505,12 +505,12 @@ void KJSEmbed::Bindings::Painter::setBackgroundColor( const TTQColor & color )
} // namespace KJSEmbed
-void KJSEmbed::Bindings::Painter::setBrush( const TTQColor & brush )
+void KJSEmbed::Bindings::Painter::setBrush( const TQColor & brush )
{
pr->painter()->setBrush(brush);
}
-TTQColor KJSEmbed::Bindings::Painter::brush( ) const
+TQColor KJSEmbed::Bindings::Painter::brush( ) const
{
return pr->painter()->brush().color();
}