diff options
Diffstat (limited to 'src/editorpage.cpp')
-rw-r--r-- | src/editorpage.cpp | 62 |
1 files changed, 31 insertions, 31 deletions
diff --git a/src/editorpage.cpp b/src/editorpage.cpp index 5c183b9..a838e76 100644 --- a/src/editorpage.cpp +++ b/src/editorpage.cpp @@ -25,7 +25,7 @@ * ***************************************************************************/ -#include <qfileinfo.h> +#include <ntqfileinfo.h> #include <kdeversion.h> #include <ktexteditor/selectioninterface.h> #include <ktexteditor/viewcursorinterface.h> @@ -43,8 +43,8 @@ * @param pParent The parent widget * @param szName The widget's name */ -EditorPage::EditorPage(KTextEditor::Document* pDoc, QPopupMenu* pMenu, - QTabWidget* pParent, const char* szName) : QHBox(pParent, szName), +EditorPage::EditorPage(KTextEditor::Document* pDoc, TQPopupMenu* pMenu, + TQTabWidget* pParent, const char* szName) : TQHBox(pParent, szName), m_pParentTab(pParent), m_pDoc(pDoc), m_bOpen(false), @@ -58,7 +58,7 @@ EditorPage::EditorPage(KTextEditor::Document* pDoc, QPopupMenu* pMenu, KTextEditor::PopupMenuInterface* pMenuIf; KTextEditor::ViewCursorInterface* pCursorIf; - // Create code-completion objects (will be deleted by QObject destructor) + // Create code-completion objects (will be deleted by TQObject destructor) m_pCompletion = new SymbolCompletion(this, this); // Set read-only mode, if required @@ -66,10 +66,10 @@ EditorPage::EditorPage(KTextEditor::Document* pDoc, QPopupMenu* pMenu, m_pDoc->setReadWrite(false); // Create the child widgets - m_pSplit = new QSplitter(this); + m_pSplit = new TQSplitter(this); m_pCtagsList = new CtagsList(m_pSplit); m_pView = m_pDoc->createView(m_pSplit); - m_pSplit->setResizeMode(m_pCtagsList, QSplitter::KeepSize); + m_pSplit->setResizeMode(m_pCtagsList, TQSplitter::KeepSize); // Perform tasks only when the document has been loaded completely connect(m_pDoc, SIGNAL(completed()), this, SLOT(slotFileOpened())); @@ -137,7 +137,7 @@ KTextEditor::View* EditorPage::getView() * @return The path of the file associated with the Document object, empty * string if no file is currently open */ -QString EditorPage::getFilePath() +TQString EditorPage::getFilePath() { return m_pDoc->url().path(); } @@ -147,7 +147,7 @@ QString EditorPage::getFilePath() * @return The name of the file associated with the Document object, empty * string if no file is currently open */ -QString EditorPage::getFileName() +TQString EditorPage::getFileName() { return m_sName; } @@ -181,7 +181,7 @@ bool EditorPage::isModified() * Opens a file for editing. * @param sFileName The full path name of the file to edit. */ -void EditorPage::open(const QString& sFileName) +void EditorPage::open(const TQString& sFileName) { // Open the given file m_bOpen = false; @@ -214,7 +214,7 @@ void EditorPage::save() */ bool EditorPage::close(bool bForce) { - QString sPath; + TQString sPath; // To override the prompt-on-close behaviour, we need to mark the file // as unmodified @@ -282,7 +282,7 @@ void EditorPage::addBookmark(uint nLine) void EditorPage::getBookmarks(FileLocationList& fll) { KTextEditor::MarkInterface* pMarkIf; - QPtrList<KTextEditor::Mark> plMarks; + TQPtrList<KTextEditor::Mark> plMarks; KTextEditor::Mark* pMark; // Get the marks interface @@ -303,14 +303,14 @@ void EditorPage::getBookmarks(FileLocationList& fll) * @return The selected text, or a null string if no text is currently * selected */ -QString EditorPage::getSelection() +TQString EditorPage::getSelection() { KTextEditor::SelectionInterface* pSelect; // Get the selected text pSelect = dynamic_cast<KTextEditor::SelectionInterface*>(m_pDoc); if (!pSelect || !pSelect->hasSelection()) - return QString::null; + return TQString::null; // Return the selected text return pSelect->selection(); @@ -320,25 +320,25 @@ QString EditorPage::getSelection() * Attempts to extract a valid C symbol from the location of the cursor, by * starting at the current line and column, and looking forward and backward * for non-symbol characters. - * @return A C symbol under the cursor, if any, or QString::null otherwise + * @return A C symbol under the cursor, if any, or TQString::null otherwise */ -QString EditorPage::getWordUnderCursor(uint* pPosInWord) +TQString EditorPage::getWordUnderCursor(uint* pPosInWord) { KTextEditor::ViewCursorInterface* pCursor; KTextEditor::EditInterface* pEditIf; - QString sLine; + TQString sLine; uint nLine, nCol, nFrom, nTo, nLast, nLength; - QChar ch; + TQChar ch; // Get a cursor object pCursor = dynamic_cast<KTextEditor::ViewCursorInterface*>(m_pView); if (pCursor == NULL) - return QString::null; + return TQString::null; // Get a pointer to the edit interface pEditIf = dynamic_cast<KTextEditor::EditInterface*>(m_pDoc); if (!pEditIf) - return QString::null; + return TQString::null; // Get the line on which the cursor is positioned pCursor->cursorPositionReal(&nLine, &nCol); @@ -366,7 +366,7 @@ QString EditorPage::getWordUnderCursor(uint* pPosInWord) // Mark empty words nLength = nTo - nFrom; if (nLength == 0) - return QString::null; + return TQString::null; // Return the in-word position, if required if (pPosInWord != NULL) @@ -383,14 +383,14 @@ QString EditorPage::getWordUnderCursor(uint* pPosInWord) * is returned. Otherwise, the word under the cursor location is returned, if * one exists. * @return Either the currently selected text, or the word under the cursor, - * or QString::null if both options fail + * or TQString::null if both options fail */ -QString EditorPage::getSuggestedText() +TQString EditorPage::getSuggestedText() { - QString sText; + TQString sText; sText = getSelection(); - if (sText == QString::null) + if (sText == TQString::null) sText = getWordUnderCursor(); return sText; @@ -400,22 +400,22 @@ QString EditorPage::getSuggestedText() * Returns the contents of the requested line. * Truncates the leading and trailing white spaces. * @param nLine The line number - * @return The text of the requested line, if successful, QString::null + * @return The text of the requested line, if successful, TQString::null * otherwise */ -QString EditorPage::getLineContents(uint nLine) +TQString EditorPage::getLineContents(uint nLine) { KTextEditor::EditInterface* pEditIf; - QString sLine; + TQString sLine; // Cannot accept line 0 if (nLine == 0) - return QString::null; + return TQString::null; // Get a pointer to the edit interface pEditIf = dynamic_cast<KTextEditor::EditInterface*>(m_pDoc); if (!pEditIf) - return QString::null; + return TQString::null; // Get the line on which the cursor is positioned sLine = pEditIf->textLine(nLine - 1); @@ -599,7 +599,7 @@ void EditorPage::setTabWidth(uint nTabWidth) { Kate::Document* pKateDoc; Kate::Command* pKateCmd; - QString sCmd, sResult; + TQString sCmd, sResult; pKateDoc = dynamic_cast<Kate::Document*>(m_pDoc); if ((pKateDoc) && @@ -619,7 +619,7 @@ void EditorPage::setTabWidth(uint nTabWidth) */ void EditorPage::slotFileOpened() { - QFileInfo fi(m_pDoc->url().path()); + TQFileInfo fi(m_pDoc->url().path()); // Get file information m_sName = fi.fileName(); |