diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:44:01 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:44:01 +0000 |
commit | 479f5f799523bffbcc83dff581a2299c047c6fff (patch) | |
tree | 186aae707ed02aac6c7cab2fb14e97f72aca5e36 /kjsembed/jsfactory_imp.cpp | |
parent | f1dbff6145c98324ff82e34448b7483727e8ace4 (diff) | |
download | tdebindings-479f5f799523bffbcc83dff581a2299c047c6fff.tar.gz tdebindings-479f5f799523bffbcc83dff581a2299c047c6fff.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebindings@1157645 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kjsembed/jsfactory_imp.cpp')
-rw-r--r-- | kjsembed/jsfactory_imp.cpp | 74 |
1 files changed, 37 insertions, 37 deletions
diff --git a/kjsembed/jsfactory_imp.cpp b/kjsembed/jsfactory_imp.cpp index c1f1f5b7..4c9fea00 100644 --- a/kjsembed/jsfactory_imp.cpp +++ b/kjsembed/jsfactory_imp.cpp @@ -17,12 +17,12 @@ * Boston, MA 02110-1301, USA. */ -#include <qwidget.h> -#include <qwidgetfactory.h> -#include <qobjectlist.h> -#include <qtoolbox.h> -#include <qtabwidget.h> -#include <qwizard.h> +#include <tqwidget.h> +#include <tqwidgetfactory.h> +#include <tqobjectlist.h> +#include <tqtoolbox.h> +#include <tqtabwidget.h> +#include <tqwizard.h> #include "global.h" #include "jsproxy.h" @@ -35,7 +35,7 @@ namespace KJSEmbed { namespace Bindings { -JSFactoryImp::JSFactoryImp( KJS::ExecState *exec, JSFactory *jsfact, int mid, const QString &p ) +JSFactoryImp::JSFactoryImp( KJS::ExecState *exec, JSFactory *jsfact, int mid, const TQString &p ) : JSProxyImp(exec), fact(jsfact), id(mid), param(p), defaultVal() { setName( KJS::Identifier(KJS::UString(param)) ); @@ -50,7 +50,7 @@ KJS::Object JSFactoryImp::construct( KJS::ExecState *exec, const KJS::List &args if ( id != NewInstance ) { kdDebug(80001) << "JSFactoryImp has no such constructor, id " << id << endl; - QString msg = i18n( "JSFactoryImp has no constructor with id '%1'." ).arg( id ); + TQString msg = i18n( "JSFactoryImp has no constructor with id '%1'." ).arg( id ); return throwError(exec, msg,KJS::ReferenceError); } @@ -71,8 +71,8 @@ KJS::Value JSFactoryImp::defaultValue( KJS::ExecState *exec, KJS::Type hint ) co KJS::Value JSFactoryImp::call( KJS::ExecState *exec, KJS::Object &self, const KJS::List &args ) { - QString arg0 = (args.size() > 0) ? args[0].toString(exec).qstring() : QString::null; - QString arg1 = (args.size() > 1) ? args[1].toString(exec).qstring() : QString::null; + TQString arg0 = (args.size() > 0) ? args[0].toString(exec).qstring() : TQString::null; + TQString arg1 = (args.size() > 1) ? args[1].toString(exec).qstring() : TQString::null; kdDebug( 80001 ) << "JSFactoryImp::call() " << id << endl; KJS::Object err; @@ -81,20 +81,20 @@ KJS::Value JSFactoryImp::call( KJS::ExecState *exec, KJS::Object &self, const KJ case MethodLoadUI: { JSObjectProxy *cproxy = JSProxy::toObjectProxy( args[1].imp() ); - QObject *cqo = cproxy ? cproxy->object() : 0; + TQObject *cqo = cproxy ? cproxy->object() : 0; JSObjectProxy *proxy = JSProxy::toObjectProxy( args[2].imp() ); - QWidget *qw = proxy ? proxy->widget() : 0; - QWidget *obj = fact->loadUI( arg0, cqo, qw, arg1.latin1() ); + TQWidget *qw = proxy ? proxy->widget() : 0; + TQWidget *obj = fact->loadUI( arg0, cqo, qw, arg1.latin1() ); if ( obj ) { KJS::Object parentObject = fact->createProxy( exec, obj ); // Add properties for child widgets. - const QObjectList *lst = obj->children(); + const TQObjectList *lst = obj->children(); if ( lst ) { - QObjectListIt it( *lst ); - QObject *child; + TQObjectListIt it( *lst ); + TQObject *child; while ( (child = it.current()) != 0 ) { publishChildren( child, parentObject); @@ -104,7 +104,7 @@ KJS::Value JSFactoryImp::call( KJS::ExecState *exec, KJS::Object &self, const KJ return parentObject; } - QString msg = i18n( "Unable to create ui from file '%1'." ).arg(arg0); + TQString msg = i18n( "Unable to create ui from file '%1'." ).arg(arg0); err = throwError(exec, msg,KJS::ReferenceError); break; } @@ -112,8 +112,8 @@ KJS::Value JSFactoryImp::call( KJS::ExecState *exec, KJS::Object &self, const KJ { kdDebug(80001) << "MethodCreateROPart called, args.size is " << args.size() << endl; - QObject *qo = 0; - QObject *ropart = 0; + TQObject *qo = 0; + TQObject *ropart = 0; if ( args.size() == 3 ) { JSObjectProxy *proxy = JSProxy::toObjectProxy( args[1].imp() ); @@ -128,7 +128,7 @@ KJS::Value JSFactoryImp::call( KJS::ExecState *exec, KJS::Object &self, const KJ else if ( args.size() == 5 ) { JSObjectProxy *proxy = JSProxy::toObjectProxy( args[2].imp() ); qo = proxy ? proxy->object() : 0; - QStringList slist = extractQStringList( exec, args, 4 ); + TQStringList slist = extractQStringList( exec, args, 4 ); ropart = fact->createROPart( arg0, arg1, qo, args[3].toString(exec).ascii(), slist ); } @@ -141,7 +141,7 @@ KJS::Value JSFactoryImp::call( KJS::ExecState *exec, KJS::Object &self, const KJ if ( ropart ) return fact->createProxy( exec, ropart ); - QString msg = i18n( "Unable to create read-only part for service '%1'." ).arg(arg0); + TQString msg = i18n( "Unable to create read-only part for service '%1'." ).arg(arg0); err = throwError(exec, msg,KJS::ReferenceError); break; } @@ -155,8 +155,8 @@ KJS::Value JSFactoryImp::call( KJS::ExecState *exec, KJS::Object &self, const KJ { KJS::List l; - QStringList widgets = QWidgetFactory::widgets(); - for ( QStringList::Iterator it = widgets.begin(); it != widgets.end(); ++it ) { + TQStringList widgets = TQWidgetFactory::widgets(); + for ( TQStringList::Iterator it = widgets.begin(); it != widgets.end(); ++it ) { l.append( KJS::String( *it ) ); } @@ -186,8 +186,8 @@ KJS::Value JSFactoryImp::call( KJS::ExecState *exec, KJS::Object &self, const KJ case MethodTypes: { KJS::List l; - QStringList types = fact->types(); - for ( QStringList::Iterator it = types.begin(); it != types.end(); ++it ) { + TQStringList types = fact->types(); + for ( TQStringList::Iterator it = types.begin(); it != types.end(); ++it ) { l.append( KJS::String( *it ) ); } @@ -203,8 +203,8 @@ KJS::Value JSFactoryImp::call( KJS::ExecState *exec, KJS::Object &self, const KJ { kdDebug(80001) << "MethodCreateRWPart called, args.size is " << args.size() << endl; - QObject *qo = 0; - QObject *rwpart = 0; + TQObject *qo = 0; + TQObject *rwpart = 0; if ( args.size() == 3 ) { JSObjectProxy *proxy = JSProxy::toObjectProxy( args[1].imp() ); @@ -226,7 +226,7 @@ KJS::Value JSFactoryImp::call( KJS::ExecState *exec, KJS::Object &self, const KJ if ( rwpart ) return fact->createProxy( exec, rwpart ); - QString msg = i18n( "Unable to create read-write part for service '%1'." ).arg(arg0); + TQString msg = i18n( "Unable to create read-write part for service '%1'." ).arg(arg0); err = throwError(exec, msg,KJS::ReferenceError); break; } @@ -245,7 +245,7 @@ KJS::Value JSFactoryImp::call( KJS::ExecState *exec, KJS::Object &self, const KJ default: { kdWarning() << "JSBuiltInImp has no method " << id << endl; - QString msg = i18n( "JSFactoryImp has no method with id '%1'." ).arg( id ); + TQString msg = i18n( "JSFactoryImp has no method with id '%1'." ).arg( id ); err = throwError(exec, msg,KJS::ReferenceError); } } @@ -253,9 +253,9 @@ KJS::Value JSFactoryImp::call( KJS::ExecState *exec, KJS::Object &self, const KJ } -void JSFactoryImp::publishChildren(QObject *obj, KJS::Object &parent) +void JSFactoryImp::publishChildren(TQObject *obj, KJS::Object &parent) { - QString name = obj->name(); + TQString name = obj->name(); name.remove(":"); name.remove(" "); name.remove("<"); @@ -264,9 +264,9 @@ void JSFactoryImp::publishChildren(QObject *obj, KJS::Object &parent) JSProxy::toProxy( newParent.imp() ) ->setOwner( JSProxy::JavaScript ); // Hack to publish QToolBoxes children - QToolBox *box = dynamic_cast<QToolBox*>(obj); - QTabWidget *tab = dynamic_cast<QTabWidget*>(obj); - QWizard *wiz = dynamic_cast<QWizard*>(obj); + TQToolBox *box = dynamic_cast<TQToolBox*>(obj); + TQTabWidget *tab = dynamic_cast<TQTabWidget*>(obj); + TQWizard *wiz = dynamic_cast<TQWizard*>(obj); if( box ) { int count = box->count(); @@ -281,10 +281,10 @@ void JSFactoryImp::publishChildren(QObject *obj, KJS::Object &parent) for( int idx = 0; idx < count; ++idx) publishChildren(wiz->page(idx),newParent); } else { - const QObjectList *lst = obj->children(); + const TQObjectList *lst = obj->children(); if ( lst ) { - QObjectListIt it( *lst ); - QObject *child; + TQObjectListIt it( *lst ); + TQObject *child; while ( (child = it.current()) != 0 ) { publishChildren( child, newParent); ++it; |