diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:56:07 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:56:07 +0000 |
commit | d6f8bbb45b267065a6907e71ff9c98bb6d161241 (patch) | |
tree | d109539636691d7b03036ca1c0ed29dbae6577cf /parts/classview | |
parent | 3331a47a9cad24795c7440ee8107143ce444ef34 (diff) | |
download | tdevelop-d6f8bbb45b267065a6907e71ff9c98bb6d161241.tar.gz tdevelop-d6f8bbb45b267065a6907e71ff9c98bb6d161241.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1157658 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'parts/classview')
-rw-r--r-- | parts/classview/classtooldlg.cpp | 100 | ||||
-rw-r--r-- | parts/classview/classtooldlg.h | 32 | ||||
-rw-r--r-- | parts/classview/classtoolwidget.cpp | 18 | ||||
-rw-r--r-- | parts/classview/classtoolwidget.h | 6 | ||||
-rw-r--r-- | parts/classview/classtreebase.cpp | 174 | ||||
-rw-r--r-- | parts/classview/classtreebase.h | 46 | ||||
-rw-r--r-- | parts/classview/classviewpart.cpp | 72 | ||||
-rw-r--r-- | parts/classview/classviewpart.h | 10 | ||||
-rw-r--r-- | parts/classview/classviewwidget.cpp | 182 | ||||
-rw-r--r-- | parts/classview/classviewwidget.h | 118 | ||||
-rw-r--r-- | parts/classview/digraphview.cpp | 116 | ||||
-rw-r--r-- | parts/classview/digraphview.h | 42 | ||||
-rw-r--r-- | parts/classview/hierarchydlg.cpp | 122 | ||||
-rw-r--r-- | parts/classview/hierarchydlg.h | 22 | ||||
-rw-r--r-- | parts/classview/navigator.cpp | 88 | ||||
-rw-r--r-- | parts/classview/navigator.h | 26 | ||||
-rw-r--r-- | parts/classview/viewcombos.cpp | 38 | ||||
-rw-r--r-- | parts/classview/viewcombos.h | 24 |
18 files changed, 618 insertions, 618 deletions
diff --git a/parts/classview/classtooldlg.cpp b/parts/classview/classtooldlg.cpp index 91ed28fc..df51f6f4 100644 --- a/parts/classview/classtooldlg.cpp +++ b/parts/classview/classtooldlg.cpp @@ -13,9 +13,9 @@ #include "classtooldlg.h" -#include <qlistbox.h> -#include <qpushbutton.h> -#include <qtooltip.h> +#include <tqlistbox.h> +#include <tqpushbutton.h> +#include <tqtooltip.h> #include <kdialog.h> #include <kiconloader.h> #include <klocale.h> @@ -27,54 +27,54 @@ ClassToolDialog::ClassToolDialog( ClassViewPart *part ) - : QWidget(0, "class tool dialog") + : TQWidget(0, "class tool dialog") { currentOperation = ViewNone; comboAccess = (PIAccess)-1; currentClass = 0; m_part = part; - class_combo = new QComboBox(false, this); + class_combo = new TQComboBox(false, this); - QPushButton *close_button = new KPushButton(KStdGuiItem::close(), this); + TQPushButton *close_button = new KPushButton(KStdGuiItem::close(), this); - parents_button = new QToolButton(this); + parents_button = new TQToolButton(this); parents_button->setPixmap( UserIcon("CTparents", KIcon::DefaultState, ClassViewFactory::instance()) ); parents_button->setToggleButton(true); parents_button->setFixedSize(parents_button->sizeHint()); - QToolTip::add(parents_button, i18n("Show parents")); + TQToolTip::add(parents_button, i18n("Show parents")); - children_button = new QToolButton(this); + children_button = new TQToolButton(this); children_button->setPixmap( UserIcon("CTchildren", KIcon::DefaultState, ClassViewFactory::instance()) ); children_button->setToggleButton(true); children_button->setFixedSize(children_button->sizeHint()); - QToolTip::add(children_button, i18n("Show children")); + TQToolTip::add(children_button, i18n("Show children")); - clients_button = new QToolButton(this); + clients_button = new TQToolButton(this); clients_button->setPixmap( UserIcon("CTclients", KIcon::DefaultState, ClassViewFactory::instance()) ); clients_button->setToggleButton(true); clients_button->setFixedSize(clients_button->sizeHint()); - QToolTip::add(clients_button, i18n("Show clients")); + TQToolTip::add(clients_button, i18n("Show clients")); - suppliers_button = new QToolButton(this); + suppliers_button = new TQToolButton(this); suppliers_button->setPixmap( UserIcon("CTsuppliers", KIcon::DefaultState, ClassViewFactory::instance()) ); suppliers_button->setToggleButton(true); suppliers_button->setFixedSize(suppliers_button->sizeHint()); - QToolTip::add(suppliers_button, i18n("Show suppliers")); + TQToolTip::add(suppliers_button, i18n("Show suppliers")); - methods_button = new QToolButton(this); + methods_button = new TQToolButton(this); methods_button->setPixmap( UserIcon("CVpublic_meth", KIcon::DefaultState, ClassViewFactory::instance()) ); methods_button->setToggleButton(true); methods_button->setFixedSize(methods_button->sizeHint()); - QToolTip::add(methods_button, i18n("Show methods")); + TQToolTip::add(methods_button, i18n("Show methods")); - attributes_button = new QToolButton(this); + attributes_button = new TQToolButton(this); attributes_button->setPixmap( UserIcon("CVpublic_var", KIcon::DefaultState, ClassViewFactory::instance()) ); attributes_button->setToggleButton(true); attributes_button->setFixedSize(attributes_button->sizeHint()); - QToolTip::add(attributes_button, i18n("Show attributes")); + TQToolTip::add(attributes_button, i18n("Show attributes")); - access_combo = new QComboBox(false, this, "access combo"); + access_combo = new TQComboBox(false, this, "access combo"); access_combo->setMinimumWidth(100); access_combo->setSizeLimit(10); access_combo->insertItem(i18n("member access","All")); @@ -86,9 +86,9 @@ ClassToolDialog::ClassToolDialog( ClassViewPart *part ) class_tree = new ClassToolWidget(part, this); // classTree->setMinimumSize( 500, 400 ); - QVBoxLayout *layout = new QVBoxLayout(this, KDialog::marginHint(), KDialog::spacingHint()); - QHBoxLayout *firstrowLayout = new QHBoxLayout(); - QHBoxLayout *secondrowLayout = new QHBoxLayout(); + TQVBoxLayout *layout = new TQVBoxLayout(this, KDialog::marginHint(), KDialog::spacingHint()); + TQHBoxLayout *firstrowLayout = new TQHBoxLayout(); + TQHBoxLayout *secondrowLayout = new TQHBoxLayout(); layout->addLayout(firstrowLayout); layout->addLayout(secondrowLayout); @@ -106,21 +106,21 @@ ClassToolDialog::ClassToolDialog( ClassViewPart *part ) layout->addWidget(class_tree, 10); - connect( class_combo, SIGNAL(activated(const QString&)), - this, SLOT(slotClassComboChoice(const QString&)) ); - connect( close_button, SIGNAL(clicked()), - this, SLOT(slotClose()) ); - connect( access_combo, SIGNAL(activated(const QString&)), - this, SLOT(slotAccessComboChoice(const QString&)) ); - connect( parents_button, SIGNAL(clicked()), SLOT(viewParents())); - connect( children_button, SIGNAL(clicked()), SLOT(viewChildren())); - connect( clients_button, SIGNAL(clicked()), SLOT(viewClients())); - connect( suppliers_button, SIGNAL(clicked()), SLOT(viewSuppliers())); - connect( methods_button, SIGNAL(clicked()), SLOT(viewMethods())); - connect( attributes_button, SIGNAL(clicked()), SLOT(viewAttributes())); - - connect( part, SIGNAL(setLanguageSupport(KDevLanguageSupport*)), - this, SLOT(setLanguageSupport(KDevLanguageSupport*)) ); + connect( class_combo, TQT_SIGNAL(activated(const TQString&)), + this, TQT_SLOT(slotClassComboChoice(const TQString&)) ); + connect( close_button, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotClose()) ); + connect( access_combo, TQT_SIGNAL(activated(const TQString&)), + this, TQT_SLOT(slotAccessComboChoice(const TQString&)) ); + connect( parents_button, TQT_SIGNAL(clicked()), TQT_SLOT(viewParents())); + connect( children_button, TQT_SIGNAL(clicked()), TQT_SLOT(viewChildren())); + connect( clients_button, TQT_SIGNAL(clicked()), TQT_SLOT(viewClients())); + connect( suppliers_button, TQT_SIGNAL(clicked()), TQT_SLOT(viewSuppliers())); + connect( methods_button, TQT_SIGNAL(clicked()), TQT_SLOT(viewMethods())); + connect( attributes_button, TQT_SIGNAL(clicked()), TQT_SLOT(viewAttributes())); + + connect( part, TQT_SIGNAL(setLanguageSupport(KDevLanguageSupport*)), + this, TQT_SLOT(setLanguageSupport(KDevLanguageSupport*)) ); m_part->registerClassToolDialog(this); } @@ -136,7 +136,7 @@ void ClassToolDialog::setLanguageSupport(KDevLanguageSupport *ls) { if (ls) { disconnect(ls, 0, this, 0); - connect(ls, SIGNAL(updatedSourceInfo()), this, SLOT(refresh())); + connect(ls, TQT_SIGNAL(updatedSourceInfo()), this, TQT_SLOT(refresh())); } else refresh(); @@ -144,11 +144,11 @@ void ClassToolDialog::setLanguageSupport(KDevLanguageSupport *ls) } -void ClassToolDialog::setClassName(const QString &name) +void ClassToolDialog::setClassName(const TQString &name) { if ( class_combo->count() == 0 ) refresh(); - QListBox *lb = class_combo->listBox(); + TQListBox *lb = class_combo->listBox(); for (int i=0; i < (int)lb->count(); ++i) if (lb->text(i) == name) { @@ -218,7 +218,7 @@ void ClassToolDialog::viewAttributes() } -void ClassToolDialog::slotAccessComboChoice(const QString &str) +void ClassToolDialog::slotAccessComboChoice(const TQString &str) { if( str == i18n("member access","All") ) comboAccess = (PIAccess)-1; @@ -240,7 +240,7 @@ void ClassToolDialog::slotAccessComboChoice(const QString &str) void ClassToolDialog::slotClose() { delete this; - // QTimer::singleShot(0, this, SLOT(delayedClose())); + // TQTimer::singleShot(0, this, TQT_SLOT(delayedClose())); } @@ -250,7 +250,7 @@ void ClassToolDialog::delayedClose() } -void ClassToolDialog::slotClassComboChoice(const QString &str) +void ClassToolDialog::slotClassComboChoice(const TQString &str) { setClassName(str); refresh(); @@ -262,10 +262,10 @@ void ClassToolDialog::refresh() // Clear the combo box and fill it with the new items. // Try to select the previously selected class - QString oldName = class_combo->currentText(); + TQString oldName = class_combo->currentText(); class_combo->clear(); - QStringList list = m_part->classStore()->getSortedClassNameList(); + TQStringList list = m_part->classStore()->getSortedClassNameList(); class_combo->insertStringList(list); setClassName(oldName); @@ -277,8 +277,8 @@ void ClassToolDialog::refresh() /** Change the caption depending on the current operation. */ void ClassToolDialog::updateCaptionAndButtons() { - QString caption; - QToolButton *button; + TQString caption; + TQToolButton *button; switch (currentOperation) { @@ -343,19 +343,19 @@ void ClassToolDialog::buildTree() break; case ViewChildren: { - QValueList<ParsedClass*> list = m_part->classStore()->getClassesByParent(currentClass->name()); + TQValueList<ParsedClass*> list = m_part->classStore()->getClassesByParent(currentClass->name()); class_tree->insertClassAndClasses(currentClass, list); } break; case ViewClients: { - QValueList<ParsedClass*> list = m_part->classStore()->getClassClients(currentClass->name()); + TQValueList<ParsedClass*> list = m_part->classStore()->getClassClients(currentClass->name()); class_tree->insertClassAndClasses(currentClass, list); } break; case ViewSuppliers: { - QValueList<ParsedClass*> list = m_part->classStore()->getClassSuppliers(currentClass->name()); + TQValueList<ParsedClass*> list = m_part->classStore()->getClassSuppliers(currentClass->name()); class_tree->insertClassAndClasses(currentClass, list); } break; diff --git a/parts/classview/classtooldlg.h b/parts/classview/classtooldlg.h index 1ab8b5c1..01c86f3b 100644 --- a/parts/classview/classtooldlg.h +++ b/parts/classview/classtooldlg.h @@ -14,11 +14,11 @@ #ifndef _CLASSTOOLDLG_H_ #define _CLASSTOOLDLG_H_ -#include <qdialog.h> -#include <qlabel.h> -#include <qtoolbutton.h> -#include <qcombobox.h> -#include <qlayout.h> +#include <tqdialog.h> +#include <tqlabel.h> +#include <tqtoolbutton.h> +#include <tqcombobox.h> +#include <tqlayout.h> #include "classtoolwidget.h" #include "parseditem.h" @@ -38,7 +38,7 @@ public: ClassToolDialog( ClassViewPart *part ); ~ClassToolDialog(); - void setClassName(const QString &name); + void setClassName(const TQString &name); public slots: @@ -63,8 +63,8 @@ private slots: void delayedClose(); void slotClose(); - void slotAccessComboChoice(const QString &str); - void slotClassComboChoice(const QString &str); + void slotAccessComboChoice(const TQString &str); + void slotClassComboChoice(const TQString &str); private: @@ -72,15 +72,15 @@ private: void buildTree(); ClassToolWidget *class_tree; - QComboBox *class_combo; + TQComboBox *class_combo; - QToolButton *parents_button; - QToolButton *children_button; - QToolButton *clients_button; - QToolButton *suppliers_button; - QToolButton *methods_button; - QToolButton *attributes_button; - QComboBox *access_combo; + TQToolButton *parents_button; + TQToolButton *children_button; + TQToolButton *clients_button; + TQToolButton *suppliers_button; + TQToolButton *methods_button; + TQToolButton *attributes_button; + TQComboBox *access_combo; /** Store that holds all classes in the system. */ ClassStore *m_store; diff --git a/parts/classview/classtoolwidget.cpp b/parts/classview/classtoolwidget.cpp index f800bd15..5aefe6e5 100644 --- a/parts/classview/classtoolwidget.cpp +++ b/parts/classview/classtoolwidget.cpp @@ -20,7 +20,7 @@ #include "classstore.h" -ClassToolWidget::ClassToolWidget(ClassViewPart *part, QWidget *parent) +ClassToolWidget::ClassToolWidget(ClassViewPart *part, TQWidget *parent) : ClassTreeBase(part, parent, "class tool widget") {} @@ -41,13 +41,13 @@ KPopupMenu *ClassToolWidget::createPopup() } -void ClassToolWidget::insertClassAndClasses(ParsedClass *parsedClass, QValueList<ParsedClass*> classList) +void ClassToolWidget::insertClassAndClasses(ParsedClass *parsedClass, TQValueList<ParsedClass*> classList) { ClassTreeItem *root = new ClassTreeClassItem(this, 0, parsedClass); ClassTreeItem *lastItem = 0; - QValueList<ParsedClass*>::ConstIterator it; + TQValueList<ParsedClass*>::ConstIterator it; for (it = classList.begin(); it != classList.end(); ++it) { lastItem = new ClassTreeClassItem(root, lastItem, *it); lastItem->setExpandable(false); @@ -60,13 +60,13 @@ void ClassToolWidget::insertClassAndClasses(ParsedClass *parsedClass, QValueList } -void ClassToolWidget::insertClassAndClasses(ParsedClass *parsedClass, const QPtrList<ParsedParent> &parentList) +void ClassToolWidget::insertClassAndClasses(ParsedClass *parsedClass, const TQPtrList<ParsedParent> &parentList) { ClassTreeItem *root = new ClassTreeClassItem(this, 0, parsedClass); ClassTreeItem *lastItem = 0; - QPtrListIterator<ParsedParent> it(parentList); + TQPtrListIterator<ParsedParent> it(parentList); for (; it.current(); ++it) { ParsedClass *parentClass = m_part->classStore()->getClassByName((*it)->name()); lastItem = new ClassTreeClassItem(root, lastItem, parentClass); @@ -86,8 +86,8 @@ void ClassToolWidget::addClassAndAttributes(ParsedClass *parsedClass, PIAccess f ClassTreeItem *ilastItem = 0; - QValueList<ParsedAttribute*> attrList = parsedClass->getSortedAttributeList(); - QValueList<ParsedAttribute*>::ConstIterator it; + TQValueList<ParsedAttribute*> attrList = parsedClass->getSortedAttributeList(); + TQValueList<ParsedAttribute*>::ConstIterator it; for (it = attrList.begin(); it != attrList.end(); ++it) { if (filter == (PIAccess)-1 || filter == (*it)->access()) ilastItem = new ClassTreeAttrItem(*lastItem, ilastItem, *it); @@ -106,8 +106,8 @@ void ClassToolWidget::addClassAndMethods(ParsedClass *parsedClass, PIAccess filt ClassTreeItem *ilastItem = 0; - QValueList<ParsedMethod*> methodList = parsedClass->getSortedMethodList(); - QValueList<ParsedMethod*>::ConstIterator it; + TQValueList<ParsedMethod*> methodList = parsedClass->getSortedMethodList(); + TQValueList<ParsedMethod*>::ConstIterator it; for (it = methodList.begin(); it != methodList.end(); ++it) { if (filter == (PIAccess)-1 || filter == (*it)->access()) ilastItem = new ClassTreeMethodItem(*lastItem, ilastItem, *it); diff --git a/parts/classview/classtoolwidget.h b/parts/classview/classtoolwidget.h index 75119e8f..4d7d8036 100644 --- a/parts/classview/classtoolwidget.h +++ b/parts/classview/classtoolwidget.h @@ -22,11 +22,11 @@ class ClassToolWidget : public ClassTreeBase Q_OBJECT public: - ClassToolWidget(ClassViewPart *part, QWidget *parent=0); + ClassToolWidget(ClassViewPart *part, TQWidget *parent=0); ~ClassToolWidget(); - void insertClassAndClasses(ParsedClass *parsedClass, QValueList<ParsedClass*> classList); - void insertClassAndClasses(ParsedClass *parsedClass, const QPtrList<ParsedParent> &parentList); + void insertClassAndClasses(ParsedClass *parsedClass, TQValueList<ParsedClass*> classList); + void insertClassAndClasses(ParsedClass *parsedClass, const TQPtrList<ParsedParent> &parentList); void insertAllClassMethods(ParsedClass *parsedClass, PIAccess filter); void insertAllClassAttributes(ParsedClass *parsedClass, PIAccess filter); diff --git a/parts/classview/classtreebase.cpp b/parts/classview/classtreebase.cpp index f5c0f4b9..c6d2770e 100644 --- a/parts/classview/classtreebase.cpp +++ b/parts/classview/classtreebase.cpp @@ -13,9 +13,9 @@ #include "classtreebase.h" -#include <qtooltip.h> -#include <qheader.h> -#include <qregexp.h> +#include <tqtooltip.h> +#include <tqheader.h> +#include <tqregexp.h> #include <kdebug.h> #include <kconfig.h> #include <kpopupmenu.h> @@ -40,11 +40,11 @@ KPopupMenu *ClassTreeItem::createPopup() KPopupMenu *popup = new KPopupMenu(); if (features & KDevLanguageSupport::Declarations) - popup->insertItem( i18n("Go to Declaration"), classTree(), SLOT(slotGotoDeclaration()) ); + popup->insertItem( i18n("Go to Declaration"), classTree(), TQT_SLOT(slotGotoDeclaration()) ); if (m_item->itemType() == PIT_METHOD) - popup->insertItem( i18n("Go to Definition"), classTree(), SLOT(slotGotoImplementation()) ); + popup->insertItem( i18n("Go to Definition"), classTree(), TQT_SLOT(slotGotoImplementation()) ); - QString title; + TQString title; switch(m_item->itemType()) { case PIT_CLASS: { @@ -52,13 +52,13 @@ KPopupMenu *ClassTreeItem::createPopup() bool hasAddMethod = features & KDevLanguageSupport::AddMethod; bool hasAddAttribute = features & KDevLanguageSupport::AddAttribute; if (hasAddMethod) - popup->insertItem( i18n("Add Method..."), classTree(), SLOT(slotAddMethod())); + popup->insertItem( i18n("Add Method..."), classTree(), TQT_SLOT(slotAddMethod())); if (hasAddAttribute) - popup->insertItem( i18n("Add Attribute..."), classTree(), SLOT(slotAddAttribute())); + popup->insertItem( i18n("Add Attribute..."), classTree(), TQT_SLOT(slotAddAttribute())); popup->insertSeparator(); - popup->insertItem( i18n("Parent Classes..."), classTree(), SLOT(slotClassBaseClasses())); - popup->insertItem( i18n("Child Classes..."), classTree(), SLOT(slotClassDerivedClasses())); - popup->insertItem( i18n("Class Tool..."), classTree(), SLOT(slotClassTool())); + popup->insertItem( i18n("Parent Classes..."), classTree(), TQT_SLOT(slotClassBaseClasses())); + popup->insertItem( i18n("Child Classes..."), classTree(), TQT_SLOT(slotClassDerivedClasses())); + popup->insertItem( i18n("Class Tool..."), classTree(), TQT_SLOT(slotClassTool())); } break; case PIT_STRUCT: @@ -90,16 +90,16 @@ KPopupMenu *ClassTreeItem::createPopup() } -QString ClassTreeItem::scopedText() const +TQString ClassTreeItem::scopedText() const { if (m_item) return m_item->path(); - return QString::null; + return TQString::null; } -void ClassTreeItem::getDeclaration(QString *toFile, int *toLine) +void ClassTreeItem::getDeclaration(TQString *toFile, int *toLine) { if (m_item) { *toFile = m_item->declaredInFile(); @@ -108,7 +108,7 @@ void ClassTreeItem::getDeclaration(QString *toFile, int *toLine) } -void ClassTreeItem::getImplementation(QString *toFile, int *toLine) +void ClassTreeItem::getImplementation(TQString *toFile, int *toLine) { if (m_item) { *toFile = m_item->definedInFile(); @@ -117,15 +117,15 @@ void ClassTreeItem::getImplementation(QString *toFile, int *toLine) } -QString ClassTreeItem::text( int ) const +TQString ClassTreeItem::text( int ) const { if (m_item) return m_item->asString(); - return QString::null; + return TQString::null; } -QString ClassTreeItem::tipText() const +TQString ClassTreeItem::tipText() const { // Purposefully avoid virtual dispatch here return ClassTreeItem::text(0); @@ -146,10 +146,10 @@ void ClassTreeScopeItem::init() } -QString ClassTreeScopeItem::text( int col ) const +TQString ClassTreeScopeItem::text( int col ) const { if (!m_item) - return QString::null; + return TQString::null; if (m_item->name().isEmpty()) return i18n("Global"); return ClassTreeItem::text( col ); @@ -171,39 +171,39 @@ void ClassTreeScopeItem::setOpen(bool o) KDevLanguageSupport::Features features = classTree()->m_part->languageSupport()->features(); // Add namespaces - QValueList<ParsedScopeContainer*> scopeList = pScope->getSortedScopeList(); - QValueList<ParsedScopeContainer*>::ConstIterator it; + TQValueList<ParsedScopeContainer*> scopeList = pScope->getSortedScopeList(); + TQValueList<ParsedScopeContainer*>::ConstIterator it; for (it = scopeList.begin(); it != scopeList.end(); ++it) lastItem = new ClassTreeScopeItem(this, lastItem, *it); if (features & KDevLanguageSupport::Classes) { // Add classes - QValueList<ParsedClass*> classList = pScope->getSortedClassList(); - QValueList<ParsedClass*>::ConstIterator it; + TQValueList<ParsedClass*> classList = pScope->getSortedClassList(); + TQValueList<ParsedClass*>::ConstIterator it; for (it = classList.begin(); it != classList.end(); ++it) lastItem = new ClassTreeClassItem(this, lastItem, *it); } if (features & KDevLanguageSupport::Structs) { // Add structs - QValueList<ParsedClass*> structList = pScope->getSortedStructList(); - QValueList<ParsedClass*>::ConstIterator it; + TQValueList<ParsedClass*> structList = pScope->getSortedStructList(); + TQValueList<ParsedClass*>::ConstIterator it; for (it = structList.begin(); it != structList.end(); ++it) lastItem = new ClassTreeClassItem(this, lastItem, *it, true); } if (features & KDevLanguageSupport::Functions) { // Add functions - QValueList<ParsedMethod*> methodList = pScope->getSortedMethodList(); - QValueList<ParsedMethod*>::ConstIterator it; + TQValueList<ParsedMethod*> methodList = pScope->getSortedMethodList(); + TQValueList<ParsedMethod*>::ConstIterator it; for (it = methodList.begin(); it != methodList.end(); ++it) lastItem = new ClassTreeMethodItem(this, lastItem, *it); } if (features & KDevLanguageSupport::Variables) { // Add attributes - QValueList<ParsedAttribute*> attrList = pScope->getSortedAttributeList(); - QValueList<ParsedAttribute*>::ConstIterator it; + TQValueList<ParsedAttribute*> attrList = pScope->getSortedAttributeList(); + TQValueList<ParsedAttribute*>::ConstIterator it; for (it = attrList.begin(); it != attrList.end(); ++it) lastItem = new ClassTreeAttrItem(this, lastItem, *it); } @@ -232,38 +232,38 @@ void ClassTreeClassItem::setOpen(bool o) ClassTreeItem *lastItem = 0; // Add nested classes - QValueList<ParsedClass*> classList = pClass->getSortedClassList(); - QValueList<ParsedClass*>::ConstIterator classIt; + TQValueList<ParsedClass*> classList = pClass->getSortedClassList(); + TQValueList<ParsedClass*>::ConstIterator classIt; for (classIt = classList.begin(); classIt != classList.end(); ++classIt) lastItem = new ClassTreeClassItem(this, lastItem, *classIt); // Add nested structs - QValueList<ParsedClass*> structList = pClass->getSortedStructList(); - QValueList<ParsedClass*>::ConstIterator structIt; + TQValueList<ParsedClass*> structList = pClass->getSortedStructList(); + TQValueList<ParsedClass*>::ConstIterator structIt; for (structIt = structList.begin(); structIt != structList.end(); ++structIt) lastItem = new ClassTreeClassItem(this, lastItem, *structIt, true); // Add methods - QValueList<ParsedMethod*> methodList = pClass->getSortedMethodList(); - QValueList<ParsedMethod*>::ConstIterator methodIt; + TQValueList<ParsedMethod*> methodList = pClass->getSortedMethodList(); + TQValueList<ParsedMethod*>::ConstIterator methodIt; for (methodIt = methodList.begin(); methodIt != methodList.end(); ++methodIt) lastItem = new ClassTreeMethodItem(this, lastItem, *methodIt); // Add slots - QValueList<ParsedMethod*> slotList = pClass->getSortedSlotList(); - QValueList<ParsedMethod*>::ConstIterator slotIt; + TQValueList<ParsedMethod*> slotList = pClass->getSortedSlotList(); + TQValueList<ParsedMethod*>::ConstIterator slotIt; for (slotIt = slotList.begin(); slotIt != slotList.end(); ++slotIt) lastItem = new ClassTreeMethodItem(this, lastItem, *slotIt); // Add signals - QValueList<ParsedMethod*> signalList = pClass->getSortedSignalList(); - QValueList<ParsedMethod*>::ConstIterator signalIt; + TQValueList<ParsedMethod*> signalList = pClass->getSortedSignalList(); + TQValueList<ParsedMethod*>::ConstIterator signalIt; for (signalIt = signalList.begin(); signalIt != signalList.end(); ++signalIt) lastItem = new ClassTreeMethodItem(this, lastItem, *signalIt); // Add attributes - QValueList<ParsedAttribute*> attrList = pClass->getSortedAttributeList(); - QValueList<ParsedAttribute*>::ConstIterator attrIt; + TQValueList<ParsedAttribute*> attrList = pClass->getSortedAttributeList(); + TQValueList<ParsedAttribute*>::ConstIterator attrIt; for (attrIt = attrList.begin(); attrIt != attrList.end(); ++attrIt) lastItem = new ClassTreeAttrItem(this, lastItem, *attrIt); @@ -276,7 +276,7 @@ ClassTreeMethodItem::ClassTreeMethodItem(ClassTreeItem *parent, ClassTreeItem *l ParsedMethod *parsedMethod) : ClassTreeItem(parent, lastSibling, parsedMethod) { - QString icon; + TQString icon; if ( !parsedMethod ) return; @@ -305,12 +305,12 @@ ClassTreeMethodItem::ClassTreeMethodItem(ClassTreeItem *parent, ClassTreeItem *l setPixmap(0, UserIcon(icon, KIcon::DefaultState, ClassViewFactory::instance())); } -QString ClassTreeMethodItem::text( int ) const +TQString ClassTreeMethodItem::text( int ) const { - QString str; + TQString str; if ( !m_item ) - return QString::null; + return TQString::null; ParsedMethod* method = static_cast<ParsedMethod*>(m_item); @@ -340,7 +340,7 @@ ClassTreeAttrItem::ClassTreeAttrItem(ClassTreeItem *parent, ClassTreeItem *lastS ParsedAttribute *parsedAttr) : ClassTreeItem(parent, lastSibling, parsedAttr) { - QString icon; + TQString icon; if ( !parsedAttr ) return; @@ -360,10 +360,10 @@ ClassTreeAttrItem::ClassTreeAttrItem(ClassTreeItem *parent, ClassTreeItem *lastS } -QString ClassTreeAttrItem::text( int ) const +TQString ClassTreeAttrItem::text( int ) const { if ( !m_item ) - return QString::null; + return TQString::null; return m_item->name(); } @@ -371,7 +371,7 @@ ClassTreeScriptItem::ClassTreeScriptItem(ClassTreeItem *parent, ClassTreeItem *l ParsedScript *parsedScript) : ClassTreeItem(parent, lastSibling, parsedScript) { - QString icon; + TQString icon; if ( !parsedScript ) return; @@ -384,10 +384,10 @@ ClassTreeScriptItem::ClassTreeScriptItem(ClassTreeItem *parent, ClassTreeItem *l } -QString ClassTreeScriptItem::text( int ) const +TQString ClassTreeScriptItem::text( int ) const { if ( !m_item ) - return QString::null; + return TQString::null; return m_item->name(); } @@ -402,14 +402,14 @@ void ClassTreeScriptItem::setOpen(bool o) ClassTreeItem *lastItem = 0; // Add methods - QValueList<ParsedMethod*> methodList = pClass->getSortedMethodList(); - QValueList<ParsedMethod*>::ConstIterator methodIt; + TQValueList<ParsedMethod*> methodList = pClass->getSortedMethodList(); + TQValueList<ParsedMethod*>::ConstIterator methodIt; for (methodIt = methodList.begin(); methodIt != methodList.end(); ++methodIt) lastItem = new ClassTreeMethodItem(this, lastItem, *methodIt); // Add attributes - QValueList<ParsedAttribute*> attrList = pClass->getSortedAttributeList(); - QValueList<ParsedAttribute*>::ConstIterator attrIt; + TQValueList<ParsedAttribute*> attrList = pClass->getSortedAttributeList(); + TQValueList<ParsedAttribute*>::ConstIterator attrIt; for (attrIt = attrList.begin(); attrIt != attrList.end(); ++attrIt) lastItem = new ClassTreeAttrItem(this, lastItem, *attrIt); @@ -422,51 +422,51 @@ void ClassTreeScriptItem::setOpen(bool o) class ClassToolTip : public QToolTip { public: - ClassToolTip( QWidget *parent ) - : QToolTip(parent) + ClassToolTip( TQWidget *parent ) + : TQToolTip(parent) {} protected: - void maybeTip(const QPoint &p); + void maybeTip(const TQPoint &p); }; -void ClassToolTip::maybeTip(const QPoint &p) +void ClassToolTip::maybeTip(const TQPoint &p) { ClassTreeBase *ctw = static_cast<ClassTreeBase*>(parentWidget()); - QListViewItem *item = ctw->itemAt(p); - QRect r = ctw->itemRect(item); + TQListViewItem *item = ctw->itemAt(p); + TQRect r = ctw->itemRect(item); if (item && r.isValid()) { ClassTreeItem *ctitem = static_cast<ClassTreeItem*>(item); - QString str = ctitem->tipText(); + TQString str = ctitem->tipText(); if (!str.isEmpty()) tip(r, str); } } -ClassTreeBase::ClassTreeBase(ClassViewPart *part, QWidget *parent, const char *name) +ClassTreeBase::ClassTreeBase(ClassViewPart *part, TQWidget *parent, const char *name) : KListView(parent, name) { setFocusPolicy(ClickFocus); setRootIsDecorated(true); - setResizeMode(QListView::LastColumn); + setResizeMode(TQListView::LastColumn); setSorting(-1); header()->hide(); - addColumn(QString::null); + addColumn(TQString::null); (void) new ClassToolTip(this); - connect( this, SIGNAL(executed(QListViewItem*)), - this, SLOT(slotItemExecuted(QListViewItem*)) ); - connect( this, SIGNAL(mouseButtonPressed(int, QListViewItem*, const QPoint&, int)), - this, SLOT(slotItemPressed(int, QListViewItem*)) ); - connect( this, SIGNAL(returnPressed( QListViewItem*)), - SLOT( slotItemExecuted(QListViewItem*)) ); - connect( this, SIGNAL(contextMenuRequested(QListViewItem*, const QPoint&, int)), - this, SLOT(slotContextMenuRequested(QListViewItem*, const QPoint&)) ); + connect( this, TQT_SIGNAL(executed(TQListViewItem*)), + this, TQT_SLOT(slotItemExecuted(TQListViewItem*)) ); + connect( this, TQT_SIGNAL(mouseButtonPressed(int, TQListViewItem*, const TQPoint&, int)), + this, TQT_SLOT(slotItemPressed(int, TQListViewItem*)) ); + connect( this, TQT_SIGNAL(returnPressed( TQListViewItem*)), + TQT_SLOT( slotItemExecuted(TQListViewItem*)) ); + connect( this, TQT_SIGNAL(contextMenuRequested(TQListViewItem*, const TQPoint&, int)), + this, TQT_SLOT(slotContextMenuRequested(TQListViewItem*, const TQPoint&)) ); m_part = part; } @@ -481,11 +481,11 @@ ClassTreeBase::TreeState ClassTreeBase::treeState() const TreeState state; ClassTreeBase *that = const_cast<ClassTreeBase*>(this); - QListViewItemIterator it(that); + TQListViewItemIterator it(that); for (; it.current(); ++it) if (it.current()->isOpen()) { - QStringList path; - QListViewItem *item = it.current(); + TQStringList path; + TQListViewItem *item = it.current(); while (item) { path.prepend(item->text(0)); item = item->parent(); @@ -501,10 +501,10 @@ void ClassTreeBase::setTreeState(TreeState state) { TreeStateIterator tsit; for (tsit = state.begin(); tsit != state.end(); ++tsit) { - QListViewItemIterator it(this); + TQListViewItemIterator it(this); for (; it.current(); ++it) { - QStringList path; - QListViewItem *item = it.current(); + TQStringList path; + TQListViewItem *item = it.current(); while (item) { path.prepend(item->text(0)); item = item->parent(); @@ -520,7 +520,7 @@ void ClassTreeBase::setTreeState(TreeState state) -void ClassTreeBase::slotItemExecuted( QListViewItem* item ) +void ClassTreeBase::slotItemExecuted( TQListViewItem* item ) { if (!item) return; @@ -535,7 +535,7 @@ void ClassTreeBase::slotItemExecuted( QListViewItem* item ) if (ctitem->isOrganizer()) return; - QString toFile; + TQString toFile; int toLine = -1; if (dynamic_cast<ClassTreeClassItem*>(item)) { ctitem->getDeclaration(&toFile, &toLine); @@ -548,7 +548,7 @@ void ClassTreeBase::slotItemExecuted( QListViewItem* item ) } -void ClassTreeBase::slotItemPressed(int button, QListViewItem *item) +void ClassTreeBase::slotItemPressed(int button, TQListViewItem *item) { if (!item) return; @@ -560,7 +560,7 @@ void ClassTreeBase::slotItemPressed(int button, QListViewItem *item) return; if (button == MidButton) { - QString toFile; + TQString toFile; int toLine = -1; ctitem->getDeclaration(&toFile, &toLine); m_part->partController()->editDocument(toFile, toLine); @@ -568,7 +568,7 @@ void ClassTreeBase::slotItemPressed(int button, QListViewItem *item) } } -void ClassTreeBase::slotContextMenuRequested(QListViewItem *item, const QPoint &p) +void ClassTreeBase::slotContextMenuRequested(TQListViewItem *item, const TQPoint &p) { contextItem = static_cast<ClassTreeItem*>(item); @@ -579,7 +579,7 @@ void ClassTreeBase::slotContextMenuRequested(QListViewItem *item, const QPoint & void ClassTreeBase::slotGotoDeclaration() { - QString toFile; + TQString toFile; int toLine = -1; contextItem->getDeclaration(&toFile, &toLine); @@ -589,7 +589,7 @@ void ClassTreeBase::slotGotoDeclaration() void ClassTreeBase::slotGotoImplementation() { - QString toFile; + TQString toFile; int toLine = -1; contextItem->getImplementation(&toFile, &toLine); diff --git a/parts/classview/classtreebase.h b/parts/classview/classtreebase.h index e019bcc2..91ac8054 100644 --- a/parts/classview/classtreebase.h +++ b/parts/classview/classtreebase.h @@ -32,12 +32,12 @@ class ClassTreeBase : public KListView Q_OBJECT public: - ClassTreeBase( ClassViewPart *part, QWidget *parent=0, const char *name=0 ); + ClassTreeBase( ClassViewPart *part, TQWidget *parent=0, const char *name=0 ); ~ClassTreeBase(); protected: - typedef QValueList<QStringList> TreeState; - typedef QValueList<QStringList>::Iterator TreeStateIterator; + typedef TQValueList<TQStringList> TreeState; + typedef TQValueList<TQStringList>::Iterator TreeStateIterator; TreeState treeState() const; void setTreeState(TreeState state); @@ -45,9 +45,9 @@ protected: virtual KPopupMenu *createPopup() = 0; private slots: - void slotItemExecuted(QListViewItem*); - void slotItemPressed(int button, QListViewItem *item); - void slotContextMenuRequested(QListViewItem *item, const QPoint &p); + void slotItemExecuted(TQListViewItem*); + void slotItemPressed(int button, TQListViewItem *item); + void slotContextMenuRequested(TQListViewItem *item, const TQPoint &p); void slotGotoDeclaration(); void slotGotoImplementation(); void slotAddMethod(); @@ -63,21 +63,21 @@ protected: }; -class ClassTreeItem : public QListViewItem, public NotifyClient +class ClassTreeItem : public TQListViewItem, public NotifyClient { public: ClassTreeItem( ClassTreeBase *parent, ClassTreeItem *lastSibling, ParsedItem *parsedItem ) - : QListViewItem(parent, lastSibling), NotifyClient(), m_item(parsedItem) + : TQListViewItem(parent, lastSibling), NotifyClient(), m_item(parsedItem) { init(); } ClassTreeItem( ClassTreeItem *parent, ClassTreeItem *lastSibling, ParsedItem *parsedItem ) - : QListViewItem(parent, lastSibling), NotifyClient(), m_item(parsedItem) + : TQListViewItem(parent, lastSibling), NotifyClient(), m_item(parsedItem) { init(); } ClassTreeItem( const ClassTreeItem& other ) - : QListViewItem( other.parent(), other.nextSibling()), NotifyClient() + : TQListViewItem( other.parent(), other.nextSibling()), NotifyClient() { m_item = other.m_item; init(); @@ -105,12 +105,12 @@ public: m_item->registerNotifyClient( (NotifyClient*)this ); } - void getDeclaration(QString *toFile, int *toLine); - void getImplementation(QString *toFile, int *toLine); + void getDeclaration(TQString *toFile, int *toLine); + void getImplementation(TQString *toFile, int *toLine); - virtual QString scopedText() const; - virtual QString text( int ) const; - virtual QString tipText() const; + virtual TQString scopedText() const; + virtual TQString text( int ) const; + virtual TQString tipText() const; protected: ClassTreeBase *classTree() @@ -123,22 +123,22 @@ class ClassTreeOrganizerItem : public ClassTreeItem { public: ClassTreeOrganizerItem( ClassTreeBase *parent, ClassTreeItem *lastSibling, - const QString &text ) + const TQString &text ) : ClassTreeItem(parent, lastSibling, 0 ) , m_text( text ) { init(); } ClassTreeOrganizerItem( ClassTreeItem *parent, ClassTreeItem *lastSibling, - const QString &text ) + const TQString &text ) : ClassTreeItem(parent, lastSibling, 0 ) , m_text( text ) { init(); } ~ClassTreeOrganizerItem() {} - virtual QString text( int ) const { return m_text; } + virtual TQString text( int ) const { return m_text; } private: - QString m_text; + TQString m_text; void init(); }; @@ -163,7 +163,7 @@ public: { } - virtual QString text( int ) const; + virtual TQString text( int ) const; virtual void setOpen(bool o); private: @@ -209,7 +209,7 @@ public: { } - virtual QString text( int ) const; + virtual TQString text( int ) const; }; @@ -222,7 +222,7 @@ public: { } - virtual QString text( int ) const; + virtual TQString text( int ) const; }; class ClassTreeScriptItem : public ClassTreeItem @@ -234,7 +234,7 @@ public: { } - virtual QString text( int ) const; + virtual TQString text( int ) const; virtual void setOpen(bool o); }; diff --git a/parts/classview/classviewpart.cpp b/parts/classview/classviewpart.cpp index 42410fbe..24163bf4 100644 --- a/parts/classview/classviewpart.cpp +++ b/parts/classview/classviewpart.cpp @@ -19,10 +19,10 @@ * */ -#include <qwhatsthis.h> -#include <qlistview.h> -#include <qfileinfo.h> -#include <qlineedit.h> +#include <tqwhatsthis.h> +#include <tqlistview.h> +#include <tqfileinfo.h> +#include <tqlineedit.h> #include <kiconloader.h> #include <klocale.h> @@ -63,13 +63,13 @@ class FunctionCompletion : public CustomCompleter { FunctionCompletion() { setOrder( Insertion ); }; - typedef QMap<QString, QString> FuncMap; + typedef TQMap<TQString, TQString> FuncMap; FuncMap nameMap; /// real -> short FuncMap revNameMap; /// short -> real - static const QString processName( QString function ) { - QString args; - QString fScope; + static const TQString processName( TQString function ) { + TQString args; + TQString fScope; int cutpos; if((cutpos = function.find('(')) != -1) { @@ -86,10 +86,10 @@ class FunctionCompletion : public CustomCompleter { return function; } - virtual void addItem ( const QString &item ) { - QString newItemName = item; + virtual void addItem ( const TQString &item ) { + TQString newItemName = item; KCompletion::addItem(newItemName); - QString tx = processName( item ); + TQString tx = processName( item ); tx += " \"" + item + "\""; nameMap[item] = tx; revNameMap[tx] = item; @@ -102,7 +102,7 @@ class FunctionCompletion : public CustomCompleter { KCompletion::addItem( item ); } - virtual void removeItem ( const QString &item ) { + virtual void removeItem ( const TQString &item ) { FuncMap::iterator it = nameMap.find( item ); if( it != nameMap.end() ) { KCompletion::removeItem( *it ); @@ -117,15 +117,15 @@ class FunctionCompletion : public CustomCompleter { KCompletion::clear(); } - virtual void postProcessMatch ( QString *match ) const { + virtual void postProcessMatch ( TQString *match ) const { FuncMap::const_iterator it = revNameMap.find( *match ); if( it != revNameMap.end() ) { *match = *it; } }; - virtual void postProcessMatches ( QStringList *matches ) const { - QStringList::iterator it = matches->begin(); + virtual void postProcessMatches ( TQStringList *matches ) const { + TQStringList::iterator it = matches->begin(); while( it != matches->end() ) { postProcessMatch( &(*it) ); @@ -142,7 +142,7 @@ typedef KDevGenericFactory<ClassViewPart> ClassViewFactory; static const KDevPluginInfo data("kdevclassview"); K_EXPORT_COMPONENT_FACTORY( libkdevclassview, ClassViewFactory( data ) ) -ClassViewPart::ClassViewPart(QObject *parent, const char *name, const QStringList& ) +ClassViewPart::ClassViewPart(TQObject *parent, const char *name, const TQStringList& ) :/// KDevPlugin( &data, parent, name ? name : "ClassViewPart" ), KDevCodeBrowserFrontend( &data, parent, name ? name : "ClassViewPart" ), m_activeDocument(0), m_activeView(0), m_activeSelection(0), m_activeEditor(0), m_activeViewCursor(0), m_hierarchyDlg(0) @@ -158,14 +158,14 @@ ClassViewPart::ClassViewPart(QObject *parent, const char *name, const QStringLis m_widget->setIcon( SmallIcon("view_tree") ); m_widget->setCaption(i18n("Class Browser")); mainWindow()->embedSelectView( m_widget, i18n("Classes"), i18n("Class browser") ); - QWhatsThis::add(m_widget, i18n("<b>Class browser</b><p>" + TQWhatsThis::add(m_widget, i18n("<b>Class browser</b><p>" "The class browser shows all namespaces, classes and namespace and class members in a project.")); - connect( core(), SIGNAL(projectOpened()), this, SLOT(slotProjectOpened()) ); - connect( core(), SIGNAL(projectClosed()), this, SLOT(slotProjectClosed()) ); - connect( core(), SIGNAL(languageChanged()), this, SLOT(slotProjectOpened()) ); - connect( partController(), SIGNAL(activePartChanged(KParts::Part*)), - this, SLOT(activePartChanged(KParts::Part*))); + connect( core(), TQT_SIGNAL(projectOpened()), this, TQT_SLOT(slotProjectOpened()) ); + connect( core(), TQT_SIGNAL(projectClosed()), this, TQT_SLOT(slotProjectClosed()) ); + connect( core(), TQT_SIGNAL(languageChanged()), this, TQT_SLOT(slotProjectOpened()) ); + connect( partController(), TQT_SIGNAL(activePartChanged(KParts::Part*)), + this, TQT_SLOT(activePartChanged(KParts::Part*))); } bool ClassViewPart::jumpedToItem( ItemDom item ) { @@ -182,34 +182,34 @@ ClassViewPart::~ClassViewPart() void ClassViewPart::slotProjectOpened( ) { - connect( languageSupport(), SIGNAL(updatedSourceInfo()), navigator, SLOT(refresh()) ); - connect( languageSupport(), SIGNAL(addedSourceInfo(const QString& )), navigator, SLOT(addFile(const QString& ))); + connect( languageSupport(), TQT_SIGNAL(updatedSourceInfo()), navigator, TQT_SLOT(refresh()) ); + connect( languageSupport(), TQT_SIGNAL(addedSourceInfo(const TQString& )), navigator, TQT_SLOT(addFile(const TQString& ))); navigator->refresh(); } void ClassViewPart::slotProjectClosed( ) { // navigator->refresh(); -// disconnect( languageSupport(), SIGNAL(updatedSourceInfo()), navigator, SLOT(refresh()) ); +// disconnect( languageSupport(), TQT_SIGNAL(updatedSourceInfo()), navigator, TQT_SLOT(refresh()) ); } void ClassViewPart::setupActions( ) { m_functionsnav = new KListViewAction( new KComboView(true, 150, 0, "m_functionsnav_combo", new FunctionCompletion() ), i18n("Functions Navigation"), 0, 0, 0, actionCollection(), "functionsnav_combo", true ); - connect(m_functionsnav->view(), SIGNAL(activated(QListViewItem*)), navigator, SLOT(selectFunctionNav(QListViewItem*))); + connect(m_functionsnav->view(), TQT_SIGNAL(activated(TQListViewItem*)), navigator, TQT_SLOT(selectFunctionNav(TQListViewItem*))); // m_functionsnav->view()->setEditable(false); - connect(m_functionsnav->view(), SIGNAL(focusGranted()), navigator, SLOT(functionNavFocused())); - connect(m_functionsnav->view(), SIGNAL(focusLost()), navigator, SLOT(functionNavUnFocused())); + connect(m_functionsnav->view(), TQT_SIGNAL(focusGranted()), navigator, TQT_SLOT(functionNavFocused())); + connect(m_functionsnav->view(), TQT_SIGNAL(focusLost()), navigator, TQT_SLOT(functionNavUnFocused())); m_functionsnav->setToolTip(i18n("Functions in file")); m_functionsnav->setWhatsThis(i18n("<b>Function navigator</b><p>Navigates over functions contained in the file.")); // m_functionsnav->view()->setCurrentText(NAV_NODEFINITION); m_functionsnav->view()->setDefaultText(NAV_NODEFINITION); - new KAction( i18n("Focus Navigator"), 0, this, SLOT(slotFocusNavbar()), actionCollection(), "focus_navigator" ); + new KAction( i18n("Focus Navigator"), 0, this, TQT_SLOT(slotFocusNavbar()), actionCollection(), "focus_navigator" ); if (langHasFeature(KDevLanguageSupport::Classes)) { - KAction *ac = new KAction(i18n("Class Inheritance Diagram"), "view_tree", 0, this, SLOT(graphicalClassView()), actionCollection(), "inheritance_dia"); + KAction *ac = new KAction(i18n("Class Inheritance Diagram"), "view_tree", 0, this, TQT_SLOT(graphicalClassView()), actionCollection(), "inheritance_dia"); ac->setToolTip(i18n("Class inheritance diagram")); ac->setWhatsThis(i18n("<b>Class inheritance diagram</b><p>Displays inheritance relationship between classes in project. " "Note, it does not display classes outside inheritance hierarchy.")); @@ -242,8 +242,8 @@ void ClassViewPart::activePartChanged( KParts::Part * part) navigator->stopTimer(); if (m_activeView) { - disconnect(m_activeView, SIGNAL(cursorPositionChanged()), - navigator, SLOT(slotCursorPositionChanged())); + disconnect(m_activeView, TQT_SIGNAL(cursorPositionChanged()), + navigator, TQT_SLOT(slotCursorPositionChanged())); } kdDebug() << "ClassViewPart::activePartChanged()" << endl; @@ -254,7 +254,7 @@ void ClassViewPart::activePartChanged( KParts::Part * part) m_activeSelection = dynamic_cast<KTextEditor::SelectionInterface*>( part ); m_activeViewCursor = part ? dynamic_cast<KTextEditor::ViewCursorInterface*>( m_activeView ) : 0; - m_activeFileName = QString::null; + m_activeFileName = TQString::null; if (m_activeDocument) { @@ -263,12 +263,12 @@ void ClassViewPart::activePartChanged( KParts::Part * part) navigator->syncFunctionNavDelayed(200); /* if ( languageSupport()->mimeTypes().find( KMimeType::findByPath(m_activeFileName)) != languageSupport()->mimeTypes().end() ) - m_activeFileName = QString::null;*/ + m_activeFileName = TQString::null;*/ } if( m_activeViewCursor ) { - connect(m_activeView, SIGNAL(cursorPositionChanged()), - navigator, SLOT(slotCursorPositionChanged()) ); + connect(m_activeView, TQT_SIGNAL(cursorPositionChanged()), + navigator, TQT_SLOT(slotCursorPositionChanged()) ); } } void ClassViewPart::slotFocusNavbar() diff --git a/parts/classview/classviewpart.h b/parts/classview/classviewpart.h index 0f4aa115..ffa1cc1f 100644 --- a/parts/classview/classviewpart.h +++ b/parts/classview/classviewpart.h @@ -24,8 +24,8 @@ #include "kdevlanguagesupport.h" #include "viewcombos.h" -#include <qguardedptr.h> -#include <qmap.h> +#include <tqguardedptr.h> +#include <tqmap.h> #include <kdevplugin.h> @@ -56,7 +56,7 @@ class ClassViewPart : public Extensions::KDevCodeBrowserFrontend { Q_OBJECT public: - ClassViewPart(QObject *parent, const char *name, const QStringList &); + ClassViewPart(TQObject *parent, const char *name, const TQStringList &); virtual ~ClassViewPart(); bool langHasFeature(KDevLanguageSupport::Features feature); @@ -82,9 +82,9 @@ private slots: private: void setupActions(); - QGuardedPtr<ClassViewWidget> m_widget; + TQGuardedPtr<ClassViewWidget> m_widget; - QString m_activeFileName; + TQString m_activeFileName; KTextEditor::Document* m_activeDocument; KTextEditor::View* m_activeView; KTextEditor::SelectionInterface* m_activeSelection; diff --git a/parts/classview/classviewwidget.cpp b/parts/classview/classviewwidget.cpp index 0ab90856..64079546 100644 --- a/parts/classview/classviewwidget.cpp +++ b/parts/classview/classviewwidget.cpp @@ -41,15 +41,15 @@ #include <klocale.h> #include <kdebug.h> -#include <qheader.h> -#include <qdir.h> -#include <qstylesheet.h> -#include <qstringlist.h> +#include <tqheader.h> +#include <tqdir.h> +#include <tqstylesheet.h> +#include <tqstringlist.h> // namespace ?!? ClassViewWidget::ClassViewWidget( ClassViewPart * part ) - : KListView( 0, "ClassViewWidget" ), QToolTip( viewport() ), m_part( part ), m_projectDirectoryLength( 0 ) + : KListView( 0, "ClassViewWidget" ), TQToolTip( viewport() ), m_part( part ), m_projectDirectoryLength( 0 ) { addColumn( "" ); header()->hide(); @@ -59,40 +59,40 @@ ClassViewWidget::ClassViewWidget( ClassViewPart * part ) m_projectItem = 0; - connect( this, SIGNAL(returnPressed(QListViewItem*)), this, SLOT(slotExecuted(QListViewItem*)) ); - connect( this, SIGNAL(executed(QListViewItem*)), this, SLOT(slotExecuted(QListViewItem*)) ); - connect( m_part->core(), SIGNAL(projectOpened()), this, SLOT(slotProjectOpened()) ); - connect( m_part->core(), SIGNAL(projectClosed()), this, SLOT(slotProjectClosed()) ); - connect( m_part->core(), SIGNAL(languageChanged()), this, SLOT(slotProjectOpened()) ); + connect( this, TQT_SIGNAL(returnPressed(TQListViewItem*)), this, TQT_SLOT(slotExecuted(TQListViewItem*)) ); + connect( this, TQT_SIGNAL(executed(TQListViewItem*)), this, TQT_SLOT(slotExecuted(TQListViewItem*)) ); + connect( m_part->core(), TQT_SIGNAL(projectOpened()), this, TQT_SLOT(slotProjectOpened()) ); + connect( m_part->core(), TQT_SIGNAL(projectClosed()), this, TQT_SLOT(slotProjectClosed()) ); + connect( m_part->core(), TQT_SIGNAL(languageChanged()), this, TQT_SLOT(slotProjectOpened()) ); - QStringList lst; + TQStringList lst; lst << i18n( "Group by Directories" ) << i18n( "Plain List" ) << i18n( "Java Like Mode" ); m_actionViewMode = new KSelectAction( i18n("View Mode"), KShortcut(), m_part->actionCollection(), "classview_mode" ); m_actionViewMode->setItems( lst ); m_actionViewMode->setWhatsThis(i18n("<b>View mode</b><p>Class browser items can be grouped by directories, listed in a plain or java like view.")); - m_actionNewClass = new KAction( i18n("New Class..."), KShortcut(), this, SLOT(slotNewClass()), + m_actionNewClass = new KAction( i18n("New Class..."), KShortcut(), this, TQT_SLOT(slotNewClass()), m_part->actionCollection(), "classview_new_class" ); m_actionNewClass->setWhatsThis(i18n("<b>New class</b><p>Calls the <b>New Class</b> wizard.")); - m_actionCreateAccessMethods = new KAction( i18n("Create get/set Methods"), KShortcut(), this, SLOT(slotCreateAccessMethods()), m_part->actionCollection(), "classview_create_access_methods" ); + m_actionCreateAccessMethods = new KAction( i18n("Create get/set Methods"), KShortcut(), this, TQT_SLOT(slotCreateAccessMethods()), m_part->actionCollection(), "classview_create_access_methods" ); - m_actionAddMethod = new KAction( i18n("Add Method..."), KShortcut(), this, SLOT(slotAddMethod()), + m_actionAddMethod = new KAction( i18n("Add Method..."), KShortcut(), this, TQT_SLOT(slotAddMethod()), m_part->actionCollection(), "classview_add_method" ); m_actionAddMethod->setWhatsThis(i18n("<b>Add method</b><p>Calls the <b>New Method</b> wizard.")); - m_actionAddAttribute = new KAction( i18n("Add Attribute..."), KShortcut(), this, SLOT(slotAddAttribute()), + m_actionAddAttribute = new KAction( i18n("Add Attribute..."), KShortcut(), this, TQT_SLOT(slotAddAttribute()), m_part->actionCollection(), "classview_add_attribute" ); m_actionAddAttribute->setWhatsThis(i18n("<b>Add attribute</b><p>Calls the <b>New Attribute</b> wizard.")); - m_actionOpenDeclaration = new KAction( i18n("Open Declaration"), KShortcut(), this, SLOT(slotOpenDeclaration()), + m_actionOpenDeclaration = new KAction( i18n("Open Declaration"), KShortcut(), this, TQT_SLOT(slotOpenDeclaration()), m_part->actionCollection(), "classview_open_declaration" ); m_actionOpenDeclaration->setWhatsThis(i18n("<b>Open declaration</b><p>Opens a file where the selected item is declared and jumps to the declaration line.")); - m_actionOpenImplementation = new KAction( i18n("Open Implementation"), KShortcut(), this, SLOT(slotOpenImplementation()), + m_actionOpenImplementation = new KAction( i18n("Open Implementation"), KShortcut(), this, TQT_SLOT(slotOpenImplementation()), m_part->actionCollection(), "classview_open_implementation" ); m_actionOpenImplementation->setWhatsThis(i18n("<b>Open implementation</b><p>Opens a file where the selected item is defined (implemented) and jumps to the definition line.")); - m_actionFollowEditor = new KToggleAction( i18n("Follow Editor"), KShortcut(), this, SLOT(slotFollowEditor()), m_part->actionCollection(), "classview_follow_editor" ); + m_actionFollowEditor = new KToggleAction( i18n("Follow Editor"), KShortcut(), this, TQT_SLOT(slotFollowEditor()), m_part->actionCollection(), "classview_follow_editor" ); KConfig* config = m_part->instance()->config(); config->setGroup( "General" ); @@ -110,13 +110,13 @@ ClassViewWidget::~ClassViewWidget( ) } template <class ModelType, class ListItemType> - static bool selectItemG( ItemDom item, const QMap<KSharedPtr<ModelType>, ListItemType*>& map ) + static bool selectItemG( ItemDom item, const TQMap<KSharedPtr<ModelType>, ListItemType*>& map ) { ModelType* c = dynamic_cast<ModelType*>( &(*item) ); if( c ) { KSharedPtr<ModelType> d( c ); - typename QMap<KSharedPtr<ModelType>, ListItemType*>::ConstIterator it = map.find(d); + typename TQMap<KSharedPtr<ModelType>, ListItemType*>::ConstIterator it = map.find(d); if( it != map.end() ) { ( *it )->select(); return true; @@ -126,7 +126,7 @@ template <class ModelType, class ListItemType> } -void ClassViewWidget::slotExecuted( QListViewItem* item ) +void ClassViewWidget::slotExecuted( TQListViewItem* item ) { if( ClassViewItem* cbitem = dynamic_cast<ClassViewItem*>( item ) ){ if( cbitem->hasImplementation() ) @@ -143,7 +143,7 @@ void ClassViewWidget::clear( ) m_projectItem = 0; } -void restoreOpenNodes( QStringList & list, QListViewItem * item ) +void restoreOpenNodes( TQStringList & list, TQListViewItem * item ) { if ( item && !list.isEmpty() ) { @@ -160,13 +160,13 @@ void restoreOpenNodes( QStringList & list, QListViewItem * item ) } } -void storeOpenNodes( QValueList<QStringList> & openNodes, QStringList const & list, QListViewItem * item ) +void storeOpenNodes( TQValueList<TQStringList> & openNodes, TQStringList const & list, TQListViewItem * item ) { if ( item ) { if ( item->isOpen() ) { - QStringList mylist( list ); + TQStringList mylist( list ); mylist << item->text( 0 ); openNodes << mylist; storeOpenNodes( openNodes, mylist, item->firstChild() ); @@ -180,8 +180,8 @@ void ClassViewWidget::refresh() if( !m_part->project() ) return; - QValueList<QStringList> openNodes; - storeOpenNodes( openNodes, QStringList(), firstChild() ); + TQValueList<TQStringList> openNodes; + storeOpenNodes( openNodes, TQStringList(), firstChild() ); int scrollbarPos = verticalScrollBar()->value(); clear(); @@ -196,7 +196,7 @@ void ClassViewWidget::refresh() ++it; } - QValueList<QStringList>::iterator itt = openNodes.begin(); + TQValueList<TQStringList>::iterator itt = openNodes.begin(); while ( itt != openNodes.end() ) { restoreOpenNodes ( *itt, firstChild() ); @@ -218,12 +218,12 @@ void ClassViewWidget::slotProjectOpened( ) m_projectDirectoryLength = m_projectDirectory.length() + 1; - connect( m_part->languageSupport(), SIGNAL(updatedSourceInfo()), - this, SLOT(refresh()) ); - connect( m_part->languageSupport(), SIGNAL(aboutToRemoveSourceInfo(const QString&)), - this, SLOT(removeFile(const QString&)) ); - connect( m_part->languageSupport(), SIGNAL(addedSourceInfo(const QString&)), - this, SLOT(insertFile(const QString&)) ); + connect( m_part->languageSupport(), TQT_SIGNAL(updatedSourceInfo()), + this, TQT_SLOT(refresh()) ); + connect( m_part->languageSupport(), TQT_SIGNAL(aboutToRemoveSourceInfo(const TQString&)), + this, TQT_SLOT(removeFile(const TQString&)) ); + connect( m_part->languageSupport(), TQT_SIGNAL(addedSourceInfo(const TQString&)), + this, TQT_SLOT(insertFile(const TQString&)) ); } void ClassViewWidget::slotProjectClosed( ) @@ -231,9 +231,9 @@ void ClassViewWidget::slotProjectClosed( ) } -void ClassViewWidget::insertFile( const QString& fileName ) +void ClassViewWidget::insertFile( const TQString& fileName ) { - QString fn = URLUtil::canonicalPath( fileName ); + TQString fn = URLUtil::canonicalPath( fileName ); //kdDebug() << "======================== insertFile(" << fn << ")" << endl; FileDom dom = m_part->codeModel()->fileByName( fn ); @@ -241,13 +241,13 @@ void ClassViewWidget::insertFile( const QString& fileName ) return; fn = URLUtil::relativePathToFile(m_part->project()->projectDirectory(), fn); - QStringList path; + TQStringList path; switch( viewMode() ) { case KDevelop3ViewMode: { - path = QStringList::split( "/", fn ); + path = TQStringList::split( "/", fn ); path.pop_back(); } break; @@ -259,10 +259,10 @@ void ClassViewWidget::insertFile( const QString& fileName ) case JavaLikeViewMode: { - QStringList l = QStringList::split( "/", fn ); + TQStringList l = TQStringList::split( "/", fn ); l.pop_back(); - QString package = l.join("."); + TQString package = l.join("."); if( !package.isEmpty() ) path.push_back( package ); } @@ -272,9 +272,9 @@ void ClassViewWidget::insertFile( const QString& fileName ) m_projectItem->processFile( dom, path ); } -void ClassViewWidget::removeFile( const QString& fileName ) +void ClassViewWidget::removeFile( const TQString& fileName ) { - QString fn = URLUtil::canonicalPath( fileName ); + TQString fn = URLUtil::canonicalPath( fileName ); //kdDebug() << "======================== removeFile(" << fn << ")" << endl; FileDom dom = m_part->codeModel()->fileByName( fn ); @@ -282,13 +282,13 @@ void ClassViewWidget::removeFile( const QString& fileName ) return; fn = URLUtil::relativePathToFile(m_part->project()->projectDirectory(), fn); - QStringList path; + TQStringList path; switch( viewMode() ) { case KDevelop3ViewMode: { - path = QStringList::split( "/", fn ); + path = TQStringList::split( "/", fn ); path.pop_back(); } break; @@ -300,10 +300,10 @@ void ClassViewWidget::removeFile( const QString& fileName ) case JavaLikeViewMode: { - QStringList l = QStringList::split( "/", fn ); + TQStringList l = TQStringList::split( "/", fn ); l.pop_back(); - QString package = l.join("."); + TQString package = l.join("."); if( !package.isEmpty() ) path.push_back( package ); } @@ -313,7 +313,7 @@ void ClassViewWidget::removeFile( const QString& fileName ) m_projectItem->processFile( dom, path, true ); } -void ClassViewWidget::contentsContextMenuEvent( QContextMenuEvent * ev ) +void ClassViewWidget::contentsContextMenuEvent( TQContextMenuEvent * ev ) { KPopupMenu menu( this ); @@ -376,14 +376,14 @@ int ClassViewWidget::viewMode( ) const return m_actionViewMode->currentItem(); } -QString ClassViewItem::comment() { - return QString(); +TQString ClassViewItem::comment() { + return TQString(); } void ClassViewItem::select( ) { setOpen(true); listView()->setCurrentItem(this); - QListViewItem* c = firstChild(); + TQListViewItem* c = firstChild(); int size = 0; if(c != 0) { while(c->nextSibling()) { @@ -411,7 +411,7 @@ bool ClassViewWidget::selectItem( ItemDom item ) { } -QString NamespaceDomBrowserItem::comment() { +TQString NamespaceDomBrowserItem::comment() { return m_dom->comment(); } @@ -437,17 +437,17 @@ bool FolderBrowserItem::selectItem(ItemDom item) ///searching for namespaces is currently not supported and not useful } - for( QMap<ClassDom, ClassDomBrowserItem*>::Iterator it = m_classes.begin(); it != m_classes.end(); ++it ) { + for( TQMap<ClassDom, ClassDomBrowserItem*>::Iterator it = m_classes.begin(); it != m_classes.end(); ++it ) { if( (*it)->selectItem(item) ) return true; } - for( QMap<QString, NamespaceDomBrowserItem*>::Iterator it = m_namespaces.begin(); it != m_namespaces.end(); ++it ) { + for( TQMap<TQString, NamespaceDomBrowserItem*>::Iterator it = m_namespaces.begin(); it != m_namespaces.end(); ++it ) { if( (*it)->selectItem(item) ) return true; } - for( QMap<QString, FolderBrowserItem*>::Iterator it = m_folders.begin(); it != m_folders.end(); ++it ) { + for( TQMap<TQString, FolderBrowserItem*>::Iterator it = m_folders.begin(); it != m_folders.end(); ++it ) { if( (*it)->selectItem(item) ) { return true; } @@ -456,7 +456,7 @@ bool FolderBrowserItem::selectItem(ItemDom item) } -void FolderBrowserItem::processFile( FileDom file, QStringList& path, bool remove ) +void FolderBrowserItem::processFile( FileDom file, TQStringList& path, bool remove ) { if( path.isEmpty() ){ NamespaceList namespaceList = file->namespaceList(); @@ -479,7 +479,7 @@ void FolderBrowserItem::processFile( FileDom file, QStringList& path, bool remov return; } - QString current = path.front(); + TQString current = path.front(); path.pop_front(); FolderBrowserItem* item = m_folders.contains( current ) ? m_folders[ current ] : 0; @@ -664,12 +664,12 @@ bool NamespaceDomBrowserItem::selectItem( ItemDom item) ///currently not neccessary.. } - for(QMap<ClassDom, ClassDomBrowserItem*>::Iterator it = m_classes.begin(); it != m_classes.end(); ++it) { + for(TQMap<ClassDom, ClassDomBrowserItem*>::Iterator it = m_classes.begin(); it != m_classes.end(); ++it) { if( (*it)->selectItem(item) ) return true; } - for(QMap<QString, NamespaceDomBrowserItem*>::Iterator it = m_namespaces.begin(); it != m_namespaces.end(); ++it) { + for(TQMap<TQString, NamespaceDomBrowserItem*>::Iterator it = m_namespaces.begin(); it != m_namespaces.end(); ++it) { if( (*it)->selectItem(item) ) return true; } @@ -834,7 +834,7 @@ bool ClassDomBrowserItem::selectItem(ItemDom item) if( selectItemG ( item, m_variables ) ) return true; } - for(QMap<ClassDom, ClassDomBrowserItem*>::Iterator it = m_classes.begin(); it != m_classes.end(); ++it) { + for(TQMap<ClassDom, ClassDomBrowserItem*>::Iterator it = m_classes.begin(); it != m_classes.end(); ++it) { if( (*it)->selectItem(item) ) return true; } @@ -951,7 +951,7 @@ void NamespaceDomBrowserItem::setup( ) setPixmap( 0, UserIcon("CVnamespace", KIcon::DefaultState, listView()->m_part->instance()) ); setExpandable( true ); - QString txt = listView()->m_part->languageSupport()->formatModelItem(m_dom.data(), true); + TQString txt = listView()->m_part->languageSupport()->formatModelItem(m_dom.data(), true); setText( 0, txt ); } @@ -961,7 +961,7 @@ void ClassDomBrowserItem::setup( ) setPixmap( 0, UserIcon("CVclass", KIcon::DefaultState, listView()->m_part->instance()) ); setExpandable( true ); - QString txt = listView()->m_part->languageSupport()->formatModelItem(m_dom.data(), true); + TQString txt = listView()->m_part->languageSupport()->formatModelItem(m_dom.data(), true); setText( 0, txt ); } @@ -971,7 +971,7 @@ void TypeAliasDomBrowserItem::setup( ) setPixmap( 0, UserIcon("CVtypedef", KIcon::DefaultState, listView()->m_part->instance()) ); setExpandable( false ); - QString txt = listView()->m_part->languageSupport()->formatModelItem(m_dom.data(), true); + TQString txt = listView()->m_part->languageSupport()->formatModelItem(m_dom.data(), true); setText( 0, txt ); } @@ -979,8 +979,8 @@ void FunctionDomBrowserItem::setup( ) { ClassViewItem::setup(); - QString iconName; - QString methodType; + TQString iconName; + TQString methodType; if ( m_dom->isSignal() ) methodType = "signal"; @@ -998,7 +998,7 @@ void FunctionDomBrowserItem::setup( ) setPixmap( 0, UserIcon(iconName, KIcon::DefaultState, listView()->m_part->instance()) ); - QString txt = listView()->m_part->languageSupport()->formatModelItem(m_dom.data(), true); + TQString txt = listView()->m_part->languageSupport()->formatModelItem(m_dom.data(), true); item() = highlightFunctionName(txt, 1, m_styles); } @@ -1020,13 +1020,13 @@ void FunctionDomBrowserItem::openImplementation() return; FunctionDefinitionDom fun; - QFileInfo fileInfo( m_dom->fileName() ); - QString path = fileInfo.dirPath( true ); + TQFileInfo fileInfo( m_dom->fileName() ); + TQString path = fileInfo.dirPath( true ); for( FunctionDefinitionList::Iterator it=lst.begin(); it!=lst.end(); ++it ) { - QFileInfo defFileInfo( (*it)->fileName() ); - QString defPath = defFileInfo.dirPath( true ); + TQFileInfo defFileInfo( (*it)->fileName() ); + TQString defPath = defFileInfo.dirPath( true ); if( path != defPath ) continue; @@ -1050,7 +1050,7 @@ void FunctionDomBrowserItem::openImplementation() void VariableDomBrowserItem::setup( ) { ClassViewItem::setup(); - QString iconName; + TQString iconName; if( m_dom->access() == CodeModelItem::Private ) iconName = "CVprivate_var"; else if( m_dom->access() == CodeModelItem::Protected ) @@ -1060,7 +1060,7 @@ void VariableDomBrowserItem::setup( ) setPixmap( 0, UserIcon(iconName, KIcon::DefaultState, listView()->m_part->instance()) ); - QString txt = listView()->m_part->languageSupport()->formatModelItem(m_dom.data(), true); + TQString txt = listView()->m_part->languageSupport()->formatModelItem(m_dom.data(), true); setText( 0, txt ); } @@ -1076,32 +1076,32 @@ void VariableDomBrowserItem::openImplementation() { } -QString FolderBrowserItem::key( int , bool ) const +TQString FolderBrowserItem::key( int , bool ) const { return "0 " + text( 0 ); } -QString NamespaceDomBrowserItem::key( int , bool ) const +TQString NamespaceDomBrowserItem::key( int , bool ) const { return "1 " + text( 0 ); } -QString ClassDomBrowserItem::key( int , bool ) const +TQString ClassDomBrowserItem::key( int , bool ) const { return "2 " + text( 0 ); } -QString TypeAliasDomBrowserItem::key( int , bool ) const +TQString TypeAliasDomBrowserItem::key( int , bool ) const { return "3 " + text( 0 ); } -QString FunctionDomBrowserItem::key( int , bool ) const +TQString FunctionDomBrowserItem::key( int , bool ) const { return "4 " + text( 0 ); } -QString VariableDomBrowserItem::key( int , bool ) const +TQString VariableDomBrowserItem::key( int , bool ) const { return "5 " + text( 0 ); } @@ -1165,12 +1165,12 @@ bool FunctionDomBrowserItem::hasImplementation() const return !lst.isEmpty(); } -void ClassViewWidget::maybeTip( QPoint const & p ) +void ClassViewWidget::maybeTip( TQPoint const & p ) { ClassViewItem * item = dynamic_cast<ClassViewItem*>( itemAt( p ) ); if ( !item ) return; - QString tooltip; + TQString tooltip; if ( item->isNamespace() ) { @@ -1195,7 +1195,7 @@ void ClassViewWidget::maybeTip( QPoint const & p ) FunctionDomBrowserItem * fitem = dynamic_cast<FunctionDomBrowserItem*>( item ); if ( fitem ) { - QString access; + TQString access; if ( fitem->dom()->access() == CodeModelItem::Private ) access = "[private] "; else if ( fitem->dom()->access() == CodeModelItem::Protected ) @@ -1203,7 +1203,7 @@ void ClassViewWidget::maybeTip( QPoint const & p ) else if ( fitem->dom()->access() == CodeModelItem::Public ) access = "[public] "; - QStringList arguments; + TQStringList arguments; ArgumentList const & list = fitem->dom()->argumentList(); ArgumentList::ConstIterator it( list.begin() ); while ( it != list.end() ) @@ -1212,13 +1212,13 @@ void ClassViewWidget::maybeTip( QPoint const & p ) ++it; } - QString strstatic = fitem->dom()->isStatic() ? QString( "[static] " ) : QString::null; - QString strsignal = fitem->dom()->isSignal() ? QString( "[signal] " ) : QString::null; - QString strslot = fitem->dom()->isSlot() ? QString( "[slot] " ) : QString::null; - QString strresult = !fitem->dom()->resultType().isEmpty() ? fitem->dom()->resultType() + " " : QString::null; + TQString strstatic = fitem->dom()->isStatic() ? TQString( "[static] " ) : TQString::null; + TQString strsignal = fitem->dom()->isSignal() ? TQString( "[signal] " ) : TQString::null; + TQString strslot = fitem->dom()->isSlot() ? TQString( "[slot] " ) : TQString::null; + TQString strresult = !fitem->dom()->resultType().isEmpty() ? fitem->dom()->resultType() + " " : TQString::null; - QString strconstant = fitem->dom()->isConstant() ? QString( " [const]" ) : QString::null; - QString strabstract = fitem->dom()->isAbstract() ? QString( " [abstract]" ) : QString::null; + TQString strconstant = fitem->dom()->isConstant() ? TQString( " [const]" ) : TQString::null; + TQString strabstract = fitem->dom()->isAbstract() ? TQString( " [abstract]" ) : TQString::null; tooltip = access + strstatic + strsignal + strslot + strresult + fitem->dom()->scope().join("::") + "::" + fitem->dom()->name() @@ -1230,7 +1230,7 @@ void ClassViewWidget::maybeTip( QPoint const & p ) VariableDomBrowserItem * vitem = dynamic_cast<VariableDomBrowserItem*>( item ); if ( vitem ) { - QString access; + TQString access; if ( vitem->dom()->access() == CodeModelItem::Private ) access = "[private] "; else if ( vitem->dom()->access() == CodeModelItem::Protected ) @@ -1238,7 +1238,7 @@ void ClassViewWidget::maybeTip( QPoint const & p ) else if ( vitem->dom()->access() == CodeModelItem::Public ) access = "[public] "; - QString strstatic = vitem->dom()->isStatic() ? QString( "[static] " ) : QString::null; + TQString strstatic = vitem->dom()->isStatic() ? TQString( "[static] " ) : TQString::null; tooltip = access + strstatic + vitem->dom()->type() + " " + vitem->dom()->name(); } } @@ -1246,7 +1246,7 @@ void ClassViewWidget::maybeTip( QPoint const & p ) { if( TypeAliasDomBrowserItem * titem = dynamic_cast<TypeAliasDomBrowserItem*>( item ) ) { - tooltip = QString( "[Type] " ) + titem->dom()->type() + " " + titem->dom()->name(); + tooltip = TQString( "[Type] " ) + titem->dom()->type() + " " + titem->dom()->name(); } } @@ -1259,11 +1259,11 @@ void ClassViewWidget::maybeTip( QPoint const & p ) kdDebug(0) << tooltip << endl; - QRect r = itemRect( item ); + TQRect r = itemRect( item ); if ( item && r.isValid() && !tooltip.isEmpty() ) { - tip( r, QString("<qt><pre>") + QStyleSheet::escape( tooltip ) + QString("</pre></qt>") ); + tip( r, TQString("<qt><pre>") + TQStyleSheet::escape( tooltip ) + TQString("</pre></qt>") ); } } diff --git a/parts/classview/classviewwidget.h b/parts/classview/classviewwidget.h index 975f6e09..0ace5692 100644 --- a/parts/classview/classviewwidget.h +++ b/parts/classview/classviewwidget.h @@ -23,10 +23,10 @@ #define __CLASSVIEW_WIDGET_H__ #include <klistview.h> -#include <qstring.h> -#include <qstringlist.h> -#include <qmap.h> -#include <qtooltip.h> +#include <tqstring.h> +#include <tqstringlist.h> +#include <tqmap.h> +#include <tqtooltip.h> #include <codemodel.h> #include <fancylistviewitem.h> #include <navigator.h> @@ -80,21 +80,21 @@ private slots: void slotFollowEditor(); protected: - void contentsContextMenuEvent( QContextMenuEvent* ); - void maybeTip( QPoint const & ); + void contentsContextMenuEvent( TQContextMenuEvent* ); + void maybeTip( TQPoint const & ); private slots: void slotProjectOpened(); void slotProjectClosed(); void refresh(); - void insertFile( const QString& fileName ); - void removeFile( const QString& fileName ); - void slotExecuted( QListViewItem* item ); + void insertFile( const TQString& fileName ); + void removeFile( const TQString& fileName ); + void slotExecuted( TQListViewItem* item ); private: ClassViewPart* m_part; - QStringList removedText; - QString m_projectDirectory; + TQStringList removedText; + TQString m_projectDirectory; int m_projectDirectoryLength; FolderBrowserItem* m_projectItem; KSelectAction* m_actionViewMode; @@ -120,9 +120,9 @@ class ClassViewItem: public FancyListViewItem { private: public: - ClassViewItem( QListView* parent, const QString& text=QString::null ) + ClassViewItem( TQListView* parent, const TQString& text=TQString::null ) : FancyListViewItem( static_cast<ClassViewWidget*>( parent )->m_paintStyles, parent, text ) {} - ClassViewItem( QListViewItem* parent, const QString& text=QString::null ) + ClassViewItem( TQListViewItem* parent, const TQString& text=TQString::null ) : FancyListViewItem( static_cast<ClassViewWidget*>( parent->listView() )->m_paintStyles, parent, text ) {} virtual const CodeModelItem* model() const { return 0; } @@ -143,26 +143,26 @@ public: void select(); - virtual QString comment(); + virtual TQString comment(); - ClassViewWidget* listView() { return static_cast<ClassViewWidget*>( QListViewItem::listView() ); } - const ClassViewWidget* listView() const { return static_cast<ClassViewWidget*>( QListViewItem::listView() ); } + ClassViewWidget* listView() { return static_cast<ClassViewWidget*>( TQListViewItem::listView() ); } + const ClassViewWidget* listView() const { return static_cast<ClassViewWidget*>( TQListViewItem::listView() ); } }; class FolderBrowserItem: public ClassViewItem { public: - FolderBrowserItem( ClassViewWidget* widget, QListView* parent, const QString& name=QString::null ) + FolderBrowserItem( ClassViewWidget* widget, TQListView* parent, const TQString& name=TQString::null ) : ClassViewItem( parent, name ), m_widget(widget) {} - FolderBrowserItem( ClassViewWidget* widget, QListViewItem* parent, const QString& name=QString::null ) + FolderBrowserItem( ClassViewWidget* widget, TQListViewItem* parent, const TQString& name=TQString::null ) : ClassViewItem( parent, name ), m_widget(widget) {} virtual bool isFolder() const { return true; } void setup(); - QString key( int, bool ) const; + TQString key( int, bool ) const; - void processFile( FileDom file, QStringList& path, bool remove=false ); + void processFile( FileDom file, TQStringList& path, bool remove=false ); void processNamespace( NamespaceDom ns, bool remove=false ); void processClass( ClassDom klass, bool remove=false ); void processTypeAlias( TypeAliasDom typeAlias, bool remove=false ); @@ -171,12 +171,12 @@ public: bool selectItem(ItemDom item); private: - QMap<QString, FolderBrowserItem*> m_folders; - QMap<QString, NamespaceDomBrowserItem*> m_namespaces; - QMap<ClassDom, ClassDomBrowserItem*> m_classes; - QMap<TypeAliasDom, TypeAliasDomBrowserItem*> m_typeAliases; - QMap<FunctionDom, FunctionDomBrowserItem*> m_functions; - QMap<VariableDom, VariableDomBrowserItem*> m_variables; + TQMap<TQString, FolderBrowserItem*> m_folders; + TQMap<TQString, NamespaceDomBrowserItem*> m_namespaces; + TQMap<ClassDom, ClassDomBrowserItem*> m_classes; + TQMap<TypeAliasDom, TypeAliasDomBrowserItem*> m_typeAliases; + TQMap<FunctionDom, FunctionDomBrowserItem*> m_functions; + TQMap<VariableDom, VariableDomBrowserItem*> m_variables; ClassViewWidget* m_widget; }; @@ -184,9 +184,9 @@ private: class NamespaceDomBrowserItem: public ClassViewItem { public: - NamespaceDomBrowserItem( QListView* parent, NamespaceDom dom ) + NamespaceDomBrowserItem( TQListView* parent, NamespaceDom dom ) : ClassViewItem( parent, dom->name() ), m_dom( dom ) {} - NamespaceDomBrowserItem( QListViewItem* parent, NamespaceDom dom ) + NamespaceDomBrowserItem( TQListViewItem* parent, NamespaceDom dom ) : ClassViewItem( parent, dom->name() ), m_dom( dom ) {} const CodeModelItem* model() const { return m_dom; } @@ -194,7 +194,7 @@ public: virtual bool isNamespace() const { return true; } void setup(); - QString key( int, bool ) const; + TQString key( int, bool ) const; void processNamespace( NamespaceDom ns, bool remove=false ); void processClass( ClassDom klass, bool remove=false ); @@ -202,25 +202,25 @@ public: void processFunction( FunctionDom fun, bool remove=false ); void processVariable( VariableDom var, bool remove=false ); bool selectItem( ItemDom item ); - virtual QString comment(); + virtual TQString comment(); NamespaceDom dom() { return m_dom; } private: NamespaceDom m_dom; - QMap<QString, NamespaceDomBrowserItem*> m_namespaces; - QMap<ClassDom, ClassDomBrowserItem*> m_classes; - QMap<TypeAliasDom, TypeAliasDomBrowserItem*> m_typeAliases; - QMap<FunctionDom, FunctionDomBrowserItem*> m_functions; - QMap<VariableDom, VariableDomBrowserItem*> m_variables; + TQMap<TQString, NamespaceDomBrowserItem*> m_namespaces; + TQMap<ClassDom, ClassDomBrowserItem*> m_classes; + TQMap<TypeAliasDom, TypeAliasDomBrowserItem*> m_typeAliases; + TQMap<FunctionDom, FunctionDomBrowserItem*> m_functions; + TQMap<VariableDom, VariableDomBrowserItem*> m_variables; }; class ClassDomBrowserItem: public ClassViewItem { public: - ClassDomBrowserItem( QListView* parent, ClassDom dom ) + ClassDomBrowserItem( TQListView* parent, ClassDom dom ) : ClassViewItem( parent, dom->name() ), m_dom( dom ) {} - ClassDomBrowserItem( QListViewItem* parent, ClassDom dom ) + ClassDomBrowserItem( TQListViewItem* parent, ClassDom dom ) : ClassViewItem( parent, dom->name() ), m_dom( dom ) {} const CodeModelItem* model() const { return m_dom; } @@ -230,14 +230,14 @@ public: virtual void openDeclaration(); void setup(); - QString key( int, bool ) const; + TQString key( int, bool ) const; void processClass( ClassDom klass, bool remove=false ); void processTypeAlias( TypeAliasDom typeAlias, bool remove=false ); void processFunction( FunctionDom fun, bool remove=false ); void processVariable( VariableDom var, bool remove=false ); - virtual QString comment() { + virtual TQString comment() { if( !m_dom ) return ""; return m_dom->comment(); } @@ -247,18 +247,18 @@ public: private: ClassDom m_dom; - QMap<ClassDom, ClassDomBrowserItem*> m_classes; - QMap<TypeAliasDom, TypeAliasDomBrowserItem*> m_typeAliases; - QMap<FunctionDom, FunctionDomBrowserItem*> m_functions; - QMap<VariableDom, VariableDomBrowserItem*> m_variables; + TQMap<ClassDom, ClassDomBrowserItem*> m_classes; + TQMap<TypeAliasDom, TypeAliasDomBrowserItem*> m_typeAliases; + TQMap<FunctionDom, FunctionDomBrowserItem*> m_functions; + TQMap<VariableDom, VariableDomBrowserItem*> m_variables; }; class TypeAliasDomBrowserItem: public ClassViewItem { public: - TypeAliasDomBrowserItem( QListView* parent, TypeAliasDom dom ) + TypeAliasDomBrowserItem( TQListView* parent, TypeAliasDom dom ) : ClassViewItem( parent, dom->name() ), m_dom( dom ) {} - TypeAliasDomBrowserItem( QListViewItem* parent, TypeAliasDom dom ) + TypeAliasDomBrowserItem( TQListViewItem* parent, TypeAliasDom dom ) : ClassViewItem( parent, dom->name() ), m_dom( dom ) {} const CodeModelItem* model() const { return m_dom; } @@ -267,13 +267,13 @@ public: virtual bool hasDeclaration() const { return true; } virtual void openDeclaration(); - virtual QString comment() { + virtual TQString comment() { if( !m_dom ) return ""; return m_dom->comment(); } void setup(); - QString key( int, bool ) const; + TQString key( int, bool ) const; TypeAliasDom dom() { return m_dom; } @@ -284,9 +284,9 @@ private: class FunctionDomBrowserItem: public ClassViewItem { public: - FunctionDomBrowserItem( QListView* parent, FunctionDom dom ) + FunctionDomBrowserItem( TQListView* parent, FunctionDom dom ) : ClassViewItem( parent, dom->name() ), m_dom( dom ) {} - FunctionDomBrowserItem( QListViewItem* parent, FunctionDom dom ) + FunctionDomBrowserItem( TQListViewItem* parent, FunctionDom dom ) : ClassViewItem( parent, dom->name() ), m_dom( dom ) {} const CodeModelItem* model() const { return m_dom; } @@ -298,13 +298,13 @@ public: virtual void openDeclaration(); virtual void openImplementation(); - virtual QString comment() { + virtual TQString comment() { if( !m_dom ) return ""; return m_dom->comment(); } void setup(); - QString key( int, bool ) const; + TQString key( int, bool ) const; FunctionDom dom() { return m_dom; } @@ -315,9 +315,9 @@ private: class VariableDomBrowserItem: public ClassViewItem { public: - VariableDomBrowserItem( QListView* parent, VariableDom dom ) + VariableDomBrowserItem( TQListView* parent, VariableDom dom ) : ClassViewItem( parent, dom->name() ), m_dom( dom ) {} - VariableDomBrowserItem( QListViewItem* parent, VariableDom dom ) + VariableDomBrowserItem( TQListViewItem* parent, VariableDom dom ) : ClassViewItem( parent, dom->name() ), m_dom( dom ) {} const CodeModelItem* model() const { return m_dom; } @@ -326,7 +326,7 @@ public: virtual bool hasDeclaration() const { return true; } virtual bool hasImplementation() const { return false; } - virtual QString comment() { + virtual TQString comment() { if( !m_dom ) return ""; return m_dom->comment(); } @@ -335,7 +335,7 @@ public: virtual void openImplementation(); void setup(); - QString key( int, bool ) const; + TQString key( int, bool ) const; VariableDom dom() { return m_dom; } @@ -355,8 +355,8 @@ struct FindOp2 ///a template would look nicer if( m_dom->isConstant() != m_dom->isConstant() ) return false; - QString scope1 = QString("::") + m_dom->scope().join("::"); - QString scope2 = QString("::") + def->scope().join("::"); + TQString scope1 = TQString("::") + m_dom->scope().join("::"); + TQString scope2 = TQString("::") + def->scope().join("::"); if( !scope1.endsWith(scope2) ) return false; @@ -389,8 +389,8 @@ struct FindOp if( m_dom->isConstant() != m_dom->isConstant() ) return false; - QString scope1 = QString("::") + m_dom->scope().join("::"); - QString scope2 = QString("::") + def->scope().join("::"); + TQString scope1 = TQString("::") + m_dom->scope().join("::"); + TQString scope2 = TQString("::") + def->scope().join("::"); if( !scope1.endsWith(scope2) ) return false; diff --git a/parts/classview/digraphview.cpp b/parts/classview/digraphview.cpp index b566757f..8bb8e963 100644 --- a/parts/classview/digraphview.cpp +++ b/parts/classview/digraphview.cpp @@ -13,10 +13,10 @@ #include <math.h> #include <stdlib.h> -#include <qapplication.h> -#include <qpainter.h> -#include <qpaintdevicemetrics.h> -#include <qtextstream.h> +#include <tqapplication.h> +#include <tqpainter.h> +#include <tqpaintdevicemetrics.h> +#include <tqtextstream.h> #include <kglobal.h> #include <klocale.h> #include <kmessagebox.h> @@ -33,22 +33,22 @@ struct DigraphNode int y; int w; int h; - QString name; + TQString name; }; struct DigraphEdge { - QPointArray points; + TQPointArray points; }; -DigraphView::DigraphView(QWidget *parent, const char *name) - : QScrollView(parent, name, WRepaintNoErase|WStaticContents|WResizeNoErase) +DigraphView::DigraphView(TQWidget *parent, const char *name) + : TQScrollView(parent, name, WRepaintNoErase|WStaticContents|WResizeNoErase) { viewport()->setBackgroundMode(PaletteBase); - QPaintDeviceMetrics m(this); + TQPaintDeviceMetrics m(this); xscale = m.logicalDpiX(); yscale = m.logicalDpiY(); @@ -86,7 +86,7 @@ void DigraphView::setRenderedExtent(double w, double h) } -void DigraphView::addRenderedNode(const QString &name, +void DigraphView::addRenderedNode(const TQString &name, double x, double y, double w, double h) { DigraphNode *node = new DigraphNode; @@ -99,8 +99,8 @@ void DigraphView::addRenderedNode(const QString &name, } -void DigraphView::addRenderedEdge(const QString &/*name1*/, const QString &/*name2*/, - QMemArray<double> coords) +void DigraphView::addRenderedEdge(const TQString &/*name1*/, const TQString &/*name2*/, + TQMemArray<double> coords) { if (coords.count() < 4) return; @@ -109,15 +109,15 @@ void DigraphView::addRenderedEdge(const QString &/*name1*/, const QString &/*nam edge->points.resize(coords.count()/2); for (uint i = 0; i < edge->points.count(); ++i) - edge->points[i] = QPoint(toXPixel(coords[2*i]), toYPixel(coords[2*i+1])); + edge->points[i] = TQPoint(toXPixel(coords[2*i]), toYPixel(coords[2*i+1])); edges.append(edge); } -void DigraphView::addEdge(const QString &name1, const QString &name2) +void DigraphView::addEdge(const TQString &name1, const TQString &name2) { - QString line; + TQString line; line = "\""; line += name1; line += "\" -> \""; @@ -139,9 +139,9 @@ void DigraphView::clear() } -void DigraphView::setSelected(const QString &name) +void DigraphView::setSelected(const TQString &name) { - QPtrListIterator<DigraphNode> it(nodes); + TQPtrListIterator<DigraphNode> it(nodes); for (; it.current(); ++it) { if (it.current()->name == name) { updateContents(selNode->x-selNode->w/2, selNode->y-selNode->h/2, @@ -155,21 +155,21 @@ void DigraphView::setSelected(const QString &name) } -void DigraphView::ensureVisible(const QString &name) +void DigraphView::ensureVisible(const TQString &name) { - QPtrListIterator<DigraphNode> it(nodes); + TQPtrListIterator<DigraphNode> it(nodes); for (; it.current(); ++it) { if (it.current()->name == name) { - QScrollView::ensureVisible((*it)->x, (*it)->y, (*it)->w, (*it)->h); + TQScrollView::ensureVisible((*it)->x, (*it)->y, (*it)->w, (*it)->h); return; } } } -QStringList DigraphView::splitLine(QString str) +TQStringList DigraphView::splitLine(TQString str) { - QStringList result; + TQStringList result; while (!str.isEmpty()) { if (str[0] == '"') { @@ -193,11 +193,11 @@ QStringList DigraphView::splitLine(QString str) } -void DigraphView::parseDotResults(const QStringList &list) +void DigraphView::parseDotResults(const TQStringList &list) { - QStringList::ConstIterator it; + TQStringList::ConstIterator it; for (it = list.begin(); it != list.end(); ++it) { - QStringList tokens = splitLine(*it); + TQStringList tokens = splitLine(*it); if (tokens.count() == 0) continue; if (tokens[0] == "graph") { @@ -212,7 +212,7 @@ void DigraphView::parseDotResults(const QStringList &list) } else if (tokens[0] == "edge") { if (tokens.count() < 8) continue; - QMemArray<double> coords(tokens.count()-6); + TQMemArray<double> coords(tokens.count()-6); for (uint i=0; i != tokens.count()-6; ++i) coords[i] = tokens[i+4].toDouble(); addRenderedEdge(tokens[1], tokens[2], coords); @@ -221,22 +221,22 @@ void DigraphView::parseDotResults(const QStringList &list) } -void DigraphView::process( const QString& file, const QString& ext ) +void DigraphView::process( const TQString& file, const TQString& ext ) { - QString cmd = KGlobal::dirs()->findExe("dot"); + TQString cmd = KGlobal::dirs()->findExe("dot"); if (cmd.isEmpty()) { KMessageBox::sorry(0, i18n("You do not have 'dot' installed.\nIt can be downloaded from www.graphviz.org.")); return; } - QStringList results; + TQStringList results; KTempFile ifile, ofile; - QTextStream &is = *ifile.textStream(); + TQTextStream &is = *ifile.textStream(); is << "digraph G {" << endl; is << "rankdir=LR;" << endl; is << "node [shape=box,fontname=Helvetica,fontsize=12];" << endl; - QStringList::Iterator it; + TQStringList::Iterator it; for (it = inputs.begin(); it != inputs.end(); ++it) is << (*it) << endl; is << "}" << endl; @@ -245,8 +245,8 @@ void DigraphView::process( const QString& file, const QString& ext ) KProcess proc; if( !file.isEmpty() && !ext.isEmpty() ) { - proc << cmd << QString("-T")+ext << ifile.name() << "-o" << file; - kdDebug() << "Executing: " << cmd <<" "<<QString("-T")+ext <<" "<< ifile.name() << "-o"<<file << endl; + proc << cmd << TQString("-T")+ext << ifile.name() << "-o" << file; + kdDebug() << "Executing: " << cmd <<" "<<TQString("-T")+ext <<" "<< ifile.name() << "-o"<<file << endl; }else { proc << cmd << "-Tplain" << ifile.name() << "-o" << ofile.name(); @@ -258,7 +258,7 @@ void DigraphView::process( const QString& file, const QString& ext ) return; } - QTextStream &os = *ofile.textStream(); + TQTextStream &os = *ofile.textStream(); while (!os.atEnd()) results << os.readLine(); ofile.close(); @@ -271,61 +271,61 @@ void DigraphView::process( const QString& file, const QString& ext ) viewport()->update(); } -void DigraphView::drawContents(QPainter* p, int clipx, int clipy, int clipw, int cliph) +void DigraphView::drawContents(TQPainter* p, int clipx, int clipy, int clipw, int cliph) { - QRect clipRect(clipx, clipy, clipw, cliph); + TQRect clipRect(clipx, clipy, clipw, cliph); p->eraseRect(clipRect); p->setFont(KGlobalSettings::generalFont()); - QPtrListIterator<DigraphNode> it1(nodes); + TQPtrListIterator<DigraphNode> it1(nodes); for (; it1.current(); ++it1) { - QRect r((*it1)->x-(*it1)->w/2, (*it1)->y-(*it1)->h/2, (*it1)->w, (*it1)->h); + TQRect r((*it1)->x-(*it1)->w/2, (*it1)->y-(*it1)->h/2, (*it1)->w, (*it1)->h); if (r.intersects(clipRect)) { if (it1.current() == selNode) - p->fillRect(r, QBrush(lightGray, SolidPattern)); + p->fillRect(r, TQBrush(lightGray, SolidPattern)); else p->drawRect(r); p->drawText(r, AlignCenter, (*it1)->name); } } - p->setBrush(QBrush(black, SolidPattern)); - QPtrListIterator<DigraphEdge> it2(edges); + p->setBrush(TQBrush(black, SolidPattern)); + TQPtrListIterator<DigraphEdge> it2(edges); for (; it2.current(); ++it2) { int n = (*it2)->points.count(); for (int i=0; i+3 < n; i+=3) { - QPointArray a(4); - QPointArray &b = (*it2)->points; + TQPointArray a(4); + TQPointArray &b = (*it2)->points; for (int j=0; j<4; ++j) a.setPoint(j, b.point(i+j)); if (a.boundingRect().intersects(clipRect)) p->drawCubicBezier((*it2)->points, i); } - QPoint p1 = (*it2)->points[n-2]; - QPoint p2 = (*it2)->points[n-1]; - QPoint d = p1-p2; + TQPoint p1 = (*it2)->points[n-2]; + TQPoint p2 = (*it2)->points[n-1]; + TQPoint d = p1-p2; double l = sqrt(d.x()*d.x()+d.y()*d.y()); double d11 = (10.0)/l*d.x(); double d12 = (10.0)/l*d.y(); double d21 = -(3.0/l)*d.y(); double d22 = (3.0/l)*d.x(); - QPointArray triangle(3); - triangle[0] = p2 + QPoint((int)(d11+d21),(int)(d12+d22)); - triangle[1] = p2 + QPoint((int)(d11-d21),(int)(d12-d22)); + TQPointArray triangle(3); + triangle[0] = p2 + TQPoint((int)(d11+d21),(int)(d12+d22)); + triangle[1] = p2 + TQPoint((int)(d11-d21),(int)(d12-d22)); triangle[2] = p2; p->drawPolygon(triangle, true); } } -void DigraphView::contentsMousePressEvent(QMouseEvent *e) +void DigraphView::contentsMousePressEvent(TQMouseEvent *e) { - QPtrListIterator<DigraphNode> it1(nodes); + TQPtrListIterator<DigraphNode> it1(nodes); for (; it1.current(); ++it1) { - QRect r((*it1)->x-(*it1)->w/2, (*it1)->y-(*it1)->h/2, (*it1)->w, (*it1)->h); + TQRect r((*it1)->x-(*it1)->w/2, (*it1)->y-(*it1)->h/2, (*it1)->w, (*it1)->h); if (r.contains(e->pos())) { if (selNode) { - QRect oldr(selNode->x-selNode->w/2, selNode->y-selNode->h/2, + TQRect oldr(selNode->x-selNode->w/2, selNode->y-selNode->h/2, selNode->w, selNode->h); updateContents(oldr); } @@ -338,21 +338,21 @@ void DigraphView::contentsMousePressEvent(QMouseEvent *e) } -QSize DigraphView::sizeHint() const +TQSize DigraphView::sizeHint() const { if (width == -1) - return QSize(100, 100); // arbitrary + return TQSize(100, 100); // arbitrary - QSize dsize = KGlobalSettings::desktopGeometry(viewport()).size(); + TQSize dsize = KGlobalSettings::desktopGeometry(viewport()).size(); kdDebug(9003) << "sizehint for inheritance diagram" << dsize << " " << width << " " << height << endl; - return QSize(width, height).boundedTo(QSize(dsize.width()*2/3, dsize.height()*2/3)); + return TQSize(width, height).boundedTo(TQSize(dsize.width()*2/3, dsize.height()*2/3)); } #if 0 int main(int argc, char **argv) { - QApplication app(argc, argv); + TQApplication app(argc, argv); DigraphView *dw = new DigraphView(0, "dot widget"); dw->addEdge( "5th Edition", "6th Edition"); diff --git a/parts/classview/digraphview.h b/parts/classview/digraphview.h index c5fb2a28..b7215075 100644 --- a/parts/classview/digraphview.h +++ b/parts/classview/digraphview.h @@ -12,10 +12,10 @@ #ifndef _DIGRAPHVIEW_H_ #define _DIGRAPHVIEW_H_ -#include <qptrlist.h> -#include <qscrollview.h> -#include <qstringlist.h> -#include <qimage.h> +#include <tqptrlist.h> +#include <tqscrollview.h> +#include <tqstringlist.h> +#include <tqimage.h> class DigraphNode; class DigraphEdge; @@ -26,40 +26,40 @@ class DigraphView : public QScrollView Q_OBJECT public: - DigraphView(QWidget *parent, const char *name); + DigraphView(TQWidget *parent, const char *name); ~DigraphView(); - void addEdge(const QString &name1, const QString &name2); - void process(const QString& file = "", const QString& ext = ""); + void addEdge(const TQString &name1, const TQString &name2); + void process(const TQString& file = "", const TQString& ext = ""); void clear(); - void setSelected(const QString &name); - void ensureVisible(const QString &name); + void setSelected(const TQString &name); + void ensureVisible(const TQString &name); signals: - void selected(const QString &name); + void selected(const TQString &name); protected: - virtual void drawContents(QPainter* p, int clipx, int clipy, int clipw, int cliph); - virtual void contentsMousePressEvent(QMouseEvent *e); - virtual QSize sizeHint() const; + virtual void drawContents(TQPainter* p, int clipx, int clipy, int clipw, int cliph); + virtual void contentsMousePressEvent(TQMouseEvent *e); + virtual TQSize sizeHint() const; private: int toXPixel(double x); int toYPixel(double x); void setRenderedExtent(double w, double h); - void addRenderedNode(const QString &name, + void addRenderedNode(const TQString &name, double x, double y, double w, double h); - void addRenderedEdge(const QString &name1, const QString &name2, - QMemArray<double> coords); - static QStringList splitLine(QString str); - void parseDotResults(const QStringList &list); + void addRenderedEdge(const TQString &name1, const TQString &name2, + TQMemArray<double> coords); + static TQStringList splitLine(TQString str); + void parseDotResults(const TQStringList &list); double xscale, yscale; int width, height; - QStringList inputs; - QPtrList<DigraphNode> nodes; - QPtrList<DigraphEdge> edges; + TQStringList inputs; + TQPtrList<DigraphNode> nodes; + TQPtrList<DigraphEdge> edges; DigraphNode *selNode; }; diff --git a/parts/classview/hierarchydlg.cpp b/parts/classview/hierarchydlg.cpp index 21a54031..a1f2c763 100644 --- a/parts/classview/hierarchydlg.cpp +++ b/parts/classview/hierarchydlg.cpp @@ -22,11 +22,11 @@ #include <kmessagebox.h> #include <kdebug.h> -#include <qlayout.h> -#include <qfileinfo.h> -#include <qlistview.h> -#include <qapplication.h> -#include <qsplitter.h> +#include <tqlayout.h> +#include <tqfileinfo.h> +#include <tqlistview.h> +#include <tqapplication.h> +#include <tqsplitter.h> #include "kdevlanguagesupport.h" #include "kcomboview.h" @@ -38,25 +38,25 @@ HierarchyDialog::HierarchyDialog( ClassViewPart *part ) - : QDialog(0, "hierarchy dialog", false) + : TQDialog(0, "hierarchy dialog", false) { class_combo = new KComboView(true, 150, this); - class_combo->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Preferred ); + class_combo->setSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Preferred ); // class_combo->setMinimumWidth(150); namespace_combo = new KComboView(true, 150, this); - namespace_combo->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Preferred ); + namespace_combo->setSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Preferred ); // namespace_combo->setMinimumWidth(150); - QPushButton *close_button = new KPushButton(KStdGuiItem::close(), this); - QPushButton *save_button = new KPushButton(KStdGuiItem::save(), this); - QPushButton *refresh_button = new KPushButton(i18n("Refresh"), this); + TQPushButton *close_button = new KPushButton(KStdGuiItem::close(), this); + TQPushButton *save_button = new KPushButton(KStdGuiItem::save(), this); + TQPushButton *refresh_button = new KPushButton(i18n("Refresh"), this); - QSplitter *splitter = new QSplitter(Vertical, this); + TQSplitter *splitter = new TQSplitter(Vertical, this); digraph = new DigraphView(splitter, "digraph view"); // member_tree = new ClassToolWidget(part, splitter); - QBoxLayout *layout = new QVBoxLayout(this, KDialog::marginHint(), KDialog::spacingHint()); - QBoxLayout *combo_layout = new QHBoxLayout(); + TQBoxLayout *layout = new TQVBoxLayout(this, KDialog::marginHint(), KDialog::spacingHint()); + TQBoxLayout *combo_layout = new TQHBoxLayout(); layout->addLayout(combo_layout); combo_layout->addWidget(namespace_combo); combo_layout->addWidget(class_combo); @@ -66,22 +66,22 @@ HierarchyDialog::HierarchyDialog( ClassViewPart *part ) combo_layout->addWidget(close_button); layout->addWidget(splitter); - connect( namespace_combo, SIGNAL(activated(QListViewItem*)), - this, SLOT(slotNamespaceComboChoice(QListViewItem*)) ); - connect( class_combo, SIGNAL(activated(QListViewItem*)), - this, SLOT(slotClassComboChoice(QListViewItem*)) ); - connect( namespace_combo, SIGNAL(textChanged(const QString&)), - this, SLOT(slotNamespaceComboChoice(const QString&)) ); - connect( class_combo, SIGNAL(textChanged(const QString&)), - this, SLOT(slotClassComboChoice(const QString&)) ); - connect( close_button, SIGNAL(clicked()), - this, SLOT(hide()) ); - connect( save_button, SIGNAL(clicked()), - this, SLOT(save()) ); - connect( refresh_button, SIGNAL(clicked()), - this, SLOT(refresh()) ); - connect( digraph, SIGNAL(selected(const QString&)), - this, SLOT(classSelected(const QString&)) ); + connect( namespace_combo, TQT_SIGNAL(activated(TQListViewItem*)), + this, TQT_SLOT(slotNamespaceComboChoice(TQListViewItem*)) ); + connect( class_combo, TQT_SIGNAL(activated(TQListViewItem*)), + this, TQT_SLOT(slotClassComboChoice(TQListViewItem*)) ); + connect( namespace_combo, TQT_SIGNAL(textChanged(const TQString&)), + this, TQT_SLOT(slotNamespaceComboChoice(const TQString&)) ); + connect( class_combo, TQT_SIGNAL(textChanged(const TQString&)), + this, TQT_SLOT(slotClassComboChoice(const TQString&)) ); + connect( close_button, TQT_SIGNAL(clicked()), + this, TQT_SLOT(hide()) ); + connect( save_button, TQT_SIGNAL(clicked()), + this, TQT_SLOT(save()) ); + connect( refresh_button, TQT_SIGNAL(clicked()), + this, TQT_SLOT(refresh()) ); + connect( digraph, TQT_SIGNAL(selected(const TQString&)), + this, TQT_SLOT(classSelected(const TQString&)) ); m_part = part; // m_part->registerHierarchyDialog(this); @@ -96,33 +96,33 @@ HierarchyDialog::~HierarchyDialog() void HierarchyDialog::save() { - KURLRequesterDlg dlg(QString::null, this, "save_inheritance"); + KURLRequesterDlg dlg(TQString::null, this, "save_inheritance"); dlg.fileDialog()->setFilter("image/png image/jpeg image/bmp image/svg+xml"); dlg.fileDialog()->setOperationMode( KFileDialog::Saving ); dlg.fileDialog()->setMode( KFile::File | KFile::LocalOnly ); dlg.urlRequester()->setMode( KFile::File | KFile::LocalOnly ); if(dlg.exec() && dlg.selectedURL().isLocalFile()) { - QFileInfo fi(dlg.selectedURL().pathOrURL()); - QApplication::setOverrideCursor( Qt::waitCursor ); + TQFileInfo fi(dlg.selectedURL().pathOrURL()); + TQApplication::setOverrideCursor( Qt::waitCursor ); KDevLanguageSupport *ls = m_part->languageSupport(); - for (QMap<QString, ClassDom>::const_iterator it = classes.begin(); it != classes.end(); ++it) + for (TQMap<TQString, ClassDom>::const_iterator it = classes.begin(); it != classes.end(); ++it) { kdDebug(9003) << "Adding class to graph: " << it.key() << endl; - QString formattedName = ls->formatClassName(it.key()); - QStringList baseClasses = it.data()->baseClassList(); - for (QStringList::const_iterator bit = baseClasses.begin(); bit != baseClasses.end(); ++bit) + TQString formattedName = ls->formatClassName(it.key()); + TQStringList baseClasses = it.data()->baseClassList(); + for (TQStringList::const_iterator bit = baseClasses.begin(); bit != baseClasses.end(); ++bit) { - QMap<QString, QString>::const_iterator baseIt = uclasses.find(*bit); + TQMap<TQString, TQString>::const_iterator baseIt = uclasses.find(*bit); if (baseIt != uclasses.end()) { - QString formattedParentName = ls->formatClassName(baseIt.data()); + TQString formattedParentName = ls->formatClassName(baseIt.data()); digraph->addEdge(formattedParentName, formattedName); } } } digraph->process(fi.absFilePath(), fi.extension()); - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); } } @@ -136,17 +136,17 @@ void HierarchyDialog::refresh() KDevLanguageSupport *ls = m_part->languageSupport(); - for (QMap<QString, ClassDom>::const_iterator it = classes.begin(); it != classes.end(); ++it) + for (TQMap<TQString, ClassDom>::const_iterator it = classes.begin(); it != classes.end(); ++it) { kdDebug(9003) << "Adding class to graph: " << it.key() << endl; - QString formattedName = ls->formatClassName(it.key()); - QStringList baseClasses = it.data()->baseClassList(); - for (QStringList::const_iterator bit = baseClasses.begin(); bit != baseClasses.end(); ++bit) + TQString formattedName = ls->formatClassName(it.key()); + TQStringList baseClasses = it.data()->baseClassList(); + for (TQStringList::const_iterator bit = baseClasses.begin(); bit != baseClasses.end(); ++bit) { - QMap<QString, QString>::const_iterator baseIt = uclasses.find(*bit); + TQMap<TQString, TQString>::const_iterator baseIt = uclasses.find(*bit); if (baseIt != uclasses.end()) { - QString formattedParentName = ls->formatClassName(baseIt.data()); + TQString formattedParentName = ls->formatClassName(baseIt.data()); digraph->addEdge(formattedParentName, formattedName); } } @@ -157,13 +157,13 @@ void HierarchyDialog::refresh() void HierarchyDialog::setLanguageSupport(KDevLanguageSupport *ls) { if (ls) - connect(ls, SIGNAL(updatedSourceInfo()), this, SLOT(refresh())); + connect(ls, TQT_SIGNAL(updatedSourceInfo()), this, TQT_SLOT(refresh())); else refresh(); } -void HierarchyDialog::slotClassComboChoice(QListViewItem * item) +void HierarchyDialog::slotClassComboChoice(TQListViewItem * item) { ClassItem *ci = dynamic_cast<ClassItem*>(item); if (!ci) @@ -171,15 +171,15 @@ void HierarchyDialog::slotClassComboChoice(QListViewItem * item) KDevLanguageSupport *ls = m_part->languageSupport(); - QString className = ls->formatClassName(uclasses[item->text(0)]); + TQString className = ls->formatClassName(uclasses[item->text(0)]); digraph->setSelected(className); digraph->ensureVisible(className); classSelected(className); } -void HierarchyDialog::slotClassComboChoice( const QString& itemText ) +void HierarchyDialog::slotClassComboChoice( const TQString& itemText ) { - QListViewItem* item = class_combo->listView()->firstChild(); + TQListViewItem* item = class_combo->listView()->firstChild(); while( item ) { if( item->text(0) == itemText ) @@ -190,7 +190,7 @@ void HierarchyDialog::slotClassComboChoice( const QString& itemText ) KDevLanguageSupport *ls = m_part->languageSupport(); - QString className = ls->formatClassName(uclasses[item->text(0)]); + TQString className = ls->formatClassName(uclasses[item->text(0)]); digraph->setSelected(className); digraph->ensureVisible(className); classSelected(className); @@ -200,7 +200,7 @@ void HierarchyDialog::slotClassComboChoice( const QString& itemText ) } } -void HierarchyDialog::classSelected(const QString &/*className*/) +void HierarchyDialog::classSelected(const TQString &/*className*/) { /* ParsedClass *currentClass = m_part->classStore()->getClassByName(className); member_tree->clear(); @@ -213,7 +213,7 @@ void HierarchyDialog::classSelected(const QString &/*className*/) }*/ } -void HierarchyDialog::slotNamespaceComboChoice( QListViewItem * item ) +void HierarchyDialog::slotNamespaceComboChoice( TQListViewItem * item ) { NamespaceItem *ni = dynamic_cast<NamespaceItem*>(item); if (!ni) @@ -221,9 +221,9 @@ void HierarchyDialog::slotNamespaceComboChoice( QListViewItem * item ) ViewCombosOp::refreshClasses(m_part, class_combo, ni->dom()->name()); } -void HierarchyDialog::slotNamespaceComboChoice( const QString& itemText ) +void HierarchyDialog::slotNamespaceComboChoice( const TQString& itemText ) { - QListViewItem* item = namespace_combo->listView()->firstChild(); + TQListViewItem* item = namespace_combo->listView()->firstChild(); while( item ) { if( item->text(0) == itemText ) @@ -238,11 +238,11 @@ void HierarchyDialog::slotNamespaceComboChoice( const QString& itemText ) } } -void HierarchyDialog::processNamespace( QString prefix, NamespaceDom dom ) +void HierarchyDialog::processNamespace( TQString prefix, NamespaceDom dom ) { qWarning("processNamespace: prefix %s", prefix.latin1()); - QString prefixInc = prefix.isEmpty() ? "" : "."; -// QString nsprefix = dom->name().isEmpty() ? QString("") : prefixInc + dom->name(); + TQString prefixInc = prefix.isEmpty() ? "" : "."; +// TQString nsprefix = dom->name().isEmpty() ? TQString("") : prefixInc + dom->name(); NamespaceList namespaceList = dom->namespaceList(); for (NamespaceList::const_iterator it = namespaceList.begin(); it != namespaceList.end(); ++it) @@ -258,11 +258,11 @@ void HierarchyDialog::processNamespace( QString prefix, NamespaceDom dom ) } } -void HierarchyDialog::processClass( QString prefix, ClassDom dom ) +void HierarchyDialog::processClass( TQString prefix, ClassDom dom ) { qWarning("processClass: prefix %s class %s", prefix.latin1(), dom->name().latin1()); - QString prefixInc = prefix.isEmpty() ? "" : "."; + TQString prefixInc = prefix.isEmpty() ? "" : "."; classes[prefix + prefixInc + dom->name()] = dom; uclasses[dom->name()] = prefix + prefixInc + dom->name(); diff --git a/parts/classview/hierarchydlg.h b/parts/classview/hierarchydlg.h index 82cf2d4a..79a6d470 100644 --- a/parts/classview/hierarchydlg.h +++ b/parts/classview/hierarchydlg.h @@ -12,7 +12,7 @@ #ifndef _HIERARCHYDLG_H_ #define _HIERARCHYDLG_H_ -#include <qdialog.h> +#include <tqdialog.h> #include "codemodel.h" @@ -35,21 +35,21 @@ public slots: private slots: void setLanguageSupport(KDevLanguageSupport *ls); - void slotClassComboChoice(QListViewItem *item); - void slotNamespaceComboChoice(QListViewItem *item); - void slotClassComboChoice(const QString&); - void slotNamespaceComboChoice(const QString&); - void classSelected(const QString &className); + void slotClassComboChoice(TQListViewItem *item); + void slotNamespaceComboChoice(TQListViewItem *item); + void slotClassComboChoice(const TQString&); + void slotNamespaceComboChoice(const TQString&); + void classSelected(const TQString &className); void save(); private: - void processNamespace(QString prefix, NamespaceDom dom); - void processClass(QString prefix, ClassDom dom); + void processNamespace(TQString prefix, NamespaceDom dom); + void processClass(TQString prefix, ClassDom dom); - QMap<QString, ClassDom> classes; - //QMap<class name, fully qualified class name> + TQMap<TQString, ClassDom> classes; + //TQMap<class name, fully qualified class name> //like MyClass - MyNamespace.MyClass - QMap<QString, QString> uclasses; + TQMap<TQString, TQString> uclasses; KComboView *namespace_combo; KComboView *class_combo; diff --git a/parts/classview/navigator.cpp b/parts/classview/navigator.cpp index 596b5786..fa83a4ff 100644 --- a/parts/classview/navigator.cpp +++ b/parts/classview/navigator.cpp @@ -21,7 +21,7 @@ ***************************************************************************/ #include "navigator.h" -#include <qtimer.h> +#include <tqtimer.h> #include <kconfig.h> #include <kdebug.h> @@ -46,10 +46,10 @@ namespace { template<class T> - QValueList<T> QValueList_reversed ( const QValueList<T> & list ) + TQValueList<T> QValueList_reversed ( const TQValueList<T> & list ) { - QValueList<T> rList; - typename QValueList<T>::ConstIterator it = list.begin(); + TQValueList<T> rList; + typename TQValueList<T>::ConstIterator it = list.begin(); while ( it != list.end() ) { rList.push_front ( *it ); @@ -61,7 +61,7 @@ namespace struct NavOp { - NavOp(Navigator *navigator, const QString &fullName) + NavOp(Navigator *navigator, const TQString &fullName) :m_navigator(navigator), m_fullName(fullName) {} bool operator() ( const FunctionDefinitionDom& def ) const @@ -75,7 +75,7 @@ struct NavOp private: Navigator *m_navigator; - QString m_fullName; + TQString m_fullName; }; @@ -85,9 +85,9 @@ private: public: enum Type { Declaration, Definition }; - FunctionNavItem(TextPaintStyleStore& styles, ClassViewPart *part, QListView *parent, QString name, Type type) + FunctionNavItem(TextPaintStyleStore& styles, ClassViewPart *part, TQListView *parent, TQString name, Type type) :FancyListViewItem(styles, parent, name, ""), m_part(part), m_type(type) {} - FunctionNavItem(TextPaintStyleStore& styles, ClassViewPart *part, QListViewItem *parent, QString name, Type type) + FunctionNavItem(TextPaintStyleStore& styles, ClassViewPart *part, TQListViewItem *parent, TQString name, Type type) :FancyListViewItem(styles, parent, name, ""), m_part(part), m_type(type) {} ~FunctionNavItem() {} @@ -105,31 +105,31 @@ private: Navigator::Navigator(ClassViewPart *parent, const char *name) - : QObject(parent, name), m_part(parent) + : TQObject(parent, name), m_part(parent) { m_state = GoToDefinitions; m_navNoDefinition = true; m_actionSyncWithEditor = new KAction( i18n("Sync ClassView"), "view_tree", KShortcut(), this, - SLOT(slotSyncWithEditor()), m_part->actionCollection(), "classview_sync_with_editor" ); + TQT_SLOT(slotSyncWithEditor()), m_part->actionCollection(), "classview_sync_with_editor" ); KAction * action = new KAction( i18n("Jump to next function"), CTRL+ALT+Key_PageDown, this, - SLOT(slotJumpToNextFunction()), m_part->actionCollection(), "navigator_jump_to_next_function" ); + TQT_SLOT(slotJumpToNextFunction()), m_part->actionCollection(), "navigator_jump_to_next_function" ); action->plug( &m_dummyActionWidget ); action = new KAction( i18n("Jump to previous function"), CTRL+ALT+Key_PageUp, this, - SLOT(slotJumpToPreviousFunction()), m_part->actionCollection(), "navigator_jump_to_previous_function" ); + TQT_SLOT(slotJumpToPreviousFunction()), m_part->actionCollection(), "navigator_jump_to_previous_function" ); action->plug( &m_dummyActionWidget ); - m_syncTimer = new QTimer(this); - connect(m_syncTimer, SIGNAL(timeout()), this, SLOT(syncFunctionNav())); + m_syncTimer = new TQTimer(this); + connect(m_syncTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(syncFunctionNav())); } Navigator::~Navigator() { } -void Navigator::selectFunctionNav(QListViewItem *item) +void Navigator::selectFunctionNav(TQListViewItem *item) { FunctionNavItem *nav = dynamic_cast<FunctionNavItem*>(item); if (!nav) @@ -247,7 +247,7 @@ void Navigator::syncFunctionNav() m_part->m_functionsnav->view()->setCurrentText(NAV_NODEFINITION); } -void Navigator::refreshNavBars(const QString &activeFileName, bool clear) +void Navigator::refreshNavBars(const TQString &activeFileName, bool clear) { kdDebug(9003) << k_funcinfo << endl; if (clear) @@ -261,13 +261,13 @@ void Navigator::refreshNavBars(const QString &activeFileName, bool clear) if (!file) return; - QStringList toLeave; + TQStringList toLeave; FunctionList list1 = CodeModelUtils::allFunctionsExhaustive(file); FunctionList::const_iterator flEnd = list1.end(); for (FunctionList::const_iterator it = list1.begin(); it != flEnd; ++it) { - QString fullName = fullFunctionDeclarationName(*it); + TQString fullName = fullFunctionDeclarationName(*it); if (clear || !m_functionNavDecls[fullName] && m_part->m_functionsnav->view()->listView()) { @@ -284,10 +284,10 @@ void Navigator::refreshNavBars(const QString &activeFileName, bool clear) kdDebug(9003) << k_funcinfo << "leave list: " << toLeave << endl; //remove items not in toLeave list - QMap<QString, QListViewItem*>::iterator it = m_functionNavDecls.begin(); + TQMap<TQString, TQListViewItem*>::iterator it = m_functionNavDecls.begin(); while ( it != m_functionNavDecls.end() ) { - QMap<QString, QListViewItem*>::iterator it2 = it; + TQMap<TQString, TQListViewItem*>::iterator it2 = it; ++it; if ( !toLeave.contains( it2.key() ) ) { @@ -303,7 +303,7 @@ void Navigator::refreshNavBars(const QString &activeFileName, bool clear) FunctionDefinitionList list = CodeModelUtils::allFunctionDefinitionsExhaustive(file); for (FunctionDefinitionList::const_iterator it = list.begin(); it != list.end(); ++it) { - QString fullName = fullFunctionDefinitionName(*it); + TQString fullName = fullFunctionDefinitionName(*it); if (clear || !m_functionNavDefs[fullName]) { @@ -326,10 +326,10 @@ void Navigator::refreshNavBars(const QString &activeFileName, bool clear) kdDebug(9003) << k_funcinfo << "leave list: " << toLeave << endl; //remove items not in toLeave list - QMap<QString, QListViewItem*>::iterator itt = m_functionNavDefs.begin(); + TQMap<TQString, TQListViewItem*>::iterator itt = m_functionNavDefs.begin(); while ( itt != m_functionNavDefs.end() ) { - QMap<QString, QListViewItem*>::iterator it2 = itt; + TQMap<TQString, TQListViewItem*>::iterator it2 = itt; ++itt; if ( !toLeave.contains( it2.key() ) ) { @@ -347,7 +347,7 @@ void Navigator::refresh() refreshNavBars(m_part->m_activeFileName, true); } -void Navigator::addFile(const QString & file) +void Navigator::addFile(const TQString & file) { kdDebug(9003) << k_funcinfo << "file: " << file << endl; if (file == m_part->m_activeFileName) @@ -374,16 +374,16 @@ FunctionDom Navigator::currentFunction() ///Some time this might be moved into the language-support-part, so each language ///can highlight as it likes -TextPaintItem highlightFunctionName(QString function, int type, TextPaintStyleStore& styles) { +TextPaintItem highlightFunctionName(TQString function, int type, TextPaintStyleStore& styles) { TextPaintItem ret; if( !styles.hasStyle( type ) ) { - QFont font = styles.getStyle( 0 ).font; + TQFont font = styles.getStyle( 0 ).font; switch(type) { case 1: default: - font.setWeight( QFont::DemiBold ); + font.setWeight( TQFont::DemiBold ); ///since bold makes the font a little bigger, make it smaller again #ifdef BOLDFONTSMALLER font.setPointSize( (font.pointSize() * 9) / 10 ); @@ -393,8 +393,8 @@ TextPaintItem highlightFunctionName(QString function, int type, TextPaintStyleSt styles.addStyle( type, font ); } - QString args; - QString fScope; + TQString args; + TQString fScope; int cutpos; if((cutpos = function.find('(')) != -1) { @@ -419,8 +419,8 @@ template <class DomType> TextPaintItem Navigator::fullFunctionItem(DomType fun) { - QStringList scope = fun->scope(); - QString function = scope.join("."); + TQStringList scope = fun->scope(); + TQString function = scope.join("."); if (!function.isEmpty()) function += "."; function += m_part->languageSupport()->formatModelItem(fun, true); @@ -429,10 +429,10 @@ TextPaintItem Navigator::fullFunctionItem(DomType fun) return highlightFunctionName(function, 1, m_styles); } -QString Navigator::fullFunctionDefinitionName(FunctionDefinitionDom fun) +TQString Navigator::fullFunctionDefinitionName(FunctionDefinitionDom fun) { - QStringList scope = fun->scope(); - QString funName = scope.join("."); + TQStringList scope = fun->scope(); + TQString funName = scope.join("."); if (!funName.isEmpty()) funName += "."; funName += m_part->languageSupport()->formatModelItem(fun, true); @@ -441,10 +441,10 @@ QString Navigator::fullFunctionDefinitionName(FunctionDefinitionDom fun) return funName; } -QString Navigator::fullFunctionDeclarationName(FunctionDom fun) +TQString Navigator::fullFunctionDeclarationName(FunctionDom fun) { - QStringList scope = fun->scope(); - QString funName = scope.join("."); + TQStringList scope = fun->scope(); + TQString funName = scope.join("."); if (!funName.isEmpty()) funName += "."; funName += m_part->languageSupport()->formatModelItem(fun, true); @@ -474,10 +474,10 @@ void Navigator::slotJumpToNextFunction() unsigned int currentLine, currentCol; m_part->m_activeViewCursor->cursorPositionReal ( ¤tLine, ¤tCol ); - QValueList<int> lines = functionStartLines(); + TQValueList<int> lines = functionStartLines(); if ( lines.isEmpty() ) return; - QValueList<int>::iterator it = lines.begin(); + TQValueList<int>::iterator it = lines.begin(); while ( it != lines.end() ) { if ( *it > currentLine ) @@ -499,10 +499,10 @@ void Navigator::slotJumpToPreviousFunction() unsigned int currentLine, currentCol; m_part->m_activeViewCursor->cursorPositionReal ( ¤tLine, ¤tCol ); - QValueList<int> lines = QValueList_reversed<int> ( functionStartLines() ); + TQValueList<int> lines = QValueList_reversed<int> ( functionStartLines() ); if ( lines.isEmpty() ) return; - QValueList<int>::iterator it = lines.begin(); + TQValueList<int>::iterator it = lines.begin(); while ( it != lines.end() ) { if ( *it < currentLine ) @@ -516,12 +516,12 @@ void Navigator::slotJumpToPreviousFunction() } } -QValueList<int> Navigator::functionStartLines() +TQValueList<int> Navigator::functionStartLines() { FileDom file = m_part->codeModel()->fileByName ( m_part->m_activeFileName ); - if ( !file ) return QValueList<int>(); + if ( !file ) return TQValueList<int>(); - QValueList<int> lines; + TQValueList<int> lines; FunctionDefinitionList list = CodeModelUtils::allFunctionDefinitionsExhaustive ( file ); FunctionDefinitionList::const_iterator it = list.begin(); while ( it != list.end() ) diff --git a/parts/classview/navigator.h b/parts/classview/navigator.h index 6953c55d..48470f19 100644 --- a/parts/classview/navigator.h +++ b/parts/classview/navigator.h @@ -20,9 +20,9 @@ #ifndef NAVIGATOR_H #define NAVIGATOR_H -#include <qobject.h> +#include <tqobject.h> #include <codemodel.h> -#include <qfont.h> +#include <tqfont.h> #include <fancylistviewitem.h> class TextPaintStyleStore; @@ -34,7 +34,7 @@ class KAction; #define NAV_NODEFINITION "(no function)" class TextPaintItem; -TextPaintItem highlightFunctionName( QString function, int type, TextPaintStyleStore& styles ); +TextPaintItem highlightFunctionName( TQString function, int type, TextPaintStyleStore& styles ); class Navigator : public QObject { @@ -46,23 +46,23 @@ public: ~Navigator(); void stopTimer(); - void refreshNavBars(const QString &activeFileName, bool clear = true); + void refreshNavBars(const TQString &activeFileName, bool clear = true); - QString fullFunctionDefinitionName(FunctionDefinitionDom fun); - QString fullFunctionDeclarationName(FunctionDom fun); + TQString fullFunctionDefinitionName(FunctionDefinitionDom fun); + TQString fullFunctionDeclarationName(FunctionDom fun); template <class DomType> TextPaintItem fullFunctionItem(DomType fun); public slots: - void selectFunctionNav(QListViewItem *item); + void selectFunctionNav(TQListViewItem *item); void syncFunctionNav(); void syncFunctionNavDelayed(int delay); void functionNavFocused(); void functionNavUnFocused(); void slotCursorPositionChanged(); void refresh(); - void addFile(const QString &file); + void addFile(const TQString &file); void slotSyncWithEditor(); void slotJumpToNextFunction(); void slotJumpToPreviousFunction(); @@ -70,20 +70,20 @@ public slots: protected: FunctionDom currentFunction(); - QValueList<int> functionStartLines(); + TQValueList<int> functionStartLines(); private: ClassViewPart *m_part; - QTimer *m_syncTimer; + TQTimer *m_syncTimer; NavigationState m_state; - QWidget m_dummyActionWidget; + TQWidget m_dummyActionWidget; KAction* m_actionSyncWithEditor; bool m_navNoDefinition; - QMap<QString, QListViewItem*> m_functionNavDefs; - QMap<QString, QListViewItem*> m_functionNavDecls; + TQMap<TQString, TQListViewItem*> m_functionNavDefs; + TQMap<TQString, TQListViewItem*> m_functionNavDecls; TextPaintStyleStore m_styles; }; diff --git a/parts/classview/viewcombos.cpp b/parts/classview/viewcombos.cpp index 63e861c6..bb7bf01d 100644 --- a/parts/classview/viewcombos.cpp +++ b/parts/classview/viewcombos.cpp @@ -27,13 +27,13 @@ #include "viewcombos.h" #include "classviewpart.h" -NamespaceItem::NamespaceItem(ClassViewPart *part, QListView *parent, QString name, NamespaceDom dom) - :QListViewItem(parent, name), m_dom(dom), m_part(part) +NamespaceItem::NamespaceItem(ClassViewPart *part, TQListView *parent, TQString name, NamespaceDom dom) + :TQListViewItem(parent, name), m_dom(dom), m_part(part) { } -NamespaceItem::NamespaceItem(ClassViewPart *part, QListViewItem *parent, QString name, NamespaceDom dom) - :QListViewItem(parent, name), m_dom(dom), m_part(part) +NamespaceItem::NamespaceItem(ClassViewPart *part, TQListViewItem *parent, TQString name, NamespaceDom dom) + :TQListViewItem(parent, name), m_dom(dom), m_part(part) { } @@ -48,18 +48,18 @@ NamespaceDom NamespaceItem::dom() const void NamespaceItem::setup() { - QListViewItem::setup(); + TQListViewItem::setup(); setPixmap( 0, UserIcon("CVnamespace", KIcon::DefaultState, m_part->instance()) ); } -ClassItem::ClassItem(ClassViewPart *part, QListView *parent, QString name, ClassDom dom) - :QListViewItem(parent, name), m_dom(dom), m_part(part) +ClassItem::ClassItem(ClassViewPart *part, TQListView *parent, TQString name, ClassDom dom) + :TQListViewItem(parent, name), m_dom(dom), m_part(part) { } -ClassItem::ClassItem(ClassViewPart *part, QListViewItem *parent, QString name, ClassDom dom) - :QListViewItem(parent, name), m_dom(dom), m_part(part) +ClassItem::ClassItem(ClassViewPart *part, TQListViewItem *parent, TQString name, ClassDom dom) + :TQListViewItem(parent, name), m_dom(dom), m_part(part) { } @@ -74,18 +74,18 @@ ClassDom ClassItem::dom() const void ClassItem::setup() { - QListViewItem::setup(); + TQListViewItem::setup(); setPixmap( 0, UserIcon("CVclass", KIcon::DefaultState, m_part->instance()) ); } -FunctionItem::FunctionItem(ClassViewPart *part, QListView *parent, QString name, FunctionDom dom) - :QListViewItem(parent, name), m_dom(dom), m_part(part) +FunctionItem::FunctionItem(ClassViewPart *part, TQListView *parent, TQString name, FunctionDom dom) + :TQListViewItem(parent, name), m_dom(dom), m_part(part) { } -FunctionItem::FunctionItem(ClassViewPart *part, QListViewItem *parent, QString name, FunctionDom dom) - :QListViewItem(parent, name), m_dom(dom), m_part(part) +FunctionItem::FunctionItem(ClassViewPart *part, TQListViewItem *parent, TQString name, FunctionDom dom) + :TQListViewItem(parent, name), m_dom(dom), m_part(part) { } @@ -100,8 +100,8 @@ FunctionDom FunctionItem::dom() const void FunctionItem::setup() { - QListViewItem::setup(); - QString iconName; + TQListViewItem::setup(); + TQString iconName; if( m_dom->access() == CodeModelItem::Private ) iconName = "CVprivate_meth"; else if( m_dom->access() == CodeModelItem::Protected ) @@ -131,7 +131,7 @@ void refreshNamespaces(ClassViewPart *part, KComboView *view) view->setCurrentActiveItem(global_item); } -void refreshClasses(ClassViewPart *part, KComboView *view, const QString &dom) +void refreshClasses(ClassViewPart *part, KComboView *view, const TQString &dom) { view->clear(); @@ -168,7 +168,7 @@ void refreshFunctions(ClassViewPart *part, KComboView *view, const ClassDom & do } } -void refreshFunctions(ClassViewPart *part, KComboView *view, const QString & dom) +void refreshFunctions(ClassViewPart *part, KComboView *view, const TQString & dom) { view->clear(); @@ -194,7 +194,7 @@ void refreshFunctions(ClassViewPart *part, KComboView *view, const QString & dom } -NamespaceDom ViewCombosOp::namespaceByName( NamespaceDom dom, QString name ) +NamespaceDom ViewCombosOp::namespaceByName( NamespaceDom dom, TQString name ) { NamespaceDom result; diff --git a/parts/classview/viewcombos.h b/parts/classview/viewcombos.h index 7c63ccd8..7525a5d8 100644 --- a/parts/classview/viewcombos.h +++ b/parts/classview/viewcombos.h @@ -22,20 +22,20 @@ #include <klocale.h> -#include <qlistview.h> +#include <tqlistview.h> #include "codemodel.h" class ClassViewPart; class KComboView; -const QString EmptyClasses = i18n("(Classes)"); -const QString EmptyFunctions = i18n("(Functions)"); +const TQString EmptyClasses = i18n("(Classes)"); +const TQString EmptyFunctions = i18n("(Functions)"); class NamespaceItem: public QListViewItem{ public: - NamespaceItem(ClassViewPart *part, QListView *parent, QString name, NamespaceDom dom); - NamespaceItem(ClassViewPart *part, QListViewItem *parent, QString name, NamespaceDom dom); + NamespaceItem(ClassViewPart *part, TQListView *parent, TQString name, NamespaceDom dom); + NamespaceItem(ClassViewPart *part, TQListViewItem *parent, TQString name, NamespaceDom dom); ~NamespaceItem(); NamespaceDom dom() const; virtual void setup(); @@ -46,8 +46,8 @@ private: class ClassItem: public QListViewItem{ public: - ClassItem(ClassViewPart *part, QListView *parent, QString name, ClassDom dom); - ClassItem(ClassViewPart *part, QListViewItem *parent, QString name, ClassDom dom); + ClassItem(ClassViewPart *part, TQListView *parent, TQString name, ClassDom dom); + ClassItem(ClassViewPart *part, TQListViewItem *parent, TQString name, ClassDom dom); ~ClassItem(); ClassDom dom() const; virtual void setup(); @@ -58,8 +58,8 @@ private: class FunctionItem: public QListViewItem{ public: - FunctionItem(ClassViewPart *part, QListView *parent, QString name, FunctionDom dom); - FunctionItem(ClassViewPart *part, QListViewItem *parent, QString name, FunctionDom dom); + FunctionItem(ClassViewPart *part, TQListView *parent, TQString name, FunctionDom dom); + FunctionItem(ClassViewPart *part, TQListViewItem *parent, TQString name, FunctionDom dom); ~FunctionItem(); FunctionDom dom() const; virtual void setup(); @@ -73,11 +73,11 @@ namespace ViewCombosOp{ enum ProcessType {Refresh, Reload}; void refreshNamespaces(ClassViewPart *part, KComboView *view); -void refreshClasses(ClassViewPart *part, KComboView *view, const QString &dom); +void refreshClasses(ClassViewPart *part, KComboView *view, const TQString &dom); void refreshFunctions(ClassViewPart *part, KComboView *view, const ClassDom & dom); -void refreshFunctions(ClassViewPart *part, KComboView *view, const QString & dom); +void refreshFunctions(ClassViewPart *part, KComboView *view, const TQString & dom); -NamespaceDom namespaceByName(NamespaceDom dom, QString name); +NamespaceDom namespaceByName(NamespaceDom dom, TQString name); } |