summaryrefslogtreecommitdiffstats
path: root/kjsembed/customobject_imp.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kjsembed/customobject_imp.cpp')
-rw-r--r--kjsembed/customobject_imp.cpp312
1 files changed, 156 insertions, 156 deletions
diff --git a/kjsembed/customobject_imp.cpp b/kjsembed/customobject_imp.cpp
index 104915d8..a29815f0 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;
- TQObject *qobj = proxy->object();
- TQWidget *widget = proxy->widget();
+ TTQObject *qobj = proxy->object();
+ TTQWidget *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) );
- TQListBox *listbox = dynamic_cast<TQListBox *>( widget );
+ TTQListBox *listbox = dynamic_cast<TTQListBox *>( widget );
if ( listbox ) {
obj = new CustomObjectImp( exec, ListBoxInsertItem, proxy );
object.put( exec, "insertItem", KJS::Object(obj) );
}
- TQListView *listview = dynamic_cast<TQListView *>( widget );
+ TTQListView *listview = dynamic_cast<TTQListView *>( widget );
if ( listview ) {
obj = new CustomObjectImp( exec, ListViewAddColumn, proxy );
object.put( exec, "addColumn", KJS::Object(obj) );
@@ -149,16 +149,16 @@ void CustomObjectImp::addBindings( KJS::ExecState *exec, KJS::Object &object )
obj = new CustomObjectImp( exec, ListViewCurrentItem, proxy );
object.put( exec, "currentItem", KJS::Object(obj) );
}
- TQSplashScreen *splashscreen = dynamic_cast<TQSplashScreen *>(widget);
+ TTQSplashScreen *splashscreen = dynamic_cast<TTQSplashScreen *>(widget);
if( splashscreen )
{
- obj = new CustomObjectImp(exec, QSplashScreenSetPixmap, proxy );
+ obj = new CustomObjectImp(exec, TQSplashScreenSetPixmap, proxy );
object.put(exec, "setPixmap", KJS::Object(obj) );
- obj = new CustomObjectImp(exec, QSplashScreenPixmap, proxy );
+ obj = new CustomObjectImp(exec, TQSplashScreenPixmap, proxy );
object.put(exec, "pixmap", KJS::Object(obj) );
- obj = new CustomObjectImp(exec, QSplashScreenFinish, proxy );
+ obj = new CustomObjectImp(exec, TQSplashScreenFinish, proxy );
object.put(exec, "finish", KJS::Object(obj) );
- obj = new CustomObjectImp(exec, QSplashScreenRepaint, proxy );
+ obj = new CustomObjectImp(exec, TQSplashScreenRepaint, proxy );
object.put(exec, "repaint", KJS::Object(obj) );
}
@@ -189,13 +189,13 @@ void CustomObjectImp::addBindings( KJS::ExecState *exec, KJS::Object &object )
#endif // QT_ONLY
- TQTabWidget *tw = dynamic_cast<TQTabWidget *>( widget );
+ TTQTabWidget *tw = dynamic_cast<TTQTabWidget *>( widget );
if ( tw ) {
obj = new CustomObjectImp( exec, TabWidgetAddTab, proxy );
object.put( exec, "addTab", KJS::Object(obj) );
}
- TQScrollView *sv = dynamic_cast<TQScrollView *>( widget );
+ TTQScrollView *sv = dynamic_cast<TTQScrollView *>( widget );
if ( sv ) {
obj = new CustomObjectImp( exec, ScrollViewViewport, proxy );
object.put( exec, "viewport", KJS::Object(obj) );
@@ -203,66 +203,66 @@ void CustomObjectImp::addBindings( KJS::ExecState *exec, KJS::Object &object )
object.put( exec, "addChild", KJS::Object(obj) );
}
- //ADDBINDING( QMenuItem, widget)
- //ADDBINDING( QMenuData, widget)
+ //ADDBINDING( TQMenuItem, widget)
+ //ADDBINDING( TQMenuData, widget)
- ADDBINDING( QPopupMenu, widget )
- ADDBINDING( QComboBox, widget )
- //ADDBINDING( QFrame, widget )
- /*ADDBINDING( QListView, widget )*/
- ADDBINDING( QCanvasView, widget )
+ ADDBINDING( TQPopupMenu, widget )
+ ADDBINDING( TQComboBox, widget )
+ //ADDBINDING( TQFrame, widget )
+ /*ADDBINDING( TQListView, widget )*/
+ ADDBINDING( TQCanvasView, widget )
/*
- TQMenuData *md = dynamic_cast<TQMenuData *>( widget );
+ TTQMenuData *md = dynamic_cast<TTQMenuData *>( widget );
if ( md ) {
- QMenuDataImp::addBindings( exec, object );
+ TQMenuDataImp::addBindings( exec, object );
}
- TQMenuItem *mitem = dynamic_cast<TQMenuItem *>( widget );
+ TTQMenuItem *mitem = dynamic_cast<TTQMenuItem *>( widget );
if ( mitem ) {
- QMenuItemImp::addBindings( exec, object );
+ TQMenuItemImp::addBindings( exec, object );
}
*/
- TQMenuData *menuData = dynamic_cast<TQMenuData*>(widget);
+ TTQMenuData *menuData = dynamic_cast<TTQMenuData*>(widget);
if( menuData )
{
- obj = new CustomObjectImp( exec, QMenuDataInsertItem, proxy );
+ obj = new CustomObjectImp( exec, TQMenuDataInsertItem, proxy );
object.put( exec, "insertItem", KJS::Object(obj) );
- obj = new CustomObjectImp( exec, QMenuDataRemoveItem, proxy );
+ obj = new CustomObjectImp( exec, TQMenuDataRemoveItem, proxy );
object.put( exec, "removeItem", KJS::Object(obj) );
- obj = new CustomObjectImp( exec, QMenuDataRemoveItem, proxy );
+ obj = new CustomObjectImp( exec, TQMenuDataRemoveItem, proxy );
object.put( exec, "insertSeparator", KJS::Object(obj) );
}
- TQHBox *hbox = dynamic_cast<TQHBox *>( widget );
+ TTQHBox *hbox = dynamic_cast<TTQHBox *>( widget );
if ( hbox ) {
obj = new CustomObjectImp( exec, HBoxSpacing, proxy );
object.put( exec, "setSpacing", KJS::Object(obj) );
}
- TQToolBox *tb = dynamic_cast<TQToolBox *>( qobj );
+ TTQToolBox *tb = dynamic_cast<TTQToolBox *>( qobj );
if ( tb ) {
- obj = new CustomObjectImp( exec, QToolBoxAddItem, proxy );
+ obj = new CustomObjectImp( exec, TQToolBoxAddItem, proxy );
object.put( exec, "addItem", KJS::Object(obj) );
- obj = new CustomObjectImp( exec, QToolBoxInsertItem, proxy );
+ obj = new CustomObjectImp( exec, TQToolBoxInsertItem, proxy );
object.put( exec, "insertItem", KJS::Object(obj) );
- obj = new CustomObjectImp( exec, QToolBoxRemoveItem, proxy );
+ obj = new CustomObjectImp( exec, TQToolBoxRemoveItem, proxy );
object.put( exec, "removeItem", KJS::Object(obj) );
- obj = new CustomObjectImp( exec, QToolBoxItemLabel, proxy );
+ obj = new CustomObjectImp( exec, TQToolBoxItemLabel, proxy );
object.put( exec, "itemLabel", KJS::Object(obj) );
- obj = new CustomObjectImp( exec, QToolBoxSetItemLabel, proxy );
+ obj = new CustomObjectImp( exec, TQToolBoxSetItemLabel, proxy );
object.put( exec, "setItemLabel", KJS::Object(obj) );
- obj = new CustomObjectImp( exec, QToolBoxItemIconSet, proxy );
+ obj = new CustomObjectImp( exec, TQToolBoxItemIconSet, proxy );
object.put( exec, "itemIconSet", KJS::Object(obj) );
- obj = new CustomObjectImp( exec, QToolBoxSetItemIconSet, proxy );
+ obj = new CustomObjectImp( exec, TQToolBoxSetItemIconSet, proxy );
object.put( exec, "setItemIconSet", KJS::Object(obj) );
- obj = new CustomObjectImp( exec, QToolBoxItem, proxy );
+ obj = new CustomObjectImp( exec, TQToolBoxItem, proxy );
object.put( exec, "item", KJS::Object(obj) );
}
return;
}
if ( qobj ) {
- TQApplication *app = dynamic_cast<TQApplication *>( qobj );
+ TTQApplication *app = dynamic_cast<TTQApplication *>( 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
- TQTimer *timer = dynamic_cast<TQTimer *>( qobj );
+ TTQTimer *timer = dynamic_cast<TTQTimer *>( 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) );
}
- TQBoxLayout *box = dynamic_cast<TQBoxLayout *>( qobj );
+ TTQBoxLayout *box = dynamic_cast<TTQBoxLayout *>( qobj );
if ( box ) {
obj = new CustomObjectImp( exec, BoxLayoutAddWidget, proxy );
object.put( exec, "addWidget", KJS::Object(obj) );
@@ -453,60 +453,60 @@ KJS::Value CustomObjectImp::call( KJS::ExecState *exec, KJS::Object &self, const
case KSystemTrayLoadIcon:
return ksystemtrayLoadIcon( exec, self, args );
break;
- case QCanvasViewCanvas:
+ case TQCanvasViewCanvas:
return qcanvasViewCanvas( exec, self, args );
break;
- case QCanvasViewSetCanvas:
+ case TQCanvasViewSetCanvas:
qcanvasViewSetCanvas( exec, self, args );
return KJS::Value();
break;
- case QSplashScreenSetPixmap:
+ case TQSplashScreenSetPixmap:
return qsplashScreenSetPixmap(exec, self, args );
break;
- case QSplashScreenPixmap:
+ case TQSplashScreenPixmap:
return qsplashScreenPixmap(exec, self, args );
break;
- case QSplashScreenFinish:
+ case TQSplashScreenFinish:
return qsplashScreenFinish(exec, self, args );
break;
- case QSplashScreenRepaint:
+ case TQSplashScreenRepaint:
return qsplashScreenRepaint(exec, self, args );
break;
- case QToolBoxAddItem:
+ case TQToolBoxAddItem:
return qtoolBoxAddItem(exec, self, args );
break;
- case QToolBoxInsertItem:
+ case TQToolBoxInsertItem:
return qtoolBoxInsertItem(exec, self, args );
break;
- case QToolBoxRemoveItem:
+ case TQToolBoxRemoveItem:
qtoolBoxRemoveItem(exec, self, args );
return KJS::Boolean(true);
break;
- case QToolBoxItemLabel:
+ case TQToolBoxItemLabel:
return qtoolBoxItemLabel(exec, self, args );
break;
- case QToolBoxSetItemLabel:
+ case TQToolBoxSetItemLabel:
qtoolBoxSetItemLabel(exec, self, args );
return KJS::Boolean(true);
break;
- case QToolBoxItemIconSet:
+ case TQToolBoxItemIconSet:
return qtoolBoxItemIconSet(exec, self, args );
break;
- case QToolBoxSetItemIconSet:
+ case TQToolBoxSetItemIconSet:
qtoolBoxSetItemIconSet(exec, self, args );
return KJS::Boolean(true);
break;
- case QToolBoxItem:
+ case TQToolBoxItem:
return qtoolBoxItem(exec, self, args );
break;
- case QMenuDataInsertItem:
+ case TQMenuDataInsertItem:
return qmenuDataInsertItem(exec, self, args );
break;
- case QMenuDataRemoveItem:
+ case TQMenuDataRemoveItem:
qmenuDataRemoveItem(exec, self, args );
return KJS::Boolean(true);
break;
- case QMenuDataInsertSeparator:
+ case TQMenuDataInsertSeparator:
qmenuDataInsertSeparator(exec, self, args );
return KJS::Boolean(true);
break;
@@ -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 )
{
- TQSplashScreen *ss = dynamic_cast<TQSplashScreen*>(proxy->widget());
+ TTQSplashScreen *ss = dynamic_cast<TTQSplashScreen*>(proxy->widget());
if ( ss )
{
- TQPixmap pix = extractQPixmap(exec, args, 0 );
+ TTQPixmap 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 & )
{
- TQSplashScreen *ss = dynamic_cast<TQSplashScreen*>(proxy->widget());
+ TTQSplashScreen *ss = dynamic_cast<TTQSplashScreen*>(proxy->widget());
if ( ss )
{
- TQPixmap pix = *(ss->pixmap());
+ TTQPixmap 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 )
{
- TQSplashScreen *ss = dynamic_cast<TQSplashScreen*>(proxy->widget());
+ TTQSplashScreen *ss = dynamic_cast<TTQSplashScreen*>(proxy->widget());
if ( ss )
{
- TQWidget *w = extractQWidget(exec, args, 0 );
+ TTQWidget *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 & )
{
- TQSplashScreen *ss = dynamic_cast<TQSplashScreen*>(proxy->widget());
+ TTQSplashScreen *ss = dynamic_cast<TTQSplashScreen*>(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 & )
{
- TQWidget *w = proxy->widget();
+ TTQWidget *w = proxy->widget();
if ( !w )
return KJS::Value();
- TQVariant pix(TQPixmap::grabWidget(w) );
+ TTQVariant pix(TTQPixmap::grabWidget(w) );
return convertToValue( exec, pix );
}
@@ -585,7 +585,7 @@ void CustomObjectImp::widgetDrawLine( KJS::ExecState *exec, KJS::Object &, const
if ( args.size() != 4 )
return;
- TQWidget *w = proxy->widget();
+ TTQWidget *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 );
- TQPainter p(w);
+ TTQPainter 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;
- TQWidget *w = proxy->widget();
+ TTQWidget *w = proxy->widget();
if ( !w )
return;
int x = extractInt( exec, args, 0 );
int y = extractInt( exec, args, 1 );
- TQString s = extractQString( exec, args, 2 );
+ TTQString 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;
- TQListBox *lb = dynamic_cast<TQListBox *>( proxy->object() );
+ TTQListBox *lb = dynamic_cast<TTQListBox *>( proxy->object() );
if ( !lb )
return;
- TQString s = extractQString( exec, args, 0 );
+ TTQString 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;
- TQListView *lv = dynamic_cast<TQListView *>( proxy->object() );
+ TTQListView *lv = dynamic_cast<TTQListView *>( proxy->object() );
if ( !lv )
return;
- TQString s = extractQString( exec, args, 0 );
+ TTQString 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){
- TQVariant arg = convertToVariant(exec, args[idx]);
- if( arg.canCast(TQVariant::String) )
+ TTQVariant arg = convertToVariant(exec, args[idx]);
+ if( arg.canCast(TTQVariant::String) )
lvm->setText(idx, arg.toString());
- else if ( arg.canCast(TQVariant::Pixmap) )
+ else if ( arg.canCast(TTQVariant::Pixmap) )
lvm->setPixmap(idx, arg.toPixmap());
}
return;
@@ -662,15 +662,15 @@ void CustomObjectImp::listViewInsertItem( KJS::ExecState *exec, KJS::Object &, c
#endif // QT_ONLY
- TQListView *lv = dynamic_cast<TQListView *>( proxy->object() );
+ TTQListView *lv = dynamic_cast<TTQListView *>( proxy->object() );
if ( lv ) {
- TQListViewItem *lvm = new TQListViewItem(lv);
+ TTQListViewItem *lvm = new TTQListViewItem(lv);
for( int idx = 0; idx < args.size(); ++idx){
- TQVariant arg = convertToVariant(exec, args[idx]);
- if( arg.canCast(TQVariant::String) )
+ TTQVariant arg = convertToVariant(exec, args[idx]);
+ if( arg.canCast(TTQVariant::String) )
lvm->setText(idx, arg.toString());
- else if ( arg.canCast(TQVariant::Pixmap) )
+ else if ( arg.canCast(TTQVariant::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();
- TQListView *lv = dynamic_cast<TQListView *>( proxy->object() );
+ TTQListView *lv = dynamic_cast<TTQListView *>( proxy->object() );
if ( !lv )
return KJS::Value();
- TQListViewItem *lvi = lv->selectedItem();
+ TTQListViewItem *lvi = lv->selectedItem();
if ( !lvi )
return KJS::Null();
- TQCheckListItem *cli = dynamic_cast<TQCheckListItem *>( lvi );
+ TTQCheckListItem *cli = dynamic_cast<TTQCheckListItem *>( lvi );
if ( cli ) {
- JSOpaqueProxy *prx = new JSOpaqueProxy( lvi, "TQCheckListItem" );
+ JSOpaqueProxy *prx = new JSOpaqueProxy( lvi, "TTQCheckListItem" );
KJS::Object proxyObj(prx);
proxy->part()->factory()->extendOpaqueProxy(exec, proxyObj);
return proxyObj;
}
- JSOpaqueProxy *prx = new JSOpaqueProxy( lvi, "TQListViewItem" );
+ JSOpaqueProxy *prx = new JSOpaqueProxy( lvi, "TTQListViewItem" );
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;
- TQListView *lv = dynamic_cast<TQListView *>( proxy->object() );
+ TTQListView *lv = dynamic_cast<TTQListView *>( 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() );
- TQWidget *cw = cwproxy ? cwproxy->widget() : 0;
+ TTQWidget *cw = cwproxy ? cwproxy->widget() : 0;
if ( !cw )
return;
KMainWindow *mw = dynamic_cast<KMainWindow *>( proxy->object() );
@@ -775,7 +775,7 @@ void CustomObjectImp::mainWinCreateGUI( KJS::ExecState *exec, KJS::Object &, con
return;
}
- mw->createGUI( extractQString( exec, args, 0 ) );
+ mw->createGUI( extractTQString( exec, args, 0 ) );
#else // QT_ONLY
Q_UNUSED( exec );
Q_UNUSED( args );
@@ -793,7 +793,7 @@ KJS::Value CustomObjectImp::mainWinMenuBar( KJS::ExecState *exec, KJS::Object &,
return KJS::Value();
}
- TQObject *obj = mw->menuBar();
+ TTQObject *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();
}
- TQObject *obj = mw->statusBar();
+ TTQObject *obj = mw->statusBar();
return proxy->part()->factory()->createProxy( exec, obj, proxy );
#else // QT_ONLY
@@ -853,28 +853,28 @@ void CustomObjectImp::tabWidgetAddTab( KJS::ExecState *exec, KJS::Object&, const
if ( args.size() < 2 )
return;
- TQTabWidget *tw = dynamic_cast<TQTabWidget *>( proxy->object() );
+ TTQTabWidget *tw = dynamic_cast<TTQTabWidget *>( proxy->object() );
if ( !tw )
return;
KJS::Object jsobj = args[0].toObject(exec);
JSObjectProxy *tproxy = JSProxy::toObjectProxy( jsobj.imp() );
- TQWidget *w = tproxy ? tproxy->widget() : 0;
+ TTQWidget *w = tproxy ? tproxy->widget() : 0;
if ( !w )
return;
- tw->addTab( w, extractQString( exec, args, 0 ) );
+ tw->addTab( w, extractTQString( exec, args, 0 ) );
}
KJS::Value CustomObjectImp::scrollViewViewport( KJS::ExecState *exec, KJS::Object&, const KJS::List &args )
{
- TQScrollView *sv = dynamic_cast<TQScrollView *>( proxy->object() );
+ TTQScrollView *sv = dynamic_cast<TTQScrollView *>( proxy->object() );
if ( !sv )
return KJS::Value();
KJS::Object jsobj = args[0].toObject(exec);
JSObjectProxy *sproxy = JSProxy::toObjectProxy( jsobj.imp() );
- TQWidget *w = sproxy ? sproxy->widget() : 0;
+ TTQWidget *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;
- TQScrollView *sv = dynamic_cast<TQScrollView *>( proxy->object() );
+ TTQScrollView *sv = dynamic_cast<TTQScrollView *>( proxy->object() );
if ( !sv )
return;
KJS::Object jsobj = args[0].toObject(exec);
JSObjectProxy *sproxy = JSProxy::toObjectProxy( jsobj.imp() );
- TQWidget *w = sproxy ? sproxy->widget() : 0;
+ TTQWidget *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& )
{
- TQApplication *app = dynamic_cast<TQApplication *>( proxy->object() );
+ TTQApplication *app = dynamic_cast<TTQApplication *>( 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 & )
{
- TQTimer *timer = dynamic_cast<TQTimer *>( proxy->object() );
+ TTQTimer *timer = dynamic_cast<TTQTimer *>( 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 )
{
- TQTimer *timer = dynamic_cast<TQTimer *>( proxy->object() );
+ TTQTimer *timer = dynamic_cast<TTQTimer *>( 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 & )
{
- TQTimer *timer = dynamic_cast<TQTimer *>( proxy->object() );
+ TTQTimer *timer = dynamic_cast<TTQTimer *>( 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;
- TQBoxLayout *box = dynamic_cast<TQBoxLayout *>( proxy->object() );
+ TTQBoxLayout *box = dynamic_cast<TTQBoxLayout *>( proxy->object() );
if ( !box )
return;
KJS::Object jsobj = args[0].toObject(exec);
JSObjectProxy *proxy = JSProxy::toObjectProxy( jsobj.imp() );
- TQWidget *w = proxy ? proxy->widget() : 0;
+ TTQWidget *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;
- TQBoxLayout *box = dynamic_cast<TQBoxLayout *>( proxy->object() );
+ TTQBoxLayout *box = dynamic_cast<TTQBoxLayout *>( proxy->object() );
if ( !box )
return;
@@ -987,7 +987,7 @@ void CustomObjectImp::boxLayoutAddStretch( KJS::ExecState *exec, KJS::Object &,
if ( args.size() > 1 )
return;
- TQBoxLayout *box = dynamic_cast<TQBoxLayout *>( proxy->object() );
+ TTQBoxLayout *box = dynamic_cast<TTQBoxLayout *>( 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;
- TQBoxLayout *box = dynamic_cast<TQBoxLayout *>( proxy->object() );
+ TTQBoxLayout *box = dynamic_cast<TTQBoxLayout *>( proxy->object() );
if ( !box )
return;
KJS::Object jsobj = args[0].toObject(exec);
JSObjectProxy *proxy = JSProxy::toObjectProxy( jsobj.imp() );
- TQLayout *l = proxy ? (dynamic_cast<TQLayout *>(proxy->object())) : 0;
+ TTQLayout *l = proxy ? (dynamic_cast<TTQLayout *>(proxy->object())) : 0;
if ( !l )
return;
@@ -1029,8 +1029,8 @@ KJS::Value CustomObjectImp::kroPartOpenStream( KJS::ExecState *exec, KJS::Object
if ( !ro )
return KJS::Boolean( false );
- bool ok = ro->openStream( extractQString( exec, args, 0 )
- , KURL(extractQString( exec, args, 1 )) );
+ bool ok = ro->openStream( extractTQString( exec, args, 0 )
+ , KURL(extractTQString( exec, args, 1 )) );
return KJS::Boolean( ok );
#else // QT_ONLY
@@ -1051,7 +1051,7 @@ KJS::Value CustomObjectImp::kroPartWriteStream( KJS::ExecState *exec, KJS::Objec
if ( !ro )
return KJS::Boolean( false );
- TQCString s = extractQString( exec, args, 0 ).latin1();
+ TTQCString 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;
- TQHBox *box = dynamic_cast<TQHBox *>( proxy->object() );
+ TTQHBox *box = dynamic_cast<TTQHBox *>( 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();
- TQVariant pix( KSystemTray::loadIcon( extractQString( exec, args, 0 ) ) );
+ TTQVariant 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 )
{
- TQCanvasView *cv = dynamic_cast<TQCanvasView *>( proxy->object() );
+ TTQCanvasView *cv = dynamic_cast<TTQCanvasView *>( 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 )
{
- TQCanvasView *cv = dynamic_cast<TQCanvasView *>( proxy->object() );
+ TTQCanvasView *cv = dynamic_cast<TTQCanvasView *>( proxy->object() );
if ( !cv )
return;
KJS::Object jsobj = args[0].toObject(exec);
JSObjectProxy *proxy = JSProxy::toObjectProxy( jsobj.imp() );
- TQObject *obj = proxy->object();
+ TTQObject *obj = proxy->object();
if ( !obj )
return;
- TQCanvas *c = (TQCanvas *) obj;
+ TTQCanvas *c = (TTQCanvas *) obj;
cv->setCanvas(c);
}
KJS::Value Bindings::CustomObjectImp::qlistViewTakeItem( KJS::ExecState * exec, KJS::Object &, const KJS::List &args )
{
- TQListView *lv = dynamic_cast<TQListView *>( proxy->object() );
+ TTQListView *lv = dynamic_cast<TTQListView *>( proxy->object() );
if( !lv )
return KJS::Boolean(false);
KJS::Object lviObj = args[0].toObject(exec);
JSOpaqueProxy *prxy = JSProxy::toOpaqueProxy(lviObj.imp() );
- TQListViewItem *itm = prxy->toNative<TQListViewItem>();
+ TTQListViewItem *itm = prxy->toNative<TTQListViewItem>();
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 )
{
- TQListView *lv = dynamic_cast<TQListView *>( proxy->object() );
+ TTQListView *lv = dynamic_cast<TTQListView *>( proxy->object() );
if( !lv )
return KJS::Boolean(false);
- TQListViewItem *itm = lv->firstChild();
- KJS::Object jsObject( new JSOpaqueProxy( itm, "TQListViewItem") );
+ TTQListViewItem *itm = lv->firstChild();
+ KJS::Object jsObject( new JSOpaqueProxy( itm, "TTQListViewItem") );
proxy->part()->factory()->extendOpaqueProxy(exec, jsObject);
return jsObject;
}
KJS::Value Bindings::CustomObjectImp::qlistViewCurrentItem( KJS::ExecState * exec, KJS::Object &, const KJS::List &args )
{
- TQListView *lv = dynamic_cast<TQListView *>( proxy->object() );
+ TTQListView *lv = dynamic_cast<TTQListView *>( proxy->object() );
if( !lv )
return KJS::Boolean(false);
- TQListViewItem *itm = lv->currentItem();
- KJS::Object jsObject( new JSOpaqueProxy( itm, "TQListViewItem") );
+ TTQListViewItem *itm = lv->currentItem();
+ KJS::Object jsObject( new JSOpaqueProxy( itm, "TTQListViewItem") );
proxy->part()->factory()->extendOpaqueProxy(exec, jsObject);
return jsObject;
}
KJS::Value Bindings::CustomObjectImp::qtoolBoxAddItem(KJS::ExecState *exec, KJS::Object &, const KJS::List &args)
{
- TQToolBox *tb = dynamic_cast<TQToolBox *>( proxy->object() );
+ TTQToolBox *tb = dynamic_cast<TTQToolBox *>( proxy->object() );
if( !tb )
return KJS::Boolean(false);
if( args.size() == 2)
{
- TQWidget *w = extractQWidget( exec, args, 0 );
- TQString lab = extractQString( exec, args, 1 );
+ TTQWidget *w = extractTQWidget( exec, args, 0 );
+ TTQString lab = extractTQString( exec, args, 1 );
return KJS::Number( tb->addItem(w,lab) );
}
if( args.size() == 3)
{
- TQWidget *w = extractQWidget( exec, args, 0 );
- TQIconSet ico = extractQPixmap( exec, args, 1 );
- TQString lab = extractQString( exec, args, 2 );
+ TTQWidget *w = extractTQWidget( exec, args, 0 );
+ TTQIconSet ico = extractTQPixmap( exec, args, 1 );
+ TTQString 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 )
{
- TQToolBox *tb = dynamic_cast<TQToolBox *>( proxy->object() );
+ TTQToolBox *tb = dynamic_cast<TTQToolBox *>( proxy->object() );
if( !tb )
return KJS::Boolean(false);
if( args.size() == 3)
{
int idx = extractInt(exec, args, 0);
- TQWidget *w = extractQWidget( exec, args, 1 );
- TQString lab = extractQString( exec, args, 2 );
+ TTQWidget *w = extractTQWidget( exec, args, 1 );
+ TTQString lab = extractTQString( exec, args, 2 );
return KJS::Number( tb->insertItem(idx,w,lab) );
}
if( args.size() == 4)
{
int idx = extractInt(exec, args, 0);
- TQWidget *w = extractQWidget( exec, args, 1 );
- TQIconSet ico = extractQPixmap( exec, args, 2 );
- TQString lab = extractQString( exec, args, 3 );
+ TTQWidget *w = extractTQWidget( exec, args, 1 );
+ TTQIconSet ico = extractTQPixmap( exec, args, 2 );
+ TTQString 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 )
{
- TQToolBox *tb = dynamic_cast<TQToolBox *>( proxy->object() );
+ TTQToolBox *tb = dynamic_cast<TTQToolBox *>( proxy->object() );
if( !tb )
return;
- TQWidget *w = extractQWidget(exec, args, 0);
+ TTQWidget *w = extractTQWidget(exec, args, 0);
tb->removeItem(w);
}
KJS::Value Bindings::CustomObjectImp::qtoolBoxItemLabel(KJS::ExecState *exec, KJS::Object &, const KJS::List &args )
{
- TQToolBox *tb = dynamic_cast<TQToolBox *>( proxy->object() );
+ TTQToolBox *tb = dynamic_cast<TTQToolBox *>( proxy->object() );
if( !tb )
return KJS::Boolean(false);
int idx = extractInt(exec, args, 0);
@@ -1301,69 +1301,69 @@ KJS::Value Bindings::CustomObjectImp::qtoolBoxItemLabel(KJS::ExecState *exec, KJ
void Bindings::CustomObjectImp::qtoolBoxSetItemLabel(KJS::ExecState *exec, KJS::Object &, const KJS::List &args )
{
- TQToolBox *tb = dynamic_cast<TQToolBox *>( proxy->object() );
+ TTQToolBox *tb = dynamic_cast<TTQToolBox *>( proxy->object() );
if( !tb )
return;
int idx = extractInt(exec, args, 0);
- TQString lab = extractQString( exec, args, 1 );
+ TTQString lab = extractTQString( exec, args, 1 );
tb->setItemLabel(idx,lab);
}
KJS::Value Bindings::CustomObjectImp::qtoolBoxItemIconSet(KJS::ExecState *exec, KJS::Object &, const KJS::List &args )
{
- TQToolBox *tb = dynamic_cast<TQToolBox *>( proxy->object() );
+ TTQToolBox *tb = dynamic_cast<TTQToolBox *>( proxy->object() );
if( !tb )
return KJS::Boolean(false);
int idx = extractInt(exec, args, 0);
- TQPixmap pix = tb->itemIconSet(idx).pixmap();
+ TTQPixmap pix = tb->itemIconSet(idx).pixmap();
return convertToValue( exec, pix );
}
void Bindings::CustomObjectImp::qtoolBoxSetItemIconSet(KJS::ExecState *exec, KJS::Object &, const KJS::List &args)
{
- TQToolBox *tb = dynamic_cast<TQToolBox *>( proxy->object() );
+ TTQToolBox *tb = dynamic_cast<TTQToolBox *>( proxy->object() );
if( !tb )
return;
int idx = extractInt(exec, args, 0);
- TQIconSet ico = extractQPixmap( exec, args, 1);
+ TTQIconSet ico = extractTQPixmap( exec, args, 1);
tb->setItemIconSet(idx,ico);
}
KJS::Value Bindings::CustomObjectImp::qtoolBoxItem(KJS::ExecState *exec, KJS::Object &, const KJS::List &args )
{
- TQToolBox *tb = dynamic_cast<TQToolBox *>( proxy->object() );
+ TTQToolBox *tb = dynamic_cast<TTQToolBox *>( proxy->object() );
if( !tb )
return KJS::Boolean(false);
int idx = extractInt(exec, args, 0);
return proxy->part()->factory()->createProxy( exec, tb->item(idx), proxy );
}
-TQPopupMenu *getMenu(const KJS::Object &obj)
+TTQPopupMenu *getMenu(const KJS::Object &obj)
{
JSObjectProxy *jsproxy = JSProxy::toObjectProxy( obj.imp() );
- return dynamic_cast<TQPopupMenu *>( jsproxy->object() );
+ return dynamic_cast<TTQPopupMenu *>( jsproxy->object() );
}
KJS::Value Bindings::CustomObjectImp::qmenuDataInsertItem(KJS::ExecState *exec, KJS::Object &, const KJS::List &args )
{
- TQMenuData *menu = dynamic_cast<TQMenuData *>( proxy->object() );
+ TTQMenuData *menu = dynamic_cast<TTQMenuData *>( proxy->object() );
if( !menu )
return KJS::Boolean(false);
int offset = 0;
- TQString text = extractQString(exec,args, offset);
- TQPixmap pix = extractQPixmap(exec,args, offset);
+ TTQString text = extractTQString(exec,args, offset);
+ TTQPixmap pix = extractTQPixmap(exec,args, offset);
int id = -1;
int idx = -1;
int newIndex = 0;
- TQPopupMenu *parentMenu = 0;
+ TTQPopupMenu *parentMenu = 0;
if( !pix.isNull() )
{
++offset;
if( args.size() > offset)
- text = extractQString(exec,args,offset);
+ text = extractTQString(exec,args,offset);
}
kdDebug() << "text " << text << " " << offset << endl;
@@ -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 )
{
- TQMenuData *menu = dynamic_cast<TQMenuData *>( proxy->object() );
+ TTQMenuData *menu = dynamic_cast<TTQMenuData *>( 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 )
{
- TQMenuData *menu = dynamic_cast<TQMenuData *>( proxy->object() );
+ TTQMenuData *menu = dynamic_cast<TTQMenuData *>( proxy->object() );
if( !menu )
return KJS::Boolean(false);
int idx = extractInt(exec, args, 0);