summaryrefslogtreecommitdiffstats
path: root/quanta/utility/quantabookmarks.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'quanta/utility/quantabookmarks.cpp')
-rw-r--r--quanta/utility/quantabookmarks.cpp58
1 files changed, 29 insertions, 29 deletions
diff --git a/quanta/utility/quantabookmarks.cpp b/quanta/utility/quantabookmarks.cpp
index ebca5843..12ba69c5 100644
--- a/quanta/utility/quantabookmarks.cpp
+++ b/quanta/utility/quantabookmarks.cpp
@@ -31,21 +31,21 @@
#include <ktexteditor/editinterface.h>
#include <ktexteditor/viewcursorinterface.h>
-#include <qregexp.h>
-#include <qmemarray.h>
-#include <qevent.h>
+#include <tqregexp.h>
+#include <tqmemarray.h>
+#include <tqevent.h>
#include "viewmanager.h"
#include "document.h"
/**
Utility: selection sort
- sort a QMemArray<uint> in ascending order.
+ sort a TQMemArray<uint> in ascending order.
max it the largest (zerobased) index to sort.
To sort the entire array: ssort( *array, array.size() -1 );
This is only efficient if ran only once.
*/
-static void ssort( QMemArray<uint> &a, int max )
+static void ssort( TQMemArray<uint> &a, int max )
{
uint tmp, j, maxpos;
for ( uint h = max; h >= 1; h-- )
@@ -62,7 +62,7 @@ static void ssort( QMemArray<uint> &a, int max )
// TODO add a insort() or bubble_sort - more efficient for aboutToShow() ?
QuantaBookmarks::QuantaBookmarks(ViewManager *parent,Sorting sort, bool onlyFromActualDocument )
- : QObject( parent, "bookmarks" )
+ : TQObject( parent, "bookmarks" )
, m_sorting(sort)
, m_onlyFromActualDocument(onlyFromActualDocument)
{
@@ -86,38 +86,38 @@ void QuantaBookmarks::init(KActionCollection* ac)
{
m_bookmarkToggle = new KToggleAction(
i18n("Set &Bookmark"), "bookmark", CTRL+Key_B,
- this, SLOT(toggleBookmark()),
+ this, TQT_SLOT(toggleBookmark()),
ac, "bookmarks_toggle" );
m_bookmarkToggle->setWhatsThis(i18n("If a line has no bookmark then add one, otherwise remove it."));
m_bookmarkToggle->setCheckedState( i18n("Clear &Bookmark") );
m_bookmarkClear = new KAction(
i18n("Clear &All Bookmarks"), 0,
- this, SLOT(clearBookmarks()),
+ this, TQT_SLOT(clearBookmarks()),
ac, "bookmarks_clear");
m_bookmarkClear->setWhatsThis(i18n("Remove all bookmarks of the current document."));
m_goNext = new KAction(
i18n("Next Bookmark"), "next", ALT + Key_PageDown,
- this, SLOT(goNext()),
+ this, TQT_SLOT(goNext()),
ac, "bookmarks_next");
m_goNext->setWhatsThis(i18n("Go to the next bookmark."));
m_goPrevious = new KAction(
i18n("Previous Bookmark"), "previous", ALT + Key_PageUp,
- this, SLOT(goPrevious()),
+ this, TQT_SLOT(goPrevious()),
ac, "bookmarks_previous");
m_goPrevious->setWhatsThis(i18n("Go to the previous bookmark."));
//connect the aboutToShow() and aboutToHide() signals with
//the bookmarkMenuAboutToShow() and bookmarkMenuAboutToHide() slots
- connect( m_bookmarksMenu, SIGNAL(aboutToShow()), this, SLOT(bookmarkMenuAboutToShow()));
- connect( m_bookmarksMenu, SIGNAL(aboutToHide()), this, SLOT(bookmarkMenuAboutToHide()) );
+ connect( m_bookmarksMenu, TQT_SIGNAL(aboutToShow()), this, TQT_SLOT(bookmarkMenuAboutToShow()));
+ connect( m_bookmarksMenu, TQT_SIGNAL(aboutToHide()), this, TQT_SLOT(bookmarkMenuAboutToHide()) );
marksChanged ();
}
-void QuantaBookmarks::setBookmarksMenu(QPopupMenu* bookmarksMenu)
+void QuantaBookmarks::setBookmarksMenu(TQPopupMenu* bookmarksMenu)
{
m_bookmarksMenu = bookmarksMenu;
@@ -147,7 +147,7 @@ void QuantaBookmarks::clearBookmarks ()
Document *doc = m_viewManager->activeDocument();
if (doc && doc->markIf)
{
- QPtrList<KTextEditor::Mark> m = doc->markIf->marks();
+ TQPtrList<KTextEditor::Mark> m = doc->markIf->marks();
for (uint i=0; i < m.count(); i++)
doc->markIf->removeMark( m.at(i)->line, KTextEditor::MarkInterface::markType01 );
@@ -156,21 +156,21 @@ void QuantaBookmarks::clearBookmarks ()
}
}
-int QuantaBookmarks::insertBookmarks(QPopupMenu& menu, Document *doc, bool insertNavigationItems )
+int QuantaBookmarks::insertBookmarks(TQPopupMenu& menu, Document *doc, bool insertNavigationItems )
{
int insertedItems = 0;
if (doc->markIf)
{
uint line = doc->viewCursorIf->cursorLine();
- const QRegExp re("&(?!&)");
+ const TQRegExp re("&(?!&)");
int idx( -1 );
int old_menu_count = menu.count();
KTextEditor::Mark *next = 0;
KTextEditor::Mark *prev = 0;
- QPtrList<KTextEditor::Mark> m = doc->markIf->marks();
- QMemArray<uint> sortArray( m.count() );
- QPtrListIterator<KTextEditor::Mark> it( m );
+ TQPtrList<KTextEditor::Mark> m = doc->markIf->marks();
+ TQMemArray<uint> sortArray( m.count() );
+ TQPtrListIterator<KTextEditor::Mark> it( m );
if ( it.count() > 0 && insertNavigationItems)
menu.insertSeparator();
@@ -179,7 +179,7 @@ int QuantaBookmarks::insertBookmarks(QPopupMenu& menu, Document *doc, bool inser
{
if( (*it)->type & KTextEditor::MarkInterface::markType01 )
{
- QString bText = KStringHandler::rEmSqueeze
+ TQString bText = KStringHandler::rEmSqueeze
( doc->editIf->textLine( (*it)->line ),
menu.fontMetrics(), 32 );
bText.replace(re, "&&"); // kill undesired accellerators!
@@ -196,7 +196,7 @@ int QuantaBookmarks::insertBookmarks(QPopupMenu& menu, Document *doc, bool inser
}
menu.insertItem(
- QString("%1 - \"%2\"").arg( (*it)->line+1 ).arg( bText ),
+ TQString("%1 - \"%2\"").arg( (*it)->line+1 ).arg( bText ),
0, (*it)->line, idx );
insertedItems++;
@@ -234,7 +234,7 @@ int QuantaBookmarks::insertBookmarks(QPopupMenu& menu, Document *doc, bool inser
if ( next || prev )
menu.insertSeparator( idx );
}
- connect(&menu, SIGNAL(activated(int)), this, SLOT(gotoLineNumber(int)));
+ connect(&menu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(gotoLineNumber(int)));
}
return insertedItems;
}
@@ -259,10 +259,10 @@ void QuantaBookmarks::bookmarkMenuAboutToShow()
Document *doc = m_doc;
if (!doc)
doc = m_viewManager->activeDocument();
- QValueList<Document*> openedDocuments = m_viewManager->openedDocuments();
+ TQValueList<Document*> openedDocuments = m_viewManager->openedDocuments();
if (doc && doc->markIf)
{
- QPtrList<KTextEditor::Mark> m = doc->markIf->marks();
+ TQPtrList<KTextEditor::Mark> m = doc->markIf->marks();
if (!m_onlyFromActualDocument)
{
@@ -279,11 +279,11 @@ void QuantaBookmarks::bookmarkMenuAboutToShow()
if (!m_onlyFromActualDocument)
{
int i = 0;
- for (QValueList<Document*>::Iterator it = openedDocuments.begin(); it != openedDocuments.end(); ++it)
+ for (TQValueList<Document*>::Iterator it = openedDocuments.begin(); it != openedDocuments.end(); ++it)
{
if (*it != doc)
{
- QPopupMenu *menu = new QPopupMenu(m_bookmarksMenu);
+ TQPopupMenu *menu = new TQPopupMenu(m_bookmarksMenu);
m_bookmarksMenu->insertItem((*it)->url().fileName(), menu);
if (insertBookmarks(*menu, *it, false) > 0)
{
@@ -317,7 +317,7 @@ void QuantaBookmarks::goNext()
doc = m_viewManager->activeDocument();
if (doc && doc->markIf)
{
- QPtrList<KTextEditor::Mark> m = doc->markIf->marks();
+ TQPtrList<KTextEditor::Mark> m = doc->markIf->marks();
if (m.isEmpty())
return;
@@ -340,7 +340,7 @@ void QuantaBookmarks::goPrevious()
doc = m_viewManager->activeDocument();
if (doc && doc->markIf)
{
- QPtrList<KTextEditor::Mark> m = doc->markIf->marks();
+ TQPtrList<KTextEditor::Mark> m = doc->markIf->marks();
if (m.isEmpty())
return;
@@ -361,7 +361,7 @@ void QuantaBookmarks::gotoLineNumber(int line)
Document *doc = m_doc;
if (!doc)
doc = m_viewManager->activeDocument();
- const QObject *s = sender();
+ const TQObject *s = sender();
for (uint i = 0; i < m_othersMenuList.count(); i++)
{
if (s == m_othersMenuList[i])