diff options
author | Slávek Banko <slavek.banko@axis.cz> | 2013-10-08 00:13:25 +0200 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2013-10-08 05:14:53 +0200 |
commit | 84f5a315c3429b47a7eff15e626e2efdbe4f6e5e (patch) | |
tree | 770861aa9033e1dc6c5168358194ff85b32dd429 /src/projectfilesdlg.cpp | |
parent | 57d8bb3d12aed373eee08915f0ff19f5233aabe3 (diff) | |
download | kscope-84f5a315c3429b47a7eff15e626e2efdbe4f6e5e.tar.gz kscope-84f5a315c3429b47a7eff15e626e2efdbe4f6e5e.zip |
Initial TQt conversion
Diffstat (limited to 'src/projectfilesdlg.cpp')
-rw-r--r-- | src/projectfilesdlg.cpp | 66 |
1 files changed, 33 insertions, 33 deletions
diff --git a/src/projectfilesdlg.cpp b/src/projectfilesdlg.cpp index de84417..badcdd1 100644 --- a/src/projectfilesdlg.cpp +++ b/src/projectfilesdlg.cpp @@ -25,10 +25,10 @@ * ***************************************************************************/ -#include <qpushbutton.h> -#include <qlistview.h> -#include <qlineedit.h> -#include <qregexp.h> +#include <ntqpushbutton.h> +#include <ntqlistview.h> +#include <ntqlineedit.h> +#include <ntqregexp.h> #include <klocale.h> #include <kmessagebox.h> #include <kfiledialog.h> @@ -43,7 +43,7 @@ * @param pParent The parent widget * @param szName The widget's name */ -ProjectFilesDlg::ProjectFilesDlg(Project* pProj, QWidget* pParent, +ProjectFilesDlg::ProjectFilesDlg(Project* pProj, TQWidget* pParent, const char* szName) : ProjectFilesLayout(pParent, szName), m_pProj(pProj), @@ -55,7 +55,7 @@ ProjectFilesDlg::ProjectFilesDlg(Project* pProj, QWidget* pParent, m_pScanner = new DirScanner(this, &m_dicFiles); // Initialise the list view - m_pFileList->setSelectionMode(QListView::Extended); + m_pFileList->setSelectionMode(TQListView::Extended); m_pFileList->addColumn("File Path"); // Sort only when asked to by the user @@ -108,11 +108,11 @@ ProjectFilesDlg::~ProjectFilesDlg() * and is added to the list. * @param sFilePath The full path of a source file */ -void ProjectFilesDlg::addItem(const QString& sFilePath) +void ProjectFilesDlg::addItem(const TQString& sFilePath) { - QListViewItem* pItem; + TQListViewItem* pItem; - pItem = new QListViewItem(m_pFileList, m_pLastItem); + pItem = new TQListViewItem(m_pFileList, m_pLastItem); pItem->setText(0, sFilePath); m_pLastItem = pItem; m_dicFiles.insert(sFilePath, pItem); @@ -125,7 +125,7 @@ void ProjectFilesDlg::addItem(const QString& sFilePath) * @param sFilePath Contains the file path, upon successful return * @return bool true if successful, false if the list is empty */ -bool ProjectFilesDlg::firstItem(QString& sFilePath) +bool ProjectFilesDlg::firstItem(TQString& sFilePath) { m_pItrItem = m_pFileList->firstChild(); return nextItem(sFilePath); @@ -140,7 +140,7 @@ bool ProjectFilesDlg::firstItem(QString& sFilePath) * @return bool true if successful, false if no more items are * available */ -bool ProjectFilesDlg::nextItem(QString& sFilePath) +bool ProjectFilesDlg::nextItem(TQString& sFilePath) { if (m_pItrItem == NULL) return false; @@ -156,10 +156,10 @@ bool ProjectFilesDlg::nextItem(QString& sFilePath) * project. * @param pEvent The event object */ -void ProjectFilesDlg::customEvent(QCustomEvent* pEvent) +void ProjectFilesDlg::customEvent(TQCustomEvent* pEvent) { DirScanEvent* pDSE; - QString sMsg; + TQString sMsg; // Process only directory scan progress events if (((uint)pEvent->type()) != DirScanEvent::EventId) @@ -207,8 +207,8 @@ void ProjectFilesDlg::customEvent(QCustomEvent* pEvent) return; // Add the files to the list - const QStringList& slFiles = m_pScanner->getFiles(); - QStringList::const_iterator itr; + const TQStringList& slFiles = m_pScanner->getFiles(); + TQStringList::const_iterator itr; for (itr = slFiles.begin(); itr != slFiles.end(); ++itr) addItem(*itr); @@ -217,7 +217,7 @@ void ProjectFilesDlg::customEvent(QCustomEvent* pEvent) /** * Removes a single item from the file list. */ -void ProjectFilesDlg::removeItem(QListViewItem* pItem) +void ProjectFilesDlg::removeItem(TQListViewItem* pItem) { m_dicFiles.remove(pItem->text(0)); delete pItem; @@ -230,8 +230,8 @@ void ProjectFilesDlg::removeItem(QListViewItem* pItem) */ void ProjectFilesDlg::slotAddFiles() { - QStringList slFiles; - QStringList::const_iterator itr; + TQStringList slFiles; + TQStringList::const_iterator itr; // Prompt the user slFiles = KFileDialog::getOpenFileNames(m_pProj->getSourceRoot(), @@ -253,9 +253,9 @@ void ProjectFilesDlg::slotAddFiles() */ void ProjectFilesDlg::slotAddDir() { - QString sDir; - QStringList slFiles; - QStringList::const_iterator itr; + TQString sDir; + TQStringList slFiles; + TQStringList::const_iterator itr; // Prompt the user for a directory sDir = KFileDialog::getExistingDirectory(m_pProj->getSourceRoot()); @@ -275,9 +275,9 @@ void ProjectFilesDlg::slotAddDir() */ void ProjectFilesDlg::slotAddTree() { - QString sDir; - QStringList slFiles; - QStringList::const_iterator itr; + TQString sDir; + TQStringList slFiles; + TQStringList::const_iterator itr; // Prompt the user for a directory sDir = KFileDialog::getExistingDirectory(m_pProj->getSourceRoot()); @@ -293,7 +293,7 @@ void ProjectFilesDlg::slotAddTree() */ void ProjectFilesDlg::slotRemSel() { - QListViewItem* pItem, * pPrevItem; + TQListViewItem* pItem, * pPrevItem; // Prompt the user before removing the files if (KMessageBox::questionYesNo(0, i18n("Are you sure you want to remove " @@ -317,8 +317,8 @@ void ProjectFilesDlg::slotRemSel() */ void ProjectFilesDlg::slotRemDir() { - QString sDir, sFilePath; - QListViewItem* pItem, * pPrevItem; + TQString sDir, sFilePath; + TQListViewItem* pItem, * pPrevItem; // Prompt the user for a directory sDir = KFileDialog::getExistingDirectory(m_pProj->getSourceRoot()); @@ -350,8 +350,8 @@ void ProjectFilesDlg::slotRemDir() */ void ProjectFilesDlg::slotRemTree() { - QString sDir, sFilePath; - QListViewItem* pItem, * pPrevItem; + TQString sDir, sFilePath; + TQListViewItem* pItem, * pPrevItem; // Prompt the user for a directory sDir = KFileDialog::getExistingDirectory(m_pProj->getSourceRoot()); @@ -385,8 +385,8 @@ void ProjectFilesDlg::slotRemTree() */ void ProjectFilesDlg::slotFilter() { - QString sFilter; - QListViewItem* pItem; + TQString sFilter; + TQListViewItem* pItem; // Get the user's filter string sFilter = m_pFilterEdit->text().stripWhiteSpace(); @@ -394,7 +394,7 @@ void ProjectFilesDlg::slotFilter() return; // Create the regular expression - QRegExp reFilter(sFilter); + TQRegExp reFilter(sFilter); reFilter.setWildcard(true); // Iterate over the list entries, and hide all items not matching the @@ -415,7 +415,7 @@ void ProjectFilesDlg::slotFilter() */ void ProjectFilesDlg::slotShowAll() { - QListViewItem* pItem; + TQListViewItem* pItem; // Iterate over the list entries, and make all items visible pItem = m_pFileList->firstChild(); |