diff options
Diffstat (limited to 'parts/classview/hierarchydlg.cpp')
-rw-r--r-- | parts/classview/hierarchydlg.cpp | 122 |
1 files changed, 61 insertions, 61 deletions
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(); |