From e63beeb5bdb82987b1e00bc35178667786fbad48 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Mon, 5 Dec 2011 16:20:48 -0600 Subject: Fix incorrect conversion --- kjsembed/customobject_imp.cpp | 220 +++++++++++++++++++++--------------------- 1 file changed, 110 insertions(+), 110 deletions(-) (limited to 'kjsembed/customobject_imp.cpp') diff --git a/kjsembed/customobject_imp.cpp b/kjsembed/customobject_imp.cpp index a29815f0..74f58c2f 100644 --- a/kjsembed/customobject_imp.cpp +++ b/kjsembed/customobject_imp.cpp @@ -102,8 +102,8 @@ void CustomObjectImp::addBindings( KJS::ExecState *exec, KJS::Object &object ) if ( !proxy ) return; kdDebug() << "CustomObjectImp::addBindings is a proxy" << endl; - TTQObject *qobj = proxy->object(); - TTQWidget *widget = proxy->widget(); + TQObject *qobj = proxy->object(); + TQWidget *widget = proxy->widget(); #ifndef QT_ONLY if ( qobj ) { @@ -126,13 +126,13 @@ void CustomObjectImp::addBindings( KJS::ExecState *exec, KJS::Object &object ) obj = new CustomObjectImp( exec, WidgetDrawText, proxy ); object.put( exec, "drawText", KJS::Object(obj) ); - TTQListBox *listbox = dynamic_cast( widget ); + TQListBox *listbox = dynamic_cast( widget ); if ( listbox ) { obj = new CustomObjectImp( exec, ListBoxInsertItem, proxy ); object.put( exec, "insertItem", KJS::Object(obj) ); } - TTQListView *listview = dynamic_cast( widget ); + TQListView *listview = dynamic_cast( widget ); if ( listview ) { obj = new CustomObjectImp( exec, ListViewAddColumn, proxy ); object.put( exec, "addColumn", KJS::Object(obj) ); @@ -149,7 +149,7 @@ void CustomObjectImp::addBindings( KJS::ExecState *exec, KJS::Object &object ) obj = new CustomObjectImp( exec, ListViewCurrentItem, proxy ); object.put( exec, "currentItem", KJS::Object(obj) ); } - TTQSplashScreen *splashscreen = dynamic_cast(widget); + TQSplashScreen *splashscreen = dynamic_cast(widget); if( splashscreen ) { obj = new CustomObjectImp(exec, TQSplashScreenSetPixmap, proxy ); @@ -189,13 +189,13 @@ void CustomObjectImp::addBindings( KJS::ExecState *exec, KJS::Object &object ) #endif // QT_ONLY - TTQTabWidget *tw = dynamic_cast( widget ); + TQTabWidget *tw = dynamic_cast( widget ); if ( tw ) { obj = new CustomObjectImp( exec, TabWidgetAddTab, proxy ); object.put( exec, "addTab", KJS::Object(obj) ); } - TTQScrollView *sv = dynamic_cast( widget ); + TQScrollView *sv = dynamic_cast( widget ); if ( sv ) { obj = new CustomObjectImp( exec, ScrollViewViewport, proxy ); object.put( exec, "viewport", KJS::Object(obj) ); @@ -213,17 +213,17 @@ void CustomObjectImp::addBindings( KJS::ExecState *exec, KJS::Object &object ) ADDBINDING( TQCanvasView, widget ) /* - TTQMenuData *md = dynamic_cast( widget ); + TQMenuData *md = dynamic_cast( widget ); if ( md ) { TQMenuDataImp::addBindings( exec, object ); } - TTQMenuItem *mitem = dynamic_cast( widget ); + TQMenuItem *mitem = dynamic_cast( widget ); if ( mitem ) { TQMenuItemImp::addBindings( exec, object ); } */ - TTQMenuData *menuData = dynamic_cast(widget); + TQMenuData *menuData = dynamic_cast(widget); if( menuData ) { obj = new CustomObjectImp( exec, TQMenuDataInsertItem, proxy ); @@ -234,12 +234,12 @@ void CustomObjectImp::addBindings( KJS::ExecState *exec, KJS::Object &object ) object.put( exec, "insertSeparator", KJS::Object(obj) ); } - TTQHBox *hbox = dynamic_cast( widget ); + TQHBox *hbox = dynamic_cast( widget ); if ( hbox ) { obj = new CustomObjectImp( exec, HBoxSpacing, proxy ); object.put( exec, "setSpacing", KJS::Object(obj) ); } - TTQToolBox *tb = dynamic_cast( qobj ); + TQToolBox *tb = dynamic_cast( qobj ); if ( tb ) { obj = new CustomObjectImp( exec, TQToolBoxAddItem, proxy ); object.put( exec, "addItem", KJS::Object(obj) ); @@ -262,7 +262,7 @@ void CustomObjectImp::addBindings( KJS::ExecState *exec, KJS::Object &object ) } if ( qobj ) { - TTQApplication *app = dynamic_cast( qobj ); + TQApplication *app = dynamic_cast( qobj ); if ( app ) { obj = new CustomObjectImp( exec, ApplicationExec, proxy ); object.put( exec, "exec", KJS::Object(obj) ); @@ -292,7 +292,7 @@ void CustomObjectImp::addBindings( KJS::ExecState *exec, KJS::Object &object ) #endif // QT_ONLY - TTQTimer *timer = dynamic_cast( qobj ); + TQTimer *timer = dynamic_cast( qobj ); if ( timer ) { obj = new CustomObjectImp( exec, TimerIsActive, proxy ); object.put( exec, "isActive", KJS::Object(obj) ); @@ -302,7 +302,7 @@ void CustomObjectImp::addBindings( KJS::ExecState *exec, KJS::Object &object ) object.put( exec, "stop", KJS::Object(obj) ); } - TTQBoxLayout *box = dynamic_cast( qobj ); + TQBoxLayout *box = dynamic_cast( qobj ); if ( box ) { obj = new CustomObjectImp( exec, BoxLayoutAddWidget, proxy ); object.put( exec, "addWidget", KJS::Object(obj) ); @@ -529,10 +529,10 @@ KJS::Value CustomObjectImp::call( KJS::ExecState *exec, KJS::Object &self, const KJS::Value CustomObjectImp::qsplashScreenSetPixmap(KJS::ExecState *exec, KJS::Object &, const KJS::List &args ) { - TTQSplashScreen *ss = dynamic_cast(proxy->widget()); + TQSplashScreen *ss = dynamic_cast(proxy->widget()); if ( ss ) { - TTQPixmap pix = extractTQPixmap(exec, args, 0 ); + TQPixmap pix = extractTQPixmap(exec, args, 0 ); ss->setPixmap(pix); } return KJS::Value(); @@ -540,10 +540,10 @@ KJS::Value CustomObjectImp::qsplashScreenSetPixmap(KJS::ExecState *exec, KJS::Ob KJS::Value CustomObjectImp::qsplashScreenPixmap(KJS::ExecState *exec, KJS::Object &, const KJS::List & ) { - TTQSplashScreen *ss = dynamic_cast(proxy->widget()); + TQSplashScreen *ss = dynamic_cast(proxy->widget()); if ( ss ) { - TTQPixmap pix = *(ss->pixmap()); + TQPixmap pix = *(ss->pixmap()); return convertToValue(exec, pix); } return KJS::Value(); @@ -551,10 +551,10 @@ KJS::Value CustomObjectImp::qsplashScreenPixmap(KJS::ExecState *exec, KJS::Objec KJS::Value CustomObjectImp::qsplashScreenFinish(KJS::ExecState *exec, KJS::Object &, const KJS::List &args ) { - TTQSplashScreen *ss = dynamic_cast(proxy->widget()); + TQSplashScreen *ss = dynamic_cast(proxy->widget()); if ( ss ) { - TTQWidget *w = extractTQWidget(exec, args, 0 ); + TQWidget *w = extractTQWidget(exec, args, 0 ); ss->finish(w); } return KJS::Value(); @@ -562,7 +562,7 @@ KJS::Value CustomObjectImp::qsplashScreenFinish(KJS::ExecState *exec, KJS::Objec KJS::Value CustomObjectImp::qsplashScreenRepaint(KJS::ExecState *exec, KJS::Object &, const KJS::List & ) { - TTQSplashScreen *ss = dynamic_cast(proxy->widget()); + TQSplashScreen *ss = dynamic_cast(proxy->widget()); if ( ss ) { ss->repaint(); @@ -573,10 +573,10 @@ KJS::Value CustomObjectImp::qsplashScreenRepaint(KJS::ExecState *exec, KJS::Obje KJS::Value CustomObjectImp::widgetGrabWidget(KJS::ExecState *exec, KJS::Object &, const KJS::List & ) { - TTQWidget *w = proxy->widget(); + TQWidget *w = proxy->widget(); if ( !w ) return KJS::Value(); - TTQVariant pix(TTQPixmap::grabWidget(w) ); + TQVariant pix(TQPixmap::grabWidget(w) ); return convertToValue( exec, pix ); } @@ -585,7 +585,7 @@ void CustomObjectImp::widgetDrawLine( KJS::ExecState *exec, KJS::Object &, const if ( args.size() != 4 ) return; - TTQWidget *w = proxy->widget(); + TQWidget *w = proxy->widget(); if ( !w ) return; @@ -594,7 +594,7 @@ void CustomObjectImp::widgetDrawLine( KJS::ExecState *exec, KJS::Object &, const int x1 = extractInt( exec, args, 2 ); int y1 = extractInt( exec, args, 3 ); - TTQPainter p(w); + TQPainter p(w); p.drawLine(x,y,x1,y1); } @@ -603,13 +603,13 @@ void CustomObjectImp::widgetDrawText( KJS::ExecState *exec, KJS::Object &, const if ( args.size() != 3 ) return; - TTQWidget *w = proxy->widget(); + TQWidget *w = proxy->widget(); if ( !w ) return; int x = extractInt( exec, args, 0 ); int y = extractInt( exec, args, 1 ); - TTQString s = extractTQString( exec, args, 2 ); + TQString s = extractTQString( exec, args, 2 ); w->drawText( x, y, s ); } @@ -618,11 +618,11 @@ void CustomObjectImp::listBoxInsertItem( KJS::ExecState *exec, KJS::Object &, co if ( args.size() != 1 ) return; - TTQListBox *lb = dynamic_cast( proxy->object() ); + TQListBox *lb = dynamic_cast( proxy->object() ); if ( !lb ) return; - TTQString s = extractTQString( exec, args, 0 ); + TQString s = extractTQString( exec, args, 0 ); lb->insertItem( s ); } @@ -631,11 +631,11 @@ void CustomObjectImp::listViewAddColumn( KJS::ExecState *exec, KJS::Object &, co if ( args.size() != 1 ) return; - TTQListView *lv = dynamic_cast( proxy->object() ); + TQListView *lv = dynamic_cast( proxy->object() ); if ( !lv ) return; - TTQString s = extractTQString( exec, args, 0 ); + TQString s = extractTQString( exec, args, 0 ); lv->addColumn( s ); } @@ -651,10 +651,10 @@ void CustomObjectImp::listViewInsertItem( KJS::ExecState *exec, KJS::Object &, c KListViewItem *lvm = new KListViewItem(klv); for( int idx = 0; idx < args.size(); ++idx){ - TTQVariant arg = convertToVariant(exec, args[idx]); - if( arg.canCast(TTQVariant::String) ) + TQVariant arg = convertToVariant(exec, args[idx]); + if( arg.canCast(TQVariant::String) ) lvm->setText(idx, arg.toString()); - else if ( arg.canCast(TTQVariant::Pixmap) ) + else if ( arg.canCast(TQVariant::Pixmap) ) lvm->setPixmap(idx, arg.toPixmap()); } return; @@ -662,15 +662,15 @@ void CustomObjectImp::listViewInsertItem( KJS::ExecState *exec, KJS::Object &, c #endif // QT_ONLY - TTQListView *lv = dynamic_cast( proxy->object() ); + TQListView *lv = dynamic_cast( proxy->object() ); if ( lv ) { - TTQListViewItem *lvm = new TTQListViewItem(lv); + TQListViewItem *lvm = new TQListViewItem(lv); for( int idx = 0; idx < args.size(); ++idx){ - TTQVariant arg = convertToVariant(exec, args[idx]); - if( arg.canCast(TTQVariant::String) ) + TQVariant arg = convertToVariant(exec, args[idx]); + if( arg.canCast(TQVariant::String) ) lvm->setText(idx, arg.toString()); - else if ( arg.canCast(TTQVariant::Pixmap) ) + else if ( arg.canCast(TQVariant::Pixmap) ) lvm->setPixmap(idx, arg.toPixmap()); } @@ -682,23 +682,23 @@ KJS::Value CustomObjectImp::listViewSelectedItem( KJS::ExecState *exec, KJS::Obj if ( args.size() ) return KJS::Value(); - TTQListView *lv = dynamic_cast( proxy->object() ); + TQListView *lv = dynamic_cast( proxy->object() ); if ( !lv ) return KJS::Value(); - TTQListViewItem *lvi = lv->selectedItem(); + TQListViewItem *lvi = lv->selectedItem(); if ( !lvi ) return KJS::Null(); - TTQCheckListItem *cli = dynamic_cast( lvi ); + TQCheckListItem *cli = dynamic_cast( lvi ); if ( cli ) { - JSOpaqueProxy *prx = new JSOpaqueProxy( lvi, "TTQCheckListItem" ); + JSOpaqueProxy *prx = new JSOpaqueProxy( lvi, "TQCheckListItem" ); KJS::Object proxyObj(prx); proxy->part()->factory()->extendOpaqueProxy(exec, proxyObj); return proxyObj; } - JSOpaqueProxy *prx = new JSOpaqueProxy( lvi, "TTQListViewItem" ); + JSOpaqueProxy *prx = new JSOpaqueProxy( lvi, "TQListViewItem" ); KJS::Object proxyObj(prx); proxy->part()->factory()->extendOpaqueProxy(exec, proxyObj); return proxyObj; @@ -710,7 +710,7 @@ void CustomObjectImp::listViewHideColumn( KJS::ExecState *exec, KJS::Object &, c if ( args.size() != 1 ) return; - TTQListView *lv = dynamic_cast( proxy->object() ); + TQListView *lv = dynamic_cast( proxy->object() ); if ( !lv ) return; @@ -728,7 +728,7 @@ void CustomObjectImp::mainWinSetCentralWidget( KJS::ExecState *exec, KJS::Object jsobj = args[0].toObject(exec); JSObjectProxy *cwproxy = JSProxy::toObjectProxy( jsobj.imp() ); - TTQWidget *cw = cwproxy ? cwproxy->widget() : 0; + TQWidget *cw = cwproxy ? cwproxy->widget() : 0; if ( !cw ) return; KMainWindow *mw = dynamic_cast( proxy->object() ); @@ -793,7 +793,7 @@ KJS::Value CustomObjectImp::mainWinMenuBar( KJS::ExecState *exec, KJS::Object &, return KJS::Value(); } - TTQObject *obj = mw->menuBar(); + TQObject *obj = mw->menuBar(); return proxy->part()->factory()->createProxy( exec, obj, proxy ); #else // QT_ONLY @@ -812,7 +812,7 @@ KJS::Value CustomObjectImp::mainWinStatusBar( KJS::ExecState *exec, KJS::Object return KJS::Value(); } - TTQObject *obj = mw->statusBar(); + TQObject *obj = mw->statusBar(); return proxy->part()->factory()->createProxy( exec, obj, proxy ); #else // QT_ONLY @@ -853,13 +853,13 @@ void CustomObjectImp::tabWidgetAddTab( KJS::ExecState *exec, KJS::Object&, const if ( args.size() < 2 ) return; - TTQTabWidget *tw = dynamic_cast( proxy->object() ); + TQTabWidget *tw = dynamic_cast( proxy->object() ); if ( !tw ) return; KJS::Object jsobj = args[0].toObject(exec); JSObjectProxy *tproxy = JSProxy::toObjectProxy( jsobj.imp() ); - TTQWidget *w = tproxy ? tproxy->widget() : 0; + TQWidget *w = tproxy ? tproxy->widget() : 0; if ( !w ) return; @@ -868,13 +868,13 @@ void CustomObjectImp::tabWidgetAddTab( KJS::ExecState *exec, KJS::Object&, const KJS::Value CustomObjectImp::scrollViewViewport( KJS::ExecState *exec, KJS::Object&, const KJS::List &args ) { - TTQScrollView *sv = dynamic_cast( proxy->object() ); + TQScrollView *sv = dynamic_cast( proxy->object() ); if ( !sv ) return KJS::Value(); KJS::Object jsobj = args[0].toObject(exec); JSObjectProxy *sproxy = JSProxy::toObjectProxy( jsobj.imp() ); - TTQWidget *w = sproxy ? sproxy->widget() : 0; + TQWidget *w = sproxy ? sproxy->widget() : 0; if ( !w ) return KJS::Value(); @@ -886,13 +886,13 @@ void CustomObjectImp::scrollViewAddChild( KJS::ExecState *exec, KJS::Object&, co if ( args.size() < 1 ) return; - TTQScrollView *sv = dynamic_cast( proxy->object() ); + TQScrollView *sv = dynamic_cast( proxy->object() ); if ( !sv ) return; KJS::Object jsobj = args[0].toObject(exec); JSObjectProxy *sproxy = JSProxy::toObjectProxy( jsobj.imp() ); - TTQWidget *w = sproxy ? sproxy->widget() : 0; + TQWidget *w = sproxy ? sproxy->widget() : 0; if ( !w ) return; @@ -904,7 +904,7 @@ void CustomObjectImp::scrollViewAddChild( KJS::ExecState *exec, KJS::Object&, co KJS::Value CustomObjectImp::applicationExec( KJS::ExecState *, KJS::Object&, const KJS::List& ) { - TTQApplication *app = dynamic_cast( proxy->object() ); + TQApplication *app = dynamic_cast( proxy->object() ); if ( !app ) return KJS::Value(); @@ -913,7 +913,7 @@ KJS::Value CustomObjectImp::applicationExec( KJS::ExecState *, KJS::Object&, con KJS::Value CustomObjectImp::timerIsActive( KJS::ExecState *, KJS::Object &, const KJS::List & ) { - TTQTimer *timer = dynamic_cast( proxy->object() ); + TQTimer *timer = dynamic_cast( proxy->object() ); if ( !timer ) return KJS::Value(); @@ -922,7 +922,7 @@ KJS::Value CustomObjectImp::timerIsActive( KJS::ExecState *, KJS::Object &, cons KJS::Value CustomObjectImp::timerStart( KJS::ExecState *exec, KJS::Object &, const KJS::List &args ) { - TTQTimer *timer = dynamic_cast( proxy->object() ); + TQTimer *timer = dynamic_cast( proxy->object() ); if ( !timer ) return KJS::Value(); @@ -939,7 +939,7 @@ KJS::Value CustomObjectImp::timerStart( KJS::ExecState *exec, KJS::Object &, con KJS::Value CustomObjectImp::timerStop( KJS::ExecState *, KJS::Object &, const KJS::List & ) { - TTQTimer *timer = dynamic_cast( proxy->object() ); + TQTimer *timer = dynamic_cast( proxy->object() ); if ( !timer ) return KJS::Value(); @@ -952,13 +952,13 @@ void CustomObjectImp::boxLayoutAddWidget( KJS::ExecState *exec, KJS::Object &, c if ( (args.size() < 1) || (args.size() > 3) ) return; - TTQBoxLayout *box = dynamic_cast( proxy->object() ); + TQBoxLayout *box = dynamic_cast( proxy->object() ); if ( !box ) return; KJS::Object jsobj = args[0].toObject(exec); JSObjectProxy *proxy = JSProxy::toObjectProxy( jsobj.imp() ); - TTQWidget *w = proxy ? proxy->widget() : 0; + TQWidget *w = proxy ? proxy->widget() : 0; if ( !w ) return; @@ -975,7 +975,7 @@ void CustomObjectImp::boxLayoutAddSpacing( KJS::ExecState *exec, KJS::Object &, if ( args.size() != 1 ) return; - TTQBoxLayout *box = dynamic_cast( proxy->object() ); + TQBoxLayout *box = dynamic_cast( proxy->object() ); if ( !box ) return; @@ -987,7 +987,7 @@ void CustomObjectImp::boxLayoutAddStretch( KJS::ExecState *exec, KJS::Object &, if ( args.size() > 1 ) return; - TTQBoxLayout *box = dynamic_cast( proxy->object() ); + TQBoxLayout *box = dynamic_cast( proxy->object() ); if ( !box ) return; @@ -1002,13 +1002,13 @@ void CustomObjectImp::boxLayoutAddLayout( KJS::ExecState *exec, KJS::Object &, c if ( (args.size() < 1) || (args.size() > 2) ) return; - TTQBoxLayout *box = dynamic_cast( proxy->object() ); + TQBoxLayout *box = dynamic_cast( proxy->object() ); if ( !box ) return; KJS::Object jsobj = args[0].toObject(exec); JSObjectProxy *proxy = JSProxy::toObjectProxy( jsobj.imp() ); - TTQLayout *l = proxy ? (dynamic_cast(proxy->object())) : 0; + TQLayout *l = proxy ? (dynamic_cast(proxy->object())) : 0; if ( !l ) return; @@ -1051,7 +1051,7 @@ KJS::Value CustomObjectImp::kroPartWriteStream( KJS::ExecState *exec, KJS::Objec if ( !ro ) return KJS::Boolean( false ); - TTQCString s = extractTQString( exec, args, 0 ).latin1(); + TQCString s = extractTQString( exec, args, 0 ).latin1(); bool ok = ro->writeStream( s ); return KJS::Boolean( ok ); @@ -1087,7 +1087,7 @@ void CustomObjectImp::hboxSpacing( KJS::ExecState *exec, KJS::Object &, const KJ if ( args.size() != 1 ) return; - TTQHBox *box = dynamic_cast( proxy->object() ); + TQHBox *box = dynamic_cast( proxy->object() ); if ( !box ) return; @@ -1167,7 +1167,7 @@ KJS::Value CustomObjectImp::ksystemtrayLoadIcon( KJS::ExecState *exec, KJS::Obje if ( args.size() != 1 ) return KJS::Value(); - TTQVariant pix( KSystemTray::loadIcon( extractTQString( exec, args, 0 ) ) ); + TQVariant pix( KSystemTray::loadIcon( extractTQString( exec, args, 0 ) ) ); return convertToValue( exec, pix ); #endif // QT_ONLY return KJS::Null(); @@ -1175,7 +1175,7 @@ return KJS::Null(); KJS::Value CustomObjectImp::qcanvasViewCanvas( KJS::ExecState *exec, KJS::Object&, const KJS::List &args ) { - TTQCanvasView *cv = dynamic_cast( proxy->object() ); + TQCanvasView *cv = dynamic_cast( proxy->object() ); if ( !cv ) return KJS::Value(); @@ -1184,28 +1184,28 @@ KJS::Value CustomObjectImp::qcanvasViewCanvas( KJS::ExecState *exec, KJS::Object void CustomObjectImp::qcanvasViewSetCanvas( KJS::ExecState *exec, KJS::Object&, const KJS::List &args ) { - TTQCanvasView *cv = dynamic_cast( proxy->object() ); + TQCanvasView *cv = dynamic_cast( proxy->object() ); if ( !cv ) return; KJS::Object jsobj = args[0].toObject(exec); JSObjectProxy *proxy = JSProxy::toObjectProxy( jsobj.imp() ); - TTQObject *obj = proxy->object(); + TQObject *obj = proxy->object(); if ( !obj ) return; - TTQCanvas *c = (TTQCanvas *) obj; + TQCanvas *c = (TQCanvas *) obj; cv->setCanvas(c); } KJS::Value Bindings::CustomObjectImp::qlistViewTakeItem( KJS::ExecState * exec, KJS::Object &, const KJS::List &args ) { - TTQListView *lv = dynamic_cast( proxy->object() ); + TQListView *lv = dynamic_cast( proxy->object() ); if( !lv ) return KJS::Boolean(false); KJS::Object lviObj = args[0].toObject(exec); JSOpaqueProxy *prxy = JSProxy::toOpaqueProxy(lviObj.imp() ); - TTQListViewItem *itm = prxy->toNative(); + TQListViewItem *itm = prxy->toNative(); if( !itm ) { // Trow an error... @@ -1217,42 +1217,42 @@ KJS::Value Bindings::CustomObjectImp::qlistViewTakeItem( KJS::ExecState * exec, KJS::Value Bindings::CustomObjectImp::qlistViewFirstChild( KJS::ExecState * exec, KJS::Object &, const KJS::List &args ) { - TTQListView *lv = dynamic_cast( proxy->object() ); + TQListView *lv = dynamic_cast( proxy->object() ); if( !lv ) return KJS::Boolean(false); - TTQListViewItem *itm = lv->firstChild(); - KJS::Object jsObject( new JSOpaqueProxy( itm, "TTQListViewItem") ); + TQListViewItem *itm = lv->firstChild(); + KJS::Object jsObject( new JSOpaqueProxy( itm, "TQListViewItem") ); proxy->part()->factory()->extendOpaqueProxy(exec, jsObject); return jsObject; } KJS::Value Bindings::CustomObjectImp::qlistViewCurrentItem( KJS::ExecState * exec, KJS::Object &, const KJS::List &args ) { - TTQListView *lv = dynamic_cast( proxy->object() ); + TQListView *lv = dynamic_cast( proxy->object() ); if( !lv ) return KJS::Boolean(false); - TTQListViewItem *itm = lv->currentItem(); - KJS::Object jsObject( new JSOpaqueProxy( itm, "TTQListViewItem") ); + TQListViewItem *itm = lv->currentItem(); + KJS::Object jsObject( new JSOpaqueProxy( itm, "TQListViewItem") ); proxy->part()->factory()->extendOpaqueProxy(exec, jsObject); return jsObject; } KJS::Value Bindings::CustomObjectImp::qtoolBoxAddItem(KJS::ExecState *exec, KJS::Object &, const KJS::List &args) { - TTQToolBox *tb = dynamic_cast( proxy->object() ); + TQToolBox *tb = dynamic_cast( proxy->object() ); if( !tb ) return KJS::Boolean(false); if( args.size() == 2) { - TTQWidget *w = extractTQWidget( exec, args, 0 ); - TTQString lab = extractTQString( exec, args, 1 ); + TQWidget *w = extractTQWidget( exec, args, 0 ); + TQString lab = extractTQString( exec, args, 1 ); return KJS::Number( tb->addItem(w,lab) ); } if( args.size() == 3) { - TTQWidget *w = extractTQWidget( exec, args, 0 ); - TTQIconSet ico = extractTQPixmap( exec, args, 1 ); - TTQString lab = extractTQString( exec, args, 2 ); + TQWidget *w = extractTQWidget( exec, args, 0 ); + TQIconSet ico = extractTQPixmap( exec, args, 1 ); + TQString lab = extractTQString( exec, args, 2 ); return KJS::Number( tb->addItem(w,ico,lab) ); } return KJS::Boolean(false); @@ -1260,22 +1260,22 @@ KJS::Value Bindings::CustomObjectImp::qtoolBoxAddItem(KJS::ExecState *exec, KJS: KJS::Value Bindings::CustomObjectImp::qtoolBoxInsertItem(KJS::ExecState *exec, KJS::Object &, const KJS::List &args ) { - TTQToolBox *tb = dynamic_cast( proxy->object() ); + TQToolBox *tb = dynamic_cast( proxy->object() ); if( !tb ) return KJS::Boolean(false); if( args.size() == 3) { int idx = extractInt(exec, args, 0); - TTQWidget *w = extractTQWidget( exec, args, 1 ); - TTQString lab = extractTQString( exec, args, 2 ); + TQWidget *w = extractTQWidget( exec, args, 1 ); + TQString lab = extractTQString( exec, args, 2 ); return KJS::Number( tb->insertItem(idx,w,lab) ); } if( args.size() == 4) { int idx = extractInt(exec, args, 0); - TTQWidget *w = extractTQWidget( exec, args, 1 ); - TTQIconSet ico = extractTQPixmap( exec, args, 2 ); - TTQString lab = extractTQString( exec, args, 3 ); + TQWidget *w = extractTQWidget( exec, args, 1 ); + TQIconSet ico = extractTQPixmap( exec, args, 2 ); + TQString lab = extractTQString( exec, args, 3 ); return KJS::Number( tb->insertItem(idx,w,ico,lab) ); } return KJS::Boolean(false); @@ -1283,16 +1283,16 @@ KJS::Value Bindings::CustomObjectImp::qtoolBoxInsertItem(KJS::ExecState *exec, K void Bindings::CustomObjectImp::qtoolBoxRemoveItem(KJS::ExecState *exec, KJS::Object &, const KJS::List &args ) { - TTQToolBox *tb = dynamic_cast( proxy->object() ); + TQToolBox *tb = dynamic_cast( proxy->object() ); if( !tb ) return; - TTQWidget *w = extractTQWidget(exec, args, 0); + TQWidget *w = extractTQWidget(exec, args, 0); tb->removeItem(w); } KJS::Value Bindings::CustomObjectImp::qtoolBoxItemLabel(KJS::ExecState *exec, KJS::Object &, const KJS::List &args ) { - TTQToolBox *tb = dynamic_cast( proxy->object() ); + TQToolBox *tb = dynamic_cast( proxy->object() ); if( !tb ) return KJS::Boolean(false); int idx = extractInt(exec, args, 0); @@ -1301,63 +1301,63 @@ KJS::Value Bindings::CustomObjectImp::qtoolBoxItemLabel(KJS::ExecState *exec, KJ void Bindings::CustomObjectImp::qtoolBoxSetItemLabel(KJS::ExecState *exec, KJS::Object &, const KJS::List &args ) { - TTQToolBox *tb = dynamic_cast( proxy->object() ); + TQToolBox *tb = dynamic_cast( proxy->object() ); if( !tb ) return; int idx = extractInt(exec, args, 0); - TTQString lab = extractTQString( exec, args, 1 ); + TQString lab = extractTQString( exec, args, 1 ); tb->setItemLabel(idx,lab); } KJS::Value Bindings::CustomObjectImp::qtoolBoxItemIconSet(KJS::ExecState *exec, KJS::Object &, const KJS::List &args ) { - TTQToolBox *tb = dynamic_cast( proxy->object() ); + TQToolBox *tb = dynamic_cast( proxy->object() ); if( !tb ) return KJS::Boolean(false); int idx = extractInt(exec, args, 0); - TTQPixmap pix = tb->itemIconSet(idx).pixmap(); + TQPixmap pix = tb->itemIconSet(idx).pixmap(); return convertToValue( exec, pix ); } void Bindings::CustomObjectImp::qtoolBoxSetItemIconSet(KJS::ExecState *exec, KJS::Object &, const KJS::List &args) { - TTQToolBox *tb = dynamic_cast( proxy->object() ); + TQToolBox *tb = dynamic_cast( proxy->object() ); if( !tb ) return; int idx = extractInt(exec, args, 0); - TTQIconSet ico = extractTQPixmap( exec, args, 1); + TQIconSet ico = extractTQPixmap( exec, args, 1); tb->setItemIconSet(idx,ico); } KJS::Value Bindings::CustomObjectImp::qtoolBoxItem(KJS::ExecState *exec, KJS::Object &, const KJS::List &args ) { - TTQToolBox *tb = dynamic_cast( proxy->object() ); + TQToolBox *tb = dynamic_cast( proxy->object() ); if( !tb ) return KJS::Boolean(false); int idx = extractInt(exec, args, 0); return proxy->part()->factory()->createProxy( exec, tb->item(idx), proxy ); } -TTQPopupMenu *getMenu(const KJS::Object &obj) +TQPopupMenu *getMenu(const KJS::Object &obj) { JSObjectProxy *jsproxy = JSProxy::toObjectProxy( obj.imp() ); - return dynamic_cast( jsproxy->object() ); + return dynamic_cast( jsproxy->object() ); } KJS::Value Bindings::CustomObjectImp::qmenuDataInsertItem(KJS::ExecState *exec, KJS::Object &, const KJS::List &args ) { - TTQMenuData *menu = dynamic_cast( proxy->object() ); + TQMenuData *menu = dynamic_cast( proxy->object() ); if( !menu ) return KJS::Boolean(false); int offset = 0; - TTQString text = extractTQString(exec,args, offset); - TTQPixmap pix = extractTQPixmap(exec,args, offset); + TQString text = extractTQString(exec,args, offset); + TQPixmap pix = extractTQPixmap(exec,args, offset); int id = -1; int idx = -1; int newIndex = 0; - TTQPopupMenu *parentMenu = 0; + TQPopupMenu *parentMenu = 0; if( !pix.isNull() ) { @@ -1419,7 +1419,7 @@ KJS::Value Bindings::CustomObjectImp::qmenuDataInsertItem(KJS::ExecState *exec, void Bindings::CustomObjectImp::qmenuDataRemoveItem(KJS::ExecState *exec, KJS::Object &, const KJS::List &args ) { - TTQMenuData *menu = dynamic_cast( proxy->object() ); + TQMenuData *menu = dynamic_cast( proxy->object() ); if( !menu ) return; int idx = extractInt(exec, args, 0); @@ -1428,7 +1428,7 @@ void Bindings::CustomObjectImp::qmenuDataRemoveItem(KJS::ExecState *exec, KJS::O KJS::Value Bindings::CustomObjectImp::qmenuDataInsertSeparator(KJS::ExecState *exec, KJS::Object &, const KJS::List &args ) { - TTQMenuData *menu = dynamic_cast( proxy->object() ); + TQMenuData *menu = dynamic_cast( proxy->object() ); if( !menu ) return KJS::Boolean(false); int idx = extractInt(exec, args, 0); -- cgit v1.2.1