diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-05 15:55:57 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-05 15:55:57 -0600 |
commit | 9ba04742771370f59740e32e11c5f3a1e6a1b70a (patch) | |
tree | c81c34dae2b3b1ea73801bf18a960265dc4207f7 /kjsembed/qtbindings/qcanvasview_imp.cpp | |
parent | 1a96c45b22d01378202d9dc7ed9c47acd30f966e (diff) | |
download | tdebindings-9ba04742771370f59740e32e11c5f3a1e6a1b70a.tar.gz tdebindings-9ba04742771370f59740e32e11c5f3a1e6a1b70a.zip |
Initial TQt conversion
Diffstat (limited to 'kjsembed/qtbindings/qcanvasview_imp.cpp')
-rw-r--r-- | kjsembed/qtbindings/qcanvasview_imp.cpp | 92 |
1 files changed, 46 insertions, 46 deletions
diff --git a/kjsembed/qtbindings/qcanvasview_imp.cpp b/kjsembed/qtbindings/qcanvasview_imp.cpp index bf190920..bfa3229b 100644 --- a/kjsembed/qtbindings/qcanvasview_imp.cpp +++ b/kjsembed/qtbindings/qcanvasview_imp.cpp @@ -23,19 +23,19 @@ */ namespace KJSEmbed { -QCanvasViewImp::QCanvasViewImp( KJS::ExecState *exec, int mid, bool constructor ) +TTQCanvasViewImp::TQCanvasViewImp( KJS::ExecState *exec, int mid, bool constructor ) : JSProxyImp(exec), id(mid), cons(constructor) { } -QCanvasViewImp::~QCanvasViewImp() +TTQCanvasViewImp::~TQCanvasViewImp() { } /** * Adds bindings for static methods and enum constants to the specified Object. */ -void QCanvasViewImp::addStaticBindings( KJS::ExecState *exec, KJS::Object &object ) +void TQCanvasViewImp::addStaticBindings( KJS::ExecState *exec, KJS::Object &object ) { JSProxy::MethodTable methods[] = { @@ -43,11 +43,11 @@ void QCanvasViewImp::addStaticBindings( KJS::ExecState *exec, KJS::Object &objec }; int idx = 0; - TQCString lastName; + TTQCString lastName; while( methods[idx].name ) { if ( lastName != methods[idx].name ) { - QCanvasViewImp *meth = new QCanvasViewImp( exec, methods[idx].id ); + TQCanvasViewImp *meth = new TQCanvasViewImp( exec, methods[idx].id ); object.put( exec , methods[idx].name, KJS::Object(meth) ); lastName = methods[idx].name; } @@ -60,7 +60,7 @@ void QCanvasViewImp::addStaticBindings( KJS::ExecState *exec, KJS::Object &objec /** * Adds bindings for instance methods to the specified Object. */ -void QCanvasViewImp::addBindings( KJS::ExecState *exec, KJS::Object &object ) +void TQCanvasViewImp::addBindings( KJS::ExecState *exec, KJS::Object &object ) { JSProxy::MethodTable methods[] = { @@ -73,11 +73,11 @@ void QCanvasViewImp::addBindings( KJS::ExecState *exec, KJS::Object &object ) }; int idx = 0; - TQCString lastName; + TTQCString lastName; while( methods[idx].name ) { if ( lastName != methods[idx].name ) { - QCanvasViewImp *meth = new QCanvasViewImp( exec, methods[idx].id ); + TQCanvasViewImp *meth = new TQCanvasViewImp( exec, methods[idx].id ); object.put( exec , methods[idx].name, KJS::Object(meth) ); lastName = methods[idx].name; } @@ -86,104 +86,104 @@ void QCanvasViewImp::addBindings( KJS::ExecState *exec, KJS::Object &object ) } /** - * Extract a TQCanvasView pointer from an Object. + * Extract a TTQCanvasView pointer from an Object. */ -TQCanvasView *QCanvasViewImp::toQCanvasView( KJS::Object &self ) +TTQCanvasView *TQCanvasViewImp::toTQCanvasView( KJS::Object &self ) { JSObjectProxy *ob = JSProxy::toObjectProxy( self.imp() ); if ( ob ) { - TQObject *obj = ob->object(); + TTQObject *obj = ob->object(); if ( obj ) - return dynamic_cast<TQCanvasView *>( obj ); + return dynamic_cast<TTQCanvasView *>( obj ); } JSOpaqueProxy *op = JSProxy::toOpaqueProxy( self.imp() ); if ( !op ) return 0; - if ( op->typeName() != "TQCanvasView" ) + if ( op->typeName() != "TTQCanvasView" ) return 0; - return op->toNative<TQCanvasView>(); + return op->toNative<TTQCanvasView>(); } /** * Select and invoke the correct constructor. */ -KJS::Object QCanvasViewImp::construct( KJS::ExecState *exec, const KJS::List &args ) +KJS::Object TQCanvasViewImp::construct( KJS::ExecState *exec, const KJS::List &args ) { switch( id ) { case Constructor_QCanvasView_1: - return QCanvasView_1( exec, args ); + return TQCanvasView_1( exec, args ); break; case Constructor_QCanvasView_2: - return QCanvasView_2( exec, args ); + return TQCanvasView_2( exec, args ); break; default: break; } - TQString msg = i18n("QCanvasViewCons has no constructor with id '%1'.").arg(id); + TTQString msg = i18n("TQCanvasViewCons has no constructor with id '%1'.").arg(id); return throwError(exec, msg,KJS::ReferenceError); } -KJS::Object QCanvasViewImp::QCanvasView_1( KJS::ExecState *exec, const KJS::List &args ) +KJS::Object TQCanvasViewImp::TQCanvasView_1( KJS::ExecState *exec, const KJS::List &args ) { - TQWidget *arg0 = extractQWidget(exec, args, 0); + TTQWidget *arg0 = extractTQWidget(exec, args, 0); const char *arg1 = (args.size() >= 2) ? args[1].toString(exec).ascii() : 0; - Qt::WFlags arg2 = 0; // TODO (hack for TQCanvasView) + TQt::WFlags arg2 = 0; // TODO (hack for TTQCanvasView) - // We should now create an instance of the TQCanvasView object + // We should now create an instance of the TTQCanvasView object - TQCanvasView *ret = new TQCanvasView( + TTQCanvasView *ret = new TTQCanvasView( arg0, arg1, arg2 ); - JSOpaqueProxy *prx = new JSOpaqueProxy( ret, "TQCanvasView"); + JSOpaqueProxy *prx = new JSOpaqueProxy( ret, "TTQCanvasView"); return KJS::Object( prx ); } -KJS::Object QCanvasViewImp::QCanvasView_2( KJS::ExecState *exec, const KJS::List &args ) +KJS::Object TQCanvasViewImp::TQCanvasView_2( KJS::ExecState *exec, const KJS::List &args ) { - TQCanvas * arg0 = 0L;; + TTQCanvas * arg0 = 0L;; KJS::Object obj = args[0].toObject(exec); JSObjectProxy *proxy = JSProxy::toObjectProxy( obj.imp() ); - if ( proxy ) arg0 = dynamic_cast<TQCanvas *>( proxy->widget() ); + if ( proxy ) arg0 = dynamic_cast<TTQCanvas *>( proxy->widget() ); - TQWidget * arg1 = extractQWidget(exec, args, 1); + TTQWidget * arg1 = extractTQWidget(exec, args, 1); const char *arg2 = (args.size() >= 3) ? args[2].toString(exec).ascii() : 0; - Qt::WFlags arg3 = 0; // TODO (hack for TQCanvasView) + TQt::WFlags arg3 = 0; // TODO (hack for TTQCanvasView) - // We should now create an instance of the TQCanvasView object + // We should now create an instance of the TTQCanvasView object - TQCanvasView *ret = new TQCanvasView( + TTQCanvasView *ret = new TTQCanvasView( arg0, arg1, arg2, arg3 ); - JSOpaqueProxy *prx = new JSOpaqueProxy( ret, "TQCanvasView"); + JSOpaqueProxy *prx = new JSOpaqueProxy( ret, "TTQCanvasView"); return KJS::Object( prx ); } -KJS::Value QCanvasViewImp::call( KJS::ExecState *exec, KJS::Object &self, const KJS::List &args ) +KJS::Value TQCanvasViewImp::call( KJS::ExecState *exec, KJS::Object &self, const KJS::List &args ) { - instance = QCanvasViewImp::toQCanvasView( self ); + instance = TQCanvasViewImp::toTQCanvasView( self ); switch( id ) { @@ -211,26 +211,26 @@ KJS::Value QCanvasViewImp::call( KJS::ExecState *exec, KJS::Object &self, const break; } - TQString msg = i18n( "QCanvasViewImp has no method with id '%1'." ).arg( id ); + TTQString msg = i18n( "TQCanvasViewImp has no method with id '%1'." ).arg( id ); return throwError(exec, msg,KJS::ReferenceError); } -KJS::Value QCanvasViewImp::canvas_4( KJS::ExecState *exec, KJS::Object &obj, const KJS::List &args ) +KJS::Value TQCanvasViewImp::canvas_4( KJS::ExecState *exec, KJS::Object &obj, const KJS::List &args ) { instance->canvas( ); - return KJS::Value(); // Returns 'TQCanvas *' + return KJS::Value(); // Returns 'TTQCanvas *' } -KJS::Value QCanvasViewImp::setCanvas_5( KJS::ExecState *exec, KJS::Object &obj, const KJS::List &args ) +KJS::Value TQCanvasViewImp::setCanvas_5( KJS::ExecState *exec, KJS::Object &obj, const KJS::List &args ) { - // Unsupported parameter TQCanvas * + // Unsupported parameter TTQCanvas * return KJS::Value(); - TQCanvas * arg0; // Dummy + TTQCanvas * arg0; // Dummy instance->setCanvas( arg0 ); @@ -238,26 +238,26 @@ KJS::Value QCanvasViewImp::setCanvas_5( KJS::ExecState *exec, KJS::Object &obj, } -KJS::Value QCanvasViewImp::worldMatrix_6( KJS::ExecState *exec, KJS::Object &obj, const KJS::List &args ) +KJS::Value TQCanvasViewImp::worldMatrix_6( KJS::ExecState *exec, KJS::Object &obj, const KJS::List &args ) { instance->worldMatrix( ); - return KJS::Value(); // Returns 'const TQWMatrix &' + return KJS::Value(); // Returns 'const TTQWMatrix &' } -KJS::Value QCanvasViewImp::inverseWorldMatrix_7( KJS::ExecState *exec, KJS::Object &obj, const KJS::List &args ) +KJS::Value TQCanvasViewImp::inverseWorldMatrix_7( KJS::ExecState *exec, KJS::Object &obj, const KJS::List &args ) { instance->inverseWorldMatrix( ); - return KJS::Value(); // Returns 'const TQWMatrix &' + return KJS::Value(); // Returns 'const TTQWMatrix &' } -KJS::Value QCanvasViewImp::setWorldMatrix_8( KJS::ExecState *exec, KJS::Object &obj, const KJS::List &args ) +KJS::Value TQCanvasViewImp::setWorldMatrix_8( KJS::ExecState *exec, KJS::Object &obj, const KJS::List &args ) { - TQWMatrix arg0; // TODO (hack for qcanvasview) + TTQWMatrix arg0; // TODO (hack for qcanvasview) bool ret; ret = instance->setWorldMatrix( |