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.cpp264
1 files changed, 132 insertions, 132 deletions
diff --git a/kjsembed/customobject_imp.cpp b/kjsembed/customobject_imp.cpp
index 8dd9fc24..104915d8 100644
--- a/kjsembed/customobject_imp.cpp
+++ b/kjsembed/customobject_imp.cpp
@@ -17,28 +17,28 @@
* Boston, MA 02110-1301, USA.
*/
#include "global.h"
-#include <qapplication.h>
-#include <qobject.h>
-#include <qobjectlist.h>
-#include <qcombobox.h>
-#include <qpopupmenu.h>
-#include <qdialog.h>
-#include <qhbox.h>
-#include <qlayout.h>
-#include <qlistbox.h>
-#include <qlistview.h>
-#include <qmetaobject.h>
-#include <qpainter.h>
-#include <qregexp.h>
-#include <qsignal.h>
-#include <qstrlist.h>
-#include <qtabwidget.h>
-#include <qtimer.h>
-#include <qvariant.h>
-#include <qcanvas.h>
-#include <qsplashscreen.h>
-#include <qtoolbox.h>
-#include <qmenudata.h>
+#include <tqapplication.h>
+#include <tqobject.h>
+#include <tqobjectlist.h>
+#include <tqcombobox.h>
+#include <tqpopupmenu.h>
+#include <tqdialog.h>
+#include <tqhbox.h>
+#include <tqlayout.h>
+#include <tqlistbox.h>
+#include <tqlistview.h>
+#include <tqmetaobject.h>
+#include <tqpainter.h>
+#include <tqregexp.h>
+#include <tqsignal.h>
+#include <tqstrlist.h>
+#include <tqtabwidget.h>
+#include <tqtimer.h>
+#include <tqvariant.h>
+#include <tqcanvas.h>
+#include <tqsplashscreen.h>
+#include <tqtoolbox.h>
+#include <tqmenudata.h>
#include <private/qucom_p.h>
#include <private/qucomextra_p.h>
@@ -102,8 +102,8 @@ void CustomObjectImp::addBindings( KJS::ExecState *exec, KJS::Object &object )
if ( !proxy )
return;
kdDebug() << "CustomObjectImp::addBindings is a proxy" << endl;
- QObject *qobj = proxy->object();
- QWidget *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) );
- QListBox *listbox = dynamic_cast<QListBox *>( widget );
+ TQListBox *listbox = dynamic_cast<TQListBox *>( widget );
if ( listbox ) {
obj = new CustomObjectImp( exec, ListBoxInsertItem, proxy );
object.put( exec, "insertItem", KJS::Object(obj) );
}
- QListView *listview = dynamic_cast<QListView *>( widget );
+ TQListView *listview = dynamic_cast<TQListView *>( 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) );
}
- QSplashScreen *splashscreen = dynamic_cast<QSplashScreen *>(widget);
+ TQSplashScreen *splashscreen = dynamic_cast<TQSplashScreen *>(widget);
if( splashscreen )
{
obj = new CustomObjectImp(exec, QSplashScreenSetPixmap, proxy );
@@ -189,13 +189,13 @@ void CustomObjectImp::addBindings( KJS::ExecState *exec, KJS::Object &object )
#endif // QT_ONLY
- QTabWidget *tw = dynamic_cast<QTabWidget *>( widget );
+ TQTabWidget *tw = dynamic_cast<TQTabWidget *>( widget );
if ( tw ) {
obj = new CustomObjectImp( exec, TabWidgetAddTab, proxy );
object.put( exec, "addTab", KJS::Object(obj) );
}
- QScrollView *sv = dynamic_cast<QScrollView *>( widget );
+ TQScrollView *sv = dynamic_cast<TQScrollView *>( 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( QCanvasView, widget )
/*
- QMenuData *md = dynamic_cast<QMenuData *>( widget );
+ TQMenuData *md = dynamic_cast<TQMenuData *>( widget );
if ( md ) {
QMenuDataImp::addBindings( exec, object );
}
- QMenuItem *mitem = dynamic_cast<QMenuItem *>( widget );
+ TQMenuItem *mitem = dynamic_cast<TQMenuItem *>( widget );
if ( mitem ) {
QMenuItemImp::addBindings( exec, object );
}
*/
- QMenuData *menuData = dynamic_cast<QMenuData*>(widget);
+ TQMenuData *menuData = dynamic_cast<TQMenuData*>(widget);
if( menuData )
{
obj = new CustomObjectImp( exec, QMenuDataInsertItem, proxy );
@@ -234,12 +234,12 @@ void CustomObjectImp::addBindings( KJS::ExecState *exec, KJS::Object &object )
object.put( exec, "insertSeparator", KJS::Object(obj) );
}
- QHBox *hbox = dynamic_cast<QHBox *>( widget );
+ TQHBox *hbox = dynamic_cast<TQHBox *>( widget );
if ( hbox ) {
obj = new CustomObjectImp( exec, HBoxSpacing, proxy );
object.put( exec, "setSpacing", KJS::Object(obj) );
}
- QToolBox *tb = dynamic_cast<QToolBox *>( qobj );
+ TQToolBox *tb = dynamic_cast<TQToolBox *>( qobj );
if ( tb ) {
obj = new CustomObjectImp( exec, QToolBoxAddItem, proxy );
object.put( exec, "addItem", KJS::Object(obj) );
@@ -262,7 +262,7 @@ void CustomObjectImp::addBindings( KJS::ExecState *exec, KJS::Object &object )
}
if ( qobj ) {
- QApplication *app = dynamic_cast<QApplication *>( qobj );
+ TQApplication *app = dynamic_cast<TQApplication *>( 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
- QTimer *timer = dynamic_cast<QTimer *>( qobj );
+ TQTimer *timer = dynamic_cast<TQTimer *>( 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) );
}
- QBoxLayout *box = dynamic_cast<QBoxLayout *>( qobj );
+ TQBoxLayout *box = dynamic_cast<TQBoxLayout *>( 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 )
{
- QSplashScreen *ss = dynamic_cast<QSplashScreen*>(proxy->widget());
+ TQSplashScreen *ss = dynamic_cast<TQSplashScreen*>(proxy->widget());
if ( ss )
{
- QPixmap pix = extractQPixmap(exec, args, 0 );
+ TQPixmap pix = extractQPixmap(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 & )
{
- QSplashScreen *ss = dynamic_cast<QSplashScreen*>(proxy->widget());
+ TQSplashScreen *ss = dynamic_cast<TQSplashScreen*>(proxy->widget());
if ( ss )
{
- QPixmap 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 )
{
- QSplashScreen *ss = dynamic_cast<QSplashScreen*>(proxy->widget());
+ TQSplashScreen *ss = dynamic_cast<TQSplashScreen*>(proxy->widget());
if ( ss )
{
- QWidget *w = extractQWidget(exec, args, 0 );
+ TQWidget *w = extractQWidget(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 & )
{
- QSplashScreen *ss = dynamic_cast<QSplashScreen*>(proxy->widget());
+ TQSplashScreen *ss = dynamic_cast<TQSplashScreen*>(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 & )
{
- QWidget *w = proxy->widget();
+ TQWidget *w = proxy->widget();
if ( !w )
return KJS::Value();
- QVariant pix(QPixmap::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;
- QWidget *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 );
- QPainter 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;
- QWidget *w = proxy->widget();
+ TQWidget *w = proxy->widget();
if ( !w )
return;
int x = extractInt( exec, args, 0 );
int y = extractInt( exec, args, 1 );
- QString s = extractQString( exec, args, 2 );
+ TQString s = extractQString( 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;
- QListBox *lb = dynamic_cast<QListBox *>( proxy->object() );
+ TQListBox *lb = dynamic_cast<TQListBox *>( proxy->object() );
if ( !lb )
return;
- QString s = extractQString( exec, args, 0 );
+ TQString s = extractQString( exec, args, 0 );
lb->insertItem( s );
}
@@ -631,11 +631,11 @@ void CustomObjectImp::listViewAddColumn( KJS::ExecState *exec, KJS::Object &, co
if ( args.size() != 1 )
return;
- QListView *lv = dynamic_cast<QListView *>( proxy->object() );
+ TQListView *lv = dynamic_cast<TQListView *>( proxy->object() );
if ( !lv )
return;
- QString s = extractQString( exec, args, 0 );
+ TQString s = extractQString( 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){
- QVariant arg = convertToVariant(exec, args[idx]);
- if( arg.canCast(QVariant::String) )
+ TQVariant arg = convertToVariant(exec, args[idx]);
+ if( arg.canCast(TQVariant::String) )
lvm->setText(idx, arg.toString());
- else if ( arg.canCast(QVariant::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
- QListView *lv = dynamic_cast<QListView *>( proxy->object() );
+ TQListView *lv = dynamic_cast<TQListView *>( proxy->object() );
if ( lv ) {
- QListViewItem *lvm = new QListViewItem(lv);
+ TQListViewItem *lvm = new TQListViewItem(lv);
for( int idx = 0; idx < args.size(); ++idx){
- QVariant arg = convertToVariant(exec, args[idx]);
- if( arg.canCast(QVariant::String) )
+ TQVariant arg = convertToVariant(exec, args[idx]);
+ if( arg.canCast(TQVariant::String) )
lvm->setText(idx, arg.toString());
- else if ( arg.canCast(QVariant::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();
- QListView *lv = dynamic_cast<QListView *>( proxy->object() );
+ TQListView *lv = dynamic_cast<TQListView *>( proxy->object() );
if ( !lv )
return KJS::Value();
- QListViewItem *lvi = lv->selectedItem();
+ TQListViewItem *lvi = lv->selectedItem();
if ( !lvi )
return KJS::Null();
- QCheckListItem *cli = dynamic_cast<QCheckListItem *>( lvi );
+ TQCheckListItem *cli = dynamic_cast<TQCheckListItem *>( lvi );
if ( cli ) {
- JSOpaqueProxy *prx = new JSOpaqueProxy( lvi, "QCheckListItem" );
+ JSOpaqueProxy *prx = new JSOpaqueProxy( lvi, "TQCheckListItem" );
KJS::Object proxyObj(prx);
proxy->part()->factory()->extendOpaqueProxy(exec, proxyObj);
return proxyObj;
}
- JSOpaqueProxy *prx = new JSOpaqueProxy( lvi, "QListViewItem" );
+ 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;
- QListView *lv = dynamic_cast<QListView *>( proxy->object() );
+ TQListView *lv = dynamic_cast<TQListView *>( 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() );
- QWidget *cw = cwproxy ? cwproxy->widget() : 0;
+ TQWidget *cw = cwproxy ? cwproxy->widget() : 0;
if ( !cw )
return;
KMainWindow *mw = dynamic_cast<KMainWindow *>( proxy->object() );
@@ -793,7 +793,7 @@ KJS::Value CustomObjectImp::mainWinMenuBar( KJS::ExecState *exec, KJS::Object &,
return KJS::Value();
}
- QObject *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();
}
- QObject *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;
- QTabWidget *tw = dynamic_cast<QTabWidget *>( proxy->object() );
+ TQTabWidget *tw = dynamic_cast<TQTabWidget *>( proxy->object() );
if ( !tw )
return;
KJS::Object jsobj = args[0].toObject(exec);
JSObjectProxy *tproxy = JSProxy::toObjectProxy( jsobj.imp() );
- QWidget *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 )
{
- QScrollView *sv = dynamic_cast<QScrollView *>( proxy->object() );
+ TQScrollView *sv = dynamic_cast<TQScrollView *>( proxy->object() );
if ( !sv )
return KJS::Value();
KJS::Object jsobj = args[0].toObject(exec);
JSObjectProxy *sproxy = JSProxy::toObjectProxy( jsobj.imp() );
- QWidget *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;
- QScrollView *sv = dynamic_cast<QScrollView *>( proxy->object() );
+ TQScrollView *sv = dynamic_cast<TQScrollView *>( proxy->object() );
if ( !sv )
return;
KJS::Object jsobj = args[0].toObject(exec);
JSObjectProxy *sproxy = JSProxy::toObjectProxy( jsobj.imp() );
- QWidget *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& )
{
- QApplication *app = dynamic_cast<QApplication *>( proxy->object() );
+ TQApplication *app = dynamic_cast<TQApplication *>( 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 & )
{
- QTimer *timer = dynamic_cast<QTimer *>( proxy->object() );
+ TQTimer *timer = dynamic_cast<TQTimer *>( 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 )
{
- QTimer *timer = dynamic_cast<QTimer *>( proxy->object() );
+ TQTimer *timer = dynamic_cast<TQTimer *>( 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 & )
{
- QTimer *timer = dynamic_cast<QTimer *>( proxy->object() );
+ TQTimer *timer = dynamic_cast<TQTimer *>( 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;
- QBoxLayout *box = dynamic_cast<QBoxLayout *>( proxy->object() );
+ TQBoxLayout *box = dynamic_cast<TQBoxLayout *>( proxy->object() );
if ( !box )
return;
KJS::Object jsobj = args[0].toObject(exec);
JSObjectProxy *proxy = JSProxy::toObjectProxy( jsobj.imp() );
- QWidget *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;
- QBoxLayout *box = dynamic_cast<QBoxLayout *>( proxy->object() );
+ TQBoxLayout *box = dynamic_cast<TQBoxLayout *>( proxy->object() );
if ( !box )
return;
@@ -987,7 +987,7 @@ void CustomObjectImp::boxLayoutAddStretch( KJS::ExecState *exec, KJS::Object &,
if ( args.size() > 1 )
return;
- QBoxLayout *box = dynamic_cast<QBoxLayout *>( proxy->object() );
+ TQBoxLayout *box = dynamic_cast<TQBoxLayout *>( 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;
- QBoxLayout *box = dynamic_cast<QBoxLayout *>( proxy->object() );
+ TQBoxLayout *box = dynamic_cast<TQBoxLayout *>( proxy->object() );
if ( !box )
return;
KJS::Object jsobj = args[0].toObject(exec);
JSObjectProxy *proxy = JSProxy::toObjectProxy( jsobj.imp() );
- QLayout *l = proxy ? (dynamic_cast<QLayout *>(proxy->object())) : 0;
+ TQLayout *l = proxy ? (dynamic_cast<TQLayout *>(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 );
- QCString s = extractQString( exec, args, 0 ).latin1();
+ TQCString s = extractQString( 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;
- QHBox *box = dynamic_cast<QHBox *>( proxy->object() );
+ TQHBox *box = dynamic_cast<TQHBox *>( 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();
- QVariant pix( KSystemTray::loadIcon( extractQString( exec, args, 0 ) ) );
+ TQVariant pix( KSystemTray::loadIcon( extractQString( 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 )
{
- QCanvasView *cv = dynamic_cast<QCanvasView *>( proxy->object() );
+ TQCanvasView *cv = dynamic_cast<TQCanvasView *>( 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 )
{
- QCanvasView *cv = dynamic_cast<QCanvasView *>( proxy->object() );
+ TQCanvasView *cv = dynamic_cast<TQCanvasView *>( proxy->object() );
if ( !cv )
return;
KJS::Object jsobj = args[0].toObject(exec);
JSObjectProxy *proxy = JSProxy::toObjectProxy( jsobj.imp() );
- QObject *obj = proxy->object();
+ TQObject *obj = proxy->object();
if ( !obj )
return;
- QCanvas *c = (QCanvas *) obj;
+ TQCanvas *c = (TQCanvas *) obj;
cv->setCanvas(c);
}
KJS::Value Bindings::CustomObjectImp::qlistViewTakeItem( KJS::ExecState * exec, KJS::Object &, const KJS::List &args )
{
- QListView *lv = dynamic_cast<QListView *>( proxy->object() );
+ TQListView *lv = dynamic_cast<TQListView *>( proxy->object() );
if( !lv )
return KJS::Boolean(false);
KJS::Object lviObj = args[0].toObject(exec);
JSOpaqueProxy *prxy = JSProxy::toOpaqueProxy(lviObj.imp() );
- QListViewItem *itm = prxy->toNative<QListViewItem>();
+ TQListViewItem *itm = prxy->toNative<TQListViewItem>();
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 )
{
- QListView *lv = dynamic_cast<QListView *>( proxy->object() );
+ TQListView *lv = dynamic_cast<TQListView *>( proxy->object() );
if( !lv )
return KJS::Boolean(false);
- QListViewItem *itm = lv->firstChild();
- KJS::Object jsObject( new JSOpaqueProxy( itm, "QListViewItem") );
+ 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 )
{
- QListView *lv = dynamic_cast<QListView *>( proxy->object() );
+ TQListView *lv = dynamic_cast<TQListView *>( proxy->object() );
if( !lv )
return KJS::Boolean(false);
- QListViewItem *itm = lv->currentItem();
- KJS::Object jsObject( new JSOpaqueProxy( itm, "QListViewItem") );
+ 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)
{
- QToolBox *tb = dynamic_cast<QToolBox *>( proxy->object() );
+ TQToolBox *tb = dynamic_cast<TQToolBox *>( proxy->object() );
if( !tb )
return KJS::Boolean(false);
if( args.size() == 2)
{
- QWidget *w = extractQWidget( exec, args, 0 );
- QString lab = extractQString( exec, args, 1 );
+ TQWidget *w = extractQWidget( exec, args, 0 );
+ TQString lab = extractQString( exec, args, 1 );
return KJS::Number( tb->addItem(w,lab) );
}
if( args.size() == 3)
{
- QWidget *w = extractQWidget( exec, args, 0 );
- QIconSet ico = extractQPixmap( exec, args, 1 );
- QString lab = extractQString( exec, args, 2 );
+ TQWidget *w = extractQWidget( exec, args, 0 );
+ TQIconSet ico = extractQPixmap( exec, args, 1 );
+ TQString lab = extractQString( 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 )
{
- QToolBox *tb = dynamic_cast<QToolBox *>( proxy->object() );
+ TQToolBox *tb = dynamic_cast<TQToolBox *>( proxy->object() );
if( !tb )
return KJS::Boolean(false);
if( args.size() == 3)
{
int idx = extractInt(exec, args, 0);
- QWidget *w = extractQWidget( exec, args, 1 );
- QString lab = extractQString( exec, args, 2 );
+ TQWidget *w = extractQWidget( exec, args, 1 );
+ TQString lab = extractQString( exec, args, 2 );
return KJS::Number( tb->insertItem(idx,w,lab) );
}
if( args.size() == 4)
{
int idx = extractInt(exec, args, 0);
- QWidget *w = extractQWidget( exec, args, 1 );
- QIconSet ico = extractQPixmap( exec, args, 2 );
- QString lab = extractQString( exec, args, 3 );
+ TQWidget *w = extractQWidget( exec, args, 1 );
+ TQIconSet ico = extractQPixmap( exec, args, 2 );
+ TQString lab = extractQString( 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 )
{
- QToolBox *tb = dynamic_cast<QToolBox *>( proxy->object() );
+ TQToolBox *tb = dynamic_cast<TQToolBox *>( proxy->object() );
if( !tb )
return;
- QWidget *w = extractQWidget(exec, args, 0);
+ TQWidget *w = extractQWidget(exec, args, 0);
tb->removeItem(w);
}
KJS::Value Bindings::CustomObjectImp::qtoolBoxItemLabel(KJS::ExecState *exec, KJS::Object &, const KJS::List &args )
{
- QToolBox *tb = dynamic_cast<QToolBox *>( proxy->object() );
+ TQToolBox *tb = dynamic_cast<TQToolBox *>( 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 )
{
- QToolBox *tb = dynamic_cast<QToolBox *>( proxy->object() );
+ TQToolBox *tb = dynamic_cast<TQToolBox *>( proxy->object() );
if( !tb )
return;
int idx = extractInt(exec, args, 0);
- QString lab = extractQString( exec, args, 1 );
+ TQString lab = extractQString( exec, args, 1 );
tb->setItemLabel(idx,lab);
}
KJS::Value Bindings::CustomObjectImp::qtoolBoxItemIconSet(KJS::ExecState *exec, KJS::Object &, const KJS::List &args )
{
- QToolBox *tb = dynamic_cast<QToolBox *>( proxy->object() );
+ TQToolBox *tb = dynamic_cast<TQToolBox *>( proxy->object() );
if( !tb )
return KJS::Boolean(false);
int idx = extractInt(exec, args, 0);
- QPixmap 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)
{
- QToolBox *tb = dynamic_cast<QToolBox *>( proxy->object() );
+ TQToolBox *tb = dynamic_cast<TQToolBox *>( proxy->object() );
if( !tb )
return;
int idx = extractInt(exec, args, 0);
- QIconSet ico = extractQPixmap( exec, args, 1);
+ TQIconSet ico = extractQPixmap( exec, args, 1);
tb->setItemIconSet(idx,ico);
}
KJS::Value Bindings::CustomObjectImp::qtoolBoxItem(KJS::ExecState *exec, KJS::Object &, const KJS::List &args )
{
- QToolBox *tb = dynamic_cast<QToolBox *>( proxy->object() );
+ TQToolBox *tb = dynamic_cast<TQToolBox *>( proxy->object() );
if( !tb )
return KJS::Boolean(false);
int idx = extractInt(exec, args, 0);
return proxy->part()->factory()->createProxy( exec, tb->item(idx), proxy );
}
-QPopupMenu *getMenu(const KJS::Object &obj)
+TQPopupMenu *getMenu(const KJS::Object &obj)
{
JSObjectProxy *jsproxy = JSProxy::toObjectProxy( obj.imp() );
- return dynamic_cast<QPopupMenu *>( jsproxy->object() );
+ return dynamic_cast<TQPopupMenu *>( jsproxy->object() );
}
KJS::Value Bindings::CustomObjectImp::qmenuDataInsertItem(KJS::ExecState *exec, KJS::Object &, const KJS::List &args )
{
- QMenuData *menu = dynamic_cast<QMenuData *>( proxy->object() );
+ TQMenuData *menu = dynamic_cast<TQMenuData *>( proxy->object() );
if( !menu )
return KJS::Boolean(false);
int offset = 0;
- QString text = extractQString(exec,args, offset);
- QPixmap pix = extractQPixmap(exec,args, offset);
+ TQString text = extractQString(exec,args, offset);
+ TQPixmap pix = extractQPixmap(exec,args, offset);
int id = -1;
int idx = -1;
int newIndex = 0;
- QPopupMenu *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 )
{
- QMenuData *menu = dynamic_cast<QMenuData *>( proxy->object() );
+ TQMenuData *menu = dynamic_cast<TQMenuData *>( 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 )
{
- QMenuData *menu = dynamic_cast<QMenuData *>( proxy->object() );
+ TQMenuData *menu = dynamic_cast<TQMenuData *>( proxy->object() );
if( !menu )
return KJS::Boolean(false);
int idx = extractInt(exec, args, 0);