summaryrefslogtreecommitdiffstats
path: root/kjsembed/jsfactory.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-05 16:20:48 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-05 16:20:48 -0600
commite63beeb5bdb82987b1e00bc35178667786fbad48 (patch)
treeab77b6ac830b7944d5d1eb9ce8f81feb8fdab948 /kjsembed/jsfactory.cpp
parent67557a2b56c0678c22ab1b00c4fd0224c5e9ed99 (diff)
downloadtdebindings-e63beeb5bdb82987b1e00bc35178667786fbad48.tar.gz
tdebindings-e63beeb5bdb82987b1e00bc35178667786fbad48.zip
Fix incorrect conversion
Diffstat (limited to 'kjsembed/jsfactory.cpp')
-rw-r--r--kjsembed/jsfactory.cpp480
1 files changed, 240 insertions, 240 deletions
diff --git a/kjsembed/jsfactory.cpp b/kjsembed/jsfactory.cpp
index 8749481a..5e6a22a7 100644
--- a/kjsembed/jsfactory.cpp
+++ b/kjsembed/jsfactory.cpp
@@ -137,9 +137,9 @@ namespace KJSEmbed {
class JSFactoryPrivate {
public:
- TTQDict<KJSEmbed::Bindings::JSBindingPlugin> plugins;
- TTQDict<KJSEmbed::Bindings::JSBindingBase> opaqueTypes;
- TTQDict<KJSEmbed::Bindings::JSBindingBase> objectTypes;
+ TQDict<KJSEmbed::Bindings::JSBindingPlugin> plugins;
+ TQDict<KJSEmbed::Bindings::JSBindingBase> opaqueTypes;
+ TQDict<KJSEmbed::Bindings::JSBindingBase> objectTypes;
};
@@ -147,9 +147,9 @@ namespace KJSEmbed {
: jspart( part ) {
evmapper = new JSEventMapper();
d = new JSFactoryPrivate;
- registerOpaqueType("TTQDir", new Bindings::TQDirLoader());
- registerOpaqueType("TTQCheckListItem", new Bindings::TQCheckListItemLoader());
- registerOpaqueType("TTQListViewItem", new Bindings::TQListViewItemLoader());
+ registerOpaqueType("TQDir", new Bindings::TQDirLoader());
+ registerOpaqueType("TQCheckListItem", new Bindings::TQCheckListItemLoader());
+ registerOpaqueType("TQListViewItem", new Bindings::TQListViewItemLoader());
registerOpaqueType("Painter", new Bindings::PainterLoader());
#ifndef QT_ONLY
@@ -174,7 +174,7 @@ namespace KJSEmbed {
KTrader::OfferListIterator itr = offers.begin();
while ( itr != offers.end() ) {
- TTQString classname = ( *itr ) ->name();
+ TQString classname = ( *itr ) ->name();
JSFactoryImp *cons = new JSFactoryImp( exec, this, JSFactoryImp::NewInstance, classname );
parent.put( exec, KJS::Identifier( cons->parameter() ), KJS::Object( cons ) );
addType( classname, TypePlugin );
@@ -187,19 +187,19 @@ namespace KJSEmbed {
}
- bool JSFactory::isBindingPlugin( const TTQString &classname ) const {
+ bool JSFactory::isBindingPlugin( const TQString &classname ) const {
if ( !isSupported( classname ) )
return false;
return ( objtypes[ classname ] & TypePlugin );
}
- KJS::Object JSFactory::createBindingPlugin( KJS::ExecState *exec, const TTQString &classname, const KJS::List &args ) {
+ KJS::Object JSFactory::createBindingPlugin( KJS::ExecState *exec, const TQString &classname, const KJS::List &args ) {
#ifndef QT_ONLY
Bindings::JSBindingPlugin * plugin = d->plugins[ classname ];
if ( plugin == 0L ) {
- TTQString query = "JSBindingPlugin/Binding";
- TTQString constraint = "[Name] == '" + classname + "'";
+ TQString query = "JSBindingPlugin/Binding";
+ TQString constraint = "[Name] == '" + classname + "'";
plugin = KParts::ComponentFactory::createInstanceFromQuery<Bindings::JSBindingPlugin>( query, constraint );
if ( plugin != 0L )
d->plugins.insert( classname, plugin );
@@ -219,10 +219,10 @@ namespace KJSEmbed {
return KJS::Object();
}
- KJS::Object JSFactory::create( KJS::ExecState *exec, const TTQString &classname, const KJS::List &args ) {
+ KJS::Object JSFactory::create( KJS::ExecState *exec, const TQString &classname, const KJS::List &args ) {
KJS::Object returnObject;
if ( !isSupported( classname ) ) {
- TTQString msg = i18n( "Object of type '%1' is not supported." ).arg( classname );
+ TQString msg = i18n( "Object of type '%1' is not supported." ).arg( classname );
return throwError(exec, msg,KJS::TypeError);
}
if ( isTQObject( classname ) ) {
@@ -232,15 +232,15 @@ namespace KJSEmbed {
returnObject = factory->createBinding( jspart, exec, args );
JSProxy::toProxy( returnObject.imp() ) ->setOwner( JSProxy::JavaScript );
} else {
- TTQObject *parent = extractTQObject(exec, args, 0);
- TTQString name = extractTQString(exec, args, 1);
+ TQObject *parent = extractTQObject(exec, args, 0);
+ TQString name = extractTQString(exec, args, 1);
- TTQObject *obj = create( classname, parent, name.latin1() );
+ TQObject *obj = create( classname, parent, name.latin1() );
if ( obj ) {
returnObject = createProxy( exec, obj );
JSProxy::toProxy( returnObject.imp() ) ->setOwner( JSProxy::JavaScript );
} else {
- TTQString msg = i18n( "TTQObject of type '%1' could not be created." ).arg( classname );
+ TQString msg = i18n( "TQObject of type '%1' could not be created." ).arg( classname );
returnObject = throwError(exec, msg,KJS::TypeError);
}
}
@@ -253,30 +253,30 @@ namespace KJSEmbed {
returnObject = createOpaque( exec, classname, args );
if ( !returnObject.isValid() ) {
- TTQString msg = i18n( "Opaque object of type '%1' could not be created." ).arg( classname );
+ TQString msg = i18n( "Opaque object of type '%1' could not be created." ).arg( classname );
returnObject = throwError(exec, msg,KJS::TypeError);
}
} else if ( isValue( classname ) ) {
returnObject = createValue( exec, classname, args );
if ( !returnObject.isValid() ) {
- TTQString msg = i18n( "Value object of type '%1' could not be created." ).arg( classname );
+ TQString msg = i18n( "Value object of type '%1' could not be created." ).arg( classname );
returnObject = throwError(exec, msg,KJS::TypeError);
}
} else if ( isBindingPlugin( classname ) ) {
returnObject = createBindingPlugin( exec, classname, args );
if ( !returnObject.isValid() ) {
- TTQString msg = i18n( "Plugin object of type '%1' could not be created." ).arg( classname );
+ TQString msg = i18n( "Plugin object of type '%1' could not be created." ).arg( classname );
returnObject = throwError(exec, msg,KJS::TypeError);
} else
JSProxy::toProxy( returnObject.imp() ) ->setOwner( JSProxy::JavaScript );
} else {
- TTQString msg = i18n( "Could not create object of type '%1'." ).arg( classname );
+ TQString msg = i18n( "Could not create object of type '%1'." ).arg( classname );
returnObject = throwError(exec, msg,KJS::TypeError);
}
return returnObject;
}
- KJS::Object JSFactory::createProxy( KJS::ExecState *exec, TTQObject *target,
+ KJS::Object JSFactory::createProxy( KJS::ExecState *exec, TQObject *target,
const JSObjectProxy *ctx ) const {
kdDebug( 80001 ) << "JSFactory::createProxy: Target '" << target->name()
<< "' type " << target->className() << endl;
@@ -301,7 +301,7 @@ namespace KJSEmbed {
}
KJS::Object JSFactory::createProxy( KJS::ExecState *exec,
- TTQTextStream *target, const JSObjectProxy *context ) const {
+ TQTextStream *target, const JSObjectProxy *context ) const {
Q_UNUSED( context )
kdDebug( 80001 ) << "TextStream proxy created" << endl;
@@ -314,74 +314,74 @@ namespace KJSEmbed {
}
KJS::Object JSFactory::createProxy( KJS::ExecState *exec,
- TTQEvent *target, const JSObjectProxy *context ) const {
+ TQEvent *target, const JSObjectProxy *context ) const {
switch ( target->type() ) {
- case TTQEvent::MouseButtonPress:
- case TTQEvent::MouseButtonRelease:
- case TTQEvent::MouseMove:
- case TTQEvent::MouseButtonDblClick:
- return JSEventUtils::convertEvent( exec, ( TTQMouseEvent * ) target, context );
+ case TQEvent::MouseButtonPress:
+ case TQEvent::MouseButtonRelease:
+ case TQEvent::MouseMove:
+ case TQEvent::MouseButtonDblClick:
+ return JSEventUtils::convertEvent( exec, ( TQMouseEvent * ) target, context );
break;
- case TTQEvent::KeyPress:
- case TTQEvent::KeyRelease:
- case TTQEvent::Accel:
- case TTQEvent::AccelOverride:
- return JSEventUtils::convertEvent( exec, ( TTQKeyEvent * ) target, context );
+ case TQEvent::KeyPress:
+ case TQEvent::KeyRelease:
+ case TQEvent::Accel:
+ case TQEvent::AccelOverride:
+ return JSEventUtils::convertEvent( exec, ( TQKeyEvent * ) target, context );
break;
- case TTQEvent::IMStart:
- case TTQEvent::IMCompose:
- case TTQEvent::IMEnd:
- return JSEventUtils::convertEvent( exec, ( TTQIMEvent * ) target, context );
+ case TQEvent::IMStart:
+ case TQEvent::IMCompose:
+ case TQEvent::IMEnd:
+ return JSEventUtils::convertEvent( exec, ( TQIMEvent * ) target, context );
break;
- case TTQEvent::Paint:
- return JSEventUtils::convertEvent( exec, ( TTQPaintEvent * ) target, context );
+ case TQEvent::Paint:
+ return JSEventUtils::convertEvent( exec, ( TQPaintEvent * ) target, context );
break;
- case TTQEvent::Resize:
- return JSEventUtils::convertEvent( exec, ( TTQResizeEvent * ) target, context );
+ case TQEvent::Resize:
+ return JSEventUtils::convertEvent( exec, ( TQResizeEvent * ) target, context );
break;
- case TTQEvent::FocusIn:
- case TTQEvent::FocusOut:
- return JSEventUtils::convertEvent( exec, ( TTQFocusEvent * ) target, context );
+ case TQEvent::FocusIn:
+ case TQEvent::FocusOut:
+ return JSEventUtils::convertEvent( exec, ( TQFocusEvent * ) target, context );
break;
- case TTQEvent::Close:
- return JSEventUtils::convertEvent( exec, ( TTQCloseEvent * ) target, context );
+ case TQEvent::Close:
+ return JSEventUtils::convertEvent( exec, ( TQCloseEvent * ) target, context );
break;
- case TTQEvent::ChildInserted:
- case TTQEvent::ChildRemoved:
- return JSEventUtils::convertEvent( exec, ( TTQChildEvent * ) target, context );
+ case TQEvent::ChildInserted:
+ case TQEvent::ChildRemoved:
+ return JSEventUtils::convertEvent( exec, ( TQChildEvent * ) target, context );
break;
- case TTQEvent::Move:
- return JSEventUtils::convertEvent( exec, ( TTQMoveEvent * ) target, context );
+ case TQEvent::Move:
+ return JSEventUtils::convertEvent( exec, ( TQMoveEvent * ) target, context );
break;
- case TTQEvent::Wheel:
- return JSEventUtils::convertEvent( exec, ( TTQWheelEvent * ) target, context );
+ case TQEvent::Wheel:
+ return JSEventUtils::convertEvent( exec, ( TQWheelEvent * ) target, context );
break;
- case TTQEvent::Timer:
- return JSEventUtils::convertEvent( exec, ( TTQTimerEvent * ) target, context );
+ case TQEvent::Timer:
+ return JSEventUtils::convertEvent( exec, ( TQTimerEvent * ) target, context );
break;
- case TTQEvent::ContextMenu:
- return JSEventUtils::convertEvent( exec, ( TTQContextMenuEvent * ) target, context );
+ case TQEvent::ContextMenu:
+ return JSEventUtils::convertEvent( exec, ( TQContextMenuEvent * ) target, context );
break;
- case TTQEvent::DragMove:
- case TTQEvent::DragEnter:
- return JSEventUtils::convertEvent( exec, ( TTQDragMoveEvent * ) target, context );
+ case TQEvent::DragMove:
+ case TQEvent::DragEnter:
+ return JSEventUtils::convertEvent( exec, ( TQDragMoveEvent * ) target, context );
break;
- case TTQEvent::Drop:
- return JSEventUtils::convertEvent( exec, ( TTQDropEvent * ) target, context );
+ case TQEvent::Drop:
+ return JSEventUtils::convertEvent( exec, ( TQDropEvent * ) target, context );
break;
- case TTQEvent::Enter:
- case TTQEvent::Leave:
- case TTQEvent::Clipboard:
- case TTQEvent::DragLeave:
- case TTQEvent::Show:
- case TTQEvent::Hide:
- return JSEventUtils::convertEvent( exec, ( TTQEvent * ) target, context );
+ case TQEvent::Enter:
+ case TQEvent::Leave:
+ case TQEvent::Clipboard:
+ case TQEvent::DragLeave:
+ case TQEvent::Show:
+ case TQEvent::Hide:
+ return JSEventUtils::convertEvent( exec, ( TQEvent * ) target, context );
break;
default:
break;
}
- return JSEventUtils::convertEvent( exec, ( TTQEvent * ) target, context );
+ return JSEventUtils::convertEvent( exec, ( TQEvent * ) target, context );
}
KJS::Object JSFactory::extendProxy( KJS::ExecState *exec, KJS::Object &target ) const {
@@ -402,8 +402,8 @@ namespace KJSEmbed {
Bindings::JSBindingPlugin *plugin = d->plugins[ proxy->object() ->className() ];
if ( plugin == 0L ) {
- TTQString query = "JSBindingPlugin/Binding";
- TTQString constraint = "[Name] == '" + TTQString::fromUtf8( proxy->object() ->className() ) + "'";
+ TQString query = "JSBindingPlugin/Binding";
+ TQString constraint = "[Name] == '" + TQString::fromUtf8( proxy->object() ->className() ) + "'";
plugin = KParts::ComponentFactory::createInstanceFromQuery<Bindings::JSBindingPlugin>( query, constraint );
if ( plugin != 0L )
d->plugins.insert( proxy->object() ->className(), plugin );
@@ -424,7 +424,7 @@ namespace KJSEmbed {
}
- TTQObject *JSFactory::createBinding( const TTQString &cname, TTQObject *parent, const char *name ) {
+ TQObject *JSFactory::createBinding( const TQString &cname, TQObject *parent, const char *name ) {
#ifndef QT_ONLY
// Bindings
@@ -446,15 +446,15 @@ namespace KJSEmbed {
return 0;
}
- TTQObject *JSFactory::createObject( const TTQString &cname, TTQObject *parent, const char *name ) {
+ TQObject *JSFactory::createObject( const TQString &cname, TQObject *parent, const char *name ) {
// TQObjects defined by Qt
- if ( cname == "TTQObject" )
- return new TTQObject( parent, name );
- else if ( cname == "TTQTimer" )
- return new TTQTimer( parent, name );
- else if ( cname == "TTQCanvas" )
- return new TTQCanvas( parent, name );
+ if ( cname == "TQObject" )
+ return new TQObject( parent, name );
+ else if ( cname == "TQTimer" )
+ return new TQTimer( parent, name );
+ else if ( cname == "TQCanvas" )
+ return new TQCanvas( parent, name );
#ifndef QT_ONLY
// TQObjects defined by KDE
@@ -464,20 +464,20 @@ namespace KJSEmbed {
return new KToggleAction( parent, name );
#endif // QT_ONLY
- TTQWidget *w = dynamic_cast<TTQWidget *>( parent );
+ TQWidget *w = dynamic_cast<TQWidget *>( parent );
if ( !w )
return 0;
- if ( cname == "TTQHBoxLayout" )
- return new TTQHBoxLayout( w, 0, -1, name );
- else if ( cname == "TTQVBoxLayout" )
- return new TTQVBoxLayout( w, 0, -1, name );
+ if ( cname == "TQHBoxLayout" )
+ return new TQHBoxLayout( w, 0, -1, name );
+ else if ( cname == "TQVBoxLayout" )
+ return new TQVBoxLayout( w, 0, -1, name );
return 0;
}
- KJS::Object JSFactory::createOpaque( KJS::ExecState *exec, const TTQString &cname, const KJS::List &args ) {
+ KJS::Object JSFactory::createOpaque( KJS::ExecState *exec, const TQString &cname, const KJS::List &args ) {
- if ( cname == "TTQCanvasText" ) {
+ if ( cname == "TQCanvasText" ) {
kdDebug( 80001 ) << "Creating canvas item, type is " << cname << endl;
JSOpaqueProxy *prx = 0;
@@ -490,11 +490,11 @@ namespace KJSEmbed {
if ( arg0 ) {
- TTQObject * obj0 = arg0->object();
+ TQObject * obj0 = arg0->object();
- if ( obj0->inherits( "TTQCanvas" ) ) {
- TTQCanvas * parent = ( TTQCanvas * ) ( obj0 );
- prx = new JSOpaqueProxy( new TTQCanvasText( parent ), "TTQCanvasText" );
+ if ( obj0->inherits( "TQCanvas" ) ) {
+ TQCanvas * parent = ( TQCanvas * ) ( obj0 );
+ prx = new JSOpaqueProxy( new TQCanvasText( parent ), "TQCanvasText" );
KJS::Object proxyObj( prx );
TQCanvasItemImp::addBindings( exec, proxyObj );
@@ -511,17 +511,17 @@ namespace KJSEmbed {
} else if ( args.size() == 2 ) {
- TTQString arg0 = args[ 0 ].toString( exec ).qstring();
+ TQString arg0 = args[ 0 ].toString( exec ).qstring();
JSObjectProxy *arg1 = JSProxy::toObjectProxy( args[ 1 ].imp() );
if ( arg1 ) {
- TTQString arg0 = args[ 0 ].toString( exec ).qstring();
- TTQObject *obj1 = arg1->object();
+ TQString arg0 = args[ 0 ].toString( exec ).qstring();
+ TQObject *obj1 = arg1->object();
- if ( obj1->inherits( "TTQCanvas" ) ) {
- TTQCanvas * parent = ( TTQCanvas * ) ( obj1 );
- prx = new JSOpaqueProxy( new TTQCanvasText( parent ), "TTQCanvasText" );
+ if ( obj1->inherits( "TQCanvas" ) ) {
+ TQCanvas * parent = ( TQCanvas * ) ( obj1 );
+ prx = new JSOpaqueProxy( new TQCanvasText( parent ), "TQCanvasText" );
KJS::Object proxyObj( prx );
TQCanvasItemImp::addBindings( exec, proxyObj );
@@ -542,9 +542,9 @@ namespace KJSEmbed {
return KJS::Object();
}
- KJS::Object JSFactory::createValue( KJS::ExecState *exec, const TTQString &cname, const KJS::List & args ) {
+ KJS::Object JSFactory::createValue( KJS::ExecState *exec, const TQString &cname, const KJS::List & args ) {
if ( cname == "Image" ) {
- TTQImage img = TTQImage();
+ TQImage img = TQImage();
JSValueProxy *prx = new JSValueProxy( );
prx->setValue( img );
KJS::Object proxyObj( prx );
@@ -552,7 +552,7 @@ namespace KJSEmbed {
return proxyObj;
}
if ( cname == "Pixmap" ) {
- TTQPixmap pix = TTQPixmap();
+ TQPixmap pix = TQPixmap();
JSValueProxy *prx = new JSValueProxy( );
prx->setValue( pix );
KJS::Object proxyObj( prx );
@@ -560,7 +560,7 @@ namespace KJSEmbed {
return proxyObj;
}
if ( cname == "Brush" ) {
- TTQBrush brsh;
+ TQBrush brsh;
JSValueProxy *prx = new JSValueProxy( );
prx->setValue( brsh );
KJS::Object proxyObj( prx );
@@ -568,7 +568,7 @@ namespace KJSEmbed {
return proxyObj;
}
if ( cname == "Pen" ) {
- TTQPen pen;
+ TQPen pen;
JSValueProxy *prx = new JSValueProxy( );
prx->setValue( pen );
KJS::Object proxyObj( prx );
@@ -576,7 +576,7 @@ namespace KJSEmbed {
return proxyObj;
}
if ( cname == "Rect" ) {
- TTQRect rect;
+ TQRect rect;
if ( args.size() == 4 ) {
rect.setX( extractInt( exec, args, 0 ) );
rect.setY( extractInt( exec, args, 1 ) );
@@ -590,7 +590,7 @@ namespace KJSEmbed {
return proxyObj;
}
if ( cname == "Point" ) {
- TTQPoint point;
+ TQPoint point;
if ( args.size() == 2 ) {
point.setX( extractInt( exec, args, 0 ) );
point.setY( extractInt( exec, args, 1 ) );
@@ -602,7 +602,7 @@ namespace KJSEmbed {
return proxyObj;
}
if ( cname == "Size" ) {
- TTQSize size;
+ TQSize size;
if ( args.size() == 2 ) {
size.setWidth( extractInt( exec, args, 0 ) );
size.setHeight( extractInt( exec, args, 1 ) );
@@ -618,21 +618,21 @@ namespace KJSEmbed {
return KJS::Object();
}
- TTQWidget *JSFactory::createWidget( const TTQString &cname, TTQWidget *pw, const char *name ) {
- if ( cname == "TTQSplitter" )
- return new TTQSplitter( pw, name );
- else if ( cname == "TTQMainWindow" )
- return new TTQMainWindow( pw, name );
- else if ( cname == "TTQProgressDialog" )
- return new TTQProgressDialog( pw, name );
- else if ( cname == "TTQScrollView" )
- return new TTQScrollView( pw, name );
- else if ( cname == "TTQCanvasView" )
- return new TTQCanvasView( pw, name );
- else if ( cname == "TTQSplashScreen" ) {
- TTQPixmap pix( 16, 16 );
+ TQWidget *JSFactory::createWidget( const TQString &cname, TQWidget *pw, const char *name ) {
+ if ( cname == "TQSplitter" )
+ return new TQSplitter( pw, name );
+ else if ( cname == "TQMainWindow" )
+ return new TQMainWindow( pw, name );
+ else if ( cname == "TQProgressDialog" )
+ return new TQProgressDialog( pw, name );
+ else if ( cname == "TQScrollView" )
+ return new TQScrollView( pw, name );
+ else if ( cname == "TQCanvasView" )
+ return new TQCanvasView( pw, name );
+ else if ( cname == "TQSplashScreen" ) {
+ TQPixmap pix( 16, 16 );
pix.fill();
- return new TTQSplashScreen( pix );
+ return new TQSplashScreen( pix );
}
#ifndef QT_ONLY
else if ( cname == "KMainWindow" )
@@ -646,19 +646,19 @@ namespace KJSEmbed {
return 0;
}
- TTQObject *JSFactory::create( const TTQString &cname, TTQObject *parent, const char *name ) {
+ TQObject *JSFactory::create( const TQString &cname, TQObject *parent, const char *name ) {
kdDebug( 80001 ) << "KJSEmbedPart::create() name " << name << " class " << cname << endl;
// Factory widgets
- TTQWidgetFactory wf;
- TTQWidget *pw = ( parent && parent->isWidgetType() ) ? static_cast<TTQWidget *>( parent ) : 0;
- TTQWidget *w = wf.createWidget( cname, pw, name );
+ TQWidgetFactory wf;
+ TQWidget *pw = ( parent && parent->isWidgetType() ) ? static_cast<TQWidget *>( parent ) : 0;
+ TQWidget *w = wf.createWidget( cname, pw, name );
if ( w ) {
kdDebug( 80001 ) << "Created from factory" << endl;
return w;
}
// Custom widgets
- TTQObject *obj;
+ TQObject *obj;
obj = createWidget( cname, pw, name );
if ( obj ) {
if ( !isTQObject( obj->className() ) )
@@ -689,22 +689,22 @@ namespace KJSEmbed {
return 0;
}
- KParts::ReadOnlyPart *JSFactory::createROPart( const TTQString &svc, TTQObject *parent, const char *name ) {
+ KParts::ReadOnlyPart *JSFactory::createROPart( const TQString &svc, TQObject *parent, const char *name ) {
kdDebug( 80001 ) << "JSFactory::createROPart svc " << svc << " parent " << ( long ) parent << endl;
return createROPart( svc, "'KParts/ReadOnlyPart' in ServiceTypes", parent, name );
}
- KParts::ReadOnlyPart *JSFactory::createROPart( const TTQString &svc, const TTQString &con,
- TTQObject *parent, const char *name ) {
+ KParts::ReadOnlyPart *JSFactory::createROPart( const TQString &svc, const TQString &con,
+ TQObject *parent, const char *name ) {
kdDebug( 80001 ) << "JSFactory::createROPart svc " << svc << " constraint " << con
<< " parent " << ( long ) parent << endl;
- return createROPart( svc, con, parent, name, TTQStringList() );
+ return createROPart( svc, con, parent, name, TQStringList() );
}
- KParts::ReadOnlyPart *JSFactory::createROPart( const TTQString &svc, const TTQString &con,
- TTQObject *parent, const char *name,
- const TTQStringList &args ) {
+ KParts::ReadOnlyPart *JSFactory::createROPart( const TQString &svc, const TQString &con,
+ TQObject *parent, const char *name,
+ const TQStringList &args ) {
#ifndef QT_ONLY
kdDebug( 80001 ) << "JSFactory::createROPart svc " << svc << " constraint " << con
<< " parent " << ( long ) parent
@@ -721,7 +721,7 @@ namespace KJSEmbed {
return 0;
}
- TTQObject *obj = fact->create( parent, name, "KParts::ReadOnlyPart", args );
+ TQObject *obj = fact->create( parent, name, "KParts::ReadOnlyPart", args );
addType( obj->className() );
return static_cast<KParts::ReadOnlyPart *>( obj );
#else // QT_ONLY
@@ -736,22 +736,22 @@ namespace KJSEmbed {
}
- KParts::ReadWritePart *JSFactory::createRWPart( const TTQString &svc, TTQObject *parent, const char *name ) {
+ KParts::ReadWritePart *JSFactory::createRWPart( const TQString &svc, TQObject *parent, const char *name ) {
kdDebug( 80001 ) << "JSFactory::createRWPart svc " << svc << " parent " << ( long ) parent << endl;
return createRWPart( svc, "'KParts/ReadWritePart' in ServiceTypes", parent, name );
}
- KParts::ReadWritePart *JSFactory::createRWPart( const TTQString &svc, const TTQString &con,
- TTQObject *parent, const char *name ) {
+ KParts::ReadWritePart *JSFactory::createRWPart( const TQString &svc, const TQString &con,
+ TQObject *parent, const char *name ) {
kdDebug( 80001 ) << "JSFactory::createRWPart svc " << svc << " constraint " << con
<< " parent " << ( long ) parent << endl;
- return createRWPart( svc, con, parent, name, TTQStringList() );
+ return createRWPart( svc, con, parent, name, TQStringList() );
}
- KParts::ReadWritePart *JSFactory::createRWPart( const TTQString &svc, const TTQString &con,
- TTQObject *parent, const char *name,
- const TTQStringList &args ) {
+ KParts::ReadWritePart *JSFactory::createRWPart( const TQString &svc, const TQString &con,
+ TQObject *parent, const char *name,
+ const TQStringList &args ) {
#ifndef QT_ONLY
kdDebug( 80001 ) << "JSFactory::createRWPart svc " << svc << " constraint " << con
<< " parent " << ( long ) parent
@@ -768,7 +768,7 @@ namespace KJSEmbed {
return 0;
}
- TTQObject *obj = fact->create( parent, name, "KParts::ReadWritePart", args );
+ TQObject *obj = fact->create( parent, name, "KParts::ReadWritePart", args );
addType( obj->className() );
return static_cast<KParts::ReadWritePart *>( obj );
#else // QT_ONLY
@@ -783,15 +783,15 @@ namespace KJSEmbed {
}
- TTQWidget *JSFactory::loadUI( const TTQString &uiFile, TTQObject *connector, TTQWidget *parent, const char *name ) {
- return TTQWidgetFactory::create( uiFile, connector, parent, name );
+ TQWidget *JSFactory::loadUI( const TQString &uiFile, TQObject *connector, TQWidget *parent, const char *name ) {
+ return TQWidgetFactory::create( uiFile, connector, parent, name );
}
- TTQStringList JSFactory::listBindingPlugins( KJS::ExecState *exec, KJS::Object &self ) {
+ TQStringList JSFactory::listBindingPlugins( KJS::ExecState *exec, KJS::Object &self ) {
Q_UNUSED( exec )
Q_UNUSED( self )
- TTQStringList pluginList;
- TTQStringList allTypes = objtypes.keys();
+ TQStringList pluginList;
+ TQStringList allTypes = objtypes.keys();
for ( uint idx = 0; idx < allTypes.count(); ++idx ) {
if ( objtypes[ allTypes[ idx ] ] & TypePlugin )
pluginList.append( allTypes[ idx ] );
@@ -799,34 +799,34 @@ namespace KJSEmbed {
return pluginList;
}
- bool JSFactory::isTQObject( const TTQString &clazz ) const {
+ bool JSFactory::isTQObject( const TQString &clazz ) const {
if ( !isSupported( clazz ) )
return false;
return ( objtypes[ clazz ] & TypeTQObject );
}
- bool JSFactory::isValue( const TTQString &clazz ) const {
+ bool JSFactory::isValue( const TQString &clazz ) const {
if ( !isSupported( clazz ) )
return false;
return objtypes[ clazz ] == TypeValue;
}
- bool JSFactory::isOpaque( const TTQString &clazz ) const {
+ bool JSFactory::isOpaque( const TQString &clazz ) const {
if ( !isSupported( clazz ) )
return false;
return objtypes[ clazz ] == TypeOpaque;
}
- void JSFactory::addTQObjectPlugin( const TTQString &classname, KJSEmbed::Bindings::JSBindingPlugin* plugin ) {
+ void JSFactory::addTQObjectPlugin( const TQString &classname, KJSEmbed::Bindings::JSBindingPlugin* plugin ) {
if ( plugin ) {
addType( classname, TypeTQObjectPlugin );
d->plugins.insert( classname, plugin );
}
}
- void JSFactory::addType( const TTQString &clazz, uint prxtype ) {
+ void JSFactory::addType( const TQString &clazz, uint prxtype ) {
if ( prxtype == TypeInvalid ) {
objtypes.remove( clazz );
return ;
@@ -835,12 +835,12 @@ namespace KJSEmbed {
objtypes[ clazz ] = prxtype;
}
- bool JSFactory::isSupported( const TTQString &clazz ) const {
+ bool JSFactory::isSupported( const TQString &clazz ) const {
kdDebug() << "Checking " << clazz << endl;
return objtypes.contains( clazz );
}
- uint JSFactory::proxyType( const TTQString &clazz ) const {
+ uint JSFactory::proxyType( const TQString &clazz ) const {
if ( !isSupported( clazz ) )
return TypeInvalid;
return objtypes[ clazz ];
@@ -856,14 +856,14 @@ namespace KJSEmbed {
addBindingPluginTypes( exec, parent );
}
- TTQStringList JSFactory::types() const {
+ TQStringList JSFactory::types() const {
return objtypes.keys();
}
void JSFactory::addWidgetFactoryTypes( KJS::ExecState *exec, KJS::Object &parent ) {
- TTQStringList sl = TTQWidgetFactory::widgets();
+ TQStringList sl = TQWidgetFactory::widgets();
- for ( TTQStringList::Iterator it = sl.begin(); it != sl.end(); ++it ) {
+ for ( TQStringList::Iterator it = sl.begin(); it != sl.end(); ++it ) {
JSFactoryImp *cons = new JSFactoryImp( exec, this, JSFactoryImp::NewInstance, *it );
parent.put( exec, KJS::Identifier( KJS::UString( cons->parameter() ) ), KJS::Object( cons ) );
addType( *it );
@@ -873,9 +873,9 @@ namespace KJSEmbed {
void JSFactory::addCustomTypes( KJS::ExecState *exec, KJS::Object &parent ) {
const char * classes[] = {
- "TTQSplitter", "TTQScrollView", "TTQCanvasView", "TTQCanvas",
- "TTQObject", "TTQTimer", "TTQSplashScreen", "TTQProgressDialog",
- "TTQLayout", "TTQBoxLayout", "TTQHBoxLayout", "TTQVBoxLayout",
+ "TQSplitter", "TQScrollView", "TQCanvasView", "TQCanvas",
+ "TQObject", "TQTimer", "TQSplashScreen", "TQProgressDialog",
+ "TQLayout", "TQBoxLayout", "TQHBoxLayout", "TQVBoxLayout",
#ifndef QT_ONLY
"KMainWindow", "KXMLGUIClient", "KSystemTray",
"KAction", "KToggleAction",
@@ -920,10 +920,10 @@ namespace KJSEmbed {
void JSFactory::addOpaqueTypes( KJS::ExecState *exec, KJS::Object &parent ) {
const char * classes[] = {
- "TTQTextStream",
+ "TQTextStream",
"TextStream",
- "TTQCanvasItem",
- "TTQCanvasText",
+ "TQCanvasItem",
+ "TQCanvasText",
0
};
@@ -934,7 +934,7 @@ namespace KJSEmbed {
}
// Create the custom added types.
- TTQDictIterator<KJSEmbed::Bindings::JSBindingBase> idx( d->opaqueTypes );
+ TQDictIterator<KJSEmbed::Bindings::JSBindingBase> idx( d->opaqueTypes );
for( ; idx.current(); ++idx){
JSFactoryImp *cons = new JSFactoryImp( exec, this, JSFactoryImp::NewInstance, idx.currentKey() );
parent.put( exec, KJS::Identifier( KJS::UString( cons->parameter() ) ), KJS::Object( cons ) );
@@ -964,100 +964,100 @@ namespace KJSEmbed {
void JSFactory::addObjectTypes( KJS::ExecState *exec, KJS::Object & parent ) {
const char * classes[] = {
- "TTQAccel",
- "TTQAccessibleObject",
- "TTQAction",
- "TTQActionGroup",
- "TTQApplication",
+ "TQAccel",
+ "TQAccessibleObject",
+ "TQAction",
+ "TQActionGroup",
+ "TQApplication",
"TQAquaStyle",
"TQAssistantClient",
"TQAxObject",
"TQAxWidget",
- "TTQButton",
+ "TQButton",
"TQCDEStyle",
"TQClipboard",
"TQColorDialog",
- "TTQColorDrag",
- "TTQComboBox",
- "TTQCommonStyle",
+ "TQColorDrag",
+ "TQComboBox",
+ "TQCommonStyle",
"TQCopChannel",
- "TTQDataPump",
- "TTQDateTimeEditBase",
- "TTQDesktopWidget",
- "TTQDns",
- "TTQDockArea",
- "TTQDockWindow",
- "TTQDoubleValidator",
- "TTQDragObject",
- "TTQEditorFactory",
- "TTQErrorMessage",
- "TTQEventLoop",
- "TTQFileDialog",
- "TTQFileIconProvider",
+ "TQDataPump",
+ "TQDateTimeEditBase",
+ "TQDesktopWidget",
+ "TQDns",
+ "TQDockArea",
+ "TQDockWindow",
+ "TQDoubleValidator",
+ "TQDragObject",
+ "TQEditorFactory",
+ "TQErrorMessage",
+ "TQEventLoop",
+ "TQFileDialog",
+ "TQFileIconProvider",
"TQFontDialog",
- "TTQFtp",
+ "TQFtp",
"TQGLWidget",
- "TTQGridLayout",
- "TTQGridView",
- "TTQHButtonGroup",
- "TTQHGroupBox",
- "TTQHeader",
- "TTQHttp",
- "TTQIconDrag",
- "TTQImageDrag",
+ "TQGridLayout",
+ "TQGridView",
+ "TQHButtonGroup",
+ "TQHGroupBox",
+ "TQHeader",
+ "TQHttp",
+ "TQIconDrag",
+ "TQImageDrag",
"TQInputDialog",
- "TTQIntValidator",
- "TTQLocalFs",
+ "TQIntValidator",
+ "TQLocalFs",
"TQMacStyle",
- "TTQMenuBar",
- "TTQMessageBox",
+ "TQMenuBar",
+ "TQMessageBox",
"TQMotif",
"TQMotifDialog",
- "TTQMotifPlusStyle",
- "TTQMotifStyle",
+ "TQMotifPlusStyle",
+ "TQMotifStyle",
"TQMotifWidget",
"TQNPInstance",
"TQNPWidget",
- "TTQNetworkOperation",
- "TTQNetworkProtocol",
- "TTQObjectCleanupHandler",
- "TTQPlatinumStyle",
- "TTQProcess",
- "TTQPopupMenu",
- "TTQProgressDialog",
- "TTQRegExpValidator",
+ "TQNetworkOperation",
+ "TQNetworkProtocol",
+ "TQObjectCleanupHandler",
+ "TQPlatinumStyle",
+ "TQProcess",
+ "TQPopupMenu",
+ "TQProgressDialog",
+ "TQRegExpValidator",
"TQSGIStyle",
- "TTQServerSocket",
+ "TQServerSocket",
"TQSessionManager",
- "TTQSignal",
- "TTQSignalMapper",
- "TTQSizeGrip",
- "TTQSocket",
- "TTQSocketNotifier",
- "TTQSound",
- "TTQSqlDatabase",
- "TTQSqlDriver",
- "TTQSqlEditorFactory",
- "TTQSqlForm",
- "TTQStatusBar",
- "TTQStoredDrag",
- "TTQStyle",
- "TTQStyleSheet",
- "TTQTabBar",
- "TTQTabDialog",
- "TTQTextDrag",
- "TTQToolBar",
- "TTQToolTipGroup",
+ "TQSignal",
+ "TQSignalMapper",
+ "TQSizeGrip",
+ "TQSocket",
+ "TQSocketNotifier",
+ "TQSound",
+ "TQSqlDatabase",
+ "TQSqlDriver",
+ "TQSqlEditorFactory",
+ "TQSqlForm",
+ "TQStatusBar",
+ "TQStoredDrag",
+ "TQStyle",
+ "TQStyleSheet",
+ "TQTabBar",
+ "TQTabDialog",
+ "TQTextDrag",
+ "TQToolBar",
+ "TQToolTipGroup",
"TQTranslator",
- "TTQUriDrag",
- "TTQUrlOperator",
- "TTQVButtonGroup",
- "TTQVGroupBox",
- "TTQValidator",
+ "TQUriDrag",
+ "TQUrlOperator",
+ "TQVButtonGroup",
+ "TQVGroupBox",
+ "TQValidator",
"TQWSKeyboardHandler",
- "TTQWindowsStyle",
+ "TQWindowsStyle",
"TQWindowsXPStyle",
- "TTQWorkspace",
+ "TQWorkspace",
"TQXtWidget",
0
@@ -1068,7 +1068,7 @@ namespace KJSEmbed {
addType( classes[ i ] );
}
// Create the custom added types.
- TTQDictIterator<KJSEmbed::Bindings::JSBindingBase> idx( d->objectTypes );
+ TQDictIterator<KJSEmbed::Bindings::JSBindingBase> idx( d->objectTypes );
for( ; idx.current(); ++idx){
JSFactoryImp *cons = new JSFactoryImp( exec, this, JSFactoryImp::NewInstance, idx.currentKey() );
parent.put( exec, KJS::Identifier( KJS::UString( cons->parameter() ) ), KJS::Object( cons ) );
@@ -1076,12 +1076,12 @@ namespace KJSEmbed {
}
}
- void JSFactory::registerOpaqueType( const TTQString & className, KJSEmbed::Bindings::JSBindingBase * bindingFactory )
+ void JSFactory::registerOpaqueType( const TQString & className, KJSEmbed::Bindings::JSBindingBase * bindingFactory )
{
d->opaqueTypes.insert(className,bindingFactory);
}
- void JSFactory::unregisterOpaqueType( const TTQString & className )
+ void JSFactory::unregisterOpaqueType( const TQString & className )
{
d->opaqueTypes.remove(className);
}
@@ -1100,12 +1100,12 @@ namespace KJSEmbed {
}
}
}
- void JSFactory::registerObjectType( const TTQString & className, KJSEmbed::Bindings::JSBindingBase * bindingFactory )
+ void JSFactory::registerObjectType( const TQString & className, KJSEmbed::Bindings::JSBindingBase * bindingFactory )
{
d->objectTypes.insert(className,bindingFactory);
}
- void JSFactory::unregisterObjectType( const TTQString & className )
+ void JSFactory::unregisterObjectType( const TQString & className )
{
d->objectTypes.remove(className);
}