diff options
Diffstat (limited to 'kate')
49 files changed, 1272 insertions, 1272 deletions
diff --git a/kate/cppsymbolviewer/cpp_parser.cpp b/kate/cppsymbolviewer/cpp_parser.cpp index 01ee919..b666983 100644 --- a/kate/cppsymbolviewer/cpp_parser.cpp +++ b/kate/cppsymbolviewer/cpp_parser.cpp @@ -20,32 +20,32 @@ void KatePluginSymbolViewerView::parseCppSymbols(void) if (!win->viewManager()->activeView()) return; - QString cl; // Current Line - QString stripped; + TQString cl; // Current Line + TQString stripped; uint i, j, tmpPos = 0; int par = 0, graph = 0, retry = 0; char mclass = 0, block = 0, comment = 0; // comment: 0-no comment 1-inline comment 2-multiline comment 3-string char macro = 0, macro_pos = 0, func_close = 0; bool structure = false; - QPixmap cls( ( const char** ) class_xpm ); - QPixmap sct( ( const char** ) struct_xpm ); - QPixmap mcr( ( const char** ) macro_xpm ); - QPixmap mtd( ( const char** ) method_xpm ); - QListViewItem *node = NULL; - QListViewItem *mcrNode = NULL, *sctNode = NULL, *clsNode = NULL, *mtdNode = NULL; - QListViewItem *lastMcrNode = NULL, *lastSctNode = NULL, *lastClsNode = NULL, *lastMtdNode = NULL; + TQPixmap cls( ( const char** ) class_xpm ); + TQPixmap sct( ( const char** ) struct_xpm ); + TQPixmap mcr( ( const char** ) macro_xpm ); + TQPixmap mtd( ( const char** ) method_xpm ); + TQListViewItem *node = NULL; + TQListViewItem *mcrNode = NULL, *sctNode = NULL, *clsNode = NULL, *mtdNode = NULL; + TQListViewItem *lastMcrNode = NULL, *lastSctNode = NULL, *lastClsNode = NULL, *lastMtdNode = NULL; Kate::Document *kv = win->viewManager()->activeView()->getDoc(); //kdDebug(13000)<<"Lines counted :"<<kv->numLines()<<endl; if(treeMode) { - mcrNode = new QListViewItem(symbols, symbols->lastItem(), i18n("Macros")); - sctNode = new QListViewItem(symbols, symbols->lastItem(), i18n("Structures")); - clsNode = new QListViewItem(symbols, symbols->lastItem(), i18n("Functions")); - mcrNode->setPixmap(0, (const QPixmap &)mcr); - sctNode->setPixmap(0, (const QPixmap &)sct); - clsNode->setPixmap(0, (const QPixmap &)cls); + mcrNode = new TQListViewItem(symbols, symbols->lastItem(), i18n("Macros")); + sctNode = new TQListViewItem(symbols, symbols->lastItem(), i18n("Structures")); + clsNode = new TQListViewItem(symbols, symbols->lastItem(), i18n("Functions")); + mcrNode->setPixmap(0, (const TQPixmap &)mcr); + sctNode->setPixmap(0, (const TQPixmap &)sct); + clsNode->setPixmap(0, (const TQPixmap &)cls); if (expanded_on) { mcrNode->setOpen(TRUE); @@ -105,12 +105,12 @@ void KatePluginSymbolViewerView::parseCppSymbols(void) { if (treeMode) { - node = new QListViewItem(mcrNode, lastMcrNode, stripped); + node = new TQListViewItem(mcrNode, lastMcrNode, stripped); lastMcrNode = node; } - else node = new QListViewItem(symbols, symbols->lastItem(), stripped); - node->setPixmap(0, (const QPixmap &)mcr); - node->setText(1, QString::number( i, 10)); + else node = new TQListViewItem(symbols, symbols->lastItem(), stripped); + node->setPixmap(0, (const TQPixmap &)mcr); + node->setText(1, TQString::number( i, 10)); } macro = 0; macro_pos = 0; @@ -142,15 +142,15 @@ void KatePluginSymbolViewerView::parseCppSymbols(void) { if (treeMode) { - node = new QListViewItem(clsNode, lastClsNode, stripped); + node = new TQListViewItem(clsNode, lastClsNode, stripped); if (expanded_on) node->setOpen(TRUE); lastClsNode = node; mtdNode = lastClsNode; lastMtdNode = lastClsNode; } - else node = new QListViewItem(symbols, symbols->lastItem(), stripped); - node->setPixmap(0, (const QPixmap &)cls); - node->setText(1, QString::number( i, 10)); + else node = new TQListViewItem(symbols, symbols->lastItem(), stripped); + node->setPixmap(0, (const TQPixmap &)cls); + node->setText(1, TQString::number( i, 10)); stripped = ""; if (mclass == 1) mclass = 3; } @@ -237,20 +237,20 @@ void KatePluginSymbolViewerView::parseCppSymbols(void) { if (mclass == 4) { - node = new QListViewItem(mtdNode, lastMtdNode, stripped); + node = new TQListViewItem(mtdNode, lastMtdNode, stripped); lastMtdNode = node; } else { - node = new QListViewItem(clsNode, lastClsNode, stripped); + node = new TQListViewItem(clsNode, lastClsNode, stripped); lastClsNode = node; } } else - node = new QListViewItem(symbols, symbols->lastItem(), stripped); - if (mclass == 4) node->setPixmap(0, (const QPixmap &)mtd); - else node->setPixmap(0, (const QPixmap &)cls); - node->setText(1, QString::number( tmpPos, 10)); + node = new TQListViewItem(symbols, symbols->lastItem(), stripped); + if (mclass == 4) node->setPixmap(0, (const TQPixmap &)mtd); + else node->setPixmap(0, (const TQPixmap &)cls); + node->setText(1, TQString::number( tmpPos, 10)); } stripped = ""; retry = 0; @@ -297,12 +297,12 @@ void KatePluginSymbolViewerView::parseCppSymbols(void) { if (treeMode) { - node = new QListViewItem(sctNode, lastSctNode, stripped); + node = new TQListViewItem(sctNode, lastSctNode, stripped); lastSctNode = node; } - else node = new QListViewItem(symbols, symbols->lastItem(), stripped); - node->setPixmap(0, (const QPixmap &)sct); - node->setText(1, QString::number( tmpPos, 10)); + else node = new TQListViewItem(symbols, symbols->lastItem(), stripped); + node->setPixmap(0, (const TQPixmap &)sct); + node->setText(1, TQString::number( tmpPos, 10)); } //kdDebug(13000)<<"Structure -- Inserted : "<<stripped<<" at row : "<<i<<endl; stripped = ""; diff --git a/kate/cppsymbolviewer/plugin_katesymbolviewer.cpp b/kate/cppsymbolviewer/plugin_katesymbolviewer.cpp index 3e18097..9165878 100644 --- a/kate/cppsymbolviewer/plugin_katesymbolviewer.cpp +++ b/kate/cppsymbolviewer/plugin_katesymbolviewer.cpp @@ -11,11 +11,11 @@ * Nov 28 2003 v.1.1 - Structured for multilanguage support * Added preliminary Tcl/Tk parser (thanks Rohit). To be improved. * Various bugfixing. - * Jun 19 2003 v.1.0 - Removed QTimer (polling is Evil(tm)... ) + * Jun 19 2003 v.1.0 - Removed TQTimer (polling is Evil(tm)... ) * - Captured documentChanged() event to refresh symbol list * - Tooltips vanished into nowhere...sigh :( * May 04 2003 v 0.6 - Symbol List becomes a KListView object. Removed Tooltip class. - * Added a QTimer that every 200ms checks: + * Added a TQTimer that every 200ms checks: * * if the list width has changed * * if the document has changed * Added an entry in the popup menu to switch between List and Tree mode @@ -47,15 +47,15 @@ #include <kgenericfactory.h> #include <kfiledialog.h> -#include <qlayout.h> -#include <qgroupbox.h> +#include <tqlayout.h> +#include <tqgroupbox.h> K_EXPORT_COMPONENT_FACTORY( katecppsymbolviewerplugin, KGenericFactory<KatePluginSymbolViewer>( "katesymbolviewer" ) ) KatePluginSymbolViewerView::KatePluginSymbolViewerView(Kate::MainWindow *w) { KGlobal::locale()->insertCatalogue("katecppsymbolviewer"); - KToggleAction* act = new KToggleAction ( i18n("Hide Symbols"), 0, this, SLOT( slotInsertSymbol() ), actionCollection(), "view_insert_symbolviewer" ); + KToggleAction* act = new KToggleAction ( i18n("Hide Symbols"), 0, this, TQT_SLOT( slotInsertSymbol() ), actionCollection(), "view_insert_symbolviewer" ); act->setCheckedState(i18n("Show Symbols")); setInstance (new KInstance("kate")); @@ -65,15 +65,15 @@ KatePluginSymbolViewerView::KatePluginSymbolViewerView(Kate::MainWindow *w) symbols = 0; m_Active = false; - popup = new QPopupMenu(); - popup->insertItem(i18n("Refresh List"), this, SLOT(slotRefreshSymbol())); + popup = new TQPopupMenu(); + popup->insertItem(i18n("Refresh List"), this, TQT_SLOT(slotRefreshSymbol())); popup->insertSeparator(); - m_macro = popup->insertItem(i18n("Show Macros"), this, SLOT(toggleShowMacros())); - m_struct = popup->insertItem(i18n("Show Structures"), this, SLOT(toggleShowStructures())); - m_func = popup->insertItem(i18n("Show Functions"), this, SLOT(toggleShowFunctions())); + m_macro = popup->insertItem(i18n("Show Macros"), this, TQT_SLOT(toggleShowMacros())); + m_struct = popup->insertItem(i18n("Show Structures"), this, TQT_SLOT(toggleShowStructures())); + m_func = popup->insertItem(i18n("Show Functions"), this, TQT_SLOT(toggleShowFunctions())); popup->insertSeparator(); - popup->insertItem(i18n("List/Tree Mode"), this, SLOT(slotChangeMode())); - m_sort = popup->insertItem(i18n("Enable sorting"), this, SLOT(slotEnableSorting())); + popup->insertItem(i18n("List/Tree Mode"), this, TQT_SLOT(slotChangeMode())); + m_sort = popup->insertItem(i18n("Enable sorting"), this, TQT_SLOT(slotEnableSorting())); popup->setItemChecked(m_macro, true); popup->setItemChecked(m_struct, true); @@ -117,7 +117,7 @@ void KatePluginSymbolViewerView::toggleShowFunctions(void) void KatePluginSymbolViewerView::slotInsertSymbol() { - QPixmap cls( ( const char** ) class_xpm ); + TQPixmap cls( ( const char** ) class_xpm ); if (m_Active == false) { @@ -126,17 +126,17 @@ void KatePluginSymbolViewerView::slotInsertSymbol() symbols = new KListView(dock); treeMode = 0; - connect(symbols, SIGNAL(executed(QListViewItem *)), this, SLOT(goToSymbol(QListViewItem *))); - connect(symbols, SIGNAL(rightButtonClicked(QListViewItem *, const QPoint&, int)), - SLOT(slotShowContextMenu(QListViewItem *, const QPoint&, int))); - connect(win->viewManager(), SIGNAL(viewChanged()), this, SLOT(slotDocChanged())); - //connect(symbols, SIGNAL(resizeEvent(QResizeEvent *)), this, SLOT(slotViewChanged(QResizeEvent *))); + connect(symbols, TQT_SIGNAL(executed(TQListViewItem *)), this, TQT_SLOT(goToSymbol(TQListViewItem *))); + connect(symbols, TQT_SIGNAL(rightButtonClicked(TQListViewItem *, const TQPoint&, int)), + TQT_SLOT(slotShowContextMenu(TQListViewItem *, const TQPoint&, int))); + connect(win->viewManager(), TQT_SIGNAL(viewChanged()), this, TQT_SLOT(slotDocChanged())); + //connect(symbols, TQT_SIGNAL(resizeEvent(TQResizeEvent *)), this, TQT_SLOT(slotViewChanged(TQResizeEvent *))); m_Active = true; //symbols->addColumn(i18n("Symbols"), symbols->parentWidget()->width()); symbols->addColumn(i18n("Symbols")); symbols->addColumn(i18n("Position")); - symbols->setColumnWidthMode(1, QListView::Manual); + symbols->setColumnWidthMode(1, TQListView::Manual); symbols->setColumnWidth ( 1, 0 ); symbols->setSorting(-1, FALSE); symbols->setRootIsDecorated(0); @@ -189,13 +189,13 @@ void KatePluginSymbolViewerView::slotDocChanged() slotRefreshSymbol(); } -void KatePluginSymbolViewerView::slotViewChanged(QResizeEvent *) +void KatePluginSymbolViewerView::slotViewChanged(TQResizeEvent *) { kdDebug(13000)<<"View changed !!!!"<<endl; symbols->setColumnWidth(0, symbols->parentWidget()->width()); } -void KatePluginSymbolViewerView::slotShowContextMenu(QListViewItem *, const QPoint &p, int) +void KatePluginSymbolViewerView::slotShowContextMenu(TQListViewItem *, const TQPoint &p, int) { popup->popup(p); } @@ -215,9 +215,9 @@ void KatePluginSymbolViewerView::parseSymbols(void) /** Get the current highlighting mode */ hlMode = kv->hlMode(); - QString hlModeName = kv->hlModeName(hlMode); + TQString hlModeName = kv->hlModeName(hlMode); - //QListViewItem mcrNode = new QListViewItem(symbols, symbols->lastItem(), hlModeName); + //TQListViewItem mcrNode = new TQListViewItem(symbols, symbols->lastItem(), hlModeName); if (hlModeName == "C++" || hlModeName == "C") parseCppSymbols(); @@ -227,7 +227,7 @@ void KatePluginSymbolViewerView::parseSymbols(void) parseCppSymbols(); } -void KatePluginSymbolViewerView::goToSymbol(QListViewItem *it) +void KatePluginSymbolViewerView::goToSymbol(TQListViewItem *it) { Kate::View *kv = win->viewManager()->activeView(); @@ -241,7 +241,7 @@ void KatePluginSymbolViewerView::goToSymbol(QListViewItem *it) kv->gotoLineNumber(it->text(1).toInt(NULL, 10)); } -KatePluginSymbolViewer::KatePluginSymbolViewer( QObject* parent, const char* name, const QStringList& ) +KatePluginSymbolViewer::KatePluginSymbolViewer( TQObject* parent, const char* name, const TQStringList& ) : Kate::Plugin ( (Kate::Application*)parent, name ), pConfig("katecppsymbolviewerpluginrc") { @@ -276,12 +276,12 @@ void KatePluginSymbolViewer::removeView(Kate::MainWindow *win) } Kate::PluginConfigPage* KatePluginSymbolViewer::configPage( - uint, QWidget *w, const char* /*name*/) + uint, TQWidget *w, const char* /*name*/) { KatePluginSymbolViewerConfigPage* p = new KatePluginSymbolViewerConfigPage(this, w); initConfigPage( p ); - connect( p, SIGNAL(configPageApplyRequest(KatePluginSymbolViewerConfigPage*)), - SLOT(applyConfig(KatePluginSymbolViewerConfigPage *)) ); + connect( p, TQT_SIGNAL(configPageApplyRequest(KatePluginSymbolViewerConfigPage*)), + TQT_SLOT(applyConfig(KatePluginSymbolViewerConfigPage *)) ); return (Kate::PluginConfigPage*)p; } @@ -307,24 +307,24 @@ void KatePluginSymbolViewer::applyConfig( KatePluginSymbolViewerConfigPage* p ) // BEGIN KatePluginSymbolViewerConfigPage KatePluginSymbolViewerConfigPage::KatePluginSymbolViewerConfigPage( - QObject* /*parent*/ /*= 0L*/, QWidget *parentWidget /*= 0L*/) + TQObject* /*parent*/ /*= 0L*/, TQWidget *parentWidget /*= 0L*/) : Kate::PluginConfigPage( parentWidget ) { - QVBoxLayout* top = new QVBoxLayout(this, 0, + TQVBoxLayout* top = new TQVBoxLayout(this, 0, KDialogBase::spacingHint()); - QGroupBox* gb = new QGroupBox( i18n("Parser Options"), + TQGroupBox* gb = new TQGroupBox( i18n("Parser Options"), this, "cppsymbolviewer_config_page_layout" ); gb->setColumnLayout(1, Qt::Horizontal); gb->setInsideSpacing(KDialogBase::spacingHint()); - viewReturns = new QCheckBox(i18n("Display functions parameters"), gb); - expandTree = new QCheckBox(i18n("Automatically expand nodes in tree mode"), gb); + viewReturns = new TQCheckBox(i18n("Display functions parameters"), gb); + expandTree = new TQCheckBox(i18n("Automatically expand nodes in tree mode"), gb); top->add(gb); top->addStretch(1); // throw signal changed - connect(viewReturns, SIGNAL(toggled(bool)), this, SIGNAL(changed())); - connect(expandTree, SIGNAL(toggled(bool)), this, SIGNAL(changed())); + connect(viewReturns, TQT_SIGNAL(toggled(bool)), this, TQT_SIGNAL(changed())); + connect(expandTree, TQT_SIGNAL(toggled(bool)), this, TQT_SIGNAL(changed())); } KatePluginSymbolViewerConfigPage::~KatePluginSymbolViewerConfigPage() {} diff --git a/kate/cppsymbolviewer/plugin_katesymbolviewer.h b/kate/cppsymbolviewer/plugin_katesymbolviewer.h index f20f097..e8ac0e0 100644 --- a/kate/cppsymbolviewer/plugin_katesymbolviewer.h +++ b/kate/cppsymbolviewer/plugin_katesymbolviewer.h @@ -30,12 +30,12 @@ #include <kate/pluginconfiginterfaceextension.h> #include <kdebug.h> -#include <qmemarray.h> -#include <qpopupmenu.h> -#include <qevent.h> -#include <qcheckbox.h> -//#include <qprocess.h> -#include <qregexp.h> +#include <tqmemarray.h> +#include <tqpopupmenu.h> +#include <tqevent.h> +#include <tqcheckbox.h> +//#include <tqprocess.h> +#include <tqregexp.h> #include <klibloader.h> #include <klocale.h> #include <klistview.h> @@ -43,7 +43,7 @@ #include <kconfig.h> -class KatePluginSymbolViewerView : public QObject, public KXMLGUIClient +class KatePluginSymbolViewerView : public TQObject, public KXMLGUIClient { Q_OBJECT @@ -59,17 +59,17 @@ class KatePluginSymbolViewerView : public QObject, public KXMLGUIClient void slotChangeMode(); void slotEnableSorting(); void slotDocChanged(); - void goToSymbol(QListViewItem *); - void slotShowContextMenu(QListViewItem *, const QPoint&, int); + void goToSymbol(TQListViewItem *); + void slotShowContextMenu(TQListViewItem *, const TQPoint&, int); void toggleShowMacros(void); void toggleShowStructures(void); void toggleShowFunctions(void); protected: - void slotViewChanged(QResizeEvent *e); + void slotViewChanged(TQResizeEvent *e); private: - QPopupMenu *popup; + TQPopupMenu *popup; KListView *symbols; - QWidget *dock; + TQWidget *dock; bool m_Active; int m_macro, m_struct, m_func, m_sort; bool macro_on, struct_on, func_on; @@ -92,7 +92,7 @@ class KatePluginSymbolViewerConfigPage : public Kate::PluginConfigPage friend class KatePluginSymbolViewer; public: - KatePluginSymbolViewerConfigPage (QObject* parent = 0L, QWidget *parentWidget = 0L); + KatePluginSymbolViewerConfigPage (TQObject* parent = 0L, TQWidget *parentWidget = 0L); ~KatePluginSymbolViewerConfigPage (); /** @@ -116,8 +116,8 @@ class KatePluginSymbolViewerConfigPage : public Kate::PluginConfigPage void configPageInitRequest( KatePluginSymbolViewerConfigPage* ); private: - QCheckBox* viewReturns; - QCheckBox* expandTree; + TQCheckBox* viewReturns; + TQCheckBox* expandTree; }; class KatePluginSymbolViewer : public Kate::Plugin, Kate::PluginViewInterface, Kate::PluginConfigInterfaceExtension @@ -125,17 +125,17 @@ class KatePluginSymbolViewer : public Kate::Plugin, Kate::PluginViewInterface, K Q_OBJECT public: - KatePluginSymbolViewer( QObject* parent = 0, const char* name = 0, const QStringList& = QStringList() ); + KatePluginSymbolViewer( TQObject* parent = 0, const char* name = 0, const TQStringList& = TQStringList() ); virtual ~KatePluginSymbolViewer(); void addView (Kate::MainWindow *win); void removeView (Kate::MainWindow *win); uint configPages () const { return 1; } - Kate::PluginConfigPage *configPage (uint , QWidget *w, const char *name=0); - QString configPageName(uint) const { return i18n("Symbol Viewer"); } - QString configPageFullName(uint) const { return i18n("Symbol Viewer Configuration Page"); } - QPixmap configPagePixmap (uint , int ) const { return 0L; } + Kate::PluginConfigPage *configPage (uint , TQWidget *w, const char *name=0); + TQString configPageName(uint) const { return i18n("Symbol Viewer"); } + TQString configPageFullName(uint) const { return i18n("Symbol Viewer Configuration Page"); } + TQPixmap configPagePixmap (uint , int ) const { return 0L; } public slots: void applyConfig( KatePluginSymbolViewerConfigPage* ); @@ -144,7 +144,7 @@ class KatePluginSymbolViewer : public Kate::Plugin, Kate::PluginViewInterface, K void initConfigPage( KatePluginSymbolViewerConfigPage* ); private: - QPtrList<KatePluginSymbolViewerView> m_views; + TQPtrList<KatePluginSymbolViewerView> m_views; KConfig pConfig; }; diff --git a/kate/cppsymbolviewer/tcl_parser.cpp b/kate/cppsymbolviewer/tcl_parser.cpp index ff51e60..c2eae61 100644 --- a/kate/cppsymbolviewer/tcl_parser.cpp +++ b/kate/cppsymbolviewer/tcl_parser.cpp @@ -21,25 +21,25 @@ void KatePluginSymbolViewerView::parseTclSymbols(void) if (!win->viewManager()->activeView()) return; - QString currline, prevline; + TQString currline, prevline; bool prevComment = false; - QString varStr("set "); - QString procStr("proc"); - QString stripped; + TQString varStr("set "); + TQString procStr("proc"); + TQString stripped; uint i, j, args_par = 0, graph = 0; char block = 0, parse_func = 0; - QListViewItem *node = NULL; - QListViewItem *mcrNode = NULL, *clsNode = NULL; - QListViewItem *lastMcrNode = NULL, *lastClsNode = NULL; + TQListViewItem *node = NULL; + TQListViewItem *mcrNode = NULL, *clsNode = NULL; + TQListViewItem *lastMcrNode = NULL, *lastClsNode = NULL; - QPixmap mcr( ( const char** ) macro_xpm ); - QPixmap cls( ( const char** ) class_xpm ); + TQPixmap mcr( ( const char** ) macro_xpm ); + TQPixmap cls( ( const char** ) class_xpm ); if(treeMode) { - clsNode = new QListViewItem(symbols, symbols->lastItem(), i18n("Functions")); - mcrNode = new QListViewItem(symbols, symbols->lastItem(), i18n("Globals")); + clsNode = new TQListViewItem(symbols, symbols->lastItem(), i18n("Functions")); + mcrNode = new TQListViewItem(symbols, symbols->lastItem(), i18n("Globals")); lastMcrNode = mcrNode; lastClsNode = clsNode; if (expanded_on) @@ -86,14 +86,14 @@ void KatePluginSymbolViewerView::parseTclSymbols(void) if (treeMode) { - node = new QListViewItem(mcrNode, lastMcrNode, stripped); + node = new TQListViewItem(mcrNode, lastMcrNode, stripped); lastMcrNode = node; } else - node = new QListViewItem(symbols, symbols->lastItem(), stripped); + node = new TQListViewItem(symbols, symbols->lastItem(), stripped); - node->setPixmap(0, (const QPixmap &)mcr); - node->setText(1, QString::number( i, 10)); + node->setPixmap(0, (const TQPixmap &)mcr); + node->setText(1, TQString::number( i, 10)); stripped = ""; }//macro } // starts with "set" @@ -127,13 +127,13 @@ void KatePluginSymbolViewerView::parseTclSymbols(void) { if (treeMode) { - node = new QListViewItem(clsNode, lastClsNode, stripped); + node = new TQListViewItem(clsNode, lastClsNode, stripped); lastClsNode = node; } else - node = new QListViewItem(symbols, symbols->lastItem(), stripped); - node->setPixmap(0, (const QPixmap &)cls); - node->setText(1, QString::number( i, 10)); + node = new TQListViewItem(symbols, symbols->lastItem(), stripped); + node->setPixmap(0, (const TQPixmap &)cls); + node->setText(1, TQString::number( i, 10)); } stripped = ""; block = 1; diff --git a/kate/filelistloader/katefll_initplugin.cpp b/kate/filelistloader/katefll_initplugin.cpp index 4eb116f..8fb8061 100644 --- a/kate/filelistloader/katefll_initplugin.cpp +++ b/kate/filelistloader/katefll_initplugin.cpp @@ -20,7 +20,7 @@ #include <kate/pluginmanager.h> -#include <qfileinfo.h> +#include <tqfileinfo.h> #include <kgenericfactory.h> #include <kaction.h> #include <klocale.h> @@ -30,7 +30,7 @@ K_EXPORT_COMPONENT_FACTORY( katefll_initplugin, KGenericFactory<InitPluginKateFileListLoader>( "katefll_loader" ) ) -InitPluginKateFileListLoader::InitPluginKateFileListLoader (QObject * parent, const char *name, const QStringList datalist) +InitPluginKateFileListLoader::InitPluginKateFileListLoader (TQObject * parent, const char *name, const TQStringList datalist) :InitPlugin((Kate::Application*)parent,name) { } @@ -48,14 +48,14 @@ int InitPluginKateFileListLoader::actionsKateShouldNotPerformOnRealStartup() int InitPluginKateFileListLoader::initKate() { - QString tmpFile; + TQString tmpFile; KURL tmpURL; if( KIO::NetAccess::download( configScript(), tmpFile ) ) { - QFile file(tmpFile); + TQFile file(tmpFile); file.open(IO_ReadOnly); - QTextStream t(&file); + TQTextStream t(&file); bool somethingOpened=false; @@ -79,11 +79,11 @@ int InitPluginKateFileListLoader::initKate() Kate::Plugin *pl=application()->pluginManager()->plugin("katefll_plugin"); if (pl) { - connect(this,SIGNAL(updateInit()),pl,SLOT(updateInit())); + connect(this,TQT_SIGNAL(updateInit()),pl,TQT_SLOT(updateInit())); updateInit(); - disconnect(this,SIGNAL(updateInit()),pl,SLOT(updateInit())); + disconnect(this,TQT_SIGNAL(updateInit()),pl,TQT_SLOT(updateInit())); -/* int id = pl->metaObject()->findSlot( SLOT(updateInit()) ); +/* int id = pl->metaObject()->findSlot( TQT_SLOT(updateInit()) ); if ( id != -1 ) { kdDebug()<<"Action slot was found, it will be called now"<<endl; diff --git a/kate/filelistloader/katefll_initplugin.h b/kate/filelistloader/katefll_initplugin.h index 7bfd955..55ac1a9 100644 --- a/kate/filelistloader/katefll_initplugin.h +++ b/kate/filelistloader/katefll_initplugin.h @@ -18,7 +18,7 @@ #ifndef _PLUGIN_KATE_FLL_H #define _PLUGIN_KATE_FLL_H -#include <qstring.h> +#include <tqstring.h> #include <kate/plugin.h> #include <kate/application.h> @@ -33,7 +33,7 @@ class InitPluginKateFileListLoader : public Kate::InitPlugin Q_OBJECT public: - InitPluginKateFileListLoader (QObject * =0, const char * =0, const QStringList =QStringList()); + InitPluginKateFileListLoader (TQObject * =0, const char * =0, const TQStringList =TQStringList()); virtual ~InitPluginKateFileListLoader(); virtual int actionsKateShouldNotPerformOnRealStartup(); virtual int initKate(); diff --git a/kate/filelistloader/katefll_plugin.cpp b/kate/filelistloader/katefll_plugin.cpp index bbb91a3..b10464f 100644 --- a/kate/filelistloader/katefll_plugin.cpp +++ b/kate/filelistloader/katefll_plugin.cpp @@ -20,7 +20,7 @@ #include <kate/pluginmanager.h> -#include <qfileinfo.h> +#include <tqfileinfo.h> #include <kgenericfactory.h> #include <kaction.h> #include <klocale.h> @@ -42,7 +42,7 @@ class PluginView : public KXMLGUIClient KRecentFilesAction *recentFiles; }; -PluginKateFileListLoader::PluginKateFileListLoader (QObject * parent, const char *name, const QStringList) +PluginKateFileListLoader::PluginKateFileListLoader (TQObject * parent, const char *name, const TQStringList) : Plugin((Kate::Application*)parent,name), PluginViewInterface(), m_config( new KConfig("katefilelistpluginrc") ) { @@ -75,20 +75,20 @@ void PluginKateFileListLoader::addView(Kate::MainWindow *win) PluginView *view = new PluginView (); (void) new KAction( i18n("Open File List..."), 0, - this, SLOT( slotOpenList() ), + this, TQT_SLOT( slotOpenList() ), view->actionCollection(), "file_kfllopen" ); view->recentFiles = new KRecentFilesAction( i18n("Open Recent"), KShortcut::null(), - this, SLOT(slotOpenList(const KURL&)), view->actionCollection(), + this, TQT_SLOT(slotOpenList(const KURL&)), view->actionCollection(), "file_kfllopenrecent"); view->recentFiles->loadEntries(m_config, "Recent Files"); (void) new KAction( i18n("Save File List"), 0, - this, SLOT( slotSaveList() ), + this, TQT_SLOT( slotSaveList() ), view->actionCollection(), "file_kfllsave" ); (void) new KAction( i18n("Save File List As..."), 0, - this, SLOT( slotSaveListAs() ), + this, TQT_SLOT( slotSaveListAs() ), view->actionCollection(), "file_kfllsaveas" ); view->setInstance (new KInstance("kate")); @@ -133,7 +133,7 @@ void PluginKateFileListLoader::removeURLFromList(const KURL& url) void PluginKateFileListLoader::slotOpenList() { - KURL url = KFileDialog::getOpenURL(QString::null, + KURL url = KFileDialog::getOpenURL(TQString::null, "*.katefl|Kate File List (*.katefl)"); if (url.isValid()) // cancel pressed? slotOpenList(url); @@ -151,13 +151,13 @@ void PluginKateFileListLoader::slotOpenList(const KURL& url) "kate-filelist-loader-close-other" ) == KMessageBox::Yes ) application()->documentManager()->closeAllDocuments(); - QString tmpFile; + TQString tmpFile; if( KIO::NetAccess::download( url, tmpFile, 0 ) ) { - QFile file(tmpFile); + TQFile file(tmpFile); file.open(IO_ReadOnly); - QTextStream t(&file); + TQTextStream t(&file); KURL tmp; while (!t.eof()) { if ( ! tmp.isEmpty() ) @@ -190,7 +190,7 @@ void PluginKateFileListLoader::slotSaveList() { /* if (m_oldInitURL!=application()->initPluginManager()->initScript()) { - switch (KMessageBox::questionYesNoCancel(0,i18n("<qt>Since the last time you saved the file list, Kate has been reinitialized by another plugin other than the <B>File List Loader</B>. Do you still want to save the list to %1?</qt>").arg(m_saveURL.prettyURL()),QString::null,KStdGuiItem::save(),KStdGuiItem::discard())) + switch (KMessageBox::questionYesNoCancel(0,i18n("<qt>Since the last time you saved the file list, Kate has been reinitialized by another plugin other than the <B>File List Loader</B>. Do you still want to save the list to %1?</qt>").arg(m_saveURL.prettyURL()),TQString::null,KStdGuiItem::save(),KStdGuiItem::discard())) { case KMessageBox::Yes: save(); break; case KMessageBox::No: slotSaveListAs(); break; @@ -203,7 +203,7 @@ void PluginKateFileListLoader::slotSaveList() { /*if (m_saveURL!=application()->initPluginManager()->initScript()) { - switch (KMessageBox::questionYesNoCancel(0,i18n("<qt>Kate has been reinitialized by another plugin other than the <B>File List Loader</B>. Do you still want to save the list to %1?</qt>").arg(m_saveURL.prettyURL()),QString::null,KStdGuiItem::save(),KStdGuiItem::discard())) + switch (KMessageBox::questionYesNoCancel(0,i18n("<qt>Kate has been reinitialized by another plugin other than the <B>File List Loader</B>. Do you still want to save the list to %1?</qt>").arg(m_saveURL.prettyURL()),TQString::null,KStdGuiItem::save(),KStdGuiItem::discard())) { case KMessageBox::Yes: save(); break; case KMessageBox::No: slotSaveListAs(); break; @@ -230,7 +230,7 @@ void PluginKateFileListLoader::save() void PluginKateFileListLoader::slotSaveListAs() { - KURL url=KFileDialog::getSaveURL(QString::null,"*.katefl|Kate File List (*.katefl)"); + KURL url=KFileDialog::getSaveURL(TQString::null,"*.katefl|Kate File List (*.katefl)"); if (url.isValid()) { m_oldInitURL="";//application()->initPluginManager()->initScript(); diff --git a/kate/filelistloader/katefll_plugin.h b/kate/filelistloader/katefll_plugin.h index 81b7bb8..e40f996 100644 --- a/kate/filelistloader/katefll_plugin.h +++ b/kate/filelistloader/katefll_plugin.h @@ -18,7 +18,7 @@ #ifndef _PLUGIN_KATE_FLL_H #define _PLUGIN_KATE_FLL_H -#include <qstring.h> +#include <tqstring.h> #include <kate/plugin.h> #include <kate/application.h> @@ -35,7 +35,7 @@ class PluginKateFileListLoader : public Kate::Plugin, Kate::PluginViewInterface Q_OBJECT public: - PluginKateFileListLoader (QObject * =0, const char * =0, const QStringList =QStringList()); + PluginKateFileListLoader (TQObject * =0, const char * =0, const TQStringList =TQStringList()); virtual ~PluginKateFileListLoader(); void addView (Kate::MainWindow *win); @@ -56,7 +56,7 @@ class PluginKateFileListLoader : public Kate::Plugin, Kate::PluginViewInterface void save(); private: - QPtrList<class PluginView> m_views; + TQPtrList<class PluginView> m_views; KRecentFilesAction *m_recentFiles; KConfig* m_config; KURL m_oldInitURL; diff --git a/kate/filetemplates/plugin/filetemplates.cpp b/kate/filetemplates/plugin/filetemplates.cpp index e1eb847..90b64c9 100644 --- a/kate/filetemplates/plugin/filetemplates.cpp +++ b/kate/filetemplates/plugin/filetemplates.cpp @@ -48,21 +48,21 @@ #include <kuser.h> #include <kxmlguifactory.h> -#include <qbuttongroup.h> -#include <qcheckbox.h> -#include <qcombobox.h> -#include <qcursor.h> -#include <qdatetime.h> -#include <qdict.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qlineedit.h> -#include <qpopupmenu.h> -#include <qpushbutton.h> -#include <qradiobutton.h> -#include <qregexp.h> -#include <qstyle.h> -#include <qwhatsthis.h> +#include <tqbuttongroup.h> +#include <tqcheckbox.h> +#include <tqcombobox.h> +#include <tqcursor.h> +#include <tqdatetime.h> +#include <tqdict.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqlineedit.h> +#include <tqpopupmenu.h> +#include <tqpushbutton.h> +#include <tqradiobutton.h> +#include <tqregexp.h> +#include <tqstyle.h> +#include <tqwhatsthis.h> #include <stdlib.h> @@ -98,7 +98,7 @@ KatePluginFactory::~KatePluginFactory() delete s_instance; } -QObject* KatePluginFactory::createObject( QObject* parent, const char* name, const char*, const QStringList & ) +TQObject* KatePluginFactory::createObject( TQObject* parent, const char* name, const char*, const TQStringList & ) { return new KateFileTemplates( parent, name ); } @@ -110,22 +110,22 @@ KInstance* KatePluginFactory::s_instance = 0L; class TemplateInfo { public: - TemplateInfo( const QString& fn, const QString &t, const QString &g ) + TemplateInfo( const TQString& fn, const TQString &t, const TQString &g ) : filename( fn ), tmplate ( t ), group( g ) { ; } ~TemplateInfo() { ; } - QString filename; - QString tmplate; - QString group; - QString description; - QString author; - QString highlight; - QString icon; + TQString filename; + TQString tmplate; + TQString group; + TQString description; + TQString author; + TQString highlight; + TQString icon; }; //END TemplateInfo //BEGIN KateFileTemplates -KateFileTemplates::KateFileTemplates( QObject* parent, const char* name ) +KateFileTemplates::KateFileTemplates( TQObject* parent, const char* name ) : Kate::Plugin ( (Kate::Application*)parent, name ), m_actionCollection( new KActionCollection( this, "template_actions", new KInstance("kate") ) ) { @@ -133,29 +133,29 @@ KateFileTemplates::KateFileTemplates( QObject* parent, const char* name ) // We plug them into each view's menus, and update them centrally, so that // new plugins can automatically become visible in all windows. (void) new KAction ( i18n("Any File..."), 0, this, - SLOT( slotAny() ), m_actionCollection, + TQT_SLOT( slotAny() ), m_actionCollection, "file_template_any" ); // recent templates m_acRecentTemplates = new KRecentFilesAction( i18n("&Use Recent"), 0, this, - SLOT(slotOpenTemplate(const KURL &)), + TQT_SLOT(slotOpenTemplate(const KURL &)), m_actionCollection, "file_templates_recent" ); m_acRecentTemplates->loadEntries( kapp->config(), "Recent Templates" ); // template menu m_dw = new KDirWatch( this, "template_dirwatch" ); - QStringList dirs = KGlobal::dirs()->findDirs("data", "kate/plugins/katefiletemplates/templates"); - for ( QStringList::Iterator it = dirs.begin(); it != dirs.end(); ++it ) + TQStringList dirs = KGlobal::dirs()->findDirs("data", "kate/plugins/katefiletemplates/templates"); + for ( TQStringList::Iterator it = dirs.begin(); it != dirs.end(); ++it ) { m_dw->addDir( *it, true ); } - connect( m_dw, SIGNAL(dirty(const QString&)), - this, SLOT(updateTemplateDirs(const QString&)) ); - connect( m_dw, SIGNAL(created(const QString&)), - this, SLOT(updateTemplateDirs(const QString&)) ); - connect( m_dw, SIGNAL(deleted(const QString&)), - this, SLOT(updateTemplateDirs(const QString&)) ); + connect( m_dw, TQT_SIGNAL(dirty(const TQString&)), + this, TQT_SLOT(updateTemplateDirs(const TQString&)) ); + connect( m_dw, TQT_SIGNAL(created(const TQString&)), + this, TQT_SLOT(updateTemplateDirs(const TQString&)) ); + connect( m_dw, TQT_SIGNAL(deleted(const TQString&)), + this, TQT_SLOT(updateTemplateDirs(const TQString&)) ); m_templates.setAutoDelete( true ); updateTemplateDirs(); @@ -167,29 +167,29 @@ KateFileTemplates::KateFileTemplates( QObject* parent, const char* name ) /** * Called whenever the template dir is changed. Recreates the templates list. */ -void KateFileTemplates::updateTemplateDirs(const QString &d) +void KateFileTemplates::updateTemplateDirs(const TQString &d) { kdDebug()<<"updateTemplateDirs called with arg "<<d<<endl; - QStringList templates = KGlobal::dirs()->findAllResources( + TQStringList templates = KGlobal::dirs()->findAllResources( "data","kate/plugins/katefiletemplates/templates/*.katetemplate", false,true); m_templates.clear(); - QRegExp re( "\\b(\\w+)\\s*=\\s*(.+)(?:\\s+\\w+=|$)" ); + TQRegExp re( "\\b(\\w+)\\s*=\\s*(.+)(?:\\s+\\w+=|$)" ); re.setMinimal( true ); KConfig *config = kapp->config(); - QStringList hidden; + TQStringList hidden; config->readListEntry( "Hidden", hidden, ';' ); - for ( QStringList::Iterator it=templates.begin(); it != templates.end(); ++it ) + for ( TQStringList::Iterator it=templates.begin(); it != templates.end(); ++it ) { - QFile _f( *it ); + TQFile _f( *it ); if ( _f.open( IO_ReadOnly ) ) { - QString fname = (*it).section( '/', -1 ); + TQString fname = (*it).section( '/', -1 ); // skip if hidden if ( hidden.contains( fname ) ) @@ -198,10 +198,10 @@ void KateFileTemplates::updateTemplateDirs(const QString &d) // Read the first line of the file, to get the group/name TemplateInfo *tmp = new TemplateInfo( *it, fname, "Other" ); bool trymore ( true ); - QTextStream stream(&_f); + TQTextStream stream(&_f); while ( trymore ) { - QString _line = stream.readLine(); + TQString _line = stream.readLine(); trymore = _line.startsWith( "katetemplate:" ); if ( ! trymore ) break; @@ -249,7 +249,7 @@ void KateFileTemplates::addView(Kate::MainWindow *win) PluginView *view = new PluginView (); (void) new KAction( i18n("&Manage Templates..."), 0, - this, SLOT(slotEditTemplate()), + this, TQT_SLOT(slotEditTemplate()), view->actionCollection(), "settings_manage_templates" ); (void)new KActionMenu( i18n("New From &Template"), "make", @@ -276,10 +276,10 @@ void KateFileTemplates::removeView(Kate::MainWindow *win) } } -QStringList KateFileTemplates::groups() +TQStringList KateFileTemplates::groups() { - QStringList l; - QString s; + TQStringList l; + TQString s; for ( uint i = 0; i < m_templates.count(); i++ ) { @@ -293,7 +293,7 @@ QStringList KateFileTemplates::groups() void KateFileTemplates::refreshMenu( PluginView *v ) { - QPopupMenu *m = (QPopupMenu*)(((KActionMenu*)(v->actionCollection()->action("file_new_fromtemplate")))->popupMenu()); + TQPopupMenu *m = (TQPopupMenu*)(((KActionMenu*)(v->actionCollection()->action("file_new_fromtemplate")))->popupMenu()); // clear the menu for templates m->clear(); @@ -303,12 +303,12 @@ void KateFileTemplates::refreshMenu( PluginView *v ) m_acRecentTemplates->plug( m ); m->insertSeparator(); - QDict<QPopupMenu> submenus; // ### QMAP + TQDict<TQPopupMenu> submenus; // ### QMAP for ( uint i = 0; i < m_templates.count(); i++ ) { if ( ! submenus[ m_templates.at( i )->group ] ) { - QPopupMenu *sm = new QPopupMenu(); + TQPopupMenu *sm = new TQPopupMenu(); submenus.insert( m_templates.at( i )->group, sm ); m->insertItem( m_templates.at( i )->group, sm ); } @@ -316,13 +316,13 @@ void KateFileTemplates::refreshMenu( PluginView *v ) if ( ! m_templates.at( i )->icon.isEmpty() ) submenus[m_templates.at( i )->group]->insertItem( SmallIconSet( m_templates.at( i )->icon ), - m_templates.at( i )->tmplate, this, SLOT(slotOpenTemplate( int )), 0, i ); + m_templates.at( i )->tmplate, this, TQT_SLOT(slotOpenTemplate( int )), 0, i ); else submenus[m_templates.at( i )->group]->insertItem( - m_templates.at( i )->tmplate, this, SLOT(slotOpenTemplate( int )), 0, i ); + m_templates.at( i )->tmplate, this, TQT_SLOT(slotOpenTemplate( int )), 0, i ); // add whatsthis containing the description and author - QString w ( m_templates.at( i )->description ); + TQString w ( m_templates.at( i )->description ); if( ! m_templates.at( i )->author.isEmpty() ) { w.append( "<p>Author: " ); @@ -346,9 +346,9 @@ void KateFileTemplates::slotAny() return; // get a URL and pass that to slotOpenTemplate - QString fn = KFileDialog::getOpenFileName( + TQString fn = KFileDialog::getOpenFileName( "katefiletemplate", - QString::null, + TQString::null, application()->activeMainWindow()->viewManager()->activeView(), i18n("Open as Template") ); if ( ! fn.isEmpty() ) @@ -368,16 +368,16 @@ void KateFileTemplates::slotOpenTemplate( int index ) void KateFileTemplates::slotOpenTemplate( const KURL &url ) { // check if the file can be opened - QString tmpfile; - QString filename = url.fileName(); + TQString tmpfile; + TQString filename = url.fileName(); kdDebug()<<"file: "<<filename<<endl; if ( KIO::NetAccess::download( url, tmpfile, 0L ) ) { bool isTemplate ( filename.endsWith( ".katetemplate" ) ); - QString docname; + TQString docname; // open the file and parse for template variables and macros - QFile file(tmpfile); + TQFile file(tmpfile); if ( ! file.open( IO_ReadOnly ) ) { KMessageBox::sorry( application()->activeMainWindow()->viewManager()->activeView(), @@ -388,7 +388,7 @@ void KateFileTemplates::slotOpenTemplate( const KURL &url ) } // this may take a moment.. - kapp->setOverrideCursor( QCursor(QCursor::WaitCursor) ); + kapp->setOverrideCursor( TQCursor(TQCursor::WaitCursor) ); // create a new document application()->activeMainWindow()->viewManager()->openURL( KURL() ); @@ -396,8 +396,8 @@ void KateFileTemplates::slotOpenTemplate( const KURL &url ) Kate::Document *doc = view->getDoc(); - QTextStream stream(&file); - QString str, tmp; + TQTextStream stream(&file); + TQString str, tmp; uint numlines = 0; uint doneheader = 0; while ( !stream.eof() ) { @@ -407,7 +407,7 @@ void KateFileTemplates::slotOpenTemplate( const KURL &url ) // look for document name, highlight if ( ! (doneheader & 1) ) { - QRegExp reName( "\\bdocumentname\\s*=\\s*(.+)(?:\\s+\\w+\\s*=|$)", false ); + TQRegExp reName( "\\bdocumentname\\s*=\\s*(.+)(?:\\s+\\w+\\s*=|$)", false ); reName.setMinimal( true ); if ( reName.search( tmp ) > -1 ) { @@ -419,7 +419,7 @@ void KateFileTemplates::slotOpenTemplate( const KURL &url ) if ( ! (doneheader & 2) ) { - QRegExp reHl( "\\bhighlight\\s*=\\s*(.+)(?:\\s+\\w+\\s*=|$)", false ); + TQRegExp reHl( "\\bhighlight\\s*=\\s*(.+)(?:\\s+\\w+\\s*=|$)", false ); reHl.setMinimal( true ); kdDebug()<<"looking for a hl mode"<<endl; if ( reHl.search( tmp ) > -1 ) @@ -427,7 +427,7 @@ void KateFileTemplates::slotOpenTemplate( const KURL &url ) kdDebug()<<"looking for a hl mode -- "<<reHl.cap()<<endl; // this is overly complex, too bad the interface is // not providing a resonable method.. - QString hlmode = reHl.cap( 1 ); + TQString hlmode = reHl.cap( 1 ); uint _i = 0; while ( _i < doc->hlModeCount() ) { @@ -466,12 +466,12 @@ void KateFileTemplates::slotOpenTemplate( const KURL &url ) // check for other documents matching this naming scheme, // and do a count before chosing a name for this one - QString p = docname; + TQString p = docname; p.replace( "%1", "\\d+" ); p.replace( ".", "\\." ); p.prepend( "^" ); p.append( "$" ); - QRegExp reName( p ); + TQRegExp reName( p ); int count = 1; for ( uint i=0; i < application()->documentManager()->documents(); i++ ) @@ -495,7 +495,7 @@ void KateFileTemplates::slotOpenTemplate( const KURL &url ) m_emailstuff = 0; if (isTemplate) { KTextEditor::TemplateInterface *ti=KTextEditor::templateInterface(doc); - ti->insertTemplateText(0,0,str,QMap<QString,QString>()); + ti->insertTemplateText(0,0,str,TQMap<TQString,TQString>()); } else { doc->insertText( 0, 0, str ); view->setCursorPosition( line, col ); @@ -504,9 +504,9 @@ void KateFileTemplates::slotOpenTemplate( const KURL &url ) } -QWidget *KateFileTemplates::parentWindow() +TQWidget *KateFileTemplates::parentWindow() { - return dynamic_cast<QWidget*>(application()->activeMainWindow()); + return dynamic_cast<TQWidget*>(application()->activeMainWindow()); } // The next part are tools to aid the creation and editing of templates @@ -544,39 +544,39 @@ void KateFileTemplates::slotEditTemplate() //BEGIN KateTemplateInfoWidget // This widget can be used to change the data of a TemplateInfo object -KateTemplateInfoWidget::KateTemplateInfoWidget( QWidget *parent, TemplateInfo *info, KateFileTemplates *kft ) - : QWidget( parent ), +KateTemplateInfoWidget::KateTemplateInfoWidget( TQWidget *parent, TemplateInfo *info, KateFileTemplates *kft ) + : TQWidget( parent ), info( info ), kft( kft ) { - QGridLayout *lo = new QGridLayout( this, 6, 2 ); + TQGridLayout *lo = new TQGridLayout( this, 6, 2 ); lo->setAutoAdd( true ); lo->setSpacing( KDialogBase::spacingHint() ); - QLabel *l = new QLabel( i18n("&Template:"), this ); - QHBox *hb = new QHBox( this ); + TQLabel *l = new TQLabel( i18n("&Template:"), this ); + TQHBox *hb = new TQHBox( this ); hb->setSpacing( KDialogBase::spacingHint() ); - leTemplate = new QLineEdit( hb ); + leTemplate = new TQLineEdit( hb ); l->setBuddy( leTemplate ); - QWhatsThis::add( leTemplate, i18n("<p>This string is used as the template's name " + TQWhatsThis::add( leTemplate, i18n("<p>This string is used as the template's name " "and is displayed, for example, in the Template menu. It should describe the " "meaning of the template, for example 'HTML Document'.</p>") ); ibIcon = new KIconButton( hb ); - QWhatsThis::add( ibIcon, i18n( + TQWhatsThis::add( ibIcon, i18n( "Press to select or change the icon for this template") ); - l = new QLabel( i18n("&Group:"), this ); - cmbGroup = new QComboBox( true, this ); + l = new TQLabel( i18n("&Group:"), this ); + cmbGroup = new TQComboBox( true, this ); cmbGroup->insertStringList( kft->groups() ); l->setBuddy( cmbGroup ); - QWhatsThis::add( cmbGroup, i18n("<p>The group is used for chosing a " + TQWhatsThis::add( cmbGroup, i18n("<p>The group is used for chosing a " "submenu for the plugin. If it is empty, 'Other' is used.</p>" "<p>You can type any string to add a new group to your menu.</p>") ); - l = new QLabel( i18n("Document &name:"), this ); - leDocumentName = new QLineEdit( this ); + l = new TQLabel( i18n("Document &name:"), this ); + leDocumentName = new TQLineEdit( this ); l->setBuddy( leDocumentName ); - QWhatsThis::add( leDocumentName, i18n("<p>This string will be used to set a name " + TQWhatsThis::add( leDocumentName, i18n("<p>This string will be used to set a name " "for the new document, to display in the title bar and file list.</p>" "<p>If the string contains '%N', that will be replaced with a number " "increasing with each similarly named file.</p><p> For example, if the " @@ -584,23 +584,23 @@ KateTemplateInfoWidget::KateTemplateInfoWidget( QWidget *parent, TemplateInfo *i "named 'New shellscript (1).sh', the second 'New shellscipt (2).sh', and " "so on.</p>") ); - l = new QLabel( i18n( "&Highlight:"), this ); - btnHighlight = new QPushButton( i18n("None"), this ); + l = new TQLabel( i18n( "&Highlight:"), this ); + btnHighlight = new TQPushButton( i18n("None"), this ); l->setBuddy( btnHighlight ); - QWhatsThis::add( btnHighlight, i18n("<p>Select the highlight to use for the " + TQWhatsThis::add( btnHighlight, i18n("<p>Select the highlight to use for the " "template. If 'None' is chosen, the property will not be set.</p>") ); - l = new QLabel( i18n("&Description:"), this ); - leDescription = new QLineEdit( this ); + l = new TQLabel( i18n("&Description:"), this ); + leDescription = new TQLineEdit( this ); l->setBuddy( leDescription ); - QWhatsThis::add( leDescription, i18n("<p>This string is used, for example, as " + TQWhatsThis::add( leDescription, i18n("<p>This string is used, for example, as " "context help for this template (such as the 'whatsthis' help for the " "menu item.)</p>") ); - l = new QLabel( i18n("&Author:"), this ); - leAuthor = new QLineEdit( this ); + l = new TQLabel( i18n("&Author:"), this ); + leAuthor = new TQLineEdit( this ); l->setBuddy( leAuthor ); - QWhatsThis::add( leAuthor, i18n("<p>You can set this if you want to share your " + TQWhatsThis::add( leAuthor, i18n("<p>You can set this if you want to share your " "template with other users.</p>" "<p>the recommended form is like an Email " "address: 'Anders Lund <anders@alweb.dk>'</p>") ); @@ -622,20 +622,20 @@ KateTemplateInfoWidget::KateTemplateInfoWidget( QWidget *parent, TemplateInfo *i Kate::Document *doc = kft->application()->documentManager()->activeDocument(); if ( doc ) { - QPopupMenu *m = new QPopupMenu( btnHighlight ); - connect( m, SIGNAL( activated( int ) ), this, SLOT( slotHlSet( int ) ) ); - QDict<QPopupMenu> submenus; + TQPopupMenu *m = new TQPopupMenu( btnHighlight ); + connect( m, TQT_SIGNAL( activated( int ) ), this, TQT_SLOT( slotHlSet( int ) ) ); + TQDict<TQPopupMenu> submenus; for ( uint n = 0; n < doc->hlModeCount(); n++ ) { // create the sub menu if it does not exist - QString text( doc->hlModeSectionName( n ) ); + TQString text( doc->hlModeSectionName( n ) ); if ( ! text.isEmpty() ) { if ( ! submenus[ text ] ) { - QPopupMenu *sm = new QPopupMenu(); + TQPopupMenu *sm = new TQPopupMenu(); submenus.insert( text, sm ); - connect( sm, SIGNAL( activated( int ) ), this, SLOT( slotHlSet( int ) ) ); + connect( sm, TQT_SIGNAL( activated( int ) ), this, TQT_SLOT( slotHlSet( int ) ) ); m->insertItem( text, sm ); } @@ -659,7 +659,7 @@ void KateTemplateInfoWidget::slotHlSet( int id ) //BEGIN KateTemplateWizard // A simple wizard to help create a new template :-) -KateTemplateWizard::KateTemplateWizard( QWidget *parent, KateFileTemplates *kft ) +KateTemplateWizard::KateTemplateWizard( TQWidget *parent, KateFileTemplates *kft ) : KWizard( parent ), kft( kft ) { @@ -667,47 +667,47 @@ KateTemplateWizard::KateTemplateWizard( QWidget *parent, KateFileTemplates *kft helpButton()->hide(); // 1) Optionally choose a file or existing template to start from - QWidget *page = new QWidget( this ); - QGridLayout *glo = new QGridLayout( page ); + TQWidget *page = new TQWidget( this ); + TQGridLayout *glo = new TQGridLayout( page ); //lo->setAutoAdd( true ); glo->setSpacing( KDialogBase::spacingHint() ); - glo->addMultiCellWidget( new QLabel( i18n("<p>If you want to base this " + glo->addMultiCellWidget( new TQLabel( i18n("<p>If you want to base this " "template on an existing file or template, select the appropriate option " "below.</p>"), page ), 1, 1, 1, 2); - bgOrigin = new QButtonGroup( page ); + bgOrigin = new TQButtonGroup( page ); bgOrigin->hide(); bgOrigin->setRadioButtonExclusive( true ); - QRadioButton *rb = new QRadioButton( i18n("Start with an &empty document" ), page ); + TQRadioButton *rb = new TQRadioButton( i18n("Start with an &empty document" ), page ); bgOrigin->insert( rb, 1 ); glo->addMultiCellWidget( rb, 2, 2, 1, 2 ); rb->setChecked( true ); - rb = new QRadioButton( i18n("Use an existing file:"), page ); + rb = new TQRadioButton( i18n("Use an existing file:"), page ); bgOrigin->insert( rb, 2 ); glo->addMultiCellWidget( rb, 3, 3, 1, 2 ); - int marg = rb->style().subRect( QStyle::SR_RadioButtonIndicator, rb ).width(); - glo->addItem( new QSpacerItem( marg, 1, QSizePolicy::Fixed ), 4, 1 ); + int marg = rb->style().subRect( TQStyle::SR_RadioButtonIndicator, rb ).width(); + glo->addItem( new TQSpacerItem( marg, 1, TQSizePolicy::Fixed ), 4, 1 ); urOrigin = new KURLRequester( page ); glo->addWidget( urOrigin, 4, 2 ); - rb = new QRadioButton( i18n("Use an existing template:"), page ); + rb = new TQRadioButton( i18n("Use an existing template:"), page ); bgOrigin->insert( rb, 3 ); glo->addMultiCellWidget( rb, 5, 5, 1, 2 ); - glo->addItem( new QSpacerItem( marg, 1, QSizePolicy::Fixed ), 6, 1 ); - btnTmpl = new QPushButton( page ); + glo->addItem( new TQSpacerItem( marg, 1, TQSizePolicy::Fixed ), 6, 1 ); + btnTmpl = new TQPushButton( page ); glo->addWidget( btnTmpl, 6, 2 ); - QPopupMenu *m = new QPopupMenu( btnTmpl ); - connect( m, SIGNAL( activated( int ) ), this, SLOT( slotTmplateSet( int ) ) ); + TQPopupMenu *m = new TQPopupMenu( btnTmpl ); + connect( m, TQT_SIGNAL( activated( int ) ), this, TQT_SLOT( slotTmplateSet( int ) ) ); - QDict<QPopupMenu> submenus; + TQDict<TQPopupMenu> submenus; for ( uint i = 0; i < kft->templates().count(); i++ ) { if ( ! submenus[ kft->templates().at( i )->group ] ) { - QPopupMenu *sm = new QPopupMenu(); - connect( sm, SIGNAL( activated( int ) ), this, SLOT( slotTmplateSet( int ) ) ); + TQPopupMenu *sm = new TQPopupMenu(); + connect( sm, TQT_SIGNAL( activated( int ) ), this, TQT_SLOT( slotTmplateSet( int ) ) ); submenus.insert( kft->templates().at( i )->group, sm ); m->insertItem( kft->templates().at( i )->group, sm ); } @@ -717,10 +717,10 @@ KateTemplateWizard::KateTemplateWizard( QWidget *parent, KateFileTemplates *kft } btnTmpl->setPopup( m ); - connect( bgOrigin, SIGNAL(clicked(int)), this, SLOT(slotStateChanged(int)) ); - connect( urOrigin, SIGNAL(textChanged(const QString&)), this, SLOT(slotStateChanged(const QString&)) ); + connect( bgOrigin, TQT_SIGNAL(clicked(int)), this, TQT_SLOT(slotStateChanged(int)) ); + connect( urOrigin, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotStateChanged(const TQString&)) ); - glo->addMultiCell( new QSpacerItem( 1, 1, QSizePolicy::Expanding, QSizePolicy::Expanding ), 7, 7, 1, 2 ); + glo->addMultiCell( new TQSpacerItem( 1, 1, TQSizePolicy::Expanding, TQSizePolicy::Expanding ), 7, 7, 1, 2 ); addPage( page, i18n("Choose Template Origin") ); kdDebug()<<"=== Adding template origin page at "<<page<<endl; @@ -729,77 +729,77 @@ KateTemplateWizard::KateTemplateWizard( QWidget *parent, KateFileTemplates *kft kdDebug()<<"=== Adding template info page at "<<kti<<endl; addPage( kti, i18n("Edit Template Properties") ); // get liekly values from KTE - QMap<QString, QString> map; + TQMap<TQString, TQString> map; map[ "fullname" ] = ""; map[ "email" ] = ""; KTextEditor::TemplateInterface::expandMacros( map, parent ); - QString sFullname = map["fullname"]; - QString sEmail = map["email"]; - QString _s = sFullname; + TQString sFullname = map["fullname"]; + TQString sEmail = map["email"]; + TQString _s = sFullname; if ( ! sEmail.isEmpty() ) _s += " <" + sEmail + ">"; kti->leAuthor->setText( _s ); // 3) choose a location - either the template directory (default) or // a custom location - page = new QWidget( this ); - glo = new QGridLayout( page, 7, 2 ); + page = new TQWidget( this ); + glo = new TQGridLayout( page, 7, 2 ); glo->setSpacing( KDialogBase::spacingHint() ); - glo->addMultiCellWidget( new QLabel( i18n("<p>Choose a location for the " + glo->addMultiCellWidget( new TQLabel( i18n("<p>Choose a location for the " "template. If you store it in the template directory, it will " "automatically be added to the template menu.</p>"), page ), 1, 1, 1, 2); - bgLocation = new QButtonGroup( page ); + bgLocation = new TQButtonGroup( page ); bgLocation->hide(); bgLocation->setRadioButtonExclusive( true ); - rb = new QRadioButton( i18n("Template directory"), page ); + rb = new TQRadioButton( i18n("Template directory"), page ); bgLocation->insert( rb, 1 ); glo->addMultiCellWidget( rb, 2, 2, 1, 2 ); rb->setChecked( true ); - glo->addMultiCell( new QSpacerItem( marg, 1, QSizePolicy::Fixed ), 3, 4, 1, 1 ); - leTemplateFileName = new QLineEdit( page ); - QLabel *l = new QLabel( leTemplateFileName, i18n("Template &file name:"), page ); + glo->addMultiCell( new TQSpacerItem( marg, 1, TQSizePolicy::Fixed ), 3, 4, 1, 1 ); + leTemplateFileName = new TQLineEdit( page ); + TQLabel *l = new TQLabel( leTemplateFileName, i18n("Template &file name:"), page ); glo->addWidget( l, 3, 2 ); glo->addWidget( leTemplateFileName, 4, 2 ); - rb = new QRadioButton( i18n("Custom location:"), page ); + rb = new TQRadioButton( i18n("Custom location:"), page ); bgLocation->insert( rb, 2 ); glo->addMultiCellWidget( rb, 5, 5, 1, 2 ); - glo->addItem( new QSpacerItem( marg, 1, QSizePolicy::Fixed ), 6, 1 ); + glo->addItem( new TQSpacerItem( marg, 1, TQSizePolicy::Fixed ), 6, 1 ); urLocation = new KURLRequester( page ); glo->addWidget( urLocation, 6, 2 ); - connect( bgLocation, SIGNAL(clicked(int)), this, SLOT(slotStateChanged(int)) ); - connect( urLocation, SIGNAL(textChanged(const QString&)), this, SLOT(slotStateChanged(const QString&)) ); - connect( leTemplateFileName, SIGNAL(textChanged(const QString &)), this, SLOT(slotStateChanged(const QString &)) ); + connect( bgLocation, TQT_SIGNAL(clicked(int)), this, TQT_SLOT(slotStateChanged(int)) ); + connect( urLocation, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotStateChanged(const TQString&)) ); + connect( leTemplateFileName, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(slotStateChanged(const TQString &)) ); - glo->addMultiCell( new QSpacerItem( 1, 1, QSizePolicy::Expanding, QSizePolicy::Expanding ), 7, 7, 1, 2 ); + glo->addMultiCell( new TQSpacerItem( 1, 1, TQSizePolicy::Expanding, TQSizePolicy::Expanding ), 7, 7, 1, 2 ); addPage( page, i18n("Choose Location") ); kdDebug()<<"=== Adding location page at "<<page<<endl; // 4) Should we edit the text to add some macros, replacing username etc? // This is *only* relevant if the origin is a non-template file. - page = new QWidget( this ); - QVBoxLayout *lo = new QVBoxLayout( page ); + page = new TQWidget( this ); + TQVBoxLayout *lo = new TQVBoxLayout( page ); lo->setSpacing( KDialogBase::spacingHint() ); lo->addWidget( - new QLabel( i18n( "<p>You can replace certain strings in the text with " + new TQLabel( i18n( "<p>You can replace certain strings in the text with " "template macros.<p>If any of the data below is incorrect or missing, " "edit the data in the KDE email information."), page ) ); - cbRRealname = new QCheckBox( i18n("Replace full name '%1' with the " + cbRRealname = new TQCheckBox( i18n("Replace full name '%1' with the " "'%{fullname}' macro").arg( sFullname ), page ); cbRRealname->setEnabled( ! sFullname.isEmpty() ); lo->addWidget( cbRRealname ); - cbREmail = new QCheckBox( i18n("Replace email address '%1' with the " + cbREmail = new TQCheckBox( i18n("Replace email address '%1' with the " "'%email' macro").arg( sEmail ), page); cbREmail->setEnabled( ! sEmail.isEmpty() ); lo->addWidget( cbREmail ); @@ -809,17 +809,17 @@ KateTemplateWizard::KateTemplateWizard( QWidget *parent, KateFileTemplates *kft addPage( page, i18n("Autoreplace Macros") ); kdDebug()<<"=== Adding autoreplace page at "<<page<<endl; // 5) Display a summary - page = new QWidget( this ); - lo = new QVBoxLayout( page ); + page = new TQWidget( this ); + lo = new TQVBoxLayout( page ); lo->setSpacing( KDialogBase::spacingHint() ); - QString s = i18n("<p>The template will now be created and saved to the chosen " + TQString s = i18n("<p>The template will now be created and saved to the chosen " "location. To position the cursor put a caret ('^') character where you " "want it in files created from the template.</p>"); - lo->addWidget( new QLabel( s, page ) ); + lo->addWidget( new TQLabel( s, page ) ); - cbOpenTemplate = new QCheckBox( i18n("Open the template for editing"), page ); + cbOpenTemplate = new TQCheckBox( i18n("Open the template for editing"), page ); lo->addWidget( cbOpenTemplate ); @@ -827,7 +827,7 @@ KateTemplateWizard::KateTemplateWizard( QWidget *parent, KateFileTemplates *kft addPage( page, i18n("Create Template") ); kdDebug()<<"=== Adding summary page at "<<endl; - connect( this, SIGNAL(selected(const QString&)), this, SLOT(slotStateChanged(const QString&)) ); + connect( this, TQT_SIGNAL(selected(const TQString&)), this, TQT_SLOT(slotStateChanged(const TQString&)) ); } void KateTemplateWizard::slotTmplateSet( int idx ) @@ -902,7 +902,7 @@ void KateTemplateWizard::accept() KURL templateUrl; if ( bgLocation->selectedId() == 1 ) { - QString suggestion; + TQString suggestion; if ( ! leTemplateFileName->text().isEmpty() ) suggestion = leTemplateFileName->text(); else @@ -913,11 +913,11 @@ void KateTemplateWizard::accept() if ( ! suggestion.endsWith(".katetemplate") ) suggestion.append(".katetemplate"); - QString dir = KGlobal::dirs()->saveLocation( "data", "kate/plugins/katefiletemplates/templates/", true ); + TQString dir = KGlobal::dirs()->saveLocation( "data", "kate/plugins/katefiletemplates/templates/", true ); templateUrl = dir + suggestion; - if ( QFile::exists( templateUrl.path() ) ) + if ( TQFile::exists( templateUrl.path() ) ) { if ( KMessageBox::warningContinueCancel( this, i18n( "<p>The file <br><strong>'%1'</strong><br> already exists; if you " @@ -933,11 +933,11 @@ void KateTemplateWizard::accept() templateUrl = urLocation->url(); } - QWizard::accept(); + TQWizard::accept(); // The following must be done: // 1) add the collected template information to the top uint ln = 0; - QString s, str; + TQString s, str; if ( ! kti->leTemplate->text().isEmpty() ) s += " Template=" + kti->leTemplate->text(); if ( ! kti->cmbGroup->currentText().isEmpty() ) @@ -968,10 +968,10 @@ void KateTemplateWizard::accept() else // template u = KURL( kft->templates().at( selectedTemplateIdx )->filename ); - QString tmpfile, tmp; + TQString tmpfile, tmp; if ( KIO::NetAccess::download( u, tmpfile, 0L ) ) { - QFile file(tmpfile); + TQFile file(tmpfile); if ( ! file.open( IO_ReadOnly ) ) { KMessageBox::sorry( this, i18n( @@ -983,8 +983,8 @@ void KateTemplateWizard::accept() return; } - QTextStream stream(&file); - QString ln; + TQTextStream stream(&file); + TQString ln; bool trymore = true; while ( !stream.eof() ) { @@ -1005,8 +1005,8 @@ void KateTemplateWizard::accept() { // 3) if the file is not already a template, escape any "%" and "^" in it, // and try do do some replacement of the authors username, name and email. - tmp.replace( QRegExp("%(?=\\{[^}]+\\})"), "\\%" ); - tmp.replace( QRegExp("\\$(?=\\{[^}]+\\})"), "\\$" ); + tmp.replace( TQRegExp("%(?=\\{[^}]+\\})"), "\\%" ); + tmp.replace( TQRegExp("\\$(?=\\{[^}]+\\})"), "\\$" ); //tmp.replace( "^", "\\^" ); if ( cbRRealname->isChecked() && ! sFullname.isEmpty() ) @@ -1028,11 +1028,11 @@ void KateTemplateWizard::accept() { if ( templateUrl.isLocalFile() ) { - QFile file( templateUrl.path() ); + TQFile file( templateUrl.path() ); if ( file.open(IO_WriteOnly) ) { kdDebug()<<"file opened with succes"<<endl; - QTextStream stream( &file ); + TQTextStream stream( &file ); stream << str; file.close(); succes = true; @@ -1041,8 +1041,8 @@ void KateTemplateWizard::accept() else { KTempFile tmp; - QString fn = tmp.name(); - QTextStream stream( tmp.file() ); + TQString fn = tmp.name(); + TQTextStream stream( tmp.file() ); stream << str; tmp.close(); @@ -1083,51 +1083,51 @@ class KateTemplateItem : public KListViewItem //BEGIN KFTNewStuff class KFTNewStuff : public KNewStuff { public: - KFTNewStuff( const QString &type, QWidget *parent=0 ) : KNewStuff( type, parent ), m_win( parent ) {} + KFTNewStuff( const TQString &type, TQWidget *parent=0 ) : KNewStuff( type, parent ), m_win( parent ) {} ~KFTNewStuff() {} - bool install( const QString &/*filename*/ ) { return true; } - bool createUploadFile( const QString &/*filename*/ ) { return false; } - QString downloadDestination( KNS::Entry *entry ) + bool install( const TQString &/*filename*/ ) { return true; } + bool createUploadFile( const TQString &/*filename*/ ) { return false; } + TQString downloadDestination( KNS::Entry *entry ) { - QString dir = KGlobal::dirs()->saveLocation( "data", "kate/plugins/katefiletemplates/templates/", true ); + TQString dir = KGlobal::dirs()->saveLocation( "data", "kate/plugins/katefiletemplates/templates/", true ); return dir.append( entry->payload().filename() ); } private: - QWidget *m_win; + TQWidget *m_win; }; //END KTNewStuff //BEGIN KateTemplateManager -KateTemplateManager::KateTemplateManager( KateFileTemplates *kft, QWidget *parent, const char *name ) - : QWidget( parent, name ) +KateTemplateManager::KateTemplateManager( KateFileTemplates *kft, TQWidget *parent, const char *name ) + : TQWidget( parent, name ) , kft( kft ) { - QGridLayout *lo = new QGridLayout( this, 2, 6 ); + TQGridLayout *lo = new TQGridLayout( this, 2, 6 ); lo->setSpacing( KDialogBase::spacingHint() ); lvTemplates = new KListView( this ); lvTemplates->addColumn( i18n("Template") ); lo->addMultiCellWidget( lvTemplates, 1, 1, 1, 6 ); - connect( lvTemplates, SIGNAL(selectionChanged()), this, SLOT(slotUpdateState()) ); + connect( lvTemplates, TQT_SIGNAL(selectionChanged()), this, TQT_SLOT(slotUpdateState()) ); - btnNew = new QPushButton( i18n("New..."), this ); - connect( btnNew, SIGNAL(clicked()), kft, SLOT(slotCreateTemplate()) ); + btnNew = new TQPushButton( i18n("New..."), this ); + connect( btnNew, TQT_SIGNAL(clicked()), kft, TQT_SLOT(slotCreateTemplate()) ); lo->addWidget( btnNew, 2, 2 ); - btnEdit = new QPushButton( i18n("Edit..."), this ); - connect( btnEdit, SIGNAL(clicked()), this, SLOT( slotEditTemplate()) ); + btnEdit = new TQPushButton( i18n("Edit..."), this ); + connect( btnEdit, TQT_SIGNAL(clicked()), this, TQT_SLOT( slotEditTemplate()) ); lo->addWidget( btnEdit, 2, 3 ); - btnRemove = new QPushButton( i18n("Remove"), this ); - connect( btnRemove, SIGNAL(clicked()), this, SLOT(slotRemoveTemplate()) ); + btnRemove = new TQPushButton( i18n("Remove"), this ); + connect( btnRemove, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotRemoveTemplate()) ); lo->addWidget( btnRemove, 2, 4 ); - btnUpload = new QPushButton( i18n("Upload..."), this ); - connect( btnUpload, SIGNAL(clicked()), this, SLOT(slotUpload()) ); + btnUpload = new TQPushButton( i18n("Upload..."), this ); + connect( btnUpload, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotUpload()) ); lo->addWidget( btnUpload, 2, 5 ); - btnDownload = new QPushButton( i18n("Download..."), this ); - connect( btnDownload, SIGNAL(clicked()), this, SLOT(slotDownload()) ); + btnDownload = new TQPushButton( i18n("Download..."), this ); + connect( btnDownload, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotDownload()) ); lo->addWidget( btnDownload, 2, 6 ); lo->setColStretch( 1, 1 ); @@ -1146,7 +1146,7 @@ void KateTemplateManager::reload() { lvTemplates->clear(); - QDict<KListViewItem> groupitems; // FIXME QMAP + TQDict<KListViewItem> groupitems; // FIXME QMAP for ( uint i = 0; i < kft->templates().count(); i++ ) { if ( ! groupitems[ kft->templates().at( i )->group ] ) @@ -1189,15 +1189,15 @@ void KateTemplateManager::slotRemoveTemplate() // If it fails (there was a global, unwritable instance), add to a // list of removed templates KConfig *config = kapp->config(); - QString fname = item->templateinfo->filename.section( '/', -1 ); - QStringList templates = KGlobal::dirs()->findAllResources( + TQString fname = item->templateinfo->filename.section( '/', -1 ); + TQStringList templates = KGlobal::dirs()->findAllResources( "data", fname.prepend( "kate/plugins/katefiletemplates/templates/" ), false,true); int failed = 0; int removed = 0; - for ( QStringList::Iterator it=templates.begin(); it!=templates.end(); ++it ) + for ( TQStringList::Iterator it=templates.begin(); it!=templates.end(); ++it ) { - if ( ! QFile::remove(*it) ) + if ( ! TQFile::remove(*it) ) failed++; else removed++; @@ -1206,7 +1206,7 @@ void KateTemplateManager::slotRemoveTemplate() if ( failed ) { config->setGroup( "KateFileTemplates" ); - QStringList l; + TQStringList l; config->readListEntry( "Hidden", l, ';' ); l << fname; config->writeEntry( "Hidden", l, ';' ); @@ -1233,7 +1233,7 @@ void KateTemplateManager::slotUpload() if ( item ) { KFTNewStuff *ns = new KFTNewStuff( "katefiletemplates/template", this ); - ns->upload( item->templateinfo->filename, QString::null ); + ns->upload( item->templateinfo->filename, TQString::null ); } } diff --git a/kate/filetemplates/plugin/filetemplates.h b/kate/filetemplates/plugin/filetemplates.h index 0eedc38..11734d5 100644 --- a/kate/filetemplates/plugin/filetemplates.h +++ b/kate/filetemplates/plugin/filetemplates.h @@ -34,7 +34,7 @@ #include <kurl.h> #include <kwizard.h> -#include <qptrlist.h> +#include <tqptrlist.h> class KatePluginFactory : public KLibFactory { @@ -44,7 +44,7 @@ class KatePluginFactory : public KLibFactory KatePluginFactory(); virtual ~KatePluginFactory(); - virtual QObject* createObject( QObject* parent = 0, const char* pname = 0, const char* name = "QObject", const QStringList &args = QStringList() ); + virtual TQObject* createObject( TQObject* parent = 0, const char* pname = 0, const char* name = "TQObject", const TQStringList &args = TQStringList() ); private: static KInstance* s_instance; @@ -75,7 +75,7 @@ class KateFileTemplates : public Kate::Plugin, public Kate::PluginViewInterface Q_OBJECT public: - KateFileTemplates( QObject* parent = 0, const char* name = 0 ); + KateFileTemplates( TQObject* parent = 0, const char* name = 0 ); virtual ~KateFileTemplates(); void addView (Kate::MainWindow *win); @@ -84,12 +84,12 @@ class KateFileTemplates : public Kate::Plugin, public Kate::PluginViewInterface /** * @return a list of unique group names in the template list. */ - QStringList groups(); + TQStringList groups(); /** * @return a pointer to the templateinfo collection */ - QPtrList<class TemplateInfo> templates() { return m_templates; } + TQPtrList<class TemplateInfo> templates() { return m_templates; } /** * @return a pointer to the templateInfo for the template at @p index @@ -100,14 +100,14 @@ class KateFileTemplates : public Kate::Plugin, public Kate::PluginViewInterface /** * @return a a pointer to the active main window */ - QWidget * parentWindow(); + TQWidget * parentWindow(); public slots: /** * Update the template collection by rereading the template * directories. Also updates the menu. */ - void updateTemplateDirs(const QString &s=QString::null); + void updateTemplateDirs(const TQString &s=TQString::null); private slots: /** @@ -137,12 +137,12 @@ class KateFileTemplates : public Kate::Plugin, public Kate::PluginViewInterface void slotCreateTemplate(); private: - void refreshMenu( class PluginView */*class QPopupMenu **/ ); + void refreshMenu( class PluginView */*class TQPopupMenu **/ ); - QPtrList<class PluginView> m_views; + TQPtrList<class PluginView> m_views; class KActionCollection *m_actionCollection; class KRecentFilesAction *m_acRecentTemplates; - QPtrList<class TemplateInfo> m_templates; + TQPtrList<class TemplateInfo> m_templates; class KDirWatch *m_dw; class KUser *m_user; class KConfig *m_emailstuff; @@ -158,14 +158,14 @@ class KateTemplateInfoWidget : public QWidget { Q_OBJECT public: - KateTemplateInfoWidget( QWidget *parent=0, TemplateInfo *info=0, KateFileTemplates *kft=0 ); + KateTemplateInfoWidget( TQWidget *parent=0, TemplateInfo *info=0, KateFileTemplates *kft=0 ); ~KateTemplateInfoWidget() {} TemplateInfo *info; - class QLineEdit *leTemplate, *leDocumentName, *leDescription, *leAuthor; - class QComboBox *cmbGroup; - class QPushButton *btnHighlight; + class TQLineEdit *leTemplate, *leDocumentName, *leDescription, *leAuthor; + class TQComboBox *cmbGroup; + class TQPushButton *btnHighlight; class KIconButton *ibIcon; private slots: @@ -192,7 +192,7 @@ class KateTemplateWizard : public KWizard friend class KateFileTemplates; Q_OBJECT public: - KateTemplateWizard( QWidget* parent, KateFileTemplates *ktf ); + KateTemplateWizard( TQWidget* parent, KateFileTemplates *ktf ); ~KateTemplateWizard() {} public slots: @@ -202,36 +202,36 @@ class KateTemplateWizard : public KWizard void slotTmplateSet( int ); void slotStateChanged(); void slotStateChanged( int ) { slotStateChanged(); } - void slotStateChanged( const QString& ) { slotStateChanged(); } + void slotStateChanged( const TQString& ) { slotStateChanged(); } private: KateFileTemplates *kft; KateTemplateInfoWidget *kti; // origin page - class QButtonGroup *bgOrigin; + class TQButtonGroup *bgOrigin; class KURLRequester *urOrigin; - class QPushButton *btnTmpl; + class TQPushButton *btnTmpl; uint selectedTemplateIdx; // location page - class QButtonGroup *bgLocation; + class TQButtonGroup *bgLocation; class KURLRequester *urLocation; - class QLineEdit *leTemplateFileName; + class TQLineEdit *leTemplateFileName; // macro replacement page - class QCheckBox *cbRRealname, *cbRUsername, *cbREmail; - QString sFullname, sEmail/*, sUsername*/; + class TQCheckBox *cbRRealname, *cbRUsername, *cbREmail; + TQString sFullname, sEmail/*, sUsername*/; // final - class QCheckBox *cbOpenTemplate; + class TQCheckBox *cbOpenTemplate; }; class KateTemplateManager : public QWidget { Q_OBJECT public: - KateTemplateManager( KateFileTemplates *kft=0, QWidget *parent=0, const char *name=0 ); + KateTemplateManager( KateFileTemplates *kft=0, TQWidget *parent=0, const char *name=0 ); ~KateTemplateManager() {} public slots: @@ -248,9 +248,9 @@ class KateTemplateManager : public QWidget private: class KListView *lvTemplates; - class QPushButton *btnNew, *btnEdit, *btnRemove, *btnDownload, *btnUpload; + class TQPushButton *btnNew, *btnEdit, *btnRemove, *btnDownload, *btnUpload; KateFileTemplates *kft; - QPtrList<class TemplateInfo> *remove; + TQPtrList<class TemplateInfo> *remove; }; diff --git a/kate/helloworld/plugin_katehelloworld.cpp b/kate/helloworld/plugin_katehelloworld.cpp index 7499c08..3031f51 100644 --- a/kate/helloworld/plugin_katehelloworld.cpp +++ b/kate/helloworld/plugin_katehelloworld.cpp @@ -16,7 +16,7 @@ class PluginView : public KXMLGUIClient Kate::MainWindow *win; }; -KatePluginHelloWorld::KatePluginHelloWorld( QObject* parent, const char* name, const QStringList& ) +KatePluginHelloWorld::KatePluginHelloWorld( TQObject* parent, const char* name, const TQStringList& ) : Kate::Plugin ( (Kate::Application*)parent, name ) { } @@ -31,7 +31,7 @@ void KatePluginHelloWorld::addView(Kate::MainWindow *win) PluginView *view = new PluginView (); (void) new KAction ( i18n("Insert Hello World"), 0, this, - SLOT( slotInsertHello() ), view->actionCollection(), + TQT_SLOT( slotInsertHello() ), view->actionCollection(), "edit_insert_helloworld" ); view->setInstance (new KInstance("kate")); diff --git a/kate/helloworld/plugin_katehelloworld.h b/kate/helloworld/plugin_katehelloworld.h index 84b3e86..7760169 100644 --- a/kate/helloworld/plugin_katehelloworld.h +++ b/kate/helloworld/plugin_katehelloworld.h @@ -14,7 +14,7 @@ class KatePluginHelloWorld : public Kate::Plugin, Kate::PluginViewInterface Q_OBJECT public: - KatePluginHelloWorld( QObject* parent = 0, const char* name = 0, const QStringList& = QStringList() ); + KatePluginHelloWorld( TQObject* parent = 0, const char* name = 0, const TQStringList& = TQStringList() ); virtual ~KatePluginHelloWorld(); void addView (Kate::MainWindow *win); @@ -24,7 +24,7 @@ class KatePluginHelloWorld : public Kate::Plugin, Kate::PluginViewInterface void slotInsertHello(); private: - QPtrList<class PluginView> m_views; + TQPtrList<class PluginView> m_views; }; #endif diff --git a/kate/htmltools/plugin_katehtmltools.cpp b/kate/htmltools/plugin_katehtmltools.cpp index f0764f2..f66ef8e 100644 --- a/kate/htmltools/plugin_katehtmltools.cpp +++ b/kate/htmltools/plugin_katehtmltools.cpp @@ -36,7 +36,7 @@ class PluginView : public KXMLGUIClient Kate::MainWindow *win; }; -PluginKateHtmlTools::PluginKateHtmlTools( QObject* parent, const char* name, const QStringList& ) +PluginKateHtmlTools::PluginKateHtmlTools( TQObject* parent, const char* name, const TQStringList& ) : Kate::Plugin ( (Kate::Application *)parent, name ) { } @@ -51,7 +51,7 @@ void PluginKateHtmlTools::addView(Kate::MainWindow *win) PluginView *view = new PluginView (); (void) new KAction ( i18n("HT&ML Tag..."), /*"edit_HTML_tag",*/ ALT + Key_Minus, this, - SLOT( slotEditHTMLtag() ), view->actionCollection(), "edit_HTML_tag" ); + TQT_SLOT( slotEditHTMLtag() ), view->actionCollection(), "edit_HTML_tag" ); view->setInstance (new KInstance("kate")); view->setXMLFile( "plugins/katehtmltools/ui.rc" ); @@ -82,9 +82,9 @@ void PluginKateHtmlTools::slotEditHTMLtag() Kate::View *kv=application()->activeMainWindow()->viewManager()->activeView(); if (!kv) return; - QString text ( KatePrompt ( i18n("HTML Tag"), + TQString text ( KatePrompt ( i18n("HTML Tag"), i18n("Enter HTML tag contents (the <, >, and closing tag will be supplied):"), - (QWidget *)kv) + (TQWidget *)kv) ); if ( !text.isEmpty () ) @@ -93,17 +93,17 @@ void PluginKateHtmlTools::slotEditHTMLtag() } -QString PluginKateHtmlTools::KatePrompt +TQString PluginKateHtmlTools::KatePrompt ( - const QString & strTitle, - const QString & strPrompt, - QWidget * that + const TQString & strTitle, + const TQString & strPrompt, + TQWidget * that ) { // TODO: Make this a "memory edit" field with a combo box // containing prior entries - KLineEditDlg dlg(strPrompt, QString::null, that); + KLineEditDlg dlg(strPrompt, TQString::null, that); dlg.setCaption(strTitle); if (dlg.exec()) @@ -113,13 +113,13 @@ QString PluginKateHtmlTools::KatePrompt } -void PluginKateHtmlTools::slipInHTMLtag (Kate::View & view, QString text) // PCP +void PluginKateHtmlTools::slipInHTMLtag (Kate::View & view, TQString text) // PCP { // We must add a heavy elaborate HTML markup system. Not! - QStringList list = QStringList::split (' ', text); - QString marked = view.getDoc()->selection (); + TQStringList list = TQStringList::split (' ', text); + TQString marked = view.getDoc()->selection (); uint preDeleteLine = 0, preDeleteCol = 0; view.cursorPosition (&preDeleteLine, &preDeleteCol); @@ -127,8 +127,8 @@ void PluginKateHtmlTools::slipInHTMLtag (Kate::View & view, QString text) // P view.keyDelete (); uint line = 0, col = 0; view.cursorPosition (&line, &col); - QString pre ("<" + text + ">"); - QString post; + TQString pre ("<" + text + ">"); + TQString post; if (list.count () > 0) post = "</" + list[0] + ">"; view.insertText (pre + marked + post); diff --git a/kate/htmltools/plugin_katehtmltools.h b/kate/htmltools/plugin_katehtmltools.h index 8f134ce..695211c 100644 --- a/kate/htmltools/plugin_katehtmltools.h +++ b/kate/htmltools/plugin_katehtmltools.h @@ -18,7 +18,7 @@ #ifndef _PLUGIN_KANT_HTMLTOOLS_H #define _PLUGIN_KANT_HTMLTOOLS_H -#include <qstring.h> +#include <tqstring.h> #include <kate/plugin.h> #include <kate/application.h> @@ -33,18 +33,18 @@ class PluginKateHtmlTools : public Kate::Plugin, Kate::PluginViewInterface Q_OBJECT public: - PluginKateHtmlTools( QObject* parent = 0, const char* name = 0, const QStringList& = QStringList() ); + PluginKateHtmlTools( TQObject* parent = 0, const char* name = 0, const TQStringList& = TQStringList() ); virtual ~PluginKateHtmlTools(); void addView (Kate::MainWindow *win); void removeView (Kate::MainWindow *win); private: - QPtrList<class PluginView> m_views; + TQPtrList<class PluginView> m_views; - QString KatePrompt (const QString & strTitle, const QString &strPrompt, - QWidget * that); - void slipInHTMLtag (Kate::View & view, QString text); + TQString KatePrompt (const TQString & strTitle, const TQString &strPrompt, + TQWidget * that); + void slipInHTMLtag (Kate::View & view, TQString text); public slots: void slotEditHTMLtag(); diff --git a/kate/insertcommand/plugin_kateinsertcommand.cpp b/kate/insertcommand/plugin_kateinsertcommand.cpp index eadbc02..fb42c3f 100644 --- a/kate/insertcommand/plugin_kateinsertcommand.cpp +++ b/kate/insertcommand/plugin_kateinsertcommand.cpp @@ -18,17 +18,17 @@ #include "plugin_kateinsertcommand.h" #include "plugin_kateinsertcommand.moc" -#include <qbuttongroup.h> -#include <qcheckbox.h> -#include <qdir.h> -#include <qfile.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qradiobutton.h> -#include <qspinbox.h> -#include <qstringlist.h> -#include <qwhatsthis.h> -#include <qwidget.h> +#include <tqbuttongroup.h> +#include <tqcheckbox.h> +#include <tqdir.h> +#include <tqfile.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqradiobutton.h> +#include <tqspinbox.h> +#include <tqstringlist.h> +#include <tqwhatsthis.h> +#include <tqwidget.h> #include <kaction.h> #include <kanimwidget.h> @@ -57,7 +57,7 @@ class PluginView : public KXMLGUIClient //END //BEGIN PluginKateInsertCommand -PluginKateInsertCommand::PluginKateInsertCommand( QObject* parent, const char* name, const QStringList& ) +PluginKateInsertCommand::PluginKateInsertCommand( TQObject* parent, const char* name, const TQStringList& ) : Kate::Plugin ( (Kate::Application *)parent, name ), kv ( 0 ), sh ( 0 ) @@ -65,7 +65,7 @@ PluginKateInsertCommand::PluginKateInsertCommand( QObject* parent, const char* n config = new KConfig("kateinsertcommandpluginrc"); cmdhist = config->readListEntry("Command History"); wdlg = 0; - workingdir = QDir::currentDirPath(); + workingdir = TQDir::currentDirPath(); } PluginKateInsertCommand::~PluginKateInsertCommand() @@ -84,7 +84,7 @@ void PluginKateInsertCommand::addView(Kate::MainWindow *win) PluginView *view = new PluginView (); (void) new KAction ( i18n("Insert Command..."), "", 0, this, - SLOT( slotInsertCommand() ), view->actionCollection(), + TQT_SLOT( slotInsertCommand() ), view->actionCollection(), "edit_insert_command" ); view->setInstance (new KInstance("kate")); @@ -124,12 +124,12 @@ void PluginKateInsertCommand::slotInsertCommand() kv = application()->activeMainWindow()->viewManager()->activeView(); - QString dir = workingdir; - QString docdir; + TQString dir = workingdir; + TQString docdir; KURL docurl = kv->getDoc()->url(); if (docurl.isLocalFile()) docdir = docurl.directory(); - QString lwd( config->readPathEntry("Last WD") ); + TQString lwd( config->readPathEntry("Last WD") ); switch ( (int)config->readNumEntry("Start In", 0) ) { case 1: @@ -142,18 +142,18 @@ void PluginKateInsertCommand::slotInsertCommand() break; } dialogSettings = config->readNumEntry("Dialog Settings", 0); - CmdPrompt *d = new CmdPrompt((QWidget*)kv, 0, cmdhist, dir, + CmdPrompt *d = new CmdPrompt((TQWidget*)kv, 0, cmdhist, dir, docdir, dialogSettings); if ( d->exec() && ! d->command().isEmpty() ) { if ( ! sh ) { sh = new KShellProcess; - connect ( sh, SIGNAL(receivedStdout(KProcess*, char*, int)), - this, SLOT(slotReceivedStdout(KProcess*, char*, int)) ); - connect ( sh, SIGNAL(receivedStderr(KProcess*, char*, int)), - this, SLOT(slotReceivedStderr(KProcess*, char*, int)) ); - connect ( sh, SIGNAL(processExited(KProcess*)), - this, SLOT(slotProcessExited(KProcess*)) ) ; + connect ( sh, TQT_SIGNAL(receivedStdout(KProcess*, char*, int)), + this, TQT_SLOT(slotReceivedStdout(KProcess*, char*, int)) ); + connect ( sh, TQT_SIGNAL(receivedStderr(KProcess*, char*, int)), + this, TQT_SLOT(slotReceivedStderr(KProcess*, char*, int)) ); + connect ( sh, TQT_SIGNAL(processExited(KProcess*)), + this, TQT_SLOT(slotProcessExited(KProcess*)) ) ; } sh->clearArguments(); @@ -169,7 +169,7 @@ void PluginKateInsertCommand::slotInsertCommand() *sh << "cd" << d->wd() << "&&"; config->writePathEntry("Last WD", d->wd()); } - *sh << QFile::encodeName(d->command()); + *sh << TQFile::encodeName(d->command()); sh->start( KProcess::NotifyOnExit, KProcess::All ); // add command to history @@ -207,9 +207,9 @@ void PluginKateInsertCommand::slotAbort() void PluginKateInsertCommand::slotShowWaitDlg() { if ( sh->isRunning() ) { - wdlg = new WaitDlg( (QWidget*)kv, i18n( + wdlg = new WaitDlg( (TQWidget*)kv, i18n( "Executing command:\n%1\n\nPress 'Cancel' to abort.").arg(cmd) ); - connect(wdlg, SIGNAL(cancelClicked()), this, SLOT(slotAbort()) ); + connect(wdlg, TQT_SIGNAL(cancelClicked()), this, TQT_SLOT(slotAbort()) ); } if ( sh->isRunning() ) // we may have finished while creating the dialog. wdlg->show(); @@ -222,7 +222,7 @@ void PluginKateInsertCommand::slotShowWaitDlg() void PluginKateInsertCommand::slotReceivedStdout( KProcess* /*p*/, char* text, int len ) { - QString t = QString::fromLocal8Bit ( text ); + TQString t = TQString::fromLocal8Bit ( text ); t.truncate(len); kv->insertText( t ); } @@ -250,12 +250,12 @@ void PluginKateInsertCommand::slotProcessExited( KProcess* p ) //BEGIN PluginConfigPage Kate::PluginConfigPage* PluginKateInsertCommand::configPage (uint, - QWidget *w, const char */*name*/) + TQWidget *w, const char */*name*/) { InsertCommandConfigPage* p = new InsertCommandConfigPage(this, w); initConfigPage( p ); - connect( p, SIGNAL(configPageApplyRequest(InsertCommandConfigPage*)), - this, SLOT(applyConfig(InsertCommandConfigPage*)) ); + connect( p, TQT_SIGNAL(configPageApplyRequest(InsertCommandConfigPage*)), + this, TQT_SLOT(applyConfig(InsertCommandConfigPage*)) ); return (Kate::PluginConfigPage*)p; } @@ -277,20 +277,20 @@ void PluginKateInsertCommand::applyConfig( InsertCommandConfigPage *p ) //BEGIN CmdPrompt // This is a simple dialog to retrieve a command and decide if // stdErr should be included in the text inserted. -CmdPrompt::CmdPrompt(QWidget* parent, +CmdPrompt::CmdPrompt(TQWidget* parent, const char* name, - const QStringList& cmdhist, - const QString& dir, - const QString& /*docdir*/, + const TQStringList& cmdhist, + const TQString& dir, + const TQString& /*docdir*/, int settings) : KDialogBase (parent, name, true, i18n("Insert Command"), Ok|Cancel, Ok, true) { - QWidget *page = new QWidget( this ); + TQWidget *page = new TQWidget( this ); setMainWidget(page); - QVBoxLayout *lo = new QVBoxLayout( page, 0, spacingHint() ); + TQVBoxLayout *lo = new TQVBoxLayout( page, 0, spacingHint() ); - QLabel *l = new QLabel( i18n("Enter &command:"), page ); + TQLabel *l = new TQLabel( i18n("Enter &command:"), page ); lo->addWidget( l ); cmb_cmd = new KHistoryCombo(true, page); cmb_cmd->setHistoryItems(cmdhist, true); @@ -299,10 +299,10 @@ CmdPrompt::CmdPrompt(QWidget* parent, l->setBuddy(cmb_cmd); cmb_cmd->setFocus(); lo->addWidget(cmb_cmd); - connect( cmb_cmd->lineEdit(),SIGNAL(textChanged ( const QString & )), - this, SLOT( slotTextChanged(const QString &))); + connect( cmb_cmd->lineEdit(),TQT_SIGNAL(textChanged ( const TQString & )), + this, TQT_SLOT( slotTextChanged(const TQString &))); - QLabel *lwd = new QLabel( i18n("Choose &working folder:"), page ); + TQLabel *lwd = new TQLabel( i18n("Choose &working folder:"), page ); lo->addWidget( lwd ); wdreq = new KURLRequester( page ); if ( ! dir.isEmpty() ) @@ -312,23 +312,23 @@ CmdPrompt::CmdPrompt(QWidget* parent, lo->addWidget( wdreq ); //kdDebug()<<"settings: "<<settings<<endl; - cb_insStdErr = new QCheckBox( i18n("Insert Std&Err messages"), page ); + cb_insStdErr = new TQCheckBox( i18n("Insert Std&Err messages"), page ); cb_insStdErr->setChecked(settings & 1); lo->addWidget( cb_insStdErr ); - cb_printCmd = new QCheckBox( i18n("&Print command name"), page ); + cb_printCmd = new TQCheckBox( i18n("&Print command name"), page ); cb_printCmd->setChecked(settings & 2); lo->addWidget( cb_printCmd ); - QWhatsThis::add( cmb_cmd, i18n( + TQWhatsThis::add( cmb_cmd, i18n( "Enter the shell command, the output of which you want inserted into your " "document. Feel free to use a pipe or two if you wish.") ); - QWhatsThis::add( wdreq, i18n( + TQWhatsThis::add( wdreq, i18n( "Sets the working folder of the command. The command executed is 'cd <dir> " "&& <command>'") ); - QWhatsThis::add( cb_insStdErr, i18n( + TQWhatsThis::add( cb_insStdErr, i18n( "Check this if you want the error output from <command> inserted as well.\n" "Some commands, such as locate, print everything to STDERR") ); - QWhatsThis::add( cb_printCmd, i18n( + TQWhatsThis::add( cb_printCmd, i18n( "If you check this, the command string will be printed followed by a " "newline before the output.") ); slotTextChanged(cmb_cmd->lineEdit()->text()); @@ -336,7 +336,7 @@ CmdPrompt::CmdPrompt(QWidget* parent, CmdPrompt::~CmdPrompt() {} -void CmdPrompt::slotTextChanged(const QString &text) +void CmdPrompt::slotTextChanged(const TQString &text) { enableButtonOK( !text.isEmpty()); } @@ -345,16 +345,16 @@ void CmdPrompt::slotTextChanged(const QString &text) //BEGIN WaitDlg implementation // This is a dialog that is displayed while a command is running, // with a cancel button to allow the user to kill the command -WaitDlg::WaitDlg(QWidget* parent, const QString& text, const QString& title) +WaitDlg::WaitDlg(TQWidget* parent, const TQString& text, const TQString& title) : KDialogBase( parent, "wait dialog", true, title, Cancel, Cancel, true ) { - QWidget *page = new QWidget( this ); + TQWidget *page = new TQWidget( this ); setMainWidget( page ); - QHBoxLayout *lo = new QHBoxLayout( page, 0, spacingHint() ); + TQHBoxLayout *lo = new TQHBoxLayout( page, 0, spacingHint() ); - KAnimWidget *aw = new KAnimWidget( QString::fromLatin1("kde"), 48, page ); + KAnimWidget *aw = new KAnimWidget( TQString::fromLatin1("kde"), 48, page ); lo->addWidget(aw); - QLabel *l = new QLabel( text, page ); + TQLabel *l = new TQLabel( text, page ); lo->addWidget( l ); aw->start(); @@ -366,40 +366,40 @@ WaitDlg::~WaitDlg() //BEGIN InsertCommandConfigPage // This is the config page for this plugin. -InsertCommandConfigPage::InsertCommandConfigPage(QObject* /*parent*/, - QWidget *parentWidget) +InsertCommandConfigPage::InsertCommandConfigPage(TQObject* /*parent*/, + TQWidget *parentWidget) : Kate::PluginConfigPage( parentWidget ) { - QVBoxLayout* lo = new QVBoxLayout( this ); + TQVBoxLayout* lo = new TQVBoxLayout( this ); lo->setSpacing(KDialogBase::spacingHint()); // command history length - QHBox *hb1 = new QHBox( this ); + TQHBox *hb1 = new TQHBox( this ); hb1->setSpacing(KDialogBase::spacingHint()); - (void) new QLabel( i18n("Remember"), hb1 ); - sb_cmdhistlen = new QSpinBox( hb1 ); - QLabel *l1 = new QLabel( sb_cmdhistlen, i18n("Co&mmands"), hb1); + (void) new TQLabel( i18n("Remember"), hb1 ); + sb_cmdhistlen = new TQSpinBox( hb1 ); + TQLabel *l1 = new TQLabel( sb_cmdhistlen, i18n("Co&mmands"), hb1); hb1->setStretchFactor(l1, 1); lo->addWidget( hb1 ); // dir history length // initial dir choice - rg_startin = new QButtonGroup( 1, Qt::Horizontal, i18n("Start In"), this ); + rg_startin = new TQButtonGroup( 1, Qt::Horizontal, i18n("Start In"), this ); rg_startin->setRadioButtonExclusive( true ); - (void) new QRadioButton( i18n("Application &working folder"), rg_startin); - (void) new QRadioButton( i18n("&Document folder"), rg_startin); - (void) new QRadioButton( i18n("&Latest used working folder"), rg_startin); + (void) new TQRadioButton( i18n("Application &working folder"), rg_startin); + (void) new TQRadioButton( i18n("&Document folder"), rg_startin); + (void) new TQRadioButton( i18n("&Latest used working folder"), rg_startin); lo->addWidget( rg_startin ); // other? lo->addStretch(1); // look nice // Be helpfull! - QWhatsThis::add( sb_cmdhistlen, i18n( + TQWhatsThis::add( sb_cmdhistlen, i18n( "Sets the number of commands to remember. The command history is saved " "over sessions.") ); - QWhatsThis::add( rg_startin, i18n( + TQWhatsThis::add( rg_startin, i18n( "<qt><p>Decides what is suggested as <em>working folder</em> for the " "command.</p><p><strong>Application Working Folder (default):</strong> " "The folder from which you launched the application hosting the plugin, " diff --git a/kate/insertcommand/plugin_kateinsertcommand.h b/kate/insertcommand/plugin_kateinsertcommand.h index c948b38..aa0f904 100644 --- a/kate/insertcommand/plugin_kateinsertcommand.h +++ b/kate/insertcommand/plugin_kateinsertcommand.h @@ -33,7 +33,7 @@ #include <klibloader.h> #include <klocale.h> #include <kurlrequester.h> -#include <qcheckbox.h> +#include <tqcheckbox.h> class InsertCommandConfigPage; @@ -57,7 +57,7 @@ class PluginKateInsertCommand : public Kate::Plugin, Q_OBJECT public: - PluginKateInsertCommand( QObject* parent = 0, const char* name = 0, const QStringList& = QStringList() ); + PluginKateInsertCommand( TQObject* parent = 0, const char* name = 0, const TQStringList& = TQStringList() ); virtual ~PluginKateInsertCommand(); void addView (Kate::MainWindow *win); @@ -66,14 +66,14 @@ class PluginKateInsertCommand : public Kate::Plugin, Kate::View *kv; WaitDlg *wdlg; - QPtrList<class PluginView> m_views; + TQPtrList<class PluginView> m_views; uint configPages () const { return 1; } - Kate::PluginConfigPage *configPage (uint , QWidget *w, const char *name=0); - QString configPageName(uint) const { return i18n("Insert Command"); } - QString configPageFullName(uint) const { + Kate::PluginConfigPage *configPage (uint , TQWidget *w, const char *name=0); + TQString configPageName(uint) const { return i18n("Insert Command"); } + TQString configPageFullName(uint) const { return i18n("Configure Insert Command Plugin"); } - QPixmap configPagePixmap (uint /*number = 0*/, + TQPixmap configPagePixmap (uint /*number = 0*/, int /*size = KIcon::SizeSmall*/) const { return 0L; } @@ -81,9 +81,9 @@ class PluginKateInsertCommand : public Kate::Plugin, void initConfigPage( InsertCommandConfigPage* ); KShellProcess *sh; - QString workingdir; - QString cmd; - QStringList cmdhist; + TQString workingdir; + TQString cmd; + TQStringList cmdhist; bool bInsStdErr; int dialogSettings; KConfig *config; @@ -104,35 +104,35 @@ class CmdPrompt : public KDialogBase { Q_OBJECT public: - CmdPrompt(QWidget* parent=0, + CmdPrompt(TQWidget* parent=0, const char* name=0, - const QStringList& cmdhist=QStringList(), - const QString& dir=QString::null, - const QString& docdir=QString::null, + const TQStringList& cmdhist=TQStringList(), + const TQString& dir=TQString::null, + const TQString& docdir=TQString::null, int settings=0); ~CmdPrompt(); - QString command()const { return cmb_cmd->currentText(); } + TQString command()const { return cmb_cmd->currentText(); } bool insertStdErr()const { return cb_insStdErr->isChecked(); } bool printCmd()const { return cb_printCmd->isChecked(); } - QString wd()const { return wdreq->url(); } + TQString wd()const { return wdreq->url(); } private slots: - void slotTextChanged(const QString &text); + void slotTextChanged(const TQString &text); private: KHistoryCombo *cmb_cmd; KURLRequester *wdreq; - QCheckBox *cb_insStdErr; - QCheckBox *cb_printCmd; + TQCheckBox *cb_insStdErr; + TQCheckBox *cb_printCmd; }; class WaitDlg : public KDialogBase { public: - WaitDlg(QWidget* parent, - const QString& text=QString::null, - const QString& title=i18n("Please Wait")); + WaitDlg(TQWidget* parent, + const TQString& text=TQString::null, + const TQString& title=i18n("Please Wait")); ~WaitDlg(); }; @@ -143,7 +143,7 @@ class InsertCommandConfigPage : public Kate::PluginConfigPage friend class PluginKateInsertCommand; public: - InsertCommandConfigPage(QObject* parent = 0L, QWidget *parentWidget = 0L); + InsertCommandConfigPage(TQObject* parent = 0L, TQWidget *parentWidget = 0L); ~InsertCommandConfigPage() {} /** Reimplemented from Kate::PluginConfigPage @@ -161,9 +161,9 @@ class InsertCommandConfigPage : public Kate::PluginConfigPage void configPageInitRequest( InsertCommandConfigPage* ); protected: - QSpinBox *sb_cmdhistlen; - //QCheckBox *cb_startindocdir; - QButtonGroup *rg_startin; + TQSpinBox *sb_cmdhistlen; + //TQCheckBox *cb_startindocdir; + TQButtonGroup *rg_startin; }; #endif // _PLUGIN_KATE_INSERT_COMMAND_H_ diff --git a/kate/kjswrapper/bindings.cpp b/kate/kjswrapper/bindings.cpp index fcb8d38..1bb56eb 100644 --- a/kate/kjswrapper/bindings.cpp +++ b/kate/kjswrapper/bindings.cpp @@ -1,7 +1,7 @@ #include "bindings.h" #include "bindings.moc" #include "plugin_katekjswrapper.h" -#include <qstringlist.h> +#include <tqstringlist.h> #include <kdebug.h> #include <kate/documentmanager.h> #include <kate/document.h> @@ -17,7 +17,7 @@ using namespace Kate::JS; -Bindings::Bindings(QObject *parent): KJSEmbed::Bindings::JSBindingPlugin(parent,"KateAppBindings",QStringList()) { +Bindings::Bindings(TQObject *parent): KJSEmbed::Bindings::JSBindingPlugin(parent,"KateAppBindings",TQStringList()) { } Bindings::~Bindings() { @@ -86,30 +86,30 @@ DocumentManager::~DocumentManager() { } KJS::Value DocumentManager::call( KJS::ExecState *exec, KJS::Object &self, const KJS::List &args ) { - QObject *o=m_proxy->object(); + TQObject *o=m_proxy->object(); Kate::DocumentManager *dm=dynamic_cast<Kate::DocumentManager*>(o); if (!dm) { kdWarning()<<"Object died"<<endl; - QString msg = i18n("Call of DocumentManager member on destroyed object"); + TQString msg = i18n("Call of DocumentManager member on destroyed object"); KJS::Object err = KJS::Error::create( exec, KJS::GeneralError, msg.utf8() ); exec->setException( err ); return KJS::Undefined(); } - QString mdesc; + TQString mdesc; switch (m_id) { case Document: { mdesc="document(int)"; if (args.size()!=1) break; uint index=args[0].toUInt32(exec); if (exec->hadException()) break; - QObject *doc=dynamic_cast<QObject*>(dm->document(index)); + TQObject *doc=dynamic_cast<TQObject*>(dm->document(index)); if (!doc) return KJS::Null(); return m_dict->jsObject(exec,doc,m_proxy); } break; case ActiveDocument: { mdesc="activeDocument()"; if (args.size()!=0) break; - QObject *doc=dynamic_cast<QObject*>(dm->activeDocument()); + TQObject *doc=dynamic_cast<TQObject*>(dm->activeDocument()); if (!doc) return KJS::Null(); return m_dict->jsObject(exec,doc,m_proxy); } break; @@ -118,21 +118,21 @@ KJS::Value DocumentManager::call( KJS::ExecState *exec, KJS::Object &self, const if (args.size()!=1) break; uint id=args[0].toUInt32(exec); if (exec->hadException()) break; - QObject *doc=dynamic_cast<QObject*>(dm->documentWithID(id)); + TQObject *doc=dynamic_cast<TQObject*>(dm->documentWithID(id)); if (!doc) return KJS::Null(); return m_dict->jsObject(exec,doc,m_proxy); } break; case FindDocument: { mdesc="documentForURL(KURL)"; if (args.size()!=1) break; - KURL url = QString( args[0].toString(exec).qstring() ); + KURL url = TQString( args[0].toString(exec).qstring() ); if (exec->hadException()) break; return KJS::Number(dm->findDocument(url)); } break; case IsOpen: { mdesc="isOpen(KURL)"; if (args.size()!=0) break; - KURL url = QString( args[0].toString(exec).qstring() ); + KURL url = TQString( args[0].toString(exec).qstring() ); if (exec->hadException()) break; return KJS::Boolean(dm->isOpen(url));} @@ -141,14 +141,14 @@ KJS::Value DocumentManager::call( KJS::ExecState *exec, KJS::Object &self, const mdesc="openURL(KURL[,String encoding])"; uint docID; if (args.size()==1) { - KURL url = QString( args[0].toString(exec).qstring() ); + KURL url = TQString( args[0].toString(exec).qstring() ); if (exec->hadException()) break; - (void)dm->openURL(url,QString::null,&docID); + (void)dm->openURL(url,TQString::null,&docID); return KJS::Number(docID); } else if (args.size()==2) { - KURL url = QString( args[0].toString(exec).qstring() ); + KURL url = TQString( args[0].toString(exec).qstring() ); if (exec->hadException()) break; - QString encoding=QString( args[1].toString(exec).qstring() ); + TQString encoding=TQString( args[1].toString(exec).qstring() ); (void)dm->openURL(url,encoding,&docID); return KJS::Number(docID); } @@ -164,7 +164,7 @@ KJS::Value DocumentManager::call( KJS::ExecState *exec, KJS::Object &self, const if (args.size()!=1) break; KJSEmbed::JSObjectProxy *proxy = KJSEmbed::JSProxy::toObjectProxy( args[0].imp() ); if (!proxy) break; - QObject *tmp=proxy->object(); + TQObject *tmp=proxy->object(); Kate::Document *tmpdoc=dynamic_cast<Kate::Document*>(tmp); if (!tmpdoc) break; return KJS::Boolean(dm->closeDocument(tmpdoc)); } @@ -178,7 +178,7 @@ KJS::Value DocumentManager::call( KJS::ExecState *exec, KJS::Object &self, const kdDebug()<<"calling illegal method of DocumentManager"<<endl; return KJS::Null(); } - QString msg = i18n("Method %1 called with wrong signature").arg(mdesc); + TQString msg = i18n("Method %1 called with wrong signature").arg(mdesc); KJS::Object err = KJS::Error::create( exec, KJS::GeneralError, msg.utf8() ); exec->setException( err ); return KJS::Undefined(); @@ -194,7 +194,7 @@ Kate::JS::Management::Management(KJS::ExecState *exec, int id, PluginKateKJSWrap KJS::Value Kate::JS::Management::call( KJS::ExecState *exec, KJS::Object &self, const KJS::List &args ) { if (m_id==AddConfigPage) { if (args.size()!=1) { - QString msg = i18n("One parameter expected"); + TQString msg = i18n("One parameter expected"); KJS::Object err = KJS::Error::create( exec, KJS::GeneralError, msg.utf8() ); exec->setException( err ); return KJS::Undefined(); @@ -204,7 +204,7 @@ KJS::Value Kate::JS::Management::call( KJS::ExecState *exec, KJS::Object &self, #warning implement me } else if (m_id==SetConfigPages) { if (args.size()>1) { - QString msg=i18n("One or no parameter expected"); + TQString msg=i18n("One or no parameter expected"); KJS::Object err = KJS::Error::create( exec, KJS::GeneralError, msg.utf8() ); exec->setException( err ); return KJS::Undefined(); @@ -212,7 +212,7 @@ KJS::Value Kate::JS::Management::call( KJS::ExecState *exec, KJS::Object &self, m_wrapper->m_configPageFactories=(args.size()>0)?args[0]:KJS::Value(); } else if (m_id==SetWindowConfiguration) { if (args.size()>3) { - QString msg = i18n("A maximum of three parameters expected"); + TQString msg = i18n("A maximum of three parameters expected"); KJS::Object err = KJS::Error::create( exec, KJS::GeneralError, msg.utf8() ); exec->setException( err ); return KJS::Undefined(); @@ -273,16 +273,16 @@ Kate::JS::Application::~Application() { } KJS::Value Kate::JS::Application::call( KJS::ExecState *exec, KJS::Object &self, const KJS::List &args ) { - QObject *o=m_proxy->object(); + TQObject *o=m_proxy->object(); Kate::Application *ka=dynamic_cast<Kate::Application*>(o); if (!ka) { kdWarning()<<"Object died"<<endl; - QString msg = i18n("Call of KATE member on destroyed object"); + TQString msg = i18n("Call of KATE member on destroyed object"); KJS::Object err = KJS::Error::create( exec, KJS::GeneralError, msg.utf8() ); exec->setException( err ); return KJS::Undefined(); } - QString mdesc; + TQString mdesc; switch (m_id) { case WindowCount: { mdesc="windowCount()"; @@ -310,7 +310,7 @@ KJS::Value Kate::JS::Application::call( KJS::ExecState *exec, KJS::Object &self, } - QString msg = i18n("Method %1 called with wrong signature").arg(mdesc); + TQString msg = i18n("Method %1 called with wrong signature").arg(mdesc); KJS::Object err = KJS::Error::create( exec, KJS::GeneralError, msg.utf8() ); exec->setException( err ); return KJS::Undefined(); @@ -373,7 +373,7 @@ KJS::Value Kate::JS::General::fieldz(KJS::ExecState *exec, KJS::Object &obj, con } -Kate::JS::RefCountedObjectDict::RefCountedObjectDict(int size): QObject(), QPtrDict<ObjectEntry>(size) { +Kate::JS::RefCountedObjectDict::RefCountedObjectDict(int size): TQObject(), TQPtrDict<ObjectEntry>(size) { m_usageCount=0; setAutoDelete(true); } @@ -389,12 +389,12 @@ void Kate::JS::RefCountedObjectDict::decRef() { } -KJS::Object Kate::JS::RefCountedObjectDict::jsObject(KJS::ExecState *exec, QObject *obj, KJSEmbed::JSObjectProxy *proxy) { +KJS::Object Kate::JS::RefCountedObjectDict::jsObject(KJS::ExecState *exec, TQObject *obj, KJSEmbed::JSObjectProxy *proxy) { ObjectEntry *oe=find(obj); if (oe==0) { oe=new ObjectEntry; oe->obj=proxy->part()->factory()->createProxy(exec,obj,proxy); - connect(obj,SIGNAL(destroyed()),this,SLOT(removeSender())); + connect(obj,TQT_SIGNAL(destroyed()),this,TQT_SLOT(removeSender())); insert(obj,oe); return oe->obj; } else return oe->obj; @@ -438,16 +438,16 @@ Kate::JS::MainWindow::~MainWindow() { } KJS::Value Kate::JS::MainWindow::call( KJS::ExecState *exec, KJS::Object &self, const KJS::List &args ) { - QObject *o=m_proxy->object(); + TQObject *o=m_proxy->object(); Kate::MainWindow *mw=dynamic_cast<Kate::MainWindow*>(o); if (!mw) { kdWarning()<<"Object died"<<endl; - QString msg = i18n("Call of MainWindow member on destroyed object"); + TQString msg = i18n("Call of MainWindow member on destroyed object"); KJS::Object err = KJS::Error::create( exec, KJS::GeneralError, msg.utf8() ); exec->setException( err ); return KJS::Undefined(); } - QString mdesc; + TQString mdesc; switch (m_id) { case ActionCollection: { mdesc="actionCollection()"; @@ -458,7 +458,7 @@ KJS::Value Kate::JS::MainWindow::call( KJS::ExecState *exec, KJS::Object &self, default: return KJS::Undefined(); } - QString msg = i18n("Method %1 called with wrong signature").arg(mdesc); + TQString msg = i18n("Method %1 called with wrong signature").arg(mdesc); KJS::Object err = KJS::Error::create( exec, KJS::GeneralError, msg.utf8() ); exec->setException( err ); return KJS::Undefined(); diff --git a/kate/kjswrapper/bindings.h b/kate/kjswrapper/bindings.h index 2e98ee8..f33418f 100644 --- a/kate/kjswrapper/bindings.h +++ b/kate/kjswrapper/bindings.h @@ -5,7 +5,7 @@ #include <kjsembed/jsproxy_imp.h> #include <kjsembed/jsobjectproxy.h> #include <kjsembed/jsfactory.h> -#include <qptrdict.h> +#include <tqptrdict.h> class PluginKateKJSWrapper; @@ -17,13 +17,13 @@ namespace Kate { KJS::Object obj; }; - class RefCountedObjectDict: public QObject, public QPtrDict<ObjectEntry> { + class RefCountedObjectDict: public TQObject, public TQPtrDict<ObjectEntry> { Q_OBJECT public: RefCountedObjectDict(int size); void incRef(); void decRef(); - KJS::Object jsObject(KJS::ExecState *exec, QObject *obj, KJSEmbed::JSObjectProxy *proxy); + KJS::Object jsObject(KJS::ExecState *exec, TQObject *obj, KJSEmbed::JSObjectProxy *proxy); public slots: void removeSender(); private: @@ -33,7 +33,7 @@ namespace Kate { class Bindings: public KJSEmbed::Bindings::JSBindingPlugin { public: - Bindings(QObject *parent); + Bindings(TQObject *parent); virtual ~Bindings(); KJS::Object createBinding(KJSEmbed::KJSEmbedPart *jspart, KJS::ExecState *exec, const KJS::List &args) const; void addBindings(KJS::ExecState *exec, KJS::Object &target) const; 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); diff --git a/kate/kjswrapper/plugin_katekjswrapper.h b/kate/kjswrapper/plugin_katekjswrapper.h index f04043e..9256b4c 100644 --- a/kate/kjswrapper/plugin_katekjswrapper.h +++ b/kate/kjswrapper/plugin_katekjswrapper.h @@ -34,15 +34,15 @@ #include <klibloader.h> #include <klocale.h> #include <kurlrequester.h> -#include <qcheckbox.h> -#include <qvaluelist.h> +#include <tqcheckbox.h> +#include <tqvaluelist.h> #include <kjs/value.h> #include <kjs/object.h> -#include <qvbox.h> -#include <qptrdict.h> +#include <tqvbox.h> +#include <tqptrdict.h> #include <kxmlguiclient.h> -#include <qvaluelist.h> -#include <qguardedptr.h> +#include <tqvaluelist.h> +#include <tqguardedptr.h> namespace Kate { class PluginConfigPage; @@ -75,7 +75,7 @@ class PluginKateKJSWrapper : public Kate::Plugin, Q_OBJECT public: - PluginKateKJSWrapper( QObject* parent = 0, const char* name = 0, const QStringList& = QStringList() ); + PluginKateKJSWrapper( TQObject* parent = 0, const char* name = 0, const TQStringList& = TQStringList() ); virtual ~PluginKateKJSWrapper(); void addView (Kate::MainWindow *win); @@ -84,12 +84,12 @@ class PluginKateKJSWrapper : public Kate::Plugin, Kate::View *kv; - QPtrDict<class PluginKateKJSWrapperView> m_views; + TQPtrDict<class PluginKateKJSWrapperView> m_views; uint configPages () const; - Kate::PluginConfigPage *configPage (uint , QWidget *w, const char *name=0); - QString configPageName(uint) const; - QString configPageFullName(uint) const; - QPixmap configPagePixmap (uint /*number = 0*/, + Kate::PluginConfigPage *configPage (uint , TQWidget *w, const char *name=0); + TQString configPageName(uint) const; + TQString configPageFullName(uint) const; + TQPixmap configPagePixmap (uint /*number = 0*/, int /*size = KIcon::SizeSmall*/) const; PluginKateKJSWrapperView *getViewObject(Kate::MainWindow *win); @@ -104,12 +104,12 @@ class PluginKateKJSWrapper : public Kate::Plugin, friend class KateKJSWrapperConfigPage; KJSEmbed::KJSEmbedPart *m_part; Kate::JS::Bindings *m_kateAppBindings; - //QValueList<KJS::Value> m_configPageFactories; + //TQValueList<KJS::Value> m_configPageFactories; KJS::Value m_configPageFactories; KJS::Value m_toolViewConstructors; KJS::Value m_newWindowHandler; KJS::Value m_removeWindowHandler; - QString m_scriptname; + TQString m_scriptname; }; @@ -120,7 +120,7 @@ class KateKJSWrapperConfigPage : public Kate::PluginConfigPage friend class PluginKateKJSWrapper; public: - KateKJSWrapperConfigPage(KJS::Object pageConstructor,PluginKateKJSWrapper* parent = 0L, QWidget *parentWidget = 0L); + KateKJSWrapperConfigPage(KJS::Object pageConstructor,PluginKateKJSWrapper* parent = 0L, TQWidget *parentWidget = 0L); ~KateKJSWrapperConfigPage() {}; /** Reimplemented from Kate::PluginConfigPage @@ -157,14 +157,14 @@ class PluginKateKJSWrapperView : public KXMLGUIClient Kate::MainWindow *win; KJS::Object winObj; KJS::Object actionCollectionObj; - QValueList<QGuardedPtr<KMDI::ToolViewAccessor> > toolviews; + TQValueList<TQGuardedPtr<KMDI::ToolViewAccessor> > toolviews; }; namespace Kate { namespace JS { - class ToolView: public QVBox { + class ToolView: public TQVBox { Q_OBJECT public: ToolView(KJS::Object constr, KJS::ExecState *exec, KJSEmbed::JSFactory *factory, KJS::List parameters, const char * name); diff --git a/kate/kpybrowser/kpybrowser.cpp b/kate/kpybrowser/kpybrowser.cpp index 9023e65..183e1e7 100644 --- a/kate/kpybrowser/kpybrowser.cpp +++ b/kate/kpybrowser/kpybrowser.cpp @@ -16,10 +16,10 @@ ***************************************************************************/ #include "kpybrowser.h" -#include <qheader.h> +#include <tqheader.h> #include <kmessagebox.h> #include <klocale.h> -#include <qregexp.h> +#include <tqregexp.h> #include "kpybrowser.moc" @@ -165,7 +165,7 @@ static const char *container_xpm[] = { }; void -getOpenNodes (QValueList < QString > *open_nodes, PyBrowseNode * node) +getOpenNodes (TQValueList < TQString > *open_nodes, PyBrowseNode * node) { if (node == NULL) return; @@ -181,23 +181,23 @@ getOpenNodes (QValueList < QString > *open_nodes, PyBrowseNode * node) } -KPyBrowser::KPyBrowser (QWidget * parent, const char *name): +KPyBrowser::KPyBrowser (TQWidget * parent, const char *name): KListView (parent, name) { addColumn(i18n("Name")); header ()->hide (); class_root = - new PyBrowseNode (this, QString ("Classes"), i18n("Classes"), + new PyBrowseNode (this, TQString ("Classes"), i18n("Classes"), PYOTHER); - class_root->setPixmap (0, QPixmap (container_xpm)); + class_root->setPixmap (0, TQPixmap (container_xpm)); function_root = - new PyBrowseNode (this, QString ("Globals"), i18n("Globals"), + new PyBrowseNode (this, TQString ("Globals"), i18n("Globals"), PYOTHER); - function_root->setPixmap (0, QPixmap (container_xpm)); + function_root->setPixmap (0, TQPixmap (container_xpm)); setRootIsDecorated (1); - connect (this, SIGNAL (executed (QListViewItem *)), this, - SLOT (nodeSelected (QListViewItem *))); + connect (this, TQT_SIGNAL (executed (TQListViewItem *)), this, + TQT_SLOT (nodeSelected (TQListViewItem *))); setTooltipColumn (1); setShowToolTips (1); tooltip = new KPBToolTip (this); @@ -208,7 +208,7 @@ KPyBrowser::~KPyBrowser () } void -KPyBrowser::nodeSelected (QListViewItem * node) +KPyBrowser::nodeSelected (TQListViewItem * node) { PyBrowseNode *browse_node = dynamic_cast < PyBrowseNode * >(node); @@ -217,41 +217,41 @@ KPyBrowser::nodeSelected (QListViewItem * node) return; } - QString method_name; + TQString method_name; int line_no; line_no = browse_node->getLine(); method_name = browse_node->getName(); if (browse_node->getType () == PYCLASS) { - method_name = QString ("class ") + browse_node->getName (); + method_name = TQString ("class ") + browse_node->getName (); } else if (browse_node->getType () == PYMETHOD || browse_node->getType () == PYFUNCTION) { - method_name = QString ("def ") + browse_node->getName (); + method_name = TQString ("def ") + browse_node->getName (); } emit selected(method_name, line_no); } void -KPyBrowser::parseText (QString & pytext) +KPyBrowser::parseText (TQString & pytext) { - QRegExp class_rx (QString ("^class [a-zA-Z0-9_,\\s\\(\\).]+:")); - QRegExp function_rx (QString ("^def [a-zA-Z_]+[^#]*:")); - QRegExp method_rx (QString ("[\\s]+def [a-zA-Z_]+[^#]*:")); + TQRegExp class_rx (TQString ("^class [a-zA-Z0-9_,\\s\\(\\).]+:")); + TQRegExp function_rx (TQString ("^def [a-zA-Z_]+[^#]*:")); + TQRegExp method_rx (TQString ("[\\s]+def [a-zA-Z_]+[^#]*:")); int paren_i; - QStringList lines = QStringList::split ("\n", pytext, TRUE); - QStringList::Iterator iter; - QString *line; - QString class_name, method_name, function_name, class_sig, method_sig, + TQStringList lines = TQStringList::split ("\n", pytext, TRUE); + TQStringList::Iterator iter; + TQString *line; + TQString class_name, method_name, function_name, class_sig, method_sig, function_sig; PyBrowseNode *last_class_node = NULL; PyBrowseNode *last_method_node = NULL; PyBrowseNode *last_function_node = NULL; - QValueList < QString > open_nodes; + TQValueList < TQString > open_nodes; getOpenNodes (&open_nodes, class_root); getOpenNodes (&open_nodes, function_root); @@ -267,13 +267,13 @@ KPyBrowser::parseText (QString & pytext) delete function_root; } class_root = - new PyBrowseNode (this, QString ("Classes"), i18n("Classes"), + new PyBrowseNode (this, TQString ("Classes"), i18n("Classes"), PYOTHER); - class_root->setPixmap (0, QPixmap (container_xpm)); + class_root->setPixmap (0, TQPixmap (container_xpm)); function_root = - new PyBrowseNode (this, QString ("Globals"), i18n("Globals"), + new PyBrowseNode (this, TQString ("Globals"), i18n("Globals"), PYOTHER); - function_root->setPixmap (0, QPixmap (container_xpm)); + function_root->setPixmap (0, TQPixmap (container_xpm)); node_dict.insert (class_root->getQualifiedName (), class_root); node_dict.insert (function_root->getQualifiedName (), function_root); @@ -286,7 +286,7 @@ KPyBrowser::parseText (QString & pytext) line = &(*iter); if (class_rx.search(*line) >= 0) { - //KMessageBox::information(this, *line, QString("Found class on line %1").arg(line_no)); + //KMessageBox::information(this, *line, TQString("Found class on line %1").arg(line_no)); //strip out the beginning class and ending colon class_sig = line->stripWhiteSpace ().mid (6); class_sig = class_sig.left (class_sig.length () - 1); @@ -318,7 +318,7 @@ KPyBrowser::parseText (QString & pytext) } if ((function_rx.search(*line) >= 0)) { - //KMessageBox::information(this, *line, QString("Found function on line %1").arg(line_no)); + //KMessageBox::information(this, *line, TQString("Found function on line %1").arg(line_no)); function_sig = line->stripWhiteSpace ().mid (4); function_sig = function_sig.left (function_sig.find (":")); paren_i = function_sig.find ("("); @@ -336,7 +336,7 @@ KPyBrowser::parseText (QString & pytext) //now go through the list of old open nodes and open them in the new //tree. For each node name in the open_nodes list, attempt to find that //node and in the new dict and open it. - QValueList<QString>::iterator it; + TQValueList<TQString>::iterator it; PyBrowseNode *tmp_node; for (it=open_nodes.begin(); it != open_nodes.end(); ++it) { @@ -351,9 +351,9 @@ KPyBrowser::parseText (QString & pytext) void -KPyBrowser::tip (const QPoint & p, QRect & r, QString & str) +KPyBrowser::tip (const TQPoint & p, TQRect & r, TQString & str) { - QListViewItem *item = (QListViewItem *) itemAt (p); + TQListViewItem *item = (TQListViewItem *) itemAt (p); if (item == NULL) { str = ""; @@ -380,15 +380,15 @@ KPyBrowser::tip (const QPoint & p, QRect & r, QString & str) ///////////////////////////////////////////////////////////////////// // KateFileList::KFLToolTip implementation -KPyBrowser::KPBToolTip::KPBToolTip (QWidget * parent):QToolTip (parent) +KPyBrowser::KPBToolTip::KPBToolTip (TQWidget * parent):TQToolTip (parent) { } void -KPyBrowser::KPBToolTip::maybeTip (const QPoint & p) +KPyBrowser::KPBToolTip::maybeTip (const TQPoint & p) { - QString str; - QRect r; + TQString str; + TQRect r; ((KPyBrowser *) parentWidget ())->tip (p, r, str); diff --git a/kate/kpybrowser/kpybrowser.h b/kate/kpybrowser/kpybrowser.h index ae49d3c..5f73c31 100644 --- a/kate/kpybrowser/kpybrowser.h +++ b/kate/kpybrowser/kpybrowser.h @@ -24,10 +24,10 @@ #include <kapplication.h> #include <klistview.h> -#include <qstring.h> -#include <qvaluelist.h> -#include <qtooltip.h> -#include <qdict.h> +#include <tqstring.h> +#include <tqvaluelist.h> +#include <tqtooltip.h> +#include <tqdict.h> #include "pybrowsenode.h" @@ -37,31 +37,31 @@ class KPyBrowser : public KListView Q_OBJECT public: /** construtor */ - KPyBrowser(QWidget* parent=0, const char *name=0); + KPyBrowser(TQWidget* parent=0, const char *name=0); /** destructor */ ~KPyBrowser(); - void parseText(QString &pytext); + void parseText(TQString &pytext); //used by KPBToolTip to dynamically create the needed tooltip - void tip (const QPoint &p, QRect &r, QString &str); + void tip (const TQPoint &p, TQRect &r, TQString &str); private: PyBrowseNode *class_root, *function_root; //create a mapping of names to nodes - QDict<PyBrowseNode> node_dict; + TQDict<PyBrowseNode> node_dict; public slots: - void nodeSelected(QListViewItem *node); + void nodeSelected(TQListViewItem *node); signals: - void selected(QString, int); + void selected(TQString, int); private: class KPBToolTip : public QToolTip { public: - KPBToolTip(QWidget *parent); + KPBToolTip(TQWidget *parent); protected: - void maybeTip( const QPoint & ); + void maybeTip( const TQPoint & ); }; KPBToolTip* tooltip; }; diff --git a/kate/kpybrowser/pybrowse_part.cpp b/kate/kpybrowser/pybrowse_part.cpp index d8b7551..4b8490c 100644 --- a/kate/kpybrowser/pybrowse_part.cpp +++ b/kate/kpybrowser/pybrowse_part.cpp @@ -25,7 +25,7 @@ #include <klocale.h> #include <kstandarddirs.h> #include <kmessagebox.h> -#include <qimage.h> +#include <tqimage.h> #include <kdockwidget.h> K_EXPORT_COMPONENT_FACTORY( katepybrowseplugin, KGenericFactory<KatePluginPyBrowse>( "katepybrowse" ) ) @@ -34,7 +34,7 @@ PluginViewPyBrowse::PluginViewPyBrowse (Kate::MainWindow *w) : win (w) { (void) new KAction ( i18n("Update Python Browser"), 0, this, - SLOT( slotUpdatePyBrowser() ), actionCollection(), + TQT_SLOT( slotUpdatePyBrowser() ), actionCollection(), "python_update_pybrowse" ); //set up the menus @@ -43,8 +43,8 @@ PluginViewPyBrowse::PluginViewPyBrowse (Kate::MainWindow *w) win->guiFactory()->addClient(this); //create a python head pixmap for the tab - QPixmap *py_pixmap = new QPixmap(pybrowse_xpm); - QImage py_image = py_pixmap->convertToImage().smoothScale(20, 20); + TQPixmap *py_pixmap = new TQPixmap(pybrowse_xpm); + TQImage py_image = py_pixmap->convertToImage().smoothScale(20, 20); py_pixmap->convertFromImage(py_image); //create the browser and put it into a dockwidget using kate's tool view manager @@ -53,7 +53,7 @@ PluginViewPyBrowse::PluginViewPyBrowse (Kate::MainWindow *w) my_dock = tool_view_manager->createToolView("kate_plugin_kpybrowser", Kate::ToolViewManager::Left, (*py_pixmap), i18n("Python Browser")); kpybrowser = new KPyBrowser(my_dock, "kpybrowser"); - connect(kpybrowser, SIGNAL(selected(QString, int)), this, SLOT(slotSelected(QString, int))); + connect(kpybrowser, TQT_SIGNAL(selected(TQString, int)), this, TQT_SLOT(slotSelected(TQString, int))); } PluginViewPyBrowse::~PluginViewPyBrowse () @@ -63,7 +63,7 @@ PluginViewPyBrowse::~PluginViewPyBrowse () } -void PluginViewPyBrowse::slotSelected(QString name, int line) +void PluginViewPyBrowse::slotSelected(TQString name, int line) { //TO DO - deal with setting the active view to be the file that has this class //if multiple files are open. @@ -74,7 +74,7 @@ void PluginViewPyBrowse::slotSelected(QString name, int line) Kate::View *view = win->viewManager()->activeView(); Kate::Document *doc = view->getDoc(); - QString docline = doc->textLine(line); + TQString docline = doc->textLine(line); int numlines = doc->numLines(); int done = 0, apiline = -1, forward_line = line,backward_line = line-1; while (!done) @@ -121,7 +121,7 @@ void PluginViewPyBrowse::slotUpdatePyBrowser() Kate::View *view = viewManager->activeView(); if (view == NULL) return; - QString pytext(view->getDoc()->text()); + TQString pytext(view->getDoc()->text()); kpybrowser->parseText(pytext); } @@ -130,7 +130,7 @@ void PluginViewPyBrowse::slotShowPyBrowser() //TO DO implement this later so that you can turn the browser off and on } -KatePluginPyBrowse::KatePluginPyBrowse( QObject* parent, const char* name, const QStringList& ) +KatePluginPyBrowse::KatePluginPyBrowse( TQObject* parent, const char* name, const TQStringList& ) : Kate::Plugin ( (Kate::Application *)parent, name ) { } diff --git a/kate/kpybrowser/pybrowse_part.h b/kate/kpybrowser/pybrowse_part.h index 85aedbb..3769661 100644 --- a/kate/kpybrowser/pybrowse_part.h +++ b/kate/kpybrowser/pybrowse_part.h @@ -30,10 +30,10 @@ #include <kdockwidget.h> #include <klibloader.h> #include <klocale.h> -#include <qstring.h> +#include <tqstring.h> #include "kpybrowser.h" -class PluginViewPyBrowse : public QObject, KXMLGUIClient +class PluginViewPyBrowse : public TQObject, KXMLGUIClient { Q_OBJECT @@ -45,12 +45,12 @@ class PluginViewPyBrowse : public QObject, KXMLGUIClient public slots: void slotShowPyBrowser(); - void slotSelected(QString name, int line); + void slotSelected(TQString name, int line); void slotUpdatePyBrowser(); private: Kate::MainWindow *win; - QWidget *my_dock; + TQWidget *my_dock; KPyBrowser *kpybrowser; }; @@ -59,14 +59,14 @@ class KatePluginPyBrowse : public Kate::Plugin, public Kate::PluginViewInterface Q_OBJECT public: - KatePluginPyBrowse( QObject* parent = 0, const char* name = 0, const QStringList& = QStringList() ); + KatePluginPyBrowse( TQObject* parent = 0, const char* name = 0, const TQStringList& = TQStringList() ); ~KatePluginPyBrowse(); void addView(Kate::MainWindow *win); void removeView(Kate::MainWindow *win); private: - QPtrList<PluginViewPyBrowse> m_views; + TQPtrList<PluginViewPyBrowse> m_views; }; #endif diff --git a/kate/kpybrowser/pybrowsenode.cpp b/kate/kpybrowser/pybrowsenode.cpp index 866924b..81c59e5 100644 --- a/kate/kpybrowser/pybrowsenode.cpp +++ b/kate/kpybrowser/pybrowsenode.cpp @@ -99,30 +99,30 @@ static const char *py_function_xpm[] = { }; -PyBrowseNode::PyBrowseNode (QListViewItem * parent, const QString &name, - const QString &signature, int nodeType): -QListViewItem (parent, signature) +PyBrowseNode::PyBrowseNode (TQListViewItem * parent, const TQString &name, + const TQString &signature, int nodeType): +TQListViewItem (parent, signature) { init (name, signature, nodeType); } -PyBrowseNode::PyBrowseNode (QListView * parent, const QString &name, - const QString &signature, int nodeType): -QListViewItem (parent, signature) +PyBrowseNode::PyBrowseNode (TQListView * parent, const TQString &name, + const TQString &signature, int nodeType): +TQListViewItem (parent, signature) { init (name, signature, nodeType); } void -PyBrowseNode::init (const QString &a_name, const QString &a_signature, int nodeType) +PyBrowseNode::init (const TQString &a_name, const TQString &a_signature, int nodeType) { node_type = nodeType; if (nodeType == PYCLASS) - setPixmap (0, QPixmap (py_class_xpm)); + setPixmap (0, TQPixmap (py_class_xpm)); if (nodeType == PYMETHOD) - setPixmap (0, QPixmap (py_method_xpm)); + setPixmap (0, TQPixmap (py_method_xpm)); if (nodeType == PYFUNCTION) - setPixmap (0, QPixmap (py_function_xpm)); + setPixmap (0, TQPixmap (py_function_xpm)); name = a_name; signature = a_signature; @@ -130,11 +130,11 @@ PyBrowseNode::init (const QString &a_name, const QString &a_signature, int nodeT PyBrowseNode::~PyBrowseNode () { - setPixmap (0, QPixmap (py_class_xpm)); + setPixmap (0, TQPixmap (py_class_xpm)); } void -PyBrowseNode::setName (const QString &a_name) +PyBrowseNode::setName (const TQString &a_name) { name = a_name; setText (0, name); @@ -147,7 +147,7 @@ PyBrowseNode::getName ()const } void -PyBrowseNode::setSig (const QString &a_signature) +PyBrowseNode::setSig (const TQString &a_signature) { signature = a_signature; @@ -185,7 +185,7 @@ PyBrowseNode::getType ()const } void -PyBrowseNode::setClass (const QString &a_method_class) +PyBrowseNode::setClass (const TQString &a_method_class) { node_class = a_method_class; } diff --git a/kate/kpybrowser/pybrowsenode.h b/kate/kpybrowser/pybrowsenode.h index d5083f9..d87a81d 100644 --- a/kate/kpybrowser/pybrowsenode.h +++ b/kate/kpybrowser/pybrowsenode.h @@ -18,11 +18,11 @@ #ifndef PYBROWSENODE_H #define PYBROWSENODE_H -#include <qlistview.h> -#include <qpixmap.h> +#include <tqlistview.h> +#include <tqpixmap.h> #define PYCLASS 1 -#define PYMETHOD 2 +#define PYQT_METHOD 2 #define PYFUNCTION 3 #define PYVARIABLE 4 #define PYOTHER 5 @@ -33,33 +33,33 @@ -class PyBrowseNode : public QListViewItem { +class PyBrowseNode : public TQListViewItem { public: - QPixmap *pyClassPixmap; + TQPixmap *pyClassPixmap; - PyBrowseNode(QListView *parent, const QString &a_name, const QString &a_signature, int type); - PyBrowseNode(QListViewItem *parent, const QString &a_name, const QString &a_signature, int type); + PyBrowseNode(TQListView *parent, const TQString &a_name, const TQString &a_signature, int type); + PyBrowseNode(TQListViewItem *parent, const TQString &a_name, const TQString &a_signature, int type); ~PyBrowseNode(); - void init(const QString &a_name, const QString &a_signature, int nodeType); + void init(const TQString &a_name, const TQString &a_signature, int nodeType); - void setName(const QString &name); - QString getName()const ; + void setName(const TQString &name); + TQString getName()const ; void setLine(int line); int getLine()const; - void setSig(const QString &signature); - QString getSig()const; + void setSig(const TQString &signature); + TQString getSig()const; void setType(int type); int getType()const; - void setClass(const QString &a_method_class); - QString getClass()const; + void setClass(const TQString &a_method_class); + TQString getClass()const; - QString getQualifiedName()const; + TQString getQualifiedName()const; private: - QString name; - QString signature; - QString node_class; + TQString name; + TQString signature; + TQString node_class; int line; int node_type; diff --git a/kate/make/plugin_katemake.cpp b/kate/make/plugin_katemake.cpp index 64282dd..e78bda9 100644 --- a/kate/make/plugin_katemake.cpp +++ b/kate/make/plugin_katemake.cpp @@ -30,15 +30,15 @@ #include <cassert> #include <config.h> -#include <qfile.h> -#include <qfileinfo.h> -#include <qinputdialog.h> -#include <qregexp.h> -#include <qstring.h> -#include <qtextstream.h> -#include <qpalette.h> -#include <qvbox.h> -#include <qlabel.h> +#include <tqfile.h> +#include <tqfileinfo.h> +#include <tqinputdialog.h> +#include <tqregexp.h> +#include <tqstring.h> +#include <tqtextstream.h> +#include <tqpalette.h> +#include <tqvbox.h> +#include <tqlabel.h> #include <kaction.h> #include <kcursor.h> @@ -62,7 +62,7 @@ K_EXPORT_COMPONENT_FACTORY( katemakeplugin, KGenericFactory<PluginKateMake>( "ka // #define FUNCTIONSETUP kdDebug() << k_funcinfo << endl; #define FUNCTIONSETUP -PluginKateMake::PluginKateMake( QObject* parent, const char* name, const QStringList& ) +PluginKateMake::PluginKateMake( TQObject* parent, const char* name, const TQStringList& ) : Kate::Plugin ( (Kate::Application *)parent, name ) { FUNCTIONSETUP; @@ -80,9 +80,9 @@ void PluginKateMake::addView(Kate::MainWindow *win) FUNCTIONSETUP; Kate::ToolViewManager *viewmanager = win->toolViewManager(); - QWidget *w = viewmanager->createToolView("kate_plugin_make", + TQWidget *w = viewmanager->createToolView("kate_plugin_make", Kate::ToolViewManager::Bottom, - SmallIcon(QString::fromLatin1("misc")), + SmallIcon(TQString::fromLatin1("misc")), i18n("Make Output")); PluginKateMakeView *view = new PluginKateMakeView (w,win, "katemakeview"); @@ -123,23 +123,23 @@ void PluginKateMake::removeView(Kate::MainWindow *win) class ErrorMessage : public QListViewItem { public: - ErrorMessage(QListView *parent, - const QString &filename, + ErrorMessage(TQListView *parent, + const TQString &filename, int lineno, - const QString &message) : - QListViewItem(parent, + const TQString &message) : + TQListViewItem(parent, filename, - (lineno > 0 ? QString::number(lineno) : QString::null), + (lineno > 0 ? TQString::number(lineno) : TQString::null), message) { - m_isError = !message.contains(QString::fromLatin1("warning")); + m_isError = !message.contains(TQString::fromLatin1("warning")); m_lineno = lineno; m_serial = s_serial++; } - ErrorMessage(QListView *parent,const QString &message) : - QListViewItem(parent,QString::null,QString::null,QString::null) + ErrorMessage(TQListView *parent,const TQString &message) : + TQListViewItem(parent,TQString::null,TQString::null,TQString::null) { - QString m(message); + TQString m(message); m.remove('\n'); m.stripWhiteSpace(); setText(COL_MSG,m); @@ -149,8 +149,8 @@ public: m_serial = s_serial++; setSelectable(false); } - ErrorMessage(QListView *parent, bool start) : - QListViewItem(parent,QString::null) + ErrorMessage(TQListView *parent, bool start) : + TQListViewItem(parent,TQString::null) { m_isError=false; m_lineno=-1; @@ -162,19 +162,19 @@ public: virtual ~ErrorMessage() ; bool isError() const { return m_isError; } - QString message() const { return text(COL_MSG); } - QString fancyMessage() const; - QString caption() const; - QString filename() const { return text(COL_FILE); } + TQString message() const { return text(COL_MSG); } + TQString fancyMessage() const; + TQString caption() const; + TQString filename() const { return text(COL_FILE); } int line() const { return m_lineno; } int serial() const { return m_serial; } - virtual int compare(QListViewItem *,int,bool) const; + virtual int compare(TQListViewItem *,int,bool) const; static void resetSerial() { s_serial=10; } protected: - virtual void paintCell(QPainter *,const QColorGroup &, + virtual void paintCell(TQPainter *,const TQColorGroup &, int,int,int); bool m_isError; @@ -190,40 +190,40 @@ protected: { } -QString ErrorMessage::caption() const +TQString ErrorMessage::caption() const { - return QString::fromLatin1("%1:%2").arg(text(COL_FILE)).arg(line()); + return TQString::fromLatin1("%1:%2").arg(text(COL_FILE)).arg(line()); } -QString ErrorMessage::fancyMessage() const +TQString ErrorMessage::fancyMessage() const { - QString msg = QString::fromLatin1("<qt>"); + TQString msg = TQString::fromLatin1("<qt>"); if (isError()) { - msg.append(QString::fromLatin1("<font color=\"red\">")); + msg.append(TQString::fromLatin1("<font color=\"red\">")); } msg.append(message()); if (isError()) { - msg.append(QString::fromLatin1("</font>")); + msg.append(TQString::fromLatin1("</font>")); } - msg.append(QString::fromLatin1("<qt>")); + msg.append(TQString::fromLatin1("<qt>")); return msg; } -/* virtual */ void ErrorMessage::paintCell(QPainter *p, - const QColorGroup &cg, +/* virtual */ void ErrorMessage::paintCell(TQPainter *p, + const TQColorGroup &cg, int column, int width, int align) { if ((column!=COL_LINE) || (serial()<0)) { - QListViewItem::paintCell(p,cg,column,width,align); + TQListViewItem::paintCell(p,cg,column,width,align); } else { - QColorGroup myCG(cg); + TQColorGroup myCG(cg); #if 0 red, //darkRed, green, //darkGreen, @@ -233,21 +233,21 @@ QString ErrorMessage::fancyMessage() const yellow, //darkYellow, gray); #endif - myCG.setColor(QColorGroup::Light,red); + myCG.setColor(TQColorGroup::Light,red); if (!isSelected()) { - myCG.setColor(QColorGroup::Base,gray); - myCG.setColor(QColorGroup::Text, + myCG.setColor(TQColorGroup::Base,gray); + myCG.setColor(TQColorGroup::Text, m_isError ? red : yellow); } - QListViewItem::paintCell(p,myCG,column,width,align); + TQListViewItem::paintCell(p,myCG,column,width,align); } } -/* virtual */ int ErrorMessage::compare(QListViewItem *i, +/* virtual */ int ErrorMessage::compare(TQListViewItem *i, int /* column */ , bool /* ascending */) const { kdDebug() << "In compare " << serial() << endl; @@ -261,17 +261,17 @@ QString ErrorMessage::fancyMessage() const class LinePopup : public KPassivePopup { protected: - LinePopup( QWidget *parent=0, const char *name=0, WFlags f=0 ); + LinePopup( TQWidget *parent=0, const char *name=0, WFlags f=0 ); virtual ~LinePopup(); public: - static LinePopup *message(QWidget *, - const QPoint &p,ErrorMessage *e); + static LinePopup *message(TQWidget *, + const TQPoint &p,ErrorMessage *e); protected: virtual void positionSelf(); - QPoint fLoc; + TQPoint fLoc; // There should be only one static LinePopup *one; @@ -279,7 +279,7 @@ protected: /* static */ LinePopup *LinePopup::one = 0L; -LinePopup::LinePopup(QWidget *p,const char *n,WFlags f) : +LinePopup::LinePopup(TQWidget *p,const char *n,WFlags f) : KPassivePopup(p,n,f), fLoc(-1,-1) { @@ -292,8 +292,8 @@ LinePopup::~LinePopup() one=0L; } -/* static */ LinePopup *LinePopup::message(QWidget *parent, - const QPoint &p, +/* static */ LinePopup *LinePopup::message(TQWidget *parent, + const TQPoint &p, ErrorMessage *e) { if (one) delete one; @@ -301,7 +301,7 @@ LinePopup::~LinePopup() pop->setAutoDelete( true ); - pop->setView( e->caption(), e->fancyMessage(), QPixmap() ); + pop->setView( e->caption(), e->fancyMessage(), TQPixmap() ); // pop->hideDelay = timeout; pop->fLoc=p; pop->show(); @@ -317,14 +317,14 @@ LinePopup::~LinePopup() // Move above or below the intended line if (fLoc.y()>320) fLoc.setY(fLoc.y()-80); else fLoc.setY(fLoc.y()+80); - moveNear(QRect(fLoc.x(),fLoc.y(),40,30)); + moveNear(TQRect(fLoc.x(),fLoc.y(),40,30)); } } -PluginKateMakeView::PluginKateMakeView(QWidget *parent, +PluginKateMakeView::PluginKateMakeView(TQWidget *parent, Kate::MainWindow *mainwin, const char* name) : - QListView(parent,name), + TQListView(parent,name), KXMLGUIClient(), win(mainwin), filenameDetector(0L), @@ -334,26 +334,26 @@ PluginKateMakeView::PluginKateMakeView(QWidget *parent, m_proc=0; (void) new KAction ( i18n("Next Error"), KShortcut(ALT+CTRL+Key_Right), - this, SLOT( slotNext() ), + this, TQT_SLOT( slotNext() ), actionCollection(), "make_right" ); (void) new KAction ( i18n("Previous Error"), KShortcut(ALT+CTRL+Key_Left), - this, SLOT( slotPrev() ), + this, TQT_SLOT( slotPrev() ), actionCollection(), "make_left" ); (void) new KAction ( i18n("Make"), KShortcut(ALT+Key_R), - this, SLOT( slotValidate() ), + this, TQT_SLOT( slotValidate() ), actionCollection(), "make_check" ); (void) new KAction ( i18n("Configure..."), KShortcut(), - this, SLOT( slotConfigure() ), + this, TQT_SLOT( slotConfigure() ), actionCollection(), "make_settings" ); setInstance(new KInstance("kate")); - setXMLFile(QString::fromLatin1("plugins/katemake/ui.rc")); + setXMLFile(TQString::fromLatin1("plugins/katemake/ui.rc")); - setFocusPolicy(QWidget::NoFocus); + setFocusPolicy(TQWidget::NoFocus); setSorting(COL_LINE); addColumn(i18n("File"), -1); @@ -361,25 +361,25 @@ PluginKateMakeView::PluginKateMakeView(QWidget *parent, setColumnAlignment(COL_LINE, AlignRight); addColumn(i18n("Message"), -1); setAllColumnsShowFocus(true); - setResizeMode(QListView::LastColumn); - connect(this, SIGNAL(clicked(QListViewItem *)), SLOT(slotClicked(QListViewItem *))); + setResizeMode(TQListView::LastColumn); + connect(this, TQT_SIGNAL(clicked(TQListViewItem *)), TQT_SLOT(slotClicked(TQListViewItem *))); m_proc = new KProcess(); - connect(m_proc, SIGNAL(processExited(KProcess*)), this, SLOT(slotProcExited(KProcess*))); - connect(m_proc, SIGNAL(receivedStderr(KProcess*,char*,int)), - this, SLOT(slotReceivedProcStderr(KProcess*, char*, int))); + connect(m_proc, TQT_SIGNAL(processExited(KProcess*)), this, TQT_SLOT(slotProcExited(KProcess*))); + connect(m_proc, TQT_SIGNAL(receivedStderr(KProcess*,char*,int)), + this, TQT_SLOT(slotReceivedProcStderr(KProcess*, char*, int))); KConfig c("katemakepluginrc"); c.setGroup("Prefixes"); - source_prefix = c.readEntry("Source",QString::null); - build_prefix = c.readEntry("Build",QString::null); + source_prefix = c.readEntry("Source",TQString::null); + build_prefix = c.readEntry("Build",TQString::null); // if (source_prefix.isEmpty()) { - filenameDetector = new QRegExp( - QString::fromLatin1("[a-zA-Z0-9_\\.\\-]*\\.[chp]*:[0-9]*:")); + filenameDetector = new TQRegExp( + TQString::fromLatin1("[a-zA-Z0-9_\\.\\-]*\\.[chp]*:[0-9]*:")); } // else { @@ -398,7 +398,7 @@ PluginKateMakeView::~PluginKateMakeView() } -void PluginKateMakeView::processLine(const QString &l) +void PluginKateMakeView::processLine(const TQString &l) { kdDebug() << "Got line " << l ; @@ -419,10 +419,10 @@ void PluginKateMakeView::processLine(const QString &l) int ofs1 = l.find(':'); int ofs2 = l.find(':',ofs1+1); // - QString m = l.mid(ofs2+1); + TQString m = l.mid(ofs2+1); m.remove('\n'); m.stripWhiteSpace(); - QString filename = l.left(ofs1); + TQString filename = l.left(ofs1); int line = l.mid(ofs1+1,ofs2-ofs1-1).toInt(); ErrorMessage *e = new ErrorMessage(this, filename,line,m); @@ -431,7 +431,7 @@ void PluginKateMakeView::processLine(const QString &l) // Should cache files being found and check for // existence. kdDebug() << ": Looking at " << document_dir+filename << endl; - if (!QFile::exists(document_dir+filename)) + if (!TQFile::exists(document_dir+filename)) { e->setSelectable(false); } @@ -447,7 +447,7 @@ void PluginKateMakeView::slotReceivedProcStderr(KProcess *, char *result, int le { FUNCTIONSETUP; - QString l = QString::fromLocal8Bit( QCString(result, len+1) ); + TQString l = TQString::fromLocal8Bit( TQCString(result, len+1) ); output_line += l; @@ -480,13 +480,13 @@ void PluginKateMakeView::slotProcExited(KProcess *p) #endif kdDebug() << "slotProcExited()" << endl; - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); sort(); if ( found_error || !p->normalExit() || p->exitStatus() ) { - QListViewItem *i = firstChild(); + TQListViewItem *i = firstChild(); while (i && !i->isSelectable()) { i = i->nextSibling(); @@ -504,8 +504,8 @@ void PluginKateMakeView::slotProcExited(KProcess *p) this); clear(); #if 0 - QListViewItem *i = new QListViewItem(this,QString::null, - QString::null, + TQListViewItem *i = new TQListViewItem(this,TQString::null, + TQString::null, i18n("No Errors.")); i->setSelectable(false); #else @@ -515,7 +515,7 @@ void PluginKateMakeView::slotProcExited(KProcess *p) } -void PluginKateMakeView::slotClicked(QListViewItem *item) +void PluginKateMakeView::slotClicked(TQListViewItem *item) { FUNCTIONSETUP; if (!item) @@ -530,7 +530,7 @@ void PluginKateMakeView::slotClicked(QListViewItem *item) ensureItemVisible(e); - QString filename = document_dir + e->filename(); + TQString filename = document_dir + e->filename(); int lineno = e->line(); if (!build_prefix.isEmpty()) @@ -542,7 +542,7 @@ void PluginKateMakeView::slotClicked(QListViewItem *item) kdDebug() << ": Looking at " << filename << ":" << lineno << endl; - if (QFile::exists(filename)) + if (TQFile::exists(filename)) { KURL u; u.setPath(filename); @@ -552,12 +552,12 @@ void PluginKateMakeView::slotClicked(QListViewItem *item) kv->setCursorPositionReal(lineno-1,1); - QPoint globalPos = kv->mapToGlobal(kv->cursorCoordinates()); + TQPoint globalPos = kv->mapToGlobal(kv->cursorCoordinates()); kdDebug() << ": Want to map at " << globalPos.x() << "," << globalPos.y() << endl; #if 0 KPassivePopup::message( - QString::fromLatin1("%1:%2").arg(filename).arg(lineno), + TQString::fromLatin1("%1:%2").arg(filename).arg(lineno), msg, this); #else @@ -571,10 +571,10 @@ void PluginKateMakeView::slotNext() { FUNCTIONSETUP; - QListViewItem *i = selectedItem(); + TQListViewItem *i = selectedItem(); if (!i) return; - QListViewItem *n = i; + TQListViewItem *n = i; while ((n=n->nextSibling())) { if (n->isSelectable()) @@ -592,10 +592,10 @@ void PluginKateMakeView::slotPrev() { FUNCTIONSETUP; - QListViewItem *i = selectedItem(); + TQListViewItem *i = selectedItem(); if (!i) return; - QListViewItem *n = i; + TQListViewItem *n = i; while ((n=n->itemAbove())) { if (n->isSelectable()) @@ -632,7 +632,7 @@ bool PluginKateMakeView::slotValidate() doc->save(); KURL url(doc->url()); - output_line = QString::null; + output_line = TQString::null; ErrorMessage::resetSerial(); found_error=false; @@ -648,8 +648,8 @@ bool PluginKateMakeView::slotValidate() return false; } - document_dir = QFileInfo(url.path()).dirPath(true) + - QString::fromLatin1("/"); + document_dir = TQFileInfo(url.path()).dirPath(true) + + TQString::fromLatin1("/"); if (document_dir.startsWith(source_prefix)) { @@ -657,7 +657,7 @@ bool PluginKateMakeView::slotValidate() } m_proc->setWorkingDirectory(document_dir); - QString make = KStandardDirs::findExe( "gmake" ); + TQString make = KStandardDirs::findExe( "gmake" ); if (make.isEmpty()) make = KStandardDirs::findExe("make"); *m_proc << make; @@ -666,7 +666,7 @@ bool PluginKateMakeView::slotValidate() "make" : make)); return false; } - QApplication::setOverrideCursor(KCursor::waitCursor()); + TQApplication::setOverrideCursor(KCursor::waitCursor()); running_indicator = new ErrorMessage(this,true); return true; } @@ -674,27 +674,27 @@ bool PluginKateMakeView::slotValidate() class Settings : public KDialogBase { public: - Settings( QWidget *parent, - const QString &src, const QString &bld); + Settings( TQWidget *parent, + const TQString &src, const TQString &bld); KLineEdit *edit_src,*edit_bld; } ; -Settings::Settings(QWidget *p, - const QString &s, const QString &b) : +Settings::Settings(TQWidget *p, + const TQString &s, const TQString &b) : KDialogBase(p,"settings",true, i18n("Directories"), KDialogBase::Ok|KDialogBase::Cancel, KDialogBase::Ok, true ) { - QVBox *page = makeVBoxMainWidget(); - QHBox *h = new QHBox(page); - (void) new QLabel(i18n("Source prefix:"),h); + TQVBox *page = makeVBoxMainWidget(); + TQHBox *h = new TQHBox(page); + (void) new TQLabel(i18n("Source prefix:"),h); edit_src = new KLineEdit(h); edit_src->setText(s); - h = new QHBox(page); - (void) new QLabel(i18n("Build prefix:"),h); + h = new TQHBox(page); + (void) new TQLabel(i18n("Build prefix:"),h); edit_bld = new KLineEdit(h); edit_bld->setText(b); } @@ -716,8 +716,8 @@ void PluginKateMakeView::slotConfigure() { if (!filenameDetector) { - filenameDetector = new QRegExp( - QString::fromLatin1("[a-zA-Z0-9_\\.\\-]*\\.[chp]*:[0-9]*:")); + filenameDetector = new TQRegExp( + TQString::fromLatin1("[a-zA-Z0-9_\\.\\-]*\\.[chp]*:[0-9]*:")); } } //else diff --git a/kate/make/plugin_katemake.h b/kate/make/plugin_katemake.h index 5042f1d..443bb46 100644 --- a/kate/make/plugin_katemake.h +++ b/kate/make/plugin_katemake.h @@ -32,8 +32,8 @@ class QRegExp; -#include <qlistview.h> -#include <qstring.h> +#include <tqlistview.h> +#include <tqstring.h> #include <kate/plugin.h> #include <kate/application.h> @@ -48,12 +48,12 @@ class QRegExp; #include <kprocess.h> #include <ktempfile.h> -class PluginKateMakeView : public QListView, public KXMLGUIClient +class PluginKateMakeView : public TQListView, public KXMLGUIClient { Q_OBJECT public: - PluginKateMakeView(QWidget *parent, + PluginKateMakeView(TQWidget *parent, Kate::MainWindow *mainwin, const char* name); virtual ~PluginKateMakeView(); @@ -61,7 +61,7 @@ class PluginKateMakeView : public QListView, public KXMLGUIClient Kate::MainWindow *win; public slots: - void slotClicked(QListViewItem *item); + void slotClicked(TQListViewItem *item); void slotNext(); void slotPrev(); @@ -72,19 +72,19 @@ class PluginKateMakeView : public QListView, public KXMLGUIClient void slotConfigure(); protected: - void processLine(const QString &); + void processLine(const TQString &); private: KProcess *m_proc; - QString output_line; - QString doc_name; - QString document_dir; - QString source_prefix,build_prefix; + TQString output_line; + TQString doc_name; + TQString document_dir; + TQString source_prefix,build_prefix; - QRegExp *filenameDetector; + TQRegExp *filenameDetector; - QListViewItem *running_indicator; + TQListViewItem *running_indicator; bool found_error; }; @@ -94,14 +94,14 @@ class PluginKateMake : public Kate::Plugin, Kate::PluginViewInterface Q_OBJECT public: - PluginKateMake( QObject* parent = 0, const char* name = 0, const QStringList& = QStringList() ); + PluginKateMake( TQObject* parent = 0, const char* name = 0, const TQStringList& = TQStringList() ); virtual ~PluginKateMake(); void addView (Kate::MainWindow *win); void removeView (Kate::MainWindow *win); private: - QPtrList<PluginKateMakeView> m_views; + TQPtrList<PluginKateMakeView> m_views; }; #endif diff --git a/kate/modeline/ModelinePlugin.cpp b/kate/modeline/ModelinePlugin.cpp index b288856..9184f6a 100644 --- a/kate/modeline/ModelinePlugin.cpp +++ b/kate/modeline/ModelinePlugin.cpp @@ -15,7 +15,7 @@ * * ***************************************************************************/ -#include <qregexp.h> +#include <tqregexp.h> #include <kgenericfactory.h> #include <klocale.h> #include <kaction.h> @@ -41,7 +41,7 @@ class PluginView : public KXMLGUIClient K_EXPORT_COMPONENT_FACTORY( katemodelineplugin, KGenericFactory<ModelinePlugin>( "katemodeline" ) ) -ModelinePlugin::ModelinePlugin( QObject* parent, const char* name, const QStringList &args ) +ModelinePlugin::ModelinePlugin( TQObject* parent, const char* name, const TQStringList &args ) : Kate::Plugin ( (Kate::Application *) parent, name ) { } @@ -56,7 +56,7 @@ void ModelinePlugin::addView(Kate::MainWindow *win) PluginView *view = new PluginView (); new KAction( i18n("Apply Modeline"), 0, - this, SLOT(applyModeline()), + this, TQT_SLOT(applyModeline()), view->actionCollection(), "edit_apply_modeline" ); view->setInstance (new KInstance("kate")); @@ -87,34 +87,34 @@ void ModelinePlugin::applyModeline() Kate::Document* doc = application()->documentManager()->activeDocument(); Kate::View* view = application()->activeMainWindow()->viewManager()->activeView(); if( !doc || !view ) return; - static QRegExp vim1( "\\b(?:vi:|vim:|ex:)[ \\t](.*)" ); - static QRegExp vim2( "\\b(?:vi:|vim:|ex:)[ \\t]set (.*):" ); + static TQRegExp vim1( "\\b(?:vi:|vim:|ex:)[ \\t](.*)" ); + static TQRegExp vim2( "\\b(?:vi:|vim:|ex:)[ \\t]set (.*):" ); uint foundAtLine; uint foundAtCol; uint matchLen; - QString options; + TQString options; if( doc->searchText( 0, 0, vim2, &foundAtLine, &foundAtCol, &matchLen ) ) { options = vim2.cap(1); } else if( doc->searchText( 0, 0, vim1, &foundAtLine, &foundAtCol, &matchLen ) ) { options = vim1.cap(1); - options.replace( QRegExp( ":" ), " " ); + options.replace( TQRegExp( ":" ), " " ); } uint configFlags = doc->configFlags(); kdDebug() << "Found modeline: " << options << endl; - if( options.find( QRegExp( "\\bnoet\\b" ) ) >= 0 ) { + if( options.find( TQRegExp( "\\bnoet\\b" ) ) >= 0 ) { kdDebug() << "Clearing replace tabs" << endl; configFlags &= ~Kate::Document::cfReplaceTabs; - } else if( options.find( QRegExp( "\\bet\\b" ) ) >= 0 ) { + } else if( options.find( TQRegExp( "\\bet\\b" ) ) >= 0 ) { kdDebug() << "Setting replace tabs" << endl; configFlags |= Kate::Document::cfReplaceTabs; } - QRegExp ts( "ts=(\\d+)" ); + TQRegExp ts( "ts=(\\d+)" ); if( options.find( ts ) >= 0 ) { uint tabWidth = ts.cap(1).toUInt(); kdDebug() << "Setting tab width " << tabWidth << endl; view->setTabWidth( tabWidth ); } - QRegExp tw( "tw=(\\d+)" ); + TQRegExp tw( "tw=(\\d+)" ); if( options.find( tw ) >= 0 ) { uint textWidth = tw.cap(1).toUInt(); kdDebug() << "Setting text width " << textWidth << endl; diff --git a/kate/modeline/ModelinePlugin.h b/kate/modeline/ModelinePlugin.h index 3f4b818..2f8e2d6 100644 --- a/kate/modeline/ModelinePlugin.h +++ b/kate/modeline/ModelinePlugin.h @@ -25,7 +25,7 @@ class ModelinePlugin : public Kate::Plugin, Kate::PluginViewInterface Q_OBJECT public: - ModelinePlugin( QObject* parent = 0, const char* name = 0, const QStringList &args = QStringList() ); + ModelinePlugin( TQObject* parent = 0, const char* name = 0, const TQStringList &args = TQStringList() ); virtual ~ModelinePlugin(); void addView (Kate::MainWindow *win); @@ -34,7 +34,7 @@ private slots: void applyModeline(); private: - QPtrList<class PluginView> m_views; + TQPtrList<class PluginView> m_views; }; #endif // _ModelinePlugin_H_ diff --git a/kate/openheader/plugin_kateopenheader.cpp b/kate/openheader/plugin_kateopenheader.cpp index f404022..61cd592 100644 --- a/kate/openheader/plugin_kateopenheader.cpp +++ b/kate/openheader/plugin_kateopenheader.cpp @@ -18,7 +18,7 @@ #include "plugin_kateopenheader.h" #include "plugin_kateopenheader.moc" -#include <qfileinfo.h> +#include <tqfileinfo.h> #include <kgenericfactory.h> #include <kaction.h> #include <klocale.h> @@ -36,7 +36,7 @@ class PluginView : public KXMLGUIClient K_EXPORT_COMPONENT_FACTORY( kateopenheaderplugin, KGenericFactory<PluginKateOpenHeader>( "kateopenheader" ) ) -PluginKateOpenHeader::PluginKateOpenHeader( QObject* parent, const char* name, const QStringList& ) +PluginKateOpenHeader::PluginKateOpenHeader( TQObject* parent, const char* name, const TQStringList& ) : Kate::Plugin ( (Kate::Application *)parent, name ) { } @@ -51,7 +51,7 @@ void PluginKateOpenHeader::addView(Kate::MainWindow *win) PluginView *view = new PluginView (); (void) new KAction( i18n("Open .h/.cpp/.c"), Key_F12, - this, SLOT( slotOpenHeader() ), + this, TQT_SLOT( slotOpenHeader() ), view->actionCollection(), "file_openheader" ); view->setInstance (new KInstance("kate")); @@ -85,11 +85,11 @@ void PluginKateOpenHeader::slotOpenHeader () KURL url=kv->document()->url(); if ((!url.isValid()) || (url.isEmpty())) return; - QFileInfo info( url.path() ); - QString extension = info.extension().lower(); + TQFileInfo info( url.path() ); + TQString extension = info.extension().lower(); - QStringList headers( QStringList() << "h" << "H" << "hh" << "hpp" ); - QStringList sources( QStringList() << "c" << "cpp" << "cc" << "cp" << "cxx" ); + TQStringList headers( TQStringList() << "h" << "H" << "hh" << "hpp" ); + TQStringList sources( TQStringList() << "c" << "cpp" << "cc" << "cp" << "cxx" ); if( sources.find( extension ) != sources.end() ) { tryOpen( url, headers ); @@ -98,15 +98,15 @@ void PluginKateOpenHeader::slotOpenHeader () } } -void PluginKateOpenHeader::tryOpen( const KURL& url, const QStringList& extensions ) +void PluginKateOpenHeader::tryOpen( const KURL& url, const TQStringList& extensions ) { if (!application()->activeMainWindow()) return; kdDebug() << "Trying to open " << url.prettyURL() << " with extensions " << extensions.join(" ") << endl; - QString basename = QFileInfo( url.path() ).baseName(); + TQString basename = TQFileInfo( url.path() ).baseName(); KURL newURL( url ); - for( QStringList::ConstIterator it = extensions.begin(); it != extensions.end(); ++it ) { + for( TQStringList::ConstIterator it = extensions.begin(); it != extensions.end(); ++it ) { newURL.setFileName( basename + "." + *it ); if( KIO::NetAccess::exists( newURL ) ) application()->activeMainWindow()->viewManager()->openURL( newURL ); diff --git a/kate/openheader/plugin_kateopenheader.h b/kate/openheader/plugin_kateopenheader.h index 61b6058..b198a9f 100644 --- a/kate/openheader/plugin_kateopenheader.h +++ b/kate/openheader/plugin_kateopenheader.h @@ -18,7 +18,7 @@ #ifndef _PLUGIN_KANT_HEADER_H #define _PLUGIN_KANT_HEADER_H -#include <qstring.h> +#include <tqstring.h> #include <kate/plugin.h> #include <kate/application.h> @@ -33,7 +33,7 @@ class PluginKateOpenHeader : public Kate::Plugin, Kate::PluginViewInterface Q_OBJECT public: - PluginKateOpenHeader( QObject* parent = 0, const char* name = 0, const QStringList& = QStringList() ); + PluginKateOpenHeader( TQObject* parent = 0, const char* name = 0, const TQStringList& = TQStringList() ); virtual ~PluginKateOpenHeader(); void addView (Kate::MainWindow *win); @@ -41,10 +41,10 @@ class PluginKateOpenHeader : public Kate::Plugin, Kate::PluginViewInterface public slots: void slotOpenHeader (); - void tryOpen( const KURL& url, const QStringList& extensions ); + void tryOpen( const KURL& url, const TQStringList& extensions ); private: - QPtrList<class PluginView> m_views; + TQPtrList<class PluginView> m_views; }; #endif // _PLUGIN_KANT_OPENHEADER_H diff --git a/kate/snippets/CWidgetSnippetsBase.ui.h b/kate/snippets/CWidgetSnippetsBase.ui.h index 816d7d8..539442a 100644 --- a/kate/snippets/CWidgetSnippetsBase.ui.h +++ b/kate/snippets/CWidgetSnippetsBase.ui.h @@ -15,9 +15,9 @@ void CWidgetSnippetsBase::init() } -QListViewItem* CWidgetSnippetsBase::insertItem( const QString& name, bool bRename ) +TQListViewItem* CWidgetSnippetsBase::insertItem( const TQString& name, bool bRename ) { - QListViewItem *item = new QListViewItem(lvSnippets, name); + TQListViewItem *item = new TQListViewItem(lvSnippets, name); item->setRenameEnabled(0,true); lvSnippets->setSelected( item, true ); if ( bRename ) { diff --git a/kate/snippets/csnippet.cpp b/kate/snippets/csnippet.cpp index fc7d7e7..2aebb5d 100644 --- a/kate/snippets/csnippet.cpp +++ b/kate/snippets/csnippet.cpp @@ -9,8 +9,8 @@ ***************************************************************************/ #include "csnippet.h" -CSnippet::CSnippet(QString sKey, QString sValue, QListViewItem *lvi, QObject *parent, const char *name) - : QObject(parent, name), _sKey(sKey), _sValue(sValue), _lvi(lvi) {} +CSnippet::CSnippet(TQString sKey, TQString sValue, TQListViewItem *lvi, TQObject *parent, const char *name) + : TQObject(parent, name), _sKey(sKey), _sValue(sValue), _lvi(lvi) {} CSnippet::~CSnippet() {} diff --git a/kate/snippets/csnippet.h b/kate/snippets/csnippet.h index a139f03..3c75db4 100644 --- a/kate/snippets/csnippet.h +++ b/kate/snippets/csnippet.h @@ -10,30 +10,30 @@ #ifndef CSNIPPET_H #define CSNIPPET_H -#include <qobject.h> -#include <qlistview.h> +#include <tqobject.h> +#include <tqlistview.h> #include <kaction.h> -#include <qsignalmapper.h> +#include <tqsignalmapper.h> /** @author Stephan Möres */ -class CSnippet : public QObject { +class CSnippet : public TQObject { Q_OBJECT public: - CSnippet(QString sKey, QString sValue, QListViewItem *lvi, QObject *parent = 0, const char *name = 0); + CSnippet(TQString sKey, TQString sValue, TQListViewItem *lvi, TQObject *parent = 0, const char *name = 0); ~CSnippet(); - QString getKey() { return _sKey; } - QString getValue() { return _sValue; } - QListViewItem* getListViewItem() const { return _lvi; } - void setKey(const QString& sKey) { _sKey = sKey; } - void setValue(const QString& sValue) { _sValue = sValue; } + TQString getKey() { return _sKey; } + TQString getValue() { return _sValue; } + TQListViewItem* getListViewItem() const { return _lvi; } + void setKey(const TQString& sKey) { _sKey = sKey; } + void setValue(const TQString& sValue) { _sValue = sValue; } protected: - QString _sKey; - QString _sValue; - QListViewItem *_lvi; + TQString _sKey; + TQString _sValue; + TQListViewItem *_lvi; }; #endif diff --git a/kate/snippets/cwidgetsnippets.cpp b/kate/snippets/cwidgetsnippets.cpp index cf44319..e58c15f 100644 --- a/kate/snippets/cwidgetsnippets.cpp +++ b/kate/snippets/cwidgetsnippets.cpp @@ -9,7 +9,7 @@ ***************************************************************************/ #include "cwidgetsnippets.h" -CWidgetSnippets::CWidgetSnippets( QWidget* parent, const char* name, WFlags fl) +CWidgetSnippets::CWidgetSnippets( TQWidget* parent, const char* name, WFlags fl) : CWidgetSnippetsBase(parent, name, fl) { } diff --git a/kate/snippets/cwidgetsnippets.h b/kate/snippets/cwidgetsnippets.h index 6d246c3..831f335 100644 --- a/kate/snippets/cwidgetsnippets.h +++ b/kate/snippets/cwidgetsnippets.h @@ -17,7 +17,7 @@ */ class CWidgetSnippets : public CWidgetSnippetsBase { public: - CWidgetSnippets( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); + CWidgetSnippets( TQWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); ~CWidgetSnippets(); diff --git a/kate/snippets/plugin_katesnippets.cpp b/kate/snippets/plugin_katesnippets.cpp index 07cba2b..fd594e1 100644 --- a/kate/snippets/plugin_katesnippets.cpp +++ b/kate/snippets/plugin_katesnippets.cpp @@ -23,7 +23,7 @@ K_EXPORT_COMPONENT_FACTORY(katesnippetsplugin, KGenericFactory<KatePluginSnippet * @param w * @return */ -KatePluginSnippetsView::KatePluginSnippetsView(Kate::MainWindow *w, QWidget *dock) : CWidgetSnippets(dock,"snippetswidget") +KatePluginSnippetsView::KatePluginSnippetsView(Kate::MainWindow *w, TQWidget *dock) : CWidgetSnippets(dock,"snippetswidget") , dock (dock) { setInstance (new KInstance("kate")); @@ -35,29 +35,29 @@ KatePluginSnippetsView::KatePluginSnippetsView(Kate::MainWindow *w, QWidget *doc //<make connections> connect ( - lvSnippets, SIGNAL( selectionChanged(QListViewItem *) ), - this, SLOT( slot_lvSnippetsSelectionChanged(QListViewItem *) ) + lvSnippets, TQT_SIGNAL( selectionChanged(TQListViewItem *) ), + this, TQT_SLOT( slot_lvSnippetsSelectionChanged(TQListViewItem *) ) ); connect ( - lvSnippets, SIGNAL( doubleClicked (QListViewItem *) ), - this, SLOT( slot_lvSnippetsClicked(QListViewItem *) ) + lvSnippets, TQT_SIGNAL( doubleClicked (TQListViewItem *) ), + this, TQT_SLOT( slot_lvSnippetsClicked(TQListViewItem *) ) ); connect ( - lvSnippets, SIGNAL( itemRenamed(QListViewItem *, int, const QString &) ), - this, SLOT( slot_lvSnippetsItemRenamed(QListViewItem *, int, const QString &) ) + lvSnippets, TQT_SIGNAL( itemRenamed(TQListViewItem *, int, const TQString &) ), + this, TQT_SLOT( slot_lvSnippetsItemRenamed(TQListViewItem *, int, const TQString &) ) ); connect ( - btnNew, SIGNAL( clicked () ), - this, SLOT( slot_btnNewClicked() ) + btnNew, TQT_SIGNAL( clicked () ), + this, TQT_SLOT( slot_btnNewClicked() ) ); connect ( - btnSave, SIGNAL( clicked () ), - this, SLOT( slot_btnSaveClicked() ) + btnSave, TQT_SIGNAL( clicked () ), + this, TQT_SLOT( slot_btnSaveClicked() ) ); connect ( - btnDelete, SIGNAL( clicked () ), - this, SLOT( slot_btnDeleteClicked() ) + btnDelete, TQT_SIGNAL( clicked () ), + this, TQT_SLOT( slot_btnDeleteClicked() ) ); //</make connections> @@ -99,7 +99,7 @@ KatePluginSnippetsView::~ KatePluginSnippetsView() { * @param name * @return */ -KatePluginSnippets::KatePluginSnippets( QObject* parent, const char* name, const QStringList& ) +KatePluginSnippets::KatePluginSnippets( TQObject* parent, const char* name, const TQStringList& ) : Kate::Plugin ( (Kate::Application*)parent, name ) {} /** @@ -114,7 +114,7 @@ KatePluginSnippets::~KatePluginSnippets() {} */ void KatePluginSnippets::addView(Kate::MainWindow *win) { - QWidget *dock = win->toolViewManager()->createToolView( + TQWidget *dock = win->toolViewManager()->createToolView( "kate_plugin_snippets", Kate::ToolViewManager::Left, SmallIcon("contents"), @@ -142,7 +142,7 @@ void KatePluginSnippets::removeView(Kate::MainWindow *win) { * * @param item */ -void KatePluginSnippetsView::slot_lvSnippetsSelectionChanged(QListViewItem * item) { +void KatePluginSnippetsView::slot_lvSnippetsSelectionChanged(TQListViewItem * item) { CSnippet *snippet; if ( (snippet = findSnippetByListViewItem(item))!= NULL ) { teSnippetText->setText(snippet->getValue()); @@ -155,14 +155,14 @@ void KatePluginSnippetsView::slot_lvSnippetsSelectionChanged(QListViewItem * it * Special meaning of <mark/> and <cursor/> ... * @param item */ -void KatePluginSnippetsView::slot_lvSnippetsClicked (QListViewItem * item) { +void KatePluginSnippetsView::slot_lvSnippetsClicked (TQListViewItem * item) { Kate::View *kv = win->viewManager()->activeView(); CSnippet *snippet; if (kv) { if ( (snippet = findSnippetByListViewItem(item))!= NULL ) { - QString sText = snippet->getValue(); - QString sSelection = ""; + TQString sText = snippet->getValue(); + TQString sSelection = ""; if ( kv->getDoc()->hasSelection() ) { sSelection = kv->getDoc()->selection(); @@ -170,9 +170,9 @@ void KatePluginSnippetsView::slot_lvSnippetsClicked (QListViewItem * item) { kv->keyDelete(); } - sText.replace( QRegExp("<mark/>"), sSelection ); - sText.replace( QRegExp("<date/>"), QDate::currentDate().toString(Qt::LocalDate) ); - sText.replace( QRegExp("<time/>"), QTime::currentTime().toString(Qt::LocalDate) ); + sText.replace( TQRegExp("<mark/>"), sSelection ); + sText.replace( TQRegExp("<date/>"), TQDate::currentDate().toString(Qt::LocalDate) ); + sText.replace( TQRegExp("<time/>"), TQTime::currentTime().toString(Qt::LocalDate) ); kv->insertText ( sText ); } kv->setFocus(); @@ -186,7 +186,7 @@ void KatePluginSnippetsView::slot_lvSnippetsClicked (QListViewItem * item) { * @param * @param text */ -void KatePluginSnippetsView::slot_lvSnippetsItemRenamed(QListViewItem *lvi,int /*col*/, const QString& text) { +void KatePluginSnippetsView::slot_lvSnippetsItemRenamed(TQListViewItem *lvi,int /*col*/, const TQString& text) { CSnippet *snippet; if ( (snippet = findSnippetByListViewItem(lvi)) != NULL ) { snippet->setKey( text ); @@ -199,10 +199,10 @@ void KatePluginSnippetsView::slot_lvSnippetsItemRenamed(QListViewItem *lvi,int / * */ void KatePluginSnippetsView::slot_btnNewClicked() { - QString sKey = "New Snippet"; - QString sValue = ""; + TQString sKey = "New Snippet"; + TQString sValue = ""; - QListViewItem *lvi = insertItem(sKey, true); + TQListViewItem *lvi = insertItem(sKey, true); lSnippets.append( new CSnippet(sKey, sValue, lvi) ); } @@ -212,7 +212,7 @@ void KatePluginSnippetsView::slot_btnNewClicked() { */ void KatePluginSnippetsView::slot_btnSaveClicked() { CSnippet *snippet; - QListViewItem *lvi = lvSnippets->selectedItem(); + TQListViewItem *lvi = lvSnippets->selectedItem(); if ( (snippet = findSnippetByListViewItem(lvi)) != NULL ) { snippet->setValue(teSnippetText->text() ); writeConfig(); @@ -225,7 +225,7 @@ void KatePluginSnippetsView::slot_btnSaveClicked() { */ void KatePluginSnippetsView::slot_btnDeleteClicked() { CSnippet *snippet; - QListViewItem *lvi = lvSnippets->selectedItem(); + TQListViewItem *lvi = lvSnippets->selectedItem(); if ( (snippet = findSnippetByListViewItem(lvi)) != NULL ) { @@ -239,15 +239,15 @@ void KatePluginSnippetsView::slot_btnDeleteClicked() { * */ void KatePluginSnippetsView::readConfig() { - QString sKey, sValue; - QListViewItem *lvi; + TQString sKey, sValue; + TQListViewItem *lvi; config->setGroup("Snippets"); int iNrOfSnippets = config->readEntry("NumberOfSnippets", "0").toInt() ; for (int i=0; i < iNrOfSnippets; i++) { - QStringList slFields; - slFields = config->readListEntry ( QString::number(i) ); + TQStringList slFields; + slFields = config->readListEntry ( TQString::number(i) ); sKey = slFields[0]; sValue = slFields[1]; @@ -288,11 +288,11 @@ void KatePluginSnippetsView::writeConfig() { CSnippet *snippet; for ( snippet = lSnippets.first(); snippet; snippet = lSnippets.next() ) { - QStringList slFields; + TQStringList slFields; slFields.append( snippet->getKey() ); slFields.append( snippet->getValue() ); - config->writeEntry ( QString::number(i), slFields, ',' ); + config->writeEntry ( TQString::number(i), slFields, ',' ); i++; } // sync to disc ... @@ -305,7 +305,7 @@ void KatePluginSnippetsView::writeConfig() { * @param item * @return */ -CSnippet* KatePluginSnippetsView::findSnippetByListViewItem(QListViewItem *item) { +CSnippet* KatePluginSnippetsView::findSnippetByListViewItem(TQListViewItem *item) { CSnippet *snippet = NULL; for ( snippet = lSnippets.first(); snippet; snippet = lSnippets.next() ) { if ( snippet->getListViewItem() == item) diff --git a/kate/snippets/plugin_katesnippets.h b/kate/snippets/plugin_katesnippets.h index 9a940e5..aac5049 100644 --- a/kate/snippets/plugin_katesnippets.h +++ b/kate/snippets/plugin_katesnippets.h @@ -17,12 +17,12 @@ #include <kate/toolviewmanager.h> -#include <qlistview.h> -#include <qregexp.h> +#include <tqlistview.h> +#include <tqregexp.h> #include <kconfig.h> -#include <qptrlist.h> -#include <qtoolbutton.h> -#include <qtextedit.h> +#include <tqptrlist.h> +#include <tqtoolbutton.h> +#include <tqtextedit.h> #include <kiconloader.h> #include "csnippet.h" @@ -35,14 +35,14 @@ class KatePluginSnippetsView : public CWidgetSnippets, public KXMLGUIClient { friend class KatePluginSnippets; public: - KatePluginSnippetsView (Kate::MainWindow *w, QWidget *dock); + KatePluginSnippetsView (Kate::MainWindow *w, TQWidget *dock); virtual ~KatePluginSnippetsView (); - CSnippet* findSnippetByListViewItem(QListViewItem *item); + CSnippet* findSnippetByListViewItem(TQListViewItem *item); public slots: - void slot_lvSnippetsSelectionChanged(QListViewItem * item); - void slot_lvSnippetsClicked (QListViewItem * item); - void slot_lvSnippetsItemRenamed(QListViewItem *lvi,int col, const QString& text); + void slot_lvSnippetsSelectionChanged(TQListViewItem * item); + void slot_lvSnippetsClicked (TQListViewItem * item); + void slot_lvSnippetsItemRenamed(TQListViewItem *lvi,int col, const TQString& text); void slot_btnNewClicked(); void slot_btnSaveClicked(); void slot_btnDeleteClicked(); @@ -53,25 +53,25 @@ protected: private: KConfig *config; - QPtrList<CSnippet> lSnippets; + TQPtrList<CSnippet> lSnippets; public: Kate::MainWindow *win; - QWidget *dock; + TQWidget *dock; }; class KatePluginSnippets : public Kate::Plugin, Kate::PluginViewInterface { Q_OBJECT public: - KatePluginSnippets( QObject* parent = 0, const char* name = 0, const QStringList& = QStringList() ); + KatePluginSnippets( TQObject* parent = 0, const char* name = 0, const TQStringList& = TQStringList() ); virtual ~KatePluginSnippets(); void addView (Kate::MainWindow *win); void removeView (Kate::MainWindow *win); private: - QPtrList<class KatePluginSnippetsView> m_views; + TQPtrList<class KatePluginSnippetsView> m_views; }; diff --git a/kate/tabbarextension/plugin_katetabbarextension.cpp b/kate/tabbarextension/plugin_katetabbarextension.cpp index 7004ff8..cfc4619 100644 --- a/kate/tabbarextension/plugin_katetabbarextension.cpp +++ b/kate/tabbarextension/plugin_katetabbarextension.cpp @@ -37,11 +37,11 @@ #include <kiconloader.h> #include <kfiledialog.h> -#include <qpushbutton.h> -#include <qlayout.h> -#include <qtooltip.h> -#include <qgroupbox.h> -#include <qcheckbox.h> +#include <tqpushbutton.h> +#include <tqlayout.h> +#include <tqtooltip.h> +#include <tqgroupbox.h> +#include <tqcheckbox.h> // END class PluginView : public KXMLGUIClient @@ -72,8 +72,8 @@ KatePluginFactory::~KatePluginFactory() delete s_instance; } -QObject* KatePluginFactory::createObject( - QObject* parent, const char* name, const char*, const QStringList & ) +TQObject* KatePluginFactory::createObject( + TQObject* parent, const char* name, const char*, const TQStringList & ) { return new KatePluginTabBarExtension( parent, name ); } @@ -82,7 +82,7 @@ KInstance* KatePluginFactory::s_instance = 0L; // BEGIN KatePluginTabBarExtension KatePluginTabBarExtension::KatePluginTabBarExtension( - QObject* parent, const char* name ) + TQObject* parent, const char* name ) : Kate::Plugin ( (Kate::Application*)parent, name ), pConfig(new KConfig("katetabbarextensionpluginrc")) { @@ -122,8 +122,8 @@ void KatePluginTabBarExtension::addView(Kate::MainWindow *win) KToolBar* toolbar = dynamic_cast<KToolBar*> (win->guiFactory()->container("tabbarExtensionToolBar", view)); if (toolbar) { - connect(toolbar, SIGNAL( orientationChanged(Orientation) ), - view->tabbar, SLOT( slotMoved(Orientation) )); + connect(toolbar, TQT_SIGNAL( orientationChanged(Orientation) ), + view->tabbar, TQT_SLOT( slotMoved(Orientation) )); } } @@ -152,12 +152,12 @@ void KatePluginTabBarExtension::removeView(Kate::MainWindow *win) } Kate::PluginConfigPage* KatePluginTabBarExtension::configPage( - uint, QWidget *w, const char* /*name*/) + uint, TQWidget *w, const char* /*name*/) { KateTabBarExtensionConfigPage* p = new KateTabBarExtensionConfigPage(this, w); initConfigPage( p ); - connect( p, SIGNAL(configPageApplyRequest(KateTabBarExtensionConfigPage*)), - SLOT(applyConfig(KateTabBarExtensionConfigPage*)) ); + connect( p, TQT_SIGNAL(configPageApplyRequest(KateTabBarExtensionConfigPage*)), + TQT_SLOT(applyConfig(KateTabBarExtensionConfigPage*)) ); return (Kate::PluginConfigPage*)p; } @@ -175,8 +175,8 @@ void KatePluginTabBarExtension::applyConfig( KateTabBarExtensionConfigPage* p ) // BEGIN KateTabBarButton KateTabBarButton::KateTabBarButton(Kate::ViewManager* pViewManager, - Kate::Document *pDoc, QWidget * parent, const char * name) - : QPushButton(parent, name), + Kate::Document *pDoc, TQWidget * parent, const char * name) + : TQPushButton(parent, name), modified(false), myDocID(pDoc->documentNumber()), doc(pDoc), @@ -184,11 +184,11 @@ KateTabBarButton::KateTabBarButton(Kate::ViewManager* pViewManager, { setFlat(true); setToggleButton(true); - setFocusPolicy(QWidget::NoFocus); + setFocusPolicy(TQWidget::NoFocus); setText(pDoc->docName()); - connect(this, SIGNAL(toggled(bool)), SLOT(setOn(bool))); + connect(this, TQT_SIGNAL(toggled(bool)), TQT_SLOT(setOn(bool))); } KateTabBarButton::~KateTabBarButton() {} @@ -204,29 +204,29 @@ void KateTabBarButton::setDirty(bool d) setIconSet(SmallIconSet("cancel")); } else { if (modified) setIconSet(SmallIconSet("modified")); - else setIconSet(QIconSet()); + else setIconSet(TQIconSet()); } } -void KateTabBarButton::setText( const QString& newText) +void KateTabBarButton::setText( const TQString& newText) { - QToolTip::remove(this); + TQToolTip::remove(this); if (newText.length() > 20) { // squeeze to length 17+3=20 - QPushButton::setText(newText.left(9) + "..." + newText.right(8)); - QToolTip::add(this, newText); + TQPushButton::setText(newText.left(9) + "..." + newText.right(8)); + TQToolTip::add(this, newText); } else { - QPushButton::setText(newText); + TQPushButton::setText(newText); } } -QString KateTabBarButton::fullName() const +TQString KateTabBarButton::fullName() const { if (doc) { return doc->docName(); } else { - return QString(""); + return TQString(""); } } @@ -234,45 +234,45 @@ void KateTabBarButton::triggerModified() { modified = !modified; if (modified) { - QColor c(255, 0, 0); + TQColor c(255, 0, 0); setPaletteForegroundColor( c ); setIconSet(SmallIconSet("modified")); } else { - QColor c(KGlobalSettings::textColor()); + TQColor c(KGlobalSettings::textColor()); setPaletteForegroundColor( c ); - setIconSet(QIconSet()); + setIconSet(TQIconSet()); } } void KateTabBarButton::setOn(bool on) { - disconnect( SIGNAL(toggled(bool))); + disconnect( TQT_SIGNAL(toggled(bool))); // kdDebug() << "setOn: " << (int)on << endl; if ((!on) && viewManager->activeView()->document()->documentNumber() == documentNumber()) { // kdDebug() << "setOn aborted " << endl; - QPushButton::setOn(true); + TQPushButton::setOn(true); } else { - QPushButton::setOn(on); + TQPushButton::setOn(on); if (on) emit myToggled(this); } - connect(this, SIGNAL(toggled(bool)), SLOT(setOn(bool))); + connect(this, TQT_SIGNAL(toggled(bool)), TQT_SLOT(setOn(bool))); } // END KateTabBarButton // BEGIN KateTabBarExtension KateTabBarExtension::KateTabBarExtension( Kate::DocumentManager *pDocManager, Kate::MainWindow *win, bool bHorizOrientation, bool bSort, - QWidget* parent, const char* name, WFlags f ) - : QWidget(parent, name, f), + TQWidget* parent, const char* name, WFlags f ) + : TQWidget(parent, name, f), pCurrentTab(0), m_win(win), m_docManager(pDocManager), m_sort(false) { if (bHorizOrientation) { - top = new QBoxLayout(this, QBoxLayout::LeftToRight); + top = new TQBoxLayout(this, TQBoxLayout::LeftToRight); m_orientation = Qt::Horizontal; } else { - top = new QBoxLayout(this, QBoxLayout::TopToBottom); + top = new TQBoxLayout(this, TQBoxLayout::TopToBottom); m_orientation = Qt::Vertical; } @@ -282,13 +282,13 @@ KateTabBarExtension::KateTabBarExtension( Kate::DocumentManager *pDocManager, slotDocumentCreated (pDocManager->document(i)); } - connect(m_win->viewManager(), SIGNAL(viewChanged()), SLOT(slotViewChanged())); + connect(m_win->viewManager(), TQT_SIGNAL(viewChanged()), TQT_SLOT(slotViewChanged())); connect(pDocManager, - SIGNAL(documentCreated(Kate::Document *)), - SLOT(slotDocumentCreated(Kate::Document *))); + TQT_SIGNAL(documentCreated(Kate::Document *)), + TQT_SLOT(slotDocumentCreated(Kate::Document *))); connect(pDocManager, - SIGNAL(documentDeleted(uint)), - SLOT(slotDocumentDeleted(uint))); + TQT_SIGNAL(documentDeleted(uint)), + TQT_SLOT(slotDocumentDeleted(uint))); setSortByName(bSort); } @@ -300,11 +300,11 @@ void KateTabBarExtension::slotMoved(Orientation o) // the tabbar moved (top, right, bottom, left or fluently) switch (o) { case Qt::Vertical: - top->setDirection(QBoxLayout::TopToBottom); + top->setDirection(TQBoxLayout::TopToBottom); break; case Qt::Horizontal: - top->setDirection(QBoxLayout::LeftToRight); + top->setDirection(TQBoxLayout::LeftToRight); break; } @@ -357,15 +357,15 @@ void KateTabBarExtension::slotDocumentCreated (Kate::Document *doc) if (!doc) return; KateTabBarButton* tab = new KateTabBarButton(m_win->viewManager(), doc, this); - connect(tab, SIGNAL(myToggled(KateTabBarButton*)), - SLOT(slotActivateView(KateTabBarButton*))); - connect(doc, SIGNAL(nameChanged(Kate::Document *)), - SLOT(slotNameChanged(Kate::Document *))); - connect(doc, SIGNAL(modStateChanged(Kate::Document *)), - SLOT(slotModChanged(Kate::Document *))); + connect(tab, TQT_SIGNAL(myToggled(KateTabBarButton*)), + TQT_SLOT(slotActivateView(KateTabBarButton*))); + connect(doc, TQT_SIGNAL(nameChanged(Kate::Document *)), + TQT_SLOT(slotNameChanged(Kate::Document *))); + connect(doc, TQT_SIGNAL(modStateChanged(Kate::Document *)), + TQT_SLOT(slotModChanged(Kate::Document *))); connect(doc, - SIGNAL(modifiedOnDisc(Kate::Document *, bool, unsigned char)), - SLOT(slotModifiedOnDisc(Kate::Document *, bool, unsigned char))); + TQT_SIGNAL(modifiedOnDisc(Kate::Document *, bool, unsigned char)), + TQT_SLOT(slotModifiedOnDisc(Kate::Document *, bool, unsigned char))); if(doc->isModified()) tab->triggerModified(); tab->show(); top->addWidget(tab); @@ -475,22 +475,22 @@ void KateTabBarExtension::slotViewChanged () // BEGIN KateTabBarExtensionConfigPage KateTabBarExtensionConfigPage::KateTabBarExtensionConfigPage( - QObject* /*parent*/ /*= 0L*/, QWidget *parentWidget /*= 0L*/) + TQObject* /*parent*/ /*= 0L*/, TQWidget *parentWidget /*= 0L*/) : Kate::PluginConfigPage( parentWidget ) { - QVBoxLayout* top = new QVBoxLayout(this, 0, + TQVBoxLayout* top = new TQVBoxLayout(this, 0, KDialogBase::spacingHint()); - QGroupBox* gb = new QGroupBox( i18n("Sorting Behavior"), + TQGroupBox* gb = new TQGroupBox( i18n("Sorting Behavior"), this, "tab_bar_extension_config_page_layout" ); gb->setColumnLayout(1, Qt::Vertical); gb->setInsideSpacing(KDialogBase::spacingHint()); - pSortAlpha = new QCheckBox(i18n("Sort files alphabetically"), gb); + pSortAlpha = new TQCheckBox(i18n("Sort files alphabetically"), gb); top->add(gb); top->addStretch(1); // throw signal changed - connect(pSortAlpha, SIGNAL(toggled(bool)), this, SIGNAL(changed())); + connect(pSortAlpha, TQT_SIGNAL(toggled(bool)), this, TQT_SIGNAL(changed())); } KateTabBarExtensionConfigPage::~KateTabBarExtensionConfigPage() {} @@ -503,8 +503,8 @@ void KateTabBarExtensionConfigPage::apply() // BEGIN MyPtrList implementaion -int MyPtrList::compareItems ( QPtrCollection::Item item1_, - QPtrCollection::Item item2_ ) +int MyPtrList::compareItems ( TQPtrCollection::Item item1_, + TQPtrCollection::Item item2_ ) { KateTabBarButton* item1 = reinterpret_cast<KateTabBarButton*>(item1_); KateTabBarButton* item2 = reinterpret_cast<KateTabBarButton*>(item2_); diff --git a/kate/tabbarextension/plugin_katetabbarextension.h b/kate/tabbarextension/plugin_katetabbarextension.h index 6b53444..db2df7a 100644 --- a/kate/tabbarextension/plugin_katetabbarextension.h +++ b/kate/tabbarextension/plugin_katetabbarextension.h @@ -39,23 +39,23 @@ #include <klocale.h> #include <ktoolbar.h> -#include <qwidget.h> -#include <qpushbutton.h> -#include <qptrlist.h> +#include <tqwidget.h> +#include <tqpushbutton.h> +#include <tqptrlist.h> class QBoxLayout; class QCheckBox; class KateTabBarButton; /** - * Same as QPtrList. Only difference is: overwrite comapreItems() for sorting reason. + * Same as TQPtrList. Only difference is: overwrite comapreItems() for sorting reason. */ -class MyPtrList : public QPtrList <KateTabBarButton> +class MyPtrList : public TQPtrList <KateTabBarButton> { public: - MyPtrList() { QPtrList<KateTabBarButton>::QPtrList(); } + MyPtrList() { TQPtrList<KateTabBarButton>::TQPtrList(); } - virtual int compareItems ( QPtrCollection::Item item1_, QPtrCollection::Item item2_ ); + virtual int compareItems ( TQPtrCollection::Item item1_, TQPtrCollection::Item item2_ ); }; class KatePluginFactory : public KLibFactory @@ -66,8 +66,8 @@ class KatePluginFactory : public KLibFactory KatePluginFactory(); virtual ~KatePluginFactory(); - virtual QObject* createObject( QObject* parent = 0, const char* pname = 0, - const char* name = "QObject", const QStringList &args = QStringList() ); + virtual TQObject* createObject( TQObject* parent = 0, const char* pname = 0, + const char* name = "TQObject", const TQStringList &args = TQStringList() ); private: static KInstance* s_instance; @@ -90,7 +90,7 @@ class KateTabBarButton: public QPushButton * @param name name of the tab button */ KateTabBarButton(Kate::ViewManager* pViewManager, Kate::Document *pDoc, - QWidget* parent = 0, const char * name = 0); + TQWidget* parent = 0, const char * name = 0); /** * standard destructor (emtpy) @@ -106,7 +106,7 @@ class KateTabBarButton: public QPushButton * get the document's full name (eg. main.cpp), used for comparison * @return the document's name */ - QString fullName() const; + TQString fullName() const; /** * negate the modified flag and change the button color @@ -124,7 +124,7 @@ class KateTabBarButton: public QPushButton * set text for this tab * @param newText new text */ - virtual void setText( const QString& newText); + virtual void setText( const TQString& newText); signals: /** @@ -167,7 +167,7 @@ class KateTabBarExtension : public QWidget */ KateTabBarExtension( Kate::DocumentManager *pDocManager, Kate::MainWindow *win, bool bHorizOrientation, bool bSort, - QWidget * parent = 0, const char * name = 0, WFlags f = 0 ); + TQWidget * parent = 0, const char * name = 0, WFlags f = 0 ); /** standard destructor */ ~KateTabBarExtension(); @@ -245,10 +245,10 @@ class KateTabBarExtension : public QWidget private: KateTabBarButton* pCurrentTab; ///< pointer to the current tab - QBoxLayout* top; ///< layout that contains all tabs + TQBoxLayout* top; ///< layout that contains all tabs Kate::MainWindow* m_win; ///< pointer to the main window Kate::DocumentManager* m_docManager; ///< pointer to the document manager -// QPtrList <KateTabBarButton> m_tabs; ///< list containing all tabs +// TQPtrList <KateTabBarButton> m_tabs; ///< list containing all tabs MyPtrList m_tabs; ///< list containing all tabs Qt::Orientation m_orientation; ///< save tabbar's orientation bool m_sort; ///< how to sort @@ -264,7 +264,7 @@ class KateTabBarExtensionConfigPage : public Kate::PluginConfigPage friend class KatePluginTabBarExtension; public: - KateTabBarExtensionConfigPage (QObject* parent = 0L, QWidget *parentWidget = 0L); + KateTabBarExtensionConfigPage (TQObject* parent = 0L, TQWidget *parentWidget = 0L); ~KateTabBarExtensionConfigPage (); /** @@ -288,7 +288,7 @@ class KateTabBarExtensionConfigPage : public Kate::PluginConfigPage void configPageInitRequest( KateTabBarExtensionConfigPage* ); private: - QCheckBox* pSortAlpha; + TQCheckBox* pSortAlpha; }; class KatePluginTabBarExtension : public Kate::Plugin, Kate::PluginViewInterface, Kate::PluginConfigInterfaceExtension @@ -296,17 +296,17 @@ class KatePluginTabBarExtension : public Kate::Plugin, Kate::PluginViewInterface Q_OBJECT public: - KatePluginTabBarExtension( QObject* parent = 0, const char* name = 0 ); + KatePluginTabBarExtension( TQObject* parent = 0, const char* name = 0 ); virtual ~KatePluginTabBarExtension(); void addView (Kate::MainWindow *win); void removeView (Kate::MainWindow *win); uint configPages () const { return 1; } - Kate::PluginConfigPage *configPage (uint , QWidget *w, const char *name=0); - QString configPageName(uint) const { return i18n("Tab Bar Extension"); } - QString configPageFullName(uint) const { return i18n("Configure Tab Bar Extension"); } - QPixmap configPagePixmap (uint number = 0, int size = KIcon::SizeSmall) const { return 0L; } + Kate::PluginConfigPage *configPage (uint , TQWidget *w, const char *name=0); + TQString configPageName(uint) const { return i18n("Tab Bar Extension"); } + TQString configPageFullName(uint) const { return i18n("Configure Tab Bar Extension"); } + TQPixmap configPagePixmap (uint number = 0, int size = KIcon::SizeSmall) const { return 0L; } public slots: void applyConfig( KateTabBarExtensionConfigPage* ); @@ -315,7 +315,7 @@ class KatePluginTabBarExtension : public Kate::Plugin, Kate::PluginViewInterface void initConfigPage( KateTabBarExtensionConfigPage* ); private: - QPtrList<class PluginView> m_views; + TQPtrList<class PluginView> m_views; KConfig* pConfig; }; diff --git a/kate/textfilter/plugin_katetextfilter.cpp b/kate/textfilter/plugin_katetextfilter.cpp index b5cd1ac..2d8e446 100644 --- a/kate/textfilter/plugin_katetextfilter.cpp +++ b/kate/textfilter/plugin_katetextfilter.cpp @@ -25,7 +25,7 @@ #include <klocale.h> #include <cassert> #include <kdebug.h> -#include <qstring.h> +#include <tqstring.h> #include <ktexteditor/editinterfaceext.h> #include <kapplication.h> #include <kcompletion.h> @@ -44,7 +44,7 @@ class PluginView : public KXMLGUIClient Kate::MainWindow *win; }; -PluginKateTextFilter::PluginKateTextFilter( QObject* parent, const char* name, const QStringList& ) +PluginKateTextFilter::PluginKateTextFilter( TQObject* parent, const char* name, const TQStringList& ) : Kate::Plugin ( (Kate::Application *)parent, name ), Kate::Command(), m_pFilterShellProcess (NULL) @@ -64,7 +64,7 @@ void PluginKateTextFilter::addView(Kate::MainWindow *win) PluginView *view = new PluginView (); (void) new KAction ( i18n("Filter Te&xt..."), /*"edit_filter",*/ CTRL + Key_Backslash, this, - SLOT( slotEditFilter() ), view->actionCollection(), "edit_filter" ); + TQT_SLOT( slotEditFilter() ), view->actionCollection(), "edit_filter" ); view->setInstance (new KInstance("kate")); view->setXMLFile( "plugins/katetextfilter/ui.rc" ); @@ -87,13 +87,13 @@ void PluginKateTextFilter::removeView(Kate::MainWindow *win) } void -splitString (QString q, char c, QStringList &list) // PCP +splitString (TQString q, char c, TQStringList &list) // PCP { // screw the OnceAndOnlyOnce Principle! int pos; - QString item; + TQString item; while ( (pos = q.find(c)) >= 0) { @@ -106,7 +106,7 @@ splitString (QString q, char c, QStringList &list) // PCP static void // PCP -slipInNewText (Kate::View & view, QString pre, QString marked, QString post, bool reselect) +slipInNewText (Kate::View & view, TQString pre, TQString marked, TQString post, bool reselect) { uint preDeleteLine = 0, preDeleteCol = 0; @@ -149,19 +149,19 @@ slipInNewText (Kate::View & view, QString pre, QString marked, QString post, boo } - static QString // PCP + static TQString // PCP KatePrompt ( - const QString & strTitle, - const QString & strPrompt, - QWidget * that, - QStringList *completionList + const TQString & strTitle, + const TQString & strPrompt, + TQWidget * that, + TQStringList *completionList ) { // TODO: Make this a "memory edit" field with a combo box // containing prior entries - KLineEditDlg dlg(strPrompt, QString::null, that); + KLineEditDlg dlg(strPrompt, TQString::null, that); dlg.setCaption(strTitle); KCompletion *comple=dlg.lineEdit()->completionObject(); comple->setItems(*completionList); @@ -189,7 +189,7 @@ PluginKateTextFilter::slotFilterReceivedStdout (KProcess * pProcess, char * got, // TODO: got a better idea? // while (len--) m_strFilterOutput += *got++; - m_strFilterOutput += QString::fromLocal8Bit( got, len ); + m_strFilterOutput += TQString::fromLocal8Bit( got, len ); // POP_(m_strFilterOutput); } @@ -212,7 +212,7 @@ PluginKateTextFilter::slotFilterProcessExited (KProcess * pProcess) if (!kv) return; KTextEditor::EditInterfaceExt *ext=KTextEditor::editInterfaceExt(kv->getDoc()); if (ext) ext->editBegin(); - QString marked = kv->getDoc()->selection (); + TQString marked = kv->getDoc()->selection (); if (marked.length() > 0) kv -> keyDelete (); kv -> insertText (m_strFilterOutput); @@ -224,9 +224,9 @@ PluginKateTextFilter::slotFilterProcessExited (KProcess * pProcess) static void // PCP -slipInFilter (KShellProcess & shell, Kate::View & view, QString command) +slipInFilter (KShellProcess & shell, Kate::View & view, TQString command) { - QString marked = view.getDoc()->selection (); + TQString marked = view.getDoc()->selection (); if( marked.isEmpty()) return; // POP_(command.latin1 ()); @@ -265,9 +265,9 @@ PluginKateTextFilter::slotEditFilter () // PCP Kate::View * kv (application()->activeMainWindow()->viewManager()->activeView()); if (!kv) return; - QString text ( KatePrompt ( i18n("Filter"), + TQString text ( KatePrompt ( i18n("Filter"), i18n("Enter command to pipe selected text through:"), - (QWidget*) kv, + (TQWidget*) kv, &completionList ) ); @@ -275,7 +275,7 @@ PluginKateTextFilter::slotEditFilter () // PCP runFilter( kv, text ); } -void PluginKateTextFilter::runFilter( Kate::View *kv, const QString &filter ) +void PluginKateTextFilter::runFilter( Kate::View *kv, const TQString &filter ) { m_strFilterOutput = ""; @@ -283,29 +283,29 @@ void PluginKateTextFilter::runFilter( Kate::View *kv, const QString &filter ) { m_pFilterShellProcess = new KShellProcess; - connect ( m_pFilterShellProcess, SIGNAL(wroteStdin(KProcess *)), - this, SLOT(slotFilterCloseStdin (KProcess *))); + connect ( m_pFilterShellProcess, TQT_SIGNAL(wroteStdin(KProcess *)), + this, TQT_SLOT(slotFilterCloseStdin (KProcess *))); - connect ( m_pFilterShellProcess, SIGNAL(receivedStdout(KProcess*,char*,int)), - this, SLOT(slotFilterReceivedStdout(KProcess*,char*,int)) ); + connect ( m_pFilterShellProcess, TQT_SIGNAL(receivedStdout(KProcess*,char*,int)), + this, TQT_SLOT(slotFilterReceivedStdout(KProcess*,char*,int)) ); - connect ( m_pFilterShellProcess, SIGNAL(receivedStderr(KProcess*,char*,int)), - this, SLOT(slotFilterReceivedStderr(KProcess*,char*,int)) ); + connect ( m_pFilterShellProcess, TQT_SIGNAL(receivedStderr(KProcess*,char*,int)), + this, TQT_SLOT(slotFilterReceivedStderr(KProcess*,char*,int)) ); - connect ( m_pFilterShellProcess, SIGNAL(processExited(KProcess*)), - this, SLOT(slotFilterProcessExited(KProcess*) ) ) ; + connect ( m_pFilterShellProcess, TQT_SIGNAL(processExited(KProcess*)), + this, TQT_SLOT(slotFilterProcessExited(KProcess*) ) ) ; } slipInFilter (*m_pFilterShellProcess, *kv, filter); } //BEGIN Kate::Command methods -QStringList PluginKateTextFilter::cmds() +TQStringList PluginKateTextFilter::cmds() { - return QStringList("textfilter"); + return TQStringList("textfilter"); } -bool PluginKateTextFilter::help( Kate::View *, const QString&, QString &msg ) +bool PluginKateTextFilter::help( Kate::View *, const TQString&, TQString &msg ) { msg = i18n( "<qt><p>Usage: <code>textfilter COMMAND</code></p>" @@ -313,7 +313,7 @@ bool PluginKateTextFilter::help( Kate::View *, const QString&, QString &msg ) return true; } -bool PluginKateTextFilter::exec( Kate::View *v, const QString &cmd, QString &msg ) +bool PluginKateTextFilter::exec( Kate::View *v, const TQString &cmd, TQString &msg ) { if (! v->getDoc()->hasSelection() ) { @@ -321,7 +321,7 @@ bool PluginKateTextFilter::exec( Kate::View *v, const QString &cmd, QString &msg return false; } - QString filter = cmd.section( " ", 1 ).stripWhiteSpace(); + TQString filter = cmd.section( " ", 1 ).stripWhiteSpace(); if ( filter.isEmpty() ) { diff --git a/kate/textfilter/plugin_katetextfilter.h b/kate/textfilter/plugin_katetextfilter.h index 1b27b89..2d5678d 100644 --- a/kate/textfilter/plugin_katetextfilter.h +++ b/kate/textfilter/plugin_katetextfilter.h @@ -18,7 +18,7 @@ #ifndef _PLUGIN_KANT_TEXTFILTER_H #define _PLUGIN_KANT_TEXTFILTER_H -#include <qstring.h> +#include <tqstring.h> #include <kate/plugin.h> #include <kate/application.h> @@ -35,24 +35,24 @@ class PluginKateTextFilter : public Kate::Plugin, public Kate::PluginViewInterfa Q_OBJECT public: - PluginKateTextFilter( QObject* parent = 0, const char* name = 0, const QStringList& = QStringList() ); + PluginKateTextFilter( TQObject* parent = 0, const char* name = 0, const TQStringList& = TQStringList() ); virtual ~PluginKateTextFilter(); void addView (Kate::MainWindow *win); void removeView (Kate::MainWindow *win); // Kate::Command - QStringList cmds (); - bool exec (Kate::View *view, const QString &cmd, QString &msg); - bool help (Kate::View *view, const QString &cmd, QString &msg); + TQStringList cmds (); + bool exec (Kate::View *view, const TQString &cmd, TQString &msg); + bool help (Kate::View *view, const TQString &cmd, TQString &msg); private: - void runFilter( Kate::View *kv, const QString & filter ); + void runFilter( Kate::View *kv, const TQString & filter ); private: - QString m_strFilterOutput; + TQString m_strFilterOutput; KShellProcess * m_pFilterShellProcess; - QPtrList<class PluginView> m_views; - QStringList completionList; + TQPtrList<class PluginView> m_views; + TQStringList completionList; public slots: void slotEditFilter (); void slotFilterReceivedStdout (KProcess * pProcess, char * got, int len); diff --git a/kate/xmlcheck/plugin_katexmlcheck.cpp b/kate/xmlcheck/plugin_katexmlcheck.cpp index 120e04e..253c9d0 100644 --- a/kate/xmlcheck/plugin_katexmlcheck.cpp +++ b/kate/xmlcheck/plugin_katexmlcheck.cpp @@ -34,11 +34,11 @@ #include <cassert> #include <config.h> -#include <qfile.h> -#include <qinputdialog.h> -#include <qregexp.h> -#include <qstring.h> -#include <qtextstream.h> +#include <tqfile.h> +#include <tqinputdialog.h> +#include <tqregexp.h> +#include <tqstring.h> +#include <tqtextstream.h> #include <kaction.h> #include <kcursor.h> @@ -54,7 +54,7 @@ K_EXPORT_COMPONENT_FACTORY( katexmlcheckplugin, KGenericFactory<PluginKateXMLCheck>( "katexmlcheck" ) ) -PluginKateXMLCheck::PluginKateXMLCheck( QObject* parent, const char* name, const QStringList& ) +PluginKateXMLCheck::PluginKateXMLCheck( TQObject* parent, const char* name, const TQStringList& ) : Kate::Plugin ( (Kate::Application *)parent, name ) { } @@ -68,7 +68,7 @@ PluginKateXMLCheck::~PluginKateXMLCheck() void PluginKateXMLCheck::addView(Kate::MainWindow *win) { Kate::ToolViewManager *viewmanager = win->toolViewManager(); - QWidget *dock = viewmanager->createToolView("kate_plugin_xmlcheck_ouputview", Kate::ToolViewManager::Bottom, SmallIcon("misc"), i18n("XML Checker Output")); + TQWidget *dock = viewmanager->createToolView("kate_plugin_xmlcheck_ouputview", Kate::ToolViewManager::Bottom, SmallIcon("misc"), i18n("XML Checker Output")); PluginKateXMLCheckView *view = new PluginKateXMLCheckView (dock,win,"katexmlcheck_outputview"); view->dock = dock; @@ -94,22 +94,22 @@ void PluginKateXMLCheck::removeView(Kate::MainWindow *win) //--------------------------------- -PluginKateXMLCheckView::PluginKateXMLCheckView(QWidget *parent,Kate::MainWindow *mainwin,const char* name) - :QListView(parent,name),KXMLGUIClient(),win(mainwin) +PluginKateXMLCheckView::PluginKateXMLCheckView(TQWidget *parent,Kate::MainWindow *mainwin,const char* name) + :TQListView(parent,name),KXMLGUIClient(),win(mainwin) { m_tmp_file=0; m_proc=0; (void) new KAction ( i18n("Validate XML"), 0, this, - SLOT( slotValidate() ), actionCollection(), "xml_check" ); + TQT_SLOT( slotValidate() ), actionCollection(), "xml_check" ); // TODO?: //(void) new KAction ( i18n("Indent XML"), 0, this, - // SLOT( slotIndent() ), actionCollection(), "xml_indent" ); + // TQT_SLOT( slotIndent() ), actionCollection(), "xml_indent" ); setInstance(new KInstance("kate")); setXMLFile("plugins/katexmlcheck/ui.rc"); - setFocusPolicy(QWidget::NoFocus); + setFocusPolicy(TQWidget::NoFocus); addColumn(i18n("#"), -1); addColumn(i18n("Line"), -1); setColumnAlignment(1, AlignRight); @@ -117,8 +117,8 @@ PluginKateXMLCheckView::PluginKateXMLCheckView(QWidget *parent,Kate::MainWindow setColumnAlignment(2, AlignRight); addColumn(i18n("Message"), -1); setAllColumnsShowFocus(true); - setResizeMode(QListView::LastColumn); - connect(this, SIGNAL(clicked(QListViewItem *)), SLOT(slotClicked(QListViewItem *))); + setResizeMode(TQListView::LastColumn); + connect(this, TQT_SIGNAL(clicked(TQListViewItem *)), TQT_SLOT(slotClicked(TQListViewItem *))); /* TODO?: invalidate the listview when document has changed Kate::View *kv = application()->activeMainWindow()->viewManager()->activeView(); @@ -126,17 +126,17 @@ PluginKateXMLCheckView::PluginKateXMLCheckView(QWidget *parent,Kate::MainWindow kdDebug() << "Warning: no Kate::View" << endl; return; } - connect(kv, SIGNAL(modifiedChanged()), this, SLOT(slotUpdate())); + connect(kv, TQT_SIGNAL(modifiedChanged()), this, TQT_SLOT(slotUpdate())); */ m_proc_stderr = ""; m_proc = new KProcess(); - connect(m_proc, SIGNAL(processExited(KProcess*)), this, SLOT(slotProcExited(KProcess*))); + connect(m_proc, TQT_SIGNAL(processExited(KProcess*)), this, TQT_SLOT(slotProcExited(KProcess*))); // we currently only want errors: - //connect(m_proc, SIGNAL(receivedStdout(KProcess*,char*,int)), - // this, SLOT(receivedProcStdout(KProcess*, char*, int))); - connect(m_proc, SIGNAL(receivedStderr(KProcess*,char*,int)), - this, SLOT(slotReceivedProcStderr(KProcess*, char*, int))); + //connect(m_proc, TQT_SIGNAL(receivedStdout(KProcess*,char*,int)), + // this, TQT_SLOT(receivedProcStdout(KProcess*, char*, int))); + connect(m_proc, TQT_SIGNAL(receivedStderr(KProcess*,char*,int)), + this, TQT_SLOT(slotReceivedProcStderr(KProcess*, char*, int))); } @@ -152,7 +152,7 @@ PluginKateXMLCheckView::~PluginKateXMLCheckView() void PluginKateXMLCheckView::slotReceivedProcStderr(KProcess *, char *result, int len) { - m_proc_stderr += QString::fromLocal8Bit( QCString(result, len+1) ); + m_proc_stderr += TQString::fromLocal8Bit( TQCString(result, len+1) ); } @@ -165,29 +165,29 @@ void PluginKateXMLCheckView::slotProcExited(KProcess*) kdDebug() << "slotProcExited()" << endl; //kdDebug() << "output: " << endl << m_proc_stderr << endl << endl; - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); m_tmp_file->unlink(); clear(); uint list_count = 0; uint err_count = 0; if( ! m_validating ) { // no i18n here, so we don't get an ugly English<->Non-english mixup: - QString msg; + TQString msg; if( m_dtdname.isEmpty() ) { msg = "No DOCTYPE found, will only check well-formedness."; } else { msg = "'" + m_dtdname + "' not found, will only check well-formedness."; } - (void)new QListViewItem(this, QString("1").rightJustify(4,' '), "", "", msg); + (void)new TQListViewItem(this, TQString("1").rightJustify(4,' '), "", "", msg); list_count++; } if( ! m_proc_stderr.isEmpty() ) { - QStringList lines = QStringList::split("\n", m_proc_stderr); - QListViewItem *item = 0; - QString linenumber, msg; + TQStringList lines = TQStringList::split("\n", m_proc_stderr); + TQListViewItem *item = 0; + TQString linenumber, msg; uint line_count = 0; - for(QStringList::Iterator it = lines.begin(); it != lines.end(); ++it) { - QString line = *it; + for(TQStringList::Iterator it = lines.begin(); it != lines.end(); ++it) { + TQString line = *it; line_count++; int semicolon_1 = line.find(':'); int semicolon_2 = line.find(':', semicolon_1+1); @@ -202,13 +202,13 @@ void PluginKateXMLCheckView::slotProcExited(KProcess*) if( line_count == lines.size() && caret_pos == -1 ) { msg = msg+"\n"+line; } - QString col = QString::number(caret_pos); + TQString col = TQString::number(caret_pos); if( col == "-1" ) { col = ""; } err_count++; list_count++; - item = new QListViewItem(this, QString::number(list_count).rightJustify(4,' '), linenumber, col, msg); + item = new TQListViewItem(this, TQString::number(list_count).rightJustify(4,' '), linenumber, col, msg); item->setMultiLinesEnabled(true); } else { msg = msg+"\n"+line; @@ -217,18 +217,18 @@ void PluginKateXMLCheckView::slotProcExited(KProcess*) sort(); // TODO?: insert in right order } if( err_count == 0 ) { - QString msg; + TQString msg; if( m_validating ) { msg = "No errors found, document is valid."; // no i18n here } else { msg = "No errors found, document is well-formed."; // no i18n here } - (void)new QListViewItem(this, QString::number(list_count+1).rightJustify(4,' '), "", "", msg); + (void)new TQListViewItem(this, TQString::number(list_count+1).rightJustify(4,' '), "", "", msg); } } -void PluginKateXMLCheckView::slotClicked(QListViewItem *item) +void PluginKateXMLCheckView::slotClicked(TQListViewItem *item) { kdDebug() << "slotClicked" << endl; if( item ) { @@ -285,14 +285,14 @@ bool PluginKateXMLCheckView::slotValidate() m_tmp_file=0L; return false; } - QTextStream *s = m_tmp_file->textStream(); + TQTextStream *s = m_tmp_file->textStream(); *s << kv->getDoc()->text(); bool removed = m_tmp_file->close(); if( ! removed ) { kdDebug() << "Warning (slotValidate()): temp file '" << m_tmp_file->name() << "' not deleted: " << m_tmp_file->status() << endl; } - QString exe = KStandardDirs::findExe("xmllint"); + TQString exe = KStandardDirs::findExe("xmllint"); if( exe.isEmpty() ) { exe = locate("exe", "xmllint"); } @@ -300,29 +300,29 @@ bool PluginKateXMLCheckView::slotValidate() // use catalogs for KDE docbook: if( ! getenv("SGML_CATALOG_FILES") ) { KInstance ins("katexmlcheckplugin"); - QString catalogs; + TQString catalogs; catalogs += ins.dirs()->findResource("data", "ksgmltools2/customization/catalog"); catalogs += ":"; catalogs += ins.dirs()->findResource("data", "ksgmltools2/docbook/xml-dtd-4.1.2/docbook.cat"); kdDebug() << "catalogs: " << catalogs << endl; - setenv("SGML_CATALOG_FILES", QFile::encodeName( catalogs ).data(), 1); + setenv("SGML_CATALOG_FILES", TQFile::encodeName( catalogs ).data(), 1); } //kdDebug() << "**catalogs: " << getenv("SGML_CATALOG_FILES") << endl; *m_proc << exe << "--catalogs" << "--noout"; // heuristic: assume that the doctype is in the first 10,000 bytes: - QString text_start = kv->getDoc()->text().left(10000); + TQString text_start = kv->getDoc()->text().left(10000); // remove comments before looking for doctype (as a doctype might be commented out // and needs to be ignored then): - QRegExp re("<!--.*-->"); + TQRegExp re("<!--.*-->"); re.setMinimal(true); text_start.replace(re, ""); - QRegExp re_doctype("<!DOCTYPE\\s+(.*)\\s+(?:PUBLIC\\s+[\"'].*[\"']\\s+[\"'](.*)[\"']|SYSTEM\\s+[\"'](.*)[\"'])", false); + TQRegExp re_doctype("<!DOCTYPE\\s+(.*)\\s+(?:PUBLIC\\s+[\"'].*[\"']\\s+[\"'](.*)[\"']|SYSTEM\\s+[\"'](.*)[\"'])", false); re_doctype.setMinimal(true); if( re_doctype.search(text_start) != -1 ) { - QString dtdname; + TQString dtdname; if( ! re_doctype.cap(2).isEmpty() ) { dtdname = re_doctype.cap(2); } else { @@ -348,6 +348,6 @@ bool PluginKateXMLCheckView::slotValidate() "sure that xmllint is installed. It is part of libxml2.")); return false; } - QApplication::setOverrideCursor(KCursor::waitCursor()); + TQApplication::setOverrideCursor(KCursor::waitCursor()); return true; } diff --git a/kate/xmlcheck/plugin_katexmlcheck.h b/kate/xmlcheck/plugin_katexmlcheck.h index 17c2e53..b078f59 100644 --- a/kate/xmlcheck/plugin_katexmlcheck.h +++ b/kate/xmlcheck/plugin_katexmlcheck.h @@ -25,8 +25,8 @@ #ifndef _PLUGIN_KANT_XMLCHECK_H #define _PLUGIN_KANT_XMLCHECK_H -#include <qlistview.h> -#include <qstring.h> +#include <tqlistview.h> +#include <tqstring.h> #include <kate/plugin.h> #include <kate/application.h> @@ -41,20 +41,20 @@ #include <kprocess.h> #include <ktempfile.h> -class PluginKateXMLCheckView : public QListView, public KXMLGUIClient +class PluginKateXMLCheckView : public TQListView, public KXMLGUIClient { Q_OBJECT public: - PluginKateXMLCheckView(QWidget *parent,Kate::MainWindow *mainwin,const char* name); + PluginKateXMLCheckView(TQWidget *parent,Kate::MainWindow *mainwin,const char* name); virtual ~PluginKateXMLCheckView(); Kate::MainWindow *win; - QWidget *dock; + TQWidget *dock; public slots: bool slotValidate(); - void slotClicked(QListViewItem *item); + void slotClicked(TQListViewItem *item); void slotProcExited(KProcess*); void slotReceivedProcStderr(KProcess*, char*, int); void slotUpdate(); @@ -64,8 +64,8 @@ class PluginKateXMLCheckView : public QListView, public KXMLGUIClient KParts::ReadOnlyPart *part; bool m_validating; KProcess *m_proc; - QString m_proc_stderr; - QString m_dtdname; + TQString m_proc_stderr; + TQString m_dtdname; }; @@ -74,14 +74,14 @@ class PluginKateXMLCheck : public Kate::Plugin, Kate::PluginViewInterface Q_OBJECT public: - PluginKateXMLCheck( QObject* parent = 0, const char* name = 0, const QStringList& = QStringList() ); + PluginKateXMLCheck( TQObject* parent = 0, const char* name = 0, const TQStringList& = TQStringList() ); virtual ~PluginKateXMLCheck(); void addView (Kate::MainWindow *win); void removeView (Kate::MainWindow *win); private: - QPtrList<PluginKateXMLCheckView> m_views; + TQPtrList<PluginKateXMLCheckView> m_views; }; #endif // _PLUGIN_KANT_XMLCHECK_H diff --git a/kate/xmltools/plugin_katexmltools.cpp b/kate/xmltools/plugin_katexmltools.cpp index 05f7802..182aeaf 100644 --- a/kate/xmltools/plugin_katexmltools.cpp +++ b/kate/xmltools/plugin_katexmltools.cpp @@ -63,12 +63,12 @@ TODO: but then at <xsl:template match="/"><html> it will only show you HTML elements! =>So better "Assign meta DTD" and "Add meta DTD", the latter will expand the current meta DTD -Option to insert empty element in <empty/> form --Show expanded entities with QChar::QChar( int rc ) + unicode font +-Show expanded entities with TQChar::TQChar( int rc ) + unicode font -Don't ignore entities defined in the document's prologue -Only offer 'valid' elements, i.e. don't take the elements as a set but check if the DTD is matched ( order, number of occurences, ... ) --Maybe only read the meta DTD file once, then store the resulting QMap on disk ( using QDataStream )? +-Maybe only read the meta DTD file once, then store the resulting TQMap on disk ( using TQDataStream )? We'll then have to compare timeOf_cacheFile <-> timeOf_metaDtd. -Try to use libxml */ @@ -78,16 +78,16 @@ TODO: #include <assert.h> -#include <qdatetime.h> -#include <qdom.h> -#include <qfile.h> -#include <qlayout.h> -#include <qlistbox.h> -#include <qprogressdialog.h> -#include <qpushbutton.h> -#include <qregexp.h> -#include <qstring.h> -#include <qtimer.h> +#include <tqdatetime.h> +#include <tqdom.h> +#include <tqfile.h> +#include <tqlayout.h> +#include <tqlistbox.h> +#include <tqprogressdialog.h> +#include <tqpushbutton.h> +#include <tqregexp.h> +#include <tqstring.h> +#include <tqtimer.h> #include <kaction.h> #include <kbuttonbox.h> @@ -113,13 +113,13 @@ class PluginView : public KXMLGUIClient Kate::MainWindow *win; }; -PluginKateXMLTools::PluginKateXMLTools( QObject* parent, const char* name, const QStringList& ) +PluginKateXMLTools::PluginKateXMLTools( TQObject* parent, const char* name, const TQStringList& ) : Kate::Plugin ( (Kate::Application*)parent, name ) { //kdDebug() << "PluginKateXMLTools constructor called" << endl; - m_dtdString = QString(); - m_urlString = QString(); + m_dtdString = TQString(); + m_urlString = TQString(); m_docToAssignTo = 0L; m_mode = none; @@ -127,17 +127,17 @@ PluginKateXMLTools::PluginKateXMLTools( QObject* parent, const char* name, const m_lastLine = 0; m_lastCol = 0; - m_lastAllowed = QStringList(); + m_lastAllowed = TQStringList(); m_popupOpenCol = -1; m_dtds.setAutoDelete( true ); m_documentManager = ((Kate::Application*)parent)->documentManager(); -// connect( m_documentManager, SIGNAL(documentCreated()), -// this, SLOT(slotDocumentCreated()) ); - connect( m_documentManager, SIGNAL(documentDeleted(uint)), - this, SLOT(slotDocumentDeleted(uint)) ); +// connect( m_documentManager, TQT_SIGNAL(documentCreated()), +// this, TQT_SLOT(slotDocumentCreated()) ); + connect( m_documentManager, TQT_SIGNAL(documentDeleted(uint)), + this, TQT_SLOT(slotDocumentDeleted(uint)) ); } PluginKateXMLTools::~PluginKateXMLTools() @@ -150,11 +150,11 @@ void PluginKateXMLTools::addView( Kate::MainWindow *win ) // TODO: doesn't this have to be deleted? PluginView *view = new PluginView (); ( void) new KAction ( i18n("&Insert Element..."), CTRL+Key_Return, this, - SLOT( slotInsertElement()), view->actionCollection(), "xml_tool_insert_element" ); + TQT_SLOT( slotInsertElement()), view->actionCollection(), "xml_tool_insert_element" ); ( void) new KAction ( i18n("&Close Element"), CTRL+Key_Less, this, - SLOT( slotCloseElement()), view->actionCollection(), "xml_tool_close_element" ); + TQT_SLOT( slotCloseElement()), view->actionCollection(), "xml_tool_close_element" ); ( void) new KAction ( i18n("Assign Meta &DTD..." ), 0, this, - SLOT( getDTD()), view->actionCollection(), "xml_tool_assign" ); + TQT_SLOT( getDTD()), view->actionCollection(), "xml_tool_assign" ); view->setInstance( new KInstance("kate") ); view->setXMLFile( "plugins/katexmltools/ui.rc" ); @@ -187,14 +187,14 @@ void PluginKateXMLTools::slotDocumentDeleted( uint documentNumber ) kdDebug()<<"XMLTools:slotDocumentDeleted: documents: "<<m_docDtds.count()<<", DTDs: "<<m_dtds.count()<<endl; PseudoDTD *dtd = m_docDtds.take( documentNumber ); - QIntDictIterator<PseudoDTD> it ( m_docDtds ); + TQIntDictIterator<PseudoDTD> it ( m_docDtds ); for ( ; it.current(); ++it ) { if ( it.current() == dtd ) return; } - QDictIterator<PseudoDTD> it1( m_dtds ); + TQDictIterator<PseudoDTD> it1( m_dtds ); for ( ; it1.current() ; ++it1 ) { if ( it1.current() == dtd ) @@ -239,10 +239,10 @@ void PluginKateXMLTools::backspacePressed() void PluginKateXMLTools::emptyKeyEvent() { - keyEvent( 0, 0, QString::null ); + keyEvent( 0, 0, TQString::null ); } -void PluginKateXMLTools::keyEvent( int, int, const QString &/*s*/ ) +void PluginKateXMLTools::keyEvent( int, int, const TQString &/*s*/ ) { //kdDebug() << "xml tools keyEvent: '" << s << endl; @@ -262,16 +262,16 @@ void PluginKateXMLTools::keyEvent( int, int, const QString &/*s*/ ) return; // debug to test speed: - //QTime t; t.start(); + //TQTime t; t.start(); - QStringList allowed = QStringList(); + TQStringList allowed = TQStringList(); // get char on the left of the cursor: uint line, col; kv->cursorPositionReal( &line, &col ); - QString lineStr = kv->getDoc()->textLine( line ); - QString leftCh = lineStr.mid( col-1, 1 ); - QString secondLeftCh = lineStr.mid( col-2, 1 ); + TQString lineStr = kv->getDoc()->textLine( line ); + TQString leftCh = lineStr.mid( col-1, 1 ); + TQString secondLeftCh = lineStr.mid( col-2, 1 ); if( leftCh == "&" ) { @@ -282,7 +282,7 @@ void PluginKateXMLTools::keyEvent( int, int, const QString &/*s*/ ) else if( leftCh == "<" ) { kdDebug() << "*outside tag -> get elements" << endl; - QString parentElement = getParentElement( *kv, true ); + TQString parentElement = getParentElement( *kv, true ); kdDebug() << "parent: " << parentElement << endl; allowed = m_docDtds[docNumber]->allowedElements(parentElement ); m_mode = elements; @@ -292,8 +292,8 @@ void PluginKateXMLTools::keyEvent( int, int, const QString &/*s*/ ) { // TODO: check secondLeftChar, too?! then you don't need to trigger // with space and we yet save CPU power - QString currentElement = insideTag( *kv ); - QString currentAttribute; + TQString currentElement = insideTag( *kv ); + TQString currentAttribute; if( ! currentElement.isEmpty() ) currentAttribute = insideAttribute( *kv ); @@ -341,12 +341,12 @@ void PluginKateXMLTools::keyEvent( int, int, const QString &/*s*/ ) //} } -QValueList<KTextEditor::CompletionEntry> -PluginKateXMLTools::stringListToCompletionEntryList( QStringList list ) +TQValueList<KTextEditor::CompletionEntry> +PluginKateXMLTools::stringListToCompletionEntryList( TQStringList list ) { - QValueList<KTextEditor::CompletionEntry> compList; + TQValueList<KTextEditor::CompletionEntry> compList; KTextEditor::CompletionEntry entry; - for( QStringList::Iterator it = list.begin(); it != list.end(); ++it ) + for( TQStringList::Iterator it = list.begin(); it != list.end(); ++it ) { entry.text = ( *it ); compList << entry; @@ -361,9 +361,9 @@ PluginKateXMLTools::stringListToCompletionEntryList( QStringList list ) */ void PluginKateXMLTools::disconnectSlots( Kate::View *kv ) { - disconnect( kv, SIGNAL(filterInsertString(KTextEditor::CompletionEntry*,QString*)), this, 0 ); - disconnect( kv, SIGNAL(completionDone(KTextEditor::CompletionEntry)), this, 0 ); - disconnect( kv, SIGNAL(completionAborted()), this, 0 ); + disconnect( kv, TQT_SIGNAL(filterInsertString(KTextEditor::CompletionEntry*,TQString*)), this, 0 ); + disconnect( kv, TQT_SIGNAL(completionDone(KTextEditor::CompletionEntry)), this, 0 ); + disconnect( kv, TQT_SIGNAL(completionAborted()), this, 0 ); } /** @@ -372,11 +372,11 @@ void PluginKateXMLTools::disconnectSlots( Kate::View *kv ) */ void PluginKateXMLTools::connectSlots( Kate::View *kv ) { - connect( kv, SIGNAL(filterInsertString(KTextEditor::CompletionEntry*,QString*) ), - this, SLOT(filterInsertString(KTextEditor::CompletionEntry*,QString*)) ); - connect( kv, SIGNAL(completionDone(KTextEditor::CompletionEntry) ), - this, SLOT(completionDone(KTextEditor::CompletionEntry)) ); - connect( kv, SIGNAL(completionAborted()), this, SLOT(completionAborted()) ); + connect( kv, TQT_SIGNAL(filterInsertString(KTextEditor::CompletionEntry*,TQString*) ), + this, TQT_SLOT(filterInsertString(KTextEditor::CompletionEntry*,TQString*)) ); + connect( kv, TQT_SIGNAL(completionDone(KTextEditor::CompletionEntry) ), + this, TQT_SLOT(completionDone(KTextEditor::CompletionEntry)) ); + connect( kv, TQT_SIGNAL(completionAborted()), this, TQT_SLOT(completionAborted()) ); } /** @@ -399,7 +399,7 @@ void PluginKateXMLTools::getDTD() // Start where the supplied XML-DTDs are fed by default unless // user changed directory last time: - QString defaultDir = KGlobal::dirs()->findResourceDir("data", "katexmltools/" ) + "katexmltools/"; + TQString defaultDir = KGlobal::dirs()->findResourceDir("data", "katexmltools/" ) + "katexmltools/"; if( m_urlString.isNull() ) { m_urlString = defaultDir; } @@ -411,13 +411,13 @@ void PluginKateXMLTools::getDTD() // Example syntax: // <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd"> uint checkMaxLines = 200; - QString documentStart = kv->getDoc()->text(0, 0, checkMaxLines+1, 0 ); - QRegExp re( "<!DOCTYPE\\s+(.*)\\s+PUBLIC\\s+[\"'](.*)[\"']", false ); + TQString documentStart = kv->getDoc()->text(0, 0, checkMaxLines+1, 0 ); + TQRegExp re( "<!DOCTYPE\\s+(.*)\\s+PUBLIC\\s+[\"'](.*)[\"']", false ); re.setMinimal( true ); int matchPos = re.search( documentStart ); - QString filename; - QString doctype; - QString topElement; + TQString filename; + TQString doctype; + TQString topElement; if( matchPos != -1 ) { topElement = re.cap( 1 ); @@ -468,7 +468,7 @@ void PluginKateXMLTools::getDTD() "as a document of type \"%1\". The meta DTD for this document type " "will now be loaded.").arg( doctype ), i18n( "Loading XML Meta DTD" ), - QString::fromLatin1( "DTDAssigned") ); + TQString::fromLatin1( "DTDAssigned") ); } if( url.isEmpty() ) @@ -483,11 +483,11 @@ void PluginKateXMLTools::getDTD() m_dtdString = ""; m_docToAssignTo = kv->document(); - QApplication::setOverrideCursor( KCursor::waitCursor() ); + TQApplication::setOverrideCursor( KCursor::waitCursor() ); KIO::Job *job = KIO::get( url ); - connect( job, SIGNAL(result(KIO::Job *)), this, SLOT(slotFinished(KIO::Job *)) ); - connect( job, SIGNAL(data(KIO::Job *, const QByteArray &)), - this, SLOT(slotData(KIO::Job *, const QByteArray &)) ); + connect( job, TQT_SIGNAL(result(KIO::Job *)), this, TQT_SLOT(slotFinished(KIO::Job *)) ); + connect( job, TQT_SIGNAL(data(KIO::Job *, const TQByteArray &)), + this, TQT_SLOT(slotData(KIO::Job *, const TQByteArray &)) ); } kdDebug()<<"XMLTools::getDTD: Documents: "<<m_docDtds.count()<<", DTDs: "<<m_dtds.count()<<endl; } @@ -518,23 +518,23 @@ void PluginKateXMLTools::slotFinished( KIO::Job *job ) m_docToAssignTo = 0; m_dtdString = ""; } - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); } -void PluginKateXMLTools::slotData( KIO::Job *, const QByteArray &data ) +void PluginKateXMLTools::slotData( KIO::Job *, const TQByteArray &data ) { - m_dtdString += QString( data ); + m_dtdString += TQString( data ); } void PluginKateXMLTools::assignDTD( PseudoDTD *dtd, KTextEditor::Document *doc ) { m_docDtds.replace( doc->documentNumber(), dtd ); - connect( doc, SIGNAL(charactersInteractivelyInserted(int,int,const QString&) ), - this, SLOT(keyEvent(int,int,const QString&)) ); + connect( doc, TQT_SIGNAL(charactersInteractivelyInserted(int,int,const TQString&) ), + this, TQT_SLOT(keyEvent(int,int,const TQString&)) ); - disconnect( doc, SIGNAL(backspacePressed()), this, 0 ); - connect( doc, SIGNAL(backspacePressed() ), - this, SLOT(backspacePressed()) ); + disconnect( doc, TQT_SIGNAL(backspacePressed()), this, 0 ); + connect( doc, TQT_SIGNAL(backspacePressed() ), + this, TQT_SLOT(backspacePressed()) ); } /** @@ -555,22 +555,22 @@ void PluginKateXMLTools::slotInsertElement() } PseudoDTD *dtd = m_docDtds[kv->document()->documentNumber()]; - QString parentElement = getParentElement( *kv, false ); - QStringList allowed; + TQString parentElement = getParentElement( *kv, false ); + TQStringList allowed; if( dtd ) allowed = dtd->allowedElements(parentElement ); InsertElement *dialog = new InsertElement( - ( QWidget *)application()->activeMainWindow()->viewManager()->activeView(), "insertXml" ); - QString text = dialog->showDialog( allowed ); + ( TQWidget *)application()->activeMainWindow()->viewManager()->activeView(), "insertXml" ); + TQString text = dialog->showDialog( allowed ); delete dialog; if( !text.isEmpty() ) { - QStringList list = QStringList::split( ' ', text ); - QString pre; - QString post; + TQStringList list = TQStringList::split( ' ', text ); + TQString pre; + TQString post; // anders: use <tagname/> if the tag is required to be empty. // In that case maybe we should not remove the selection? or overwrite it? int adjust = 0; // how much to move cursor. @@ -591,7 +591,7 @@ void PluginKateXMLTools::slotInsertElement() post ="</" + list[0] + ">"; } - QString marked; + TQString marked; if ( ! post.isEmpty() ) marked = kv->getDoc()->selection(); @@ -616,16 +616,16 @@ void PluginKateXMLTools::slotCloseElement() kdDebug() << "Warning: no Kate::View" << endl; return; } - QString parentElement = getParentElement( *kv, false ); + TQString parentElement = getParentElement( *kv, false ); //kdDebug() << "parentElement: '" << parentElement << "'" << endl; - QString closeTag = "</" + parentElement + ">"; + TQString closeTag = "</" + parentElement + ">"; if( ! parentElement.isEmpty() ) kv->insertText( closeTag ); } // modify the completion string before it gets inserted -void PluginKateXMLTools::filterInsertString( KTextEditor::CompletionEntry *ce, QString *text ) +void PluginKateXMLTools::filterInsertString( KTextEditor::CompletionEntry *ce, TQString *text ) { kdDebug() << "filterInsertString str: " << *text << endl; kdDebug() << "filterInsertString text: " << ce->text << endl; @@ -642,9 +642,9 @@ void PluginKateXMLTools::filterInsertString( KTextEditor::CompletionEntry *ce, Q uint line, col; kv->cursorPositionReal( &line, &col ); - QString lineStr = kv->getDoc()->textLine(line ); - QString leftCh = lineStr.mid( col-1, 1 ); - QString rightCh = lineStr.mid( col, 1 ); + TQString lineStr = kv->getDoc()->textLine(line ); + TQString leftCh = lineStr.mid( col-1, 1 ); + TQString rightCh = lineStr.mid( col, 1 ); m_correctPos = 0; // where to move the cursor after completion ( >0 = move right ) if( m_mode == entities ) @@ -677,7 +677,7 @@ void PluginKateXMLTools::filterInsertString( KTextEditor::CompletionEntry *ce, Q // find left quote: for( startAttValue = col; startAttValue > 0; startAttValue-- ) { - QString ch = lineStr.mid( startAttValue-1, 1 ); + TQString ch = lineStr.mid( startAttValue-1, 1 ); if( isQuote(ch) ) break; } @@ -685,7 +685,7 @@ void PluginKateXMLTools::filterInsertString( KTextEditor::CompletionEntry *ce, Q // find right quote: for( endAttValue = col; endAttValue <= lineStr.length(); endAttValue++ ) { - QString ch = lineStr.mid( endAttValue-1, 1 ); + TQString ch = lineStr.mid( endAttValue-1, 1 ); if( isQuote(ch) ) break; } @@ -706,7 +706,7 @@ void PluginKateXMLTools::filterInsertString( KTextEditor::CompletionEntry *ce, Q else if( m_mode == elements ) { // anders: if the tag is marked EMPTY, insert in form <tagname/> - QString str; + TQString str; int docNumber = kv->document()->documentNumber(); bool isEmptyTag =m_docDtds[docNumber]->allowedElements(ce->text).contains( "__EMPTY" ); if ( isEmptyTag ) @@ -782,7 +782,7 @@ void PluginKateXMLTools::completionDone( KTextEditor::CompletionEntry ) if( m_mode == attributes ) { // immediately show attribute values: - QTimer::singleShot( 10, this, SLOT(emptyKeyEvent()) ); + TQTimer::singleShot( 10, this, TQT_SLOT(emptyKeyEvent()) ); } } @@ -795,23 +795,23 @@ void PluginKateXMLTools::completionDone( KTextEditor::CompletionEntry ) * if "<" occurs before ">" occurs ( on the left side of the cursor ). * Return the tag name, return "" if we cursor is outside a tag. */ -QString PluginKateXMLTools::insideTag( Kate::View &kv ) +TQString PluginKateXMLTools::insideTag( Kate::View &kv ) { uint line = 0, col = 0; kv.cursorPositionReal( &line, &col ); int y = line; // another variable because uint <-> int do { - QString lineStr = kv.getDoc()->textLine(y ); + TQString lineStr = kv.getDoc()->textLine(y ); for( uint x = col; x > 0; x-- ) { - QString ch = lineStr.mid( x-1, 1 ); + TQString ch = lineStr.mid( x-1, 1 ); if( ch == ">" ) // cursor is outside tag return ""; if( ch == "<" ) { - QString tag; + TQString tag; // look for white space on the right to get the tag name for( uint z = x; z <= lineStr.length() ; z++ ) { @@ -846,21 +846,21 @@ QString PluginKateXMLTools::insideTag( Kate::View &kv ) * Note: only call when insideTag() == true. * TODO: allow whitespace around "=" */ -QString PluginKateXMLTools::insideAttribute( Kate::View &kv ) +TQString PluginKateXMLTools::insideAttribute( Kate::View &kv ) { uint line = 0, col = 0; kv.cursorPositionReal( &line, &col ); int y = line; // another variable because uint <-> int uint x = 0; - QString lineStr = ""; - QString ch = ""; + TQString lineStr = ""; + TQString ch = ""; do { lineStr = kv.getDoc()->textLine(y ); for( x = col; x > 0; x-- ) { ch = lineStr.mid( x-1, 1 ); - QString chLeft = lineStr.mid( x-2, 1 ); + TQString chLeft = lineStr.mid( x-2, 1 ); // TODO: allow whitespace if( isQuote(ch) && chLeft == "=" ) break; @@ -874,7 +874,7 @@ QString PluginKateXMLTools::insideAttribute( Kate::View &kv ) } while( !isQuote(ch) ); // look for next white space on the left to get the tag name - QString attr = ""; + TQString attr = ""; for( int z = x; z >= 0; z-- ) { ch = lineStr.mid( z-1, 1 ); @@ -904,7 +904,7 @@ QString PluginKateXMLTools::insideAttribute( Kate::View &kv ) * <p> foo <img/> bar X * <p> foo bar X */ -QString PluginKateXMLTools::getParentElement( Kate::View &kv, bool ignoreSingleChar ) +TQString PluginKateXMLTools::getParentElement( Kate::View &kv, bool ignoreSingleChar ) { enum { parsingText, @@ -921,7 +921,7 @@ QString PluginKateXMLTools::getParentElement( Kate::View &kv, bool ignoreSingleC uint line, col; kv.cursorPositionReal( &line, &col ); - QString str = kv.getDoc()->textLine(line ); + TQString str = kv.getDoc()->textLine(line ); while( true ) { @@ -930,7 +930,7 @@ QString PluginKateXMLTools::getParentElement( Kate::View &kv, bool ignoreSingleC { do { - if( !line-- ) return QString::null; // reached start of document + if( !line-- ) return TQString::null; // reached start of document str = kv.getDoc()->textLine(line ); col = str.length(); } while( !col ); @@ -950,7 +950,7 @@ QString PluginKateXMLTools::getParentElement( Kate::View &kv, bool ignoreSingleC { case '<': // hmm... we were actually inside an element - return QString::null; + return TQString::null; case '>': // we just hit an element boundary @@ -979,7 +979,7 @@ QString PluginKateXMLTools::getParentElement( Kate::View &kv, bool ignoreSingleC // we just hit the start of the element... if( nestingLevel-- ) break; - QString tag = str.mid( col + 1 ); + TQString tag = str.mid( col + 1 ); for( uint pos = 0, len = tag.length(); pos < len; ++pos ) { ch = tag.at( pos).unicode(); if( ch == ' ' || ch == '\t' || ch == '>' ) { @@ -1036,7 +1036,7 @@ QString PluginKateXMLTools::getParentElement( Kate::View &kv, bool ignoreSingleC * Return true if the tag is neither a closing tag * nor an empty tag, nor a comment, nor processing instruction. */ -bool PluginKateXMLTools::isOpeningTag( QString tag ) +bool PluginKateXMLTools::isOpeningTag( TQString tag ) { return ( !isClosingTag(tag) && !isEmptyTag(tag ) && !tag.startsWith( "<?") && !tag.startsWith("<!") ); @@ -1046,12 +1046,12 @@ bool PluginKateXMLTools::isOpeningTag( QString tag ) * Return true if the tag is a closing tag. Return false * if the tag is an opening tag or an empty tag ( ! ) */ -bool PluginKateXMLTools::isClosingTag( QString tag ) +bool PluginKateXMLTools::isClosingTag( TQString tag ) { return ( tag.startsWith("</") ); } -bool PluginKateXMLTools::isEmptyTag( QString tag ) +bool PluginKateXMLTools::isEmptyTag( TQString tag ) { return ( tag.right(2) == "/>" ); } @@ -1059,7 +1059,7 @@ bool PluginKateXMLTools::isEmptyTag( QString tag ) /** * Return true if ch is a single or double quote. Expects ch to be of length 1. */ -bool PluginKateXMLTools::isQuote( QString ch ) +bool PluginKateXMLTools::isQuote( TQString ch ) { return ( ch == "\"" || ch == "'" ); } @@ -1068,14 +1068,14 @@ bool PluginKateXMLTools::isQuote( QString ch ) // ======================================================================== // Tools: -/** Sort a QStringList case-insensitively. Static. TODO: make it more simple. */ -QStringList PluginKateXMLTools::sortQStringList( QStringList list ) { +/** Sort a TQStringList case-insensitively. Static. TODO: make it more simple. */ +TQStringList PluginKateXMLTools::sortQStringList( TQStringList list ) { // Sort list case-insensitive. This looks complicated but using a QMap // is even suggested by the Qt documentation. - QMap<QString,QString> mapList; - for ( QStringList::Iterator it = list.begin(); it != list.end(); ++it ) + TQMap<TQString,TQString> mapList; + for ( TQStringList::Iterator it = list.begin(); it != list.end(); ++it ) { - QString str = *it; + TQString str = *it; if( mapList.contains(str.lower()) ) { // do not override a previous value, e.g. "Auml" and "auml" are two different @@ -1089,7 +1089,7 @@ QStringList PluginKateXMLTools::sortQStringList( QStringList list ) { } list.clear(); - QMap<QString,QString>::Iterator it; + TQMap<TQString,TQString>::Iterator it; // Qt doc: "the items are alphabetically sorted [by key] when iterating over the map": for( it = mapList.begin(); it != mapList.end(); ++it ) @@ -1099,7 +1099,7 @@ QStringList PluginKateXMLTools::sortQStringList( QStringList list ) { } //BEGIN InsertElement dialog -InsertElement::InsertElement( QWidget *parent, const char *name ) +InsertElement::InsertElement( TQWidget *parent, const char *name ) :KDialogBase( parent, name, true, i18n("Insert XML Element" ), KDialogBase::Ok|KDialogBase::Cancel) { @@ -1109,23 +1109,23 @@ InsertElement::~InsertElement() { } -void InsertElement::slotHistoryTextChanged( const QString& text ) +void InsertElement::slotHistoryTextChanged( const TQString& text ) { enableButtonOK( !text.isEmpty() ); } -QString InsertElement::showDialog( QStringList &completions ) +TQString InsertElement::showDialog( TQStringList &completions ) { - QWidget *page = new QWidget( this ); + TQWidget *page = new TQWidget( this ); setMainWidget( page ); - QVBoxLayout *topLayout = new QVBoxLayout( page, 0, spacingHint() ); + TQVBoxLayout *topLayout = new TQVBoxLayout( page, 0, spacingHint() ); KHistoryCombo *combo = new KHistoryCombo( page, "value" ); combo->setHistoryItems( completions, true ); - connect( combo->lineEdit(), SIGNAL(textChanged ( const QString & )), - this, SLOT(slotHistoryTextChanged(const QString &)) ); - QString text = i18n( "Enter XML tag name and attributes (\"<\", \">\" and closing tag will be supplied):" ); - QLabel *label = new QLabel( text, page, "insert" ); + connect( combo->lineEdit(), TQT_SIGNAL(textChanged ( const TQString & )), + this, TQT_SLOT(slotHistoryTextChanged(const TQString &)) ); + TQString text = i18n( "Enter XML tag name and attributes (\"<\", \">\" and closing tag will be supplied):" ); + TQLabel *label = new TQLabel( text, page, "insert" ); topLayout->addWidget( label ); topLayout->addWidget( combo ); @@ -1135,7 +1135,7 @@ QString InsertElement::showDialog( QStringList &completions ) if( exec() ) return combo->currentText(); - return QString::null; + return TQString::null; } //END InsertElement dialog // kate: space-indent on; indent-width 2; replace-tabs on; mixed-indent off; diff --git a/kate/xmltools/plugin_katexmltools.h b/kate/xmltools/plugin_katexmltools.h index 9be61c7..843ab15 100644 --- a/kate/xmltools/plugin_katexmltools.h +++ b/kate/xmltools/plugin_katexmltools.h @@ -25,11 +25,11 @@ #include "pseudo_dtd.h" -#include <qdict.h> -#include <qstring.h> -#include <qlistbox.h> -#include <qprogressdialog.h> -#include <qintdict.h> +#include <tqdict.h> +#include <tqstring.h> +#include <tqlistbox.h> +#include <tqprogressdialog.h> +#include <tqintdict.h> #include <kate/plugin.h> #include <kate/application.h> @@ -52,7 +52,7 @@ class PluginKateXMLTools : public Kate::Plugin, Kate::PluginViewInterface public: - PluginKateXMLTools( QObject* parent = 0, const char* name = 0, const QStringList& = QStringList() ); + PluginKateXMLTools( TQObject* parent = 0, const char* name = 0, const TQStringList& = TQStringList() ); virtual ~PluginKateXMLTools(); void addView ( Kate::MainWindow *win ); void removeView( Kate::MainWindow *win ); @@ -64,52 +64,52 @@ class PluginKateXMLTools : public Kate::Plugin, Kate::PluginViewInterface void slotInsertElement(); void slotCloseElement(); - void filterInsertString( KTextEditor::CompletionEntry *ce, QString *str ); + void filterInsertString( KTextEditor::CompletionEntry *ce, TQString *str ); void completionDone( KTextEditor::CompletionEntry completionEntry ); void completionAborted(); void slotFinished( KIO::Job *job ); - void slotData( KIO::Job *, const QByteArray &data ); + void slotData( KIO::Job *, const TQByteArray &data ); void backspacePressed(); void emptyKeyEvent(); - void keyEvent( int, int, const QString & ); + void keyEvent( int, int, const TQString & ); /// Connected to the document manager, to manage the dtd collection. void slotDocumentDeleted( uint n ); protected: - static QStringList sortQStringList( QStringList list ); - //bool eventFilter( QObject *object, QEvent *event ); + static TQStringList sortQStringList( TQStringList list ); + //bool eventFilter( TQObject *object, TQEvent *event ); - QString insideTag( Kate::View &kv ); - QString insideAttribute( Kate::View &kv ); + TQString insideTag( Kate::View &kv ); + TQString insideAttribute( Kate::View &kv ); - bool isOpeningTag( QString tag ); - bool isClosingTag( QString tag ); - bool isEmptyTag( QString tag ); - bool isQuote( QString ch ); + bool isOpeningTag( TQString tag ); + bool isClosingTag( TQString tag ); + bool isEmptyTag( TQString tag ); + bool isQuote( TQString ch ); - QString getParentElement( Kate::View &view, bool ignoreSingleBracket ); + TQString getParentElement( Kate::View &view, bool ignoreSingleBracket ); enum Mode {none, entities, attributevalues, attributes, elements}; enum PopupMode {noPopup, tagname, attributename, attributevalue, entityname}; - QValueList<KTextEditor::CompletionEntry> stringListToCompletionEntryList( QStringList list ); + TQValueList<KTextEditor::CompletionEntry> stringListToCompletionEntryList( TQStringList list ); /// Assign the PseudoDTD @p dtd to the Kate::Document @p doc void assignDTD( PseudoDTD *dtd, KTextEditor::Document *doc ); /// temporary placeholder for the metaDTD file - QString m_dtdString; + TQString m_dtdString; /// temporary placeholder for the document to assign a DTD to while the file is loaded KTextEditor::Document *m_docToAssignTo; /// URL of the last loaded meta DTD - QString m_urlString; + TQString m_urlString; uint m_lastLine, m_lastCol; - QStringList m_lastAllowed; + TQStringList m_lastAllowed; int m_popupOpenCol; Mode m_mode; @@ -119,12 +119,12 @@ class PluginKateXMLTools : public Kate::Plugin, Kate::PluginViewInterface KTextEditor::CodeCompletionInterface* m_codeInterface; /// maps KTE::Document::docNumber -> DTD - QIntDict<PseudoDTD> m_docDtds; + TQIntDict<PseudoDTD> m_docDtds; /// maps DTD filename -> DTD - QDict<PseudoDTD> m_dtds; + TQDict<PseudoDTD> m_dtds; - QPtrList<class PluginView> m_views; + TQPtrList<class PluginView> m_views; void connectSlots( Kate::View *kv ); void disconnectSlots( Kate::View *kv ); @@ -138,11 +138,11 @@ class InsertElement : public KDialogBase Q_OBJECT public: - InsertElement( QWidget *parent, const char *name ); + InsertElement( TQWidget *parent, const char *name ); ~InsertElement(); - QString showDialog( QStringList &completions ); + TQString showDialog( TQStringList &completions ); private slots: - void slotHistoryTextChanged( const QString& ); + void slotHistoryTextChanged( const TQString& ); }; diff --git a/kate/xmltools/pseudo_dtd.cpp b/kate/xmltools/pseudo_dtd.cpp index b5c9cd1..05ac58a 100644 --- a/kate/xmltools/pseudo_dtd.cpp +++ b/kate/xmltools/pseudo_dtd.cpp @@ -24,8 +24,8 @@ #include <assert.h> -#include <qdom.h> -#include <qregexp.h> +#include <tqdom.h> +#include <tqregexp.h> #include <klocale.h> #include <kmessagebox.h> @@ -40,9 +40,9 @@ PseudoDTD::~PseudoDTD() { } -void PseudoDTD::analyzeDTD( QString &metaDtdUrl, QString &metaDtd ) +void PseudoDTD::analyzeDTD( TQString &metaDtdUrl, TQString &metaDtd ) { - QDomDocument doc( "dtdIn_xml" ); + TQDomDocument doc( "dtdIn_xml" ); if ( ! doc.setContent( metaDtd) ) { KMessageBox::error(0, i18n("The file '%1' could not be parsed. " @@ -68,7 +68,7 @@ void PseudoDTD::analyzeDTD( QString &metaDtdUrl, QString &metaDtd ) // count this twice, as it will be iterated twice ( TODO: optimize that? ): listLength += doc.elementsByTagName( "attlist" ).count() * 2; - QProgressDialog progress( i18n("Analyzing meta DTD..."), i18n("Cancel"), listLength, + TQProgressDialog progress( i18n("Analyzing meta DTD..."), i18n("Cancel"), listLength, 0, "progress", TRUE ); progress.setMinimumDuration( 400 ); progress.setProgress(0); @@ -97,16 +97,16 @@ void PseudoDTD::analyzeDTD( QString &metaDtdUrl, QString &metaDtd ) * Iterate through the XML to get a mapping which sub-elements are allowed for * all elements. */ -bool PseudoDTD::parseElements( QDomDocument *doc, QProgressDialog *progress ) +bool PseudoDTD::parseElements( TQDomDocument *doc, TQProgressDialog *progress ) { m_elementsList.clear(); // We only display a list, i.e. we pretend that the content model is just // a set, so we use a map. This is necessay e.g. for xhtml 1.0's head element, // which would otherwise display some elements twice. - QMap<QString,bool> subelementList; // the bool is not used + TQMap<TQString,bool> subelementList; // the bool is not used - QDomNodeList list = doc->elementsByTagName( "element" ); + TQDomNodeList list = doc->elementsByTagName( "element" ); uint listLength = list.count(); // speedup (really! ) for( uint i = 0; i < listLength; i++ ) @@ -119,57 +119,57 @@ bool PseudoDTD::parseElements( QDomDocument *doc, QProgressDialog *progress ) //qApp->processEvents(); subelementList.clear(); - QDomNode node = list.item( i ); - QDomElement elem = node.toElement(); + TQDomNode node = list.item( i ); + TQDomElement elem = node.toElement(); if( !elem.isNull() ) { // Enter the expanded content model, which may also include stuff not allowed. // We do not care if it's a <sequence-group> or whatever. - QDomNodeList contentModelList = elem.elementsByTagName( "content-model-expanded" ); - QDomNode contentModelNode = contentModelList.item(0); - QDomElement contentModelElem = contentModelNode.toElement(); + TQDomNodeList contentModelList = elem.elementsByTagName( "content-model-expanded" ); + TQDomNode contentModelNode = contentModelList.item(0); + TQDomElement contentModelElem = contentModelNode.toElement(); if( ! contentModelElem.isNull() ) { // check for <pcdata/>: - QDomNodeList pcdataList = contentModelElem.elementsByTagName( "pcdata" ); + TQDomNodeList pcdataList = contentModelElem.elementsByTagName( "pcdata" ); // check for other sub elements: - QDomNodeList subList = contentModelElem.elementsByTagName( "element-name" ); + TQDomNodeList subList = contentModelElem.elementsByTagName( "element-name" ); uint subListLength = subList.count(); for( uint l = 0; l < subListLength; l++ ) { - QDomNode subNode = subList.item(l); - QDomElement subElem = subNode.toElement(); + TQDomNode subNode = subList.item(l); + TQDomElement subElem = subNode.toElement(); if( !subElem.isNull() ) subelementList[subElem.attribute( "name" )] = true; } // anders: check if this is an EMPTY element, and put "__EMPTY" in the // sub list, so that we can insert tags in empty form if required. - QDomNodeList emptyList = elem.elementsByTagName( "empty" ); + TQDomNodeList emptyList = elem.elementsByTagName( "empty" ); if ( emptyList.count() ) subelementList["__EMPTY"] = true; } // Now remove the elements not allowed (e.g. <a> is explicitely not allowed in <a> // in the HTML 4.01 Strict DTD): - QDomNodeList exclusionsList = elem.elementsByTagName( "exclusions" ); + TQDomNodeList exclusionsList = elem.elementsByTagName( "exclusions" ); if( exclusionsList.length() > 0 ) { // sometimes there are no exclusions ( e.g. in XML DTDs there are never exclusions ) - QDomNode exclusionsNode = exclusionsList.item(0); - QDomElement exclusionsElem = exclusionsNode.toElement(); + TQDomNode exclusionsNode = exclusionsList.item(0); + TQDomElement exclusionsElem = exclusionsNode.toElement(); if( ! exclusionsElem.isNull() ) { - QDomNodeList subList = exclusionsElem.elementsByTagName( "element-name" ); + TQDomNodeList subList = exclusionsElem.elementsByTagName( "element-name" ); uint subListLength = subList.count(); for( uint l = 0; l < subListLength; l++ ) { - QDomNode subNode = subList.item(l); - QDomElement subElem = subNode.toElement(); + TQDomNode subNode = subList.item(l); + TQDomElement subElem = subNode.toElement(); if( !subElem.isNull() ) { - QMap<QString,bool>::Iterator it = subelementList.find( subElem.attribute( "name" ) ); + TQMap<TQString,bool>::Iterator it = subelementList.find( subElem.attribute( "name" ) ); if( it != subelementList.end() ) subelementList.remove(it); } @@ -178,8 +178,8 @@ bool PseudoDTD::parseElements( QDomDocument *doc, QProgressDialog *progress ) } // turn the map into a list: - QStringList subelementListTmp; - QMap<QString,bool>::Iterator it; + TQStringList subelementListTmp; + TQMap<TQString,bool>::Iterator it; for( it = subelementList.begin(); it != subelementList.end(); ++it ) subelementListTmp.append( it.key() ); @@ -196,12 +196,12 @@ bool PseudoDTD::parseElements( QDomDocument *doc, QProgressDialog *progress ) * a list of allowed elements, but it doesn't care about order or if only a certain * number of occurences is allowed. */ -QStringList PseudoDTD::allowedElements( QString parentElement ) +TQStringList PseudoDTD::allowedElements( TQString parentElement ) { if( m_sgmlSupport ) { // find the matching element, ignoring case: - QMap<QString,QStringList>::Iterator it; + TQMap<TQString,TQStringList>::Iterator it; for( it = m_elementsList.begin(); it != m_elementsList.end(); ++it ) { if( it.key().lower() == parentElement.lower() ) @@ -211,18 +211,18 @@ QStringList PseudoDTD::allowedElements( QString parentElement ) else if( m_elementsList.contains(parentElement) ) return m_elementsList[parentElement]; - return QStringList(); + return TQStringList(); } /** * Iterate through the XML to get a mapping which attributes are allowed inside * all elements. */ -bool PseudoDTD::parseAttributes( QDomDocument *doc, QProgressDialog *progress ) +bool PseudoDTD::parseAttributes( TQDomDocument *doc, TQProgressDialog *progress ) { m_attributesList.clear(); -// QStringList allowedAttributes; - QDomNodeList list = doc->elementsByTagName( "attlist" ); +// TQStringList allowedAttributes; + TQDomNodeList list = doc->elementsByTagName( "attlist" ); uint listLength = list.count(); for( uint i = 0; i < listLength; i++ ) @@ -235,16 +235,16 @@ bool PseudoDTD::parseAttributes( QDomDocument *doc, QProgressDialog *progress ) //qApp->processEvents(); ElementAttributes attrs; - QDomNode node = list.item(i); - QDomElement elem = node.toElement(); + TQDomNode node = list.item(i); + TQDomElement elem = node.toElement(); if( !elem.isNull() ) { - QDomNodeList attributeList = elem.elementsByTagName( "attribute" ); + TQDomNodeList attributeList = elem.elementsByTagName( "attribute" ); uint attributeListLength = attributeList.count(); for( uint l = 0; l < attributeListLength; l++ ) { - QDomNode attributeNode = attributeList.item(l); - QDomElement attributeElem = attributeNode.toElement(); + TQDomNode attributeNode = attributeList.item(l); + TQDomElement attributeElem = attributeNode.toElement(); if( ! attributeElem.isNull() ) { @@ -263,12 +263,12 @@ bool PseudoDTD::parseAttributes( QDomDocument *doc, QProgressDialog *progress ) /** Check which attributes are allowed for an element. */ -QStringList PseudoDTD::allowedAttributes( QString element ) +TQStringList PseudoDTD::allowedAttributes( TQString element ) { if( m_sgmlSupport ) { // find the matching element, ignoring case: - QMap<QString,ElementAttributes>::Iterator it; + TQMap<TQString,ElementAttributes>::Iterator it; for( it = m_attributesList.begin(); it != m_attributesList.end(); ++it ) { if( it.key().lower() == element.lower() ) { return it.data().optionalAttributes + it.data().requiredAttributes; @@ -278,14 +278,14 @@ QStringList PseudoDTD::allowedAttributes( QString element ) else if( m_attributesList.contains(element) ) return m_attributesList[element].optionalAttributes + m_attributesList[element].requiredAttributes; - return QStringList(); + return TQStringList(); } -QStringList PseudoDTD::requiredAttributes( const QString &element ) const +TQStringList PseudoDTD::requiredAttributes( const TQString &element ) const { if ( m_sgmlSupport ) { - QMap<QString,ElementAttributes>::ConstIterator it; + TQMap<TQString,ElementAttributes>::ConstIterator it; for( it = m_attributesList.begin(); it != m_attributesList.end(); ++it ) { if( it.key().lower() == element.lower() ) @@ -295,18 +295,18 @@ QStringList PseudoDTD::requiredAttributes( const QString &element ) const else if( m_attributesList.contains(element) ) return m_attributesList[element].requiredAttributes; - return QStringList(); + return TQStringList(); } /** * Iterate through the XML to get a mapping which attribute values are allowed * for all attributes inside all elements. */ -bool PseudoDTD::parseAttributeValues( QDomDocument *doc, QProgressDialog *progress ) +bool PseudoDTD::parseAttributeValues( TQDomDocument *doc, TQProgressDialog *progress ) { m_attributevaluesList.clear(); // 1 element : n possible attributes - QMap<QString,QStringList> attributevaluesTmp; // 1 attribute : n possible values - QDomNodeList list = doc->elementsByTagName( "attlist" ); + TQMap<TQString,TQStringList> attributevaluesTmp; // 1 attribute : n possible values + TQDomNodeList list = doc->elementsByTagName( "attlist" ); uint listLength = list.count(); for( uint i = 0; i < listLength; i++ ) @@ -319,21 +319,21 @@ bool PseudoDTD::parseAttributeValues( QDomDocument *doc, QProgressDialog *progre //qApp->processEvents(); attributevaluesTmp.clear(); - QDomNode node = list.item(i); - QDomElement elem = node.toElement(); + TQDomNode node = list.item(i); + TQDomElement elem = node.toElement(); if( !elem.isNull() ) { // Enter the list of <attribute>: - QDomNodeList attributeList = elem.elementsByTagName( "attribute" ); + TQDomNodeList attributeList = elem.elementsByTagName( "attribute" ); uint attributeListLength = attributeList.count(); for( uint l = 0; l < attributeListLength; l++ ) { - QDomNode attributeNode = attributeList.item(l); - QDomElement attributeElem = attributeNode.toElement(); + TQDomNode attributeNode = attributeList.item(l); + TQDomElement attributeElem = attributeNode.toElement(); if( ! attributeElem.isNull() ) { - QString value = attributeElem.attribute( "value" ); - attributevaluesTmp.insert( attributeElem.attribute("name"), QStringList::split(QRegExp(" "), value) ); + TQString value = attributeElem.attribute( "value" ); + attributevaluesTmp.insert( attributeElem.attribute("name"), TQStringList::split(TQRegExp(" "), value) ); } } m_attributevaluesList.insert( elem.attribute("name"), attributevaluesTmp ); @@ -347,19 +347,19 @@ bool PseudoDTD::parseAttributeValues( QDomDocument *doc, QProgressDialog *progre * (the element is necessary because e.g. "href" inside <a> could be different * to an "href" inside <link>): */ -QStringList PseudoDTD::attributeValues( QString element, QString attribute ) +TQStringList PseudoDTD::attributeValues( TQString element, TQString attribute ) { // Direct access would be faster than iteration of course but not always correct, // because we need to be case-insensitive. if( m_sgmlSupport ) { // first find the matching element, ignoring case: - QMap< QString,QMap<QString,QStringList> >::Iterator it; + TQMap< TQString,TQMap<TQString,TQStringList> >::Iterator it; for( it = m_attributevaluesList.begin(); it != m_attributevaluesList.end(); ++it ) { if( it.key().lower() == element.lower() ) { - QMap<QString,QStringList> attrVals = it.data(); - QMap<QString,QStringList>::Iterator itV; + TQMap<TQString,TQStringList> attrVals = it.data(); + TQMap<TQString,TQStringList>::Iterator itV; // then find the matching attribute for that element, ignoring case: for( itV = attrVals.begin(); itV != attrVals.end(); ++itV ) { @@ -371,23 +371,23 @@ QStringList PseudoDTD::attributeValues( QString element, QString attribute ) } else if( m_attributevaluesList.contains(element) ) { - QMap<QString,QStringList> attrVals = m_attributevaluesList[element]; + TQMap<TQString,TQStringList> attrVals = m_attributevaluesList[element]; if( attrVals.contains(attribute) ) return attrVals[attribute]; } // no predefined values available: - return QStringList(); + return TQStringList(); } /** * Iterate through the XML to get a mapping of all entity names and their expanded * version, e.g. nbsp =>  . Parameter entities are ignored. */ -bool PseudoDTD::parseEntities( QDomDocument *doc, QProgressDialog *progress ) +bool PseudoDTD::parseEntities( TQDomDocument *doc, TQProgressDialog *progress ) { m_entityList.clear(); - QDomNodeList list = doc->elementsByTagName( "entity" ); + TQDomNodeList list = doc->elementsByTagName( "entity" ); uint listLength = list.count(); for( uint i = 0; i < listLength; i++ ) @@ -398,36 +398,36 @@ bool PseudoDTD::parseEntities( QDomDocument *doc, QProgressDialog *progress ) progress->setProgress( progress->progress()+1 ); //FIXME!! //qApp->processEvents(); - QDomNode node = list.item(i); - QDomElement elem = node.toElement(); + TQDomNode node = list.item(i); + TQDomElement elem = node.toElement(); if( !elem.isNull() && elem.attribute( "type" ) != "param" ) { // TODO: what's cdata <-> gen ? - QDomNodeList expandedList = elem.elementsByTagName( "text-expanded" ); - QDomNode expandedNode = expandedList.item(0); - QDomElement expandedElem = expandedNode.toElement(); + TQDomNodeList expandedList = elem.elementsByTagName( "text-expanded" ); + TQDomNode expandedNode = expandedList.item(0); + TQDomElement expandedElem = expandedNode.toElement(); if( ! expandedElem.isNull() ) { - QString exp = expandedElem.text(); + TQString exp = expandedElem.text(); // TODO: support more than one &#...; in the expanded text /* TODO include do this when the unicode font problem is solved: - if( exp.contains(QRegExp("^&#x[a-zA-Z0-9]+;$")) ) { + if( exp.contains(TQRegExp("^&#x[a-zA-Z0-9]+;$")) ) { // hexadecimal numbers, e.g. "ȶ" uint end = exp.find( ";" ); exp = exp.mid( 3, end-3 ); - exp = QChar(); - } else if( exp.contains(QRegExp("^&#[0-9]+;$")) ) { + exp = TQChar(); + } else if( exp.contains(TQRegExp("^&#[0-9]+;$")) ) { // decimal numbers, e.g. "ì" uint end = exp.find( ";" ); exp = exp.mid( 2, end-2 ); - exp = QChar( exp.toInt() ); + exp = TQChar( exp.toInt() ); } */ m_entityList.insert( elem.attribute("name"), exp ); } else { - m_entityList.insert( elem.attribute("name"), QString() ); + m_entityList.insert( elem.attribute("name"), TQString() ); } } } @@ -437,21 +437,21 @@ bool PseudoDTD::parseEntities( QDomDocument *doc, QProgressDialog *progress ) /** * Get a list of all ( non-parameter ) entities that start with a certain string. */ -QStringList PseudoDTD::entities( QString start ) +TQStringList PseudoDTD::entities( TQString start ) { - QStringList entities; - QMap<QString,QString>::Iterator it; + TQStringList entities; + TQMap<TQString,TQString>::Iterator it; for( it = m_entityList.begin(); it != m_entityList.end(); ++it ) { if( (*it).startsWith(start) ) { - QString str = it.key(); + TQString str = it.key(); /* TODO: show entities as unicode character if( !it.data().isEmpty() ) { //str += " -- " + it.data(); - QRegExp re( "&#(\\d+);" ); + TQRegExp re( "&#(\\d+);" ); if( re.search(it.data()) != -1 ) { uint ch = re.cap( 1).toUInt(); - str += " -- " + QChar( ch).decomposition(); + str += " -- " + TQChar( ch).decomposition(); } //kdDebug() << "#" << it.data() << endl; } diff --git a/kate/xmltools/pseudo_dtd.h b/kate/xmltools/pseudo_dtd.h index f5cf37e..5da444c 100644 --- a/kate/xmltools/pseudo_dtd.h +++ b/kate/xmltools/pseudo_dtd.h @@ -23,8 +23,8 @@ #ifndef _PLUGIN_KANT_XMLTOOLS_DTD_H #define _PLUGIN_KANT_XMLTOOLS_DTD_H -#include <qdom.h> -#include <qprogressdialog.h> +#include <tqdom.h> +#include <tqprogressdialog.h> /** * This class contains the attributes for one element. @@ -33,8 +33,8 @@ class ElementAttributes { public: - QStringList optionalAttributes; - QStringList requiredAttributes; + TQStringList optionalAttributes; + TQStringList requiredAttributes; }; class PseudoDTD @@ -44,31 +44,31 @@ class PseudoDTD PseudoDTD(); ~PseudoDTD(); - void analyzeDTD( QString &metaDtdUrl, QString &metaDtd ); + void analyzeDTD( TQString &metaDtdUrl, TQString &metaDtd ); - QStringList allowedElements( QString parentElement ); - QStringList allowedAttributes( QString parentElement ); - QStringList attributeValues( QString element, QString attribute ); - QStringList entities( QString start ); - QStringList requiredAttributes( const QString &parentElement ) const; + TQStringList allowedElements( TQString parentElement ); + TQStringList allowedAttributes( TQString parentElement ); + TQStringList attributeValues( TQString element, TQString attribute ); + TQStringList entities( TQString start ); + TQStringList requiredAttributes( const TQString &parentElement ) const; protected: - bool parseElements( QDomDocument *doc, QProgressDialog *progress ); - bool parseAttributes( QDomDocument *doc, QProgressDialog *progress ); - bool parseAttributeValues( QDomDocument *doc, QProgressDialog *progress ); - bool parseEntities( QDomDocument *doc, QProgressDialog *progress ); + bool parseElements( TQDomDocument *doc, TQProgressDialog *progress ); + bool parseAttributes( TQDomDocument *doc, TQProgressDialog *progress ); + bool parseAttributeValues( TQDomDocument *doc, TQProgressDialog *progress ); + bool parseEntities( TQDomDocument *doc, TQProgressDialog *progress ); bool m_sgmlSupport; // Entities, e.g. <"nbsp", "160"> - QMap<QString,QString> m_entityList; + TQMap<TQString,TQString> m_entityList; // Elements, e.g. <"a", ( "b", "i", "em", "strong" )> - QMap<QString,QStringList> m_elementsList; + TQMap<TQString,TQStringList> m_elementsList; // Attributes e.g. <"a", ( "href", "lang", "title" )> - QMap<QString,ElementAttributes> m_attributesList; + TQMap<TQString,ElementAttributes> m_attributesList; // Attribute values e.g. <"td", <"align", ( "left", "right", "justify" )>> - QMap< QString,QMap<QString,QStringList> > m_attributevaluesList; + TQMap< TQString,TQMap<TQString,TQStringList> > m_attributevaluesList; }; |