From d6f8bbb45b267065a6907e71ff9c98bb6d161241 Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 31 Jul 2010 19:56:07 +0000 Subject: Trinity Qt initial conversion git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1157658 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- .../custommakefiles/selectnewfilesdialog.cpp | 54 +++++++++++----------- 1 file changed, 27 insertions(+), 27 deletions(-) (limited to 'buildtools/custommakefiles/selectnewfilesdialog.cpp') diff --git a/buildtools/custommakefiles/selectnewfilesdialog.cpp b/buildtools/custommakefiles/selectnewfilesdialog.cpp index cfcb84e6..a4c0db99 100644 --- a/buildtools/custommakefiles/selectnewfilesdialog.cpp +++ b/buildtools/custommakefiles/selectnewfilesdialog.cpp @@ -12,21 +12,21 @@ #include "selectnewfilesdialog.h" -#include +#include #include -#include -#include +#include +#include #include #include #include "selectnewfilesdialogbase.h" -SelectNewFilesDialog::SelectNewFilesDialog( QStringList paths, QWidget* parent, const char* name ) +SelectNewFilesDialog::SelectNewFilesDialog( TQStringList paths, TQWidget* parent, const char* name ) : KDialogBase( parent, name, true, i18n("Add newly created files to project"), KDialogBase::Ok|KDialogBase::Cancel ) { m_widget = new SelectNewFilesDialogBase(this); m_widget->fileView->header()->hide(); m_widget->fileView->addColumn(i18n("Path") ); - for( QStringList::const_iterator it = paths.begin(); it != paths.end(); ++it) + for( TQStringList::const_iterator it = paths.begin(); it != paths.end(); ++it) { addPath(0, *it); } @@ -44,84 +44,84 @@ void SelectNewFilesDialog::slotCancel() KDialogBase::slotCancel(); } -void SelectNewFilesDialog::checkItem( QCheckListItem* item, const QString& curpath ) +void SelectNewFilesDialog::checkItem( TQCheckListItem* item, const TQString& curpath ) { if( !item ) return; - QString path = curpath + item->text(); - if( item->state() != QCheckListItem::Off ) + TQString path = curpath + item->text(); + if( item->state() != TQCheckListItem::Off ) includePaths << path; else excludePaths << path; if( item->firstChild() ) { - checkItem( static_cast(item->firstChild()), path+"/" ); + checkItem( static_cast(item->firstChild()), path+"/" ); } if( item->nextSibling() ) { - checkItem( static_cast(item->nextSibling()), curpath ); + checkItem( static_cast(item->nextSibling()), curpath ); } } void SelectNewFilesDialog::slotOk() { - QCheckListItem* item = static_cast (m_widget->fileView->firstChild()); + TQCheckListItem* item = static_cast (m_widget->fileView->firstChild()); checkItem( item, "" ); kdDebug(9025) << "Inc List:" << includePaths << endl; kdDebug(9025) << "Exc List:" << excludePaths << endl; KDialogBase::slotOk(); } -void SelectNewFilesDialog::addPath( QCheckListItem* item, const QString& path ) +void SelectNewFilesDialog::addPath( TQCheckListItem* item, const TQString& path ) { if( path.isEmpty() ) return; - QStringList parts = QStringList::split("/", path ); - QString name = parts.first(); + TQStringList parts = TQStringList::split("/", path ); + TQString name = parts.first(); parts.pop_front(); - QCheckListItem* i = createItem( item, name, parts.size() ); - i->setState( QCheckListItem::On ); + TQCheckListItem* i = createItem( item, name, parts.size() ); + i->setState( TQCheckListItem::On ); i->setTristate( true ); addPath(i, parts.join("/") ); } -QCheckListItem* SelectNewFilesDialog::createItem( QCheckListItem* parent, const QString& name, int count ) +TQCheckListItem* SelectNewFilesDialog::createItem( TQCheckListItem* parent, const TQString& name, int count ) { - QCheckListItem::Type t = QCheckListItem::CheckBox; + TQCheckListItem::Type t = TQCheckListItem::CheckBox; if( count > 0 ) - t = QCheckListItem::CheckBoxController; + t = TQCheckListItem::CheckBoxController; if( parent == 0 ) { - QListViewItem* item = m_widget->fileView->firstChild(); + TQListViewItem* item = m_widget->fileView->firstChild(); while( item ) { if( item->text( 0 ) == name ) - return static_cast(item); + return static_cast(item); item = item->nextSibling(); } - return new QCheckListItem( m_widget->fileView, name, t ); + return new TQCheckListItem( m_widget->fileView, name, t ); }else { - QListViewItem* item = parent->firstChild(); + TQListViewItem* item = parent->firstChild(); while( item ) { if( item->text( 0 ) == name ) - return static_cast(item); + return static_cast(item); item = item->nextSibling(); } - return new QCheckListItem( parent, name, t ); + return new TQCheckListItem( parent, name, t ); } } -QStringList SelectNewFilesDialog::excludedPaths() const +TQStringList SelectNewFilesDialog::excludedPaths() const { return excludePaths; } -QStringList SelectNewFilesDialog::includedPaths() const +TQStringList SelectNewFilesDialog::includedPaths() const { return includePaths; } -- cgit v1.2.3