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/editortabs.cpp | |
parent | 57d8bb3d12aed373eee08915f0ff19f5233aabe3 (diff) | |
download | kscope-84f5a315c3429b47a7eff15e626e2efdbe4f6e5e.tar.gz kscope-84f5a315c3429b47a7eff15e626e2efdbe4f6e5e.zip |
Initial TQt conversion
Diffstat (limited to 'src/editortabs.cpp')
-rw-r--r-- | src/editortabs.cpp | 56 |
1 files changed, 28 insertions, 28 deletions
diff --git a/src/editortabs.cpp b/src/editortabs.cpp index 5af9be1..af9587c 100644 --- a/src/editortabs.cpp +++ b/src/editortabs.cpp @@ -25,7 +25,7 @@ * ***************************************************************************/ -#include <qfileinfo.h> +#include <ntqfileinfo.h> #include <klocale.h> #include <kmessagebox.h> #include <kurldrag.h> @@ -39,7 +39,7 @@ * @param pParent The parent widget * @param szName The widget's name */ -EditorTabs::EditorTabs(QWidget* pParent, const char* szName) : +EditorTabs::EditorTabs(TQWidget* pParent, const char* szName) : TabWidget(pParent, szName), m_pCurPage(NULL), m_pWindowMenu(NULL), @@ -53,16 +53,16 @@ EditorTabs::EditorTabs(QWidget* pParent, const char* szName) : setAcceptDrops(true); // Close an editor page when its close button is clicked - connect(this, SIGNAL(closeRequest(QWidget*)), this, - SLOT(slotRemovePage(QWidget*))); + connect(this, SIGNAL(closeRequest(TQWidget*)), this, + SLOT(slotRemovePage(TQWidget*))); // Set an editor page as the active part, when its tab is selected - connect(this, SIGNAL(currentChanged(QWidget*)), this, - SLOT(slotCurrentChanged(QWidget*))); + connect(this, SIGNAL(currentChanged(TQWidget*)), this, + SLOT(slotCurrentChanged(TQWidget*))); // Start dragging a file from a tab - connect(this, SIGNAL(initiateDrag(QWidget*)), this, - SLOT(slotInitiateDrag(QWidget*))); + connect(this, SIGNAL(initiateDrag(TQWidget*)), this, + SLOT(slotInitiateDrag(TQWidget*))); } /** @@ -76,7 +76,7 @@ EditorTabs::~EditorTabs() * @param pWindowMenu Pointer to the main window's "Window" menu (used to * add an activation menu item for each editor page) */ -void EditorTabs::setWindowMenu(QPopupMenu* pWindowMenu) +void EditorTabs::setWindowMenu(TQPopupMenu* pWindowMenu) { m_pWindowMenu = pWindowMenu; connect(pWindowMenu, SIGNAL(aboutToShow()), this, @@ -97,8 +97,8 @@ void EditorTabs::addEditorPage(EditorPage* pNewPage) // Add the file edited by this page to the map, and display its name, // once the file is opened - connect(pNewPage, SIGNAL(fileOpened(EditorPage*, const QString&)), this, - SLOT(slotAttachFile(EditorPage*, const QString&))); + connect(pNewPage, SIGNAL(fileOpened(EditorPage*, const TQString&)), this, + SLOT(slotAttachFile(EditorPage*, const TQString&))); // Handle new unnamed files connect(pNewPage, SIGNAL(newFile(EditorPage*)), this, @@ -124,7 +124,7 @@ void EditorTabs::addEditorPage(EditorPage* pNewPage) * current one * @return The editor page object, if found, NULL otherwise */ -EditorPage* EditorTabs::findEditorPage(const QString& sFileName, +EditorPage* EditorTabs::findEditorPage(const TQString& sFileName, bool bForceChange) { EditorMap::iterator itr; @@ -164,7 +164,7 @@ EditorPage* EditorTabs::getCurrentPage() */ void EditorTabs::removeCurrentPage() { - QWidget* pPage; + TQWidget* pPage; // Get the active page, if any pPage = currentPage(); @@ -181,7 +181,7 @@ void EditorTabs::removeCurrentPage() */ bool EditorTabs::removeAllPages() { - QWidget* pPage; + TQWidget* pPage; // Check if there are any modified files if (getModifiedFilesCount()) { @@ -222,11 +222,11 @@ bool EditorTabs::removeAllPages() /** * Keeps track of the currently active editor page, and notifies on a change * in the active page. - * This slot is connected to the currentChanged() signal of the QTabWidget + * This slot is connected to the currentChanged() signal of the TQTabWidget * object. * @param pWidget The new active page */ -void EditorTabs::slotCurrentChanged(QWidget* pWidget) +void EditorTabs::slotCurrentChanged(TQWidget* pWidget) { EditorPage* pOldPage; @@ -261,7 +261,7 @@ void EditorTabs::slotCurrentChanged(QWidget* pWidget) * @param sFilePath The full path of the file edited in this page */ void EditorTabs::slotAttachFile(EditorPage* pEditPage, - const QString& sFilePath) + const TQString& sFilePath) { // Set the appropriate tab icon, according to the file permissions if (pEditPage->isWritable()) @@ -288,11 +288,11 @@ void EditorTabs::slotAttachFile(EditorPage* pEditPage, */ void EditorTabs::slotNewFile(EditorPage* pEditPage) { - QString sCaption; + TQString sCaption; // Set the tab caption to mark a new file m_nNewFiles++; - sCaption = i18n("Untitled ") + QString::number(m_nNewFiles); + sCaption = i18n("Untitled ") + TQString::number(m_nNewFiles); changeTab(pEditPage, Pixmaps().getPixmap(KScopePixmaps::TabRW), sCaption); @@ -403,7 +403,7 @@ void EditorTabs::showBookmarks(QueryView* pView) // Populate the view for (pLoc = fll.first(); pLoc; pLoc = fll.next()) { pView->addRecord("", pLoc->m_sPath, - QString::number(pLoc->m_nLine + 1), + TQString::number(pLoc->m_nLine + 1), pPage->getLineContents(pLoc->m_nLine + 1)); } @@ -418,7 +418,7 @@ void EditorTabs::showBookmarks(QueryView* pView) * This slot is connected to the clicked() signal of the tab's close button. * @param pPage The EditorPage object to remove */ -void EditorTabs::slotRemovePage(QWidget* pPage) +void EditorTabs::slotRemovePage(TQWidget* pPage) { removePage(pPage, false); } @@ -447,7 +447,7 @@ void EditorTabs::slotToggleTagList() * The event is accepted if the dragged object is a list of file paths. * @param pEvent The drag move event object */ -void EditorTabs::dragMoveEvent(QDragMoveEvent* pEvent) +void EditorTabs::dragMoveEvent(TQDragMoveEvent* pEvent) { KURL::List list; bool bAccept; @@ -460,7 +460,7 @@ void EditorTabs::dragMoveEvent(QDragMoveEvent* pEvent) * Handles file drops over an empty tab widget, or over the tab bar. * @param pEvent The drop event object */ -void EditorTabs::dropEvent(QDropEvent* pEvent) +void EditorTabs::dropEvent(TQDropEvent* pEvent) { emit filesDropped(pEvent); } @@ -473,7 +473,7 @@ void EditorTabs::dropEvent(QDropEvent* pEvent) * widget. * @param pWidget The page whose tab is being dragged */ -void EditorTabs::slotInitiateDrag(QWidget* pWidget) +void EditorTabs::slotInitiateDrag(TQWidget* pWidget) { KURL url; KURLDrag* pDrag; @@ -565,7 +565,7 @@ void EditorTabs::slotGoRight() */ void EditorTabs::slotFillWindowMenu() { - QString sLabel; + TQString sLabel; int i; // Delete old menu items @@ -576,7 +576,7 @@ void EditorTabs::slotFillWindowMenu() // Add new items for (i = 0; i < count(); i++) { - sLabel = (i < 10) ? QString("&%1 %2").arg(i).arg(label(i)) : label(i); + sLabel = (i < 10) ? TQString("&%1 %2").arg(i).arg(label(i)) : label(i); m_pWindowMenu->insertItem(sLabel, i); } @@ -609,10 +609,10 @@ void EditorTabs::slotSetCurrentPage(int nId) * false otherwise * @return true if the page was removed, false otherwise */ -bool EditorTabs::removePage(QWidget* pPage, bool bForce) +bool EditorTabs::removePage(TQWidget* pPage, bool bForce) { EditorPage* pEditPage; - QString sFilePath; + TQString sFilePath; // Store the file path for later pEditPage = (EditorPage*)pPage; |