summaryrefslogtreecommitdiffstats
path: root/kate/kjswrapper/plugin_katekjswrapper.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:22:56 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:22:56 +0000
commit7346aee26bf190a7e70333c40fab4caca847cd27 (patch)
tree4b019b434f88dcc3eeaafe1d3f26240b4c4718e8 /kate/kjswrapper/plugin_katekjswrapper.cpp
parent23a3d3aa5b44cbdf305495919866d9dbf4f6da54 (diff)
downloadtdeaddons-7346aee26bf190a7e70333c40fab4caca847cd27.tar.gz
tdeaddons-7346aee26bf190a7e70333c40fab4caca847cd27.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeaddons@1157634 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kate/kjswrapper/plugin_katekjswrapper.cpp')
-rw-r--r--kate/kjswrapper/plugin_katekjswrapper.cpp54
1 files changed, 27 insertions, 27 deletions
diff --git a/kate/kjswrapper/plugin_katekjswrapper.cpp b/kate/kjswrapper/plugin_katekjswrapper.cpp
index c3e54b7..8fc4ae5 100644
--- a/kate/kjswrapper/plugin_katekjswrapper.cpp
+++ b/kate/kjswrapper/plugin_katekjswrapper.cpp
@@ -29,12 +29,12 @@
#include <kjs/object.h>
#include <kgenericfactory.h>
#include <kdebug.h>
-#include <qlayout.h>
+#include <tqlayout.h>
#include <kstandarddirs.h>
#include <kate/mainwindow.h>
#include <kate/toolviewmanager.h>
#include <kdockwidget.h>
-#include <qvbox.h>
+#include <tqvbox.h>
//END includes
K_EXPORT_COMPONENT_FACTORY( katekjswrapperplugin, KGenericFactory<PluginKateKJSWrapper>( "katekjswrapper" ) )
@@ -44,7 +44,7 @@ PluginKateKJSWrapperView::~PluginKateKJSWrapperView() {
void PluginKateKJSWrapperView::removeFromWindow() {
kdDebug()<<"PluginKateKJSWrapperView::removeFromWindow"<<endl;
- for (QValueList<QGuardedPtr<KMDI::ToolViewAccessor> >::iterator it=toolviews.begin();it!=toolviews.end();it=toolviews.begin()) {
+ for (TQValueList<TQGuardedPtr<KMDI::ToolViewAccessor> >::iterator it=toolviews.begin();it!=toolviews.end();it=toolviews.begin()) {
kdDebug()<<"removeFromWindow: removing a toolview"<<endl;
KMDI::ToolViewAccessor* tva=(*it);
toolviews.remove(it);
@@ -53,7 +53,7 @@ void PluginKateKJSWrapperView::removeFromWindow() {
win->guiFactory()->removeClient (this);
}
-PluginKateKJSWrapper::PluginKateKJSWrapper( QObject* parent, const char* name, const QStringList& list)
+PluginKateKJSWrapper::PluginKateKJSWrapper( TQObject* parent, const char* name, const TQStringList& list)
: Kate::Plugin ( (Kate::Application *)parent, name ) {
m_views.setAutoDelete(true);
m_scriptname=list[0];
@@ -86,7 +86,7 @@ PluginKateKJSWrapper::PluginKateKJSWrapper( QObject* parent, const char* name, c
w->show();
//w->show();*/
kdDebug()<<"m_scriptname="<<m_scriptname<<endl;
- m_part->runFile(locate("appdata",QString("plugins/%1/%2.js").arg(m_scriptname).arg(m_scriptname)));
+ m_part->runFile(locate("appdata",TQString("plugins/%1/%2.js").arg(m_scriptname).arg(m_scriptname)));
//"/home/jowenn/development/kde/cvs/kdeaddons/kate/kjswrapper/samples/test1.js");
}
@@ -104,7 +104,7 @@ uint PluginKateKJSWrapper::configPages () const {
if (! (m_configPageFactories.isNull() || (m_configPageFactories.type()==KJS::NullType))) {
KJS::Object constrs=m_configPageFactories.toObject(exec);
if (!exec->hadException()) {
- if (QString(constrs.classInfo()->className)=="Array") {
+ if (TQString(constrs.classInfo()->className)=="Array") {
kdDebug()<<"config page constructor array detected"<<endl;
uint size=constrs.get(exec,KJS::Identifier("length")).toInteger(exec);
if (exec->hadException()) {
@@ -125,7 +125,7 @@ static KJS::Object getObj(KJS::Interpreter *js, KJS::Value mightBeArray, int id)
KJS::Object constrs=mightBeArray.toObject(exec);
KJS::Value constr;
if (!exec->hadException()) {
- if (QString(constrs.classInfo()->className)=="Array") {
+ if (TQString(constrs.classInfo()->className)=="Array") {
kdDebug()<<"config page constructor array detected"<<endl;
constr=constrs.get(exec,id);
} else constr=mightBeArray;
@@ -134,14 +134,14 @@ static KJS::Object getObj(KJS::Interpreter *js, KJS::Value mightBeArray, int id)
return constr.toObject(js->globalExec());
}
-QString PluginKateKJSWrapper::configPageName(uint id) const {
+TQString PluginKateKJSWrapper::configPageName(uint id) const {
if (id>=configPages()) return "";
KJS::Interpreter *js = m_part->interpreter();
KJS::Object constr=getObj(js,m_configPageFactories,id);
KJS::Value o=constr.get(js->globalExec(),KJS::Identifier("name"));
- QString retVal( o.toString(js->globalExec()).qstring() );
+ TQString retVal( o.toString(js->globalExec()).qstring() );
kdDebug()<<"=============================================================================================="<<endl;
kdDebug()<<"PluginKateKJSWrapper::configPageName: "<<retVal<<endl;
@@ -150,14 +150,14 @@ QString PluginKateKJSWrapper::configPageName(uint id) const {
return retVal;
}
-QString PluginKateKJSWrapper::configPageFullName(uint id) const {
+TQString PluginKateKJSWrapper::configPageFullName(uint id) const {
if (id>=configPages()) return "";
KJS::Interpreter *js = m_part->interpreter();
KJS::Object constr=getObj(js,m_configPageFactories,id);
KJS::Value o=constr.get(js->globalExec(),KJS::Identifier("fullName"));
- QString retVal( o.toString(js->globalExec()).qstring() );
+ TQString retVal( o.toString(js->globalExec()).qstring() );
kdDebug()<<"=============================================================================================="<<endl;
kdDebug()<<"PluginKateKJSWrapper::configPageFullName: "<<retVal<<endl;
@@ -166,14 +166,14 @@ QString PluginKateKJSWrapper::configPageFullName(uint id) const {
return retVal;
}
-QPixmap PluginKateKJSWrapper::configPagePixmap (uint /*number = 0*/,
+TQPixmap PluginKateKJSWrapper::configPagePixmap (uint /*number = 0*/,
int /*size = KIcon::SizeSmall*/) const {
return 0;
}
Kate::PluginConfigPage* PluginKateKJSWrapper::configPage (uint id,
- QWidget *w, const char */*name*/) {
+ TQWidget *w, const char */*name*/) {
kdDebug()<<"PluginKateKJSWrapper::configPage"<<endl;
if (id>=configPages()) return 0;
@@ -197,8 +197,8 @@ Kate::PluginConfigPage* PluginKateKJSWrapper::configPage (uint id,
/*
KateKJSWrapperConfigPage* p = new KateKJSWrapperConfigPage(this, w);
//init
- connect( p, SIGNAL(configPageApplyRequest(KateKJSWrapperConfigPage*)),
- this, SLOT(applyConfig(KateKJSWrapperConfigPage*)) );
+ connect( p, TQT_SIGNAL(configPageApplyRequest(KateKJSWrapperConfigPage*)),
+ this, TQT_SLOT(applyConfig(KateKJSWrapperConfigPage*)) );
return (Kate::PluginConfigPage*);*/
}
@@ -223,13 +223,13 @@ static KMDI::ToolViewAccessor *createToolView(KJSEmbed::JSFactory *factory,KJS::
exec->clearException();
}
}
- QString viewName;
+ TQString viewName;
KJS::Value viewNameV=viewConstructor.get(exec,KJS::Identifier("name"));
if (exec->hadException()) {
viewName="kjs_unknown";
exec->clearException();
} else {
- viewName=QString( viewNameV.toString(exec).qstring() );
+ viewName=TQString( viewNameV.toString(exec).qstring() );
if (exec->hadException()) {
viewName="kjs_unknown";
exec->clearException();
@@ -247,7 +247,7 @@ static KMDI::ToolViewAccessor *createToolView(KJSEmbed::JSFactory *factory,KJS::
return 0;
}
KMDI::ToolViewAccessor *tva=winN->toolViewManager()->addToolView((KDockWidget::DockPosition)dockPos,tv,
- tv->icon()?(*(tv->icon())):QPixmap(),tv->caption());
+ tv->icon()?(*(tv->icon())):TQPixmap(),tv->caption());
kdDebug()<<"****************************************************************************************"<<endl;
kdDebug()<<"PluginKateKJSWrapper: Toolview has been added"<<endl;
kdDebug()<<"****************************************************************************************"<<endl;
@@ -260,7 +260,7 @@ PluginKateKJSWrapperView *PluginKateKJSWrapper::getViewObject(Kate::MainWindow *
if (!view) {
view=new PluginKateKJSWrapperView();
view->win=win;
- connect(win,SIGNAL(destroyed()),this,SLOT(slotWindowDestroyed()));
+ connect(win,TQT_SIGNAL(destroyed()),this,TQT_SLOT(slotWindowDestroyed()));
m_views.insert(win,view);
KJS::Interpreter *js = m_part->interpreter();
KJS::ExecState *exec = js->globalExec();
@@ -302,7 +302,7 @@ void PluginKateKJSWrapper::addView(Kate::MainWindow *win)
if (! (m_toolViewConstructors.isNull() || (m_toolViewConstructors.type()==KJS::NullType))) {
KJS::Object constrs=m_toolViewConstructors.toObject(exec);
if (!exec->hadException()) {
- if (QString(constrs.classInfo()->className)=="Array") {
+ if (TQString(constrs.classInfo()->className)=="Array") {
kdDebug()<<"Toolview constructor array detected"<<endl;
int size=constrs.get(exec,KJS::Identifier("length")).toInteger(exec);
if (exec->hadException()) {
@@ -317,7 +317,7 @@ void PluginKateKJSWrapper::addView(Kate::MainWindow *win)
} else {
KMDI::ToolViewAccessor *w=createToolView(m_part->factory(),js,win,view->winObj,constrO);
if (w) {
- view->toolviews.append(QGuardedPtr<KMDI::ToolViewAccessor>(w));
+ view->toolviews.append(TQGuardedPtr<KMDI::ToolViewAccessor>(w));
}
exec->clearException();
}
@@ -330,7 +330,7 @@ void PluginKateKJSWrapper::addView(Kate::MainWindow *win)
} else {
KMDI::ToolViewAccessor *w=createToolView(m_part->factory(),js,win,view->winObj,constrs);
if (w) {
- view->toolviews.append(QGuardedPtr<KMDI::ToolViewAccessor>(w));
+ view->toolviews.append(TQGuardedPtr<KMDI::ToolViewAccessor>(w));
}
exec->clearException();
}
@@ -343,7 +343,7 @@ void PluginKateKJSWrapper::addView(Kate::MainWindow *win)
if (exec->hadException()) kdDebug()<<"void PluginKateKJSWrapper::addView(Kate::MainWindow *win): exec had an exception - 2"<<endl;
view->setInstance (new KInstance("kate"));
- view->setXMLFile(QString("plugins/%1/%2.rc").arg(m_scriptname).arg(m_scriptname));
+ view->setXMLFile(TQString("plugins/%1/%2.rc").arg(m_scriptname).arg(m_scriptname));
win->guiFactory()->addClient (view);
}
@@ -371,10 +371,10 @@ void PluginKateKJSWrapper::applyConfig( KateKJSWrapperConfigPage *p )
}
KateKJSWrapperConfigPage::KateKJSWrapperConfigPage(KJS::Object pageConstructor,PluginKateKJSWrapper* parent,
- QWidget *parentWidget)
+ TQWidget *parentWidget)
: Kate::PluginConfigPage( parentWidget ),m_plugin(parent)
{
- QVBoxLayout *l=new QVBoxLayout(this);
+ TQVBoxLayout *l=new TQVBoxLayout(this);
l->setAutoAdd(true);
l->activate();
KJS::Interpreter *js = parent->m_part->interpreter();
@@ -386,7 +386,7 @@ KateKJSWrapperConfigPage::KateKJSWrapperConfigPage(KJS::Object pageConstructor,P
}
-static void callJS(KJSEmbed::KJSEmbedPart *p,KJS::Object o,const QString& funcName){
+static void callJS(KJSEmbed::KJSEmbedPart *p,KJS::Object o,const TQString& funcName){
KJS::Interpreter *js = p->interpreter();
KJS::ExecState *exec = js->globalExec();
KJS::List param;
@@ -426,7 +426,7 @@ void KateKJSWrapperConfigPage::defaults()
}
-Kate::JS::ToolView::ToolView(KJS::Object constr, KJS::ExecState *exec, KJSEmbed::JSFactory *factory, KJS::List parameters, const char *name):QVBox(0,name) {
+Kate::JS::ToolView::ToolView(KJS::Object constr, KJS::ExecState *exec, KJSEmbed::JSFactory *factory, KJS::List parameters, const char *name):TQVBox(0,name) {
parameters.append(factory->createProxy(exec,this));
handler=constr.construct(exec,parameters);