summaryrefslogtreecommitdiffstats
path: root/parts/classview/navigator.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:56:07 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:56:07 +0000
commitd6f8bbb45b267065a6907e71ff9c98bb6d161241 (patch)
treed109539636691d7b03036ca1c0ed29dbae6577cf /parts/classview/navigator.cpp
parent3331a47a9cad24795c7440ee8107143ce444ef34 (diff)
downloadtdevelop-d6f8bbb45b267065a6907e71ff9c98bb6d161241.tar.gz
tdevelop-d6f8bbb45b267065a6907e71ff9c98bb6d161241.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1157658 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'parts/classview/navigator.cpp')
-rw-r--r--parts/classview/navigator.cpp88
1 files changed, 44 insertions, 44 deletions
diff --git a/parts/classview/navigator.cpp b/parts/classview/navigator.cpp
index 596b5786..fa83a4ff 100644
--- a/parts/classview/navigator.cpp
+++ b/parts/classview/navigator.cpp
@@ -21,7 +21,7 @@
***************************************************************************/
#include "navigator.h"
-#include <qtimer.h>
+#include <tqtimer.h>
#include <kconfig.h>
#include <kdebug.h>
@@ -46,10 +46,10 @@
namespace
{
template<class T>
- QValueList<T> QValueList_reversed ( const QValueList<T> & list )
+ TQValueList<T> QValueList_reversed ( const TQValueList<T> & list )
{
- QValueList<T> rList;
- typename QValueList<T>::ConstIterator it = list.begin();
+ TQValueList<T> rList;
+ typename TQValueList<T>::ConstIterator it = list.begin();
while ( it != list.end() )
{
rList.push_front ( *it );
@@ -61,7 +61,7 @@ namespace
struct NavOp
{
- NavOp(Navigator *navigator, const QString &fullName)
+ NavOp(Navigator *navigator, const TQString &fullName)
:m_navigator(navigator), m_fullName(fullName) {}
bool operator() ( const FunctionDefinitionDom& def ) const
@@ -75,7 +75,7 @@ struct NavOp
private:
Navigator *m_navigator;
- QString m_fullName;
+ TQString m_fullName;
};
@@ -85,9 +85,9 @@ private:
public:
enum Type { Declaration, Definition };
- FunctionNavItem(TextPaintStyleStore& styles, ClassViewPart *part, QListView *parent, QString name, Type type)
+ FunctionNavItem(TextPaintStyleStore& styles, ClassViewPart *part, TQListView *parent, TQString name, Type type)
:FancyListViewItem(styles, parent, name, ""), m_part(part), m_type(type) {}
- FunctionNavItem(TextPaintStyleStore& styles, ClassViewPart *part, QListViewItem *parent, QString name, Type type)
+ FunctionNavItem(TextPaintStyleStore& styles, ClassViewPart *part, TQListViewItem *parent, TQString name, Type type)
:FancyListViewItem(styles, parent, name, ""), m_part(part), m_type(type) {}
~FunctionNavItem() {}
@@ -105,31 +105,31 @@ private:
Navigator::Navigator(ClassViewPart *parent, const char *name)
- : QObject(parent, name), m_part(parent)
+ : TQObject(parent, name), m_part(parent)
{
m_state = GoToDefinitions;
m_navNoDefinition = true;
m_actionSyncWithEditor = new KAction( i18n("Sync ClassView"), "view_tree", KShortcut(), this,
- SLOT(slotSyncWithEditor()), m_part->actionCollection(), "classview_sync_with_editor" );
+ TQT_SLOT(slotSyncWithEditor()), m_part->actionCollection(), "classview_sync_with_editor" );
KAction * action = new KAction( i18n("Jump to next function"), CTRL+ALT+Key_PageDown, this,
- SLOT(slotJumpToNextFunction()), m_part->actionCollection(), "navigator_jump_to_next_function" );
+ TQT_SLOT(slotJumpToNextFunction()), m_part->actionCollection(), "navigator_jump_to_next_function" );
action->plug( &m_dummyActionWidget );
action = new KAction( i18n("Jump to previous function"), CTRL+ALT+Key_PageUp, this,
- SLOT(slotJumpToPreviousFunction()), m_part->actionCollection(), "navigator_jump_to_previous_function" );
+ TQT_SLOT(slotJumpToPreviousFunction()), m_part->actionCollection(), "navigator_jump_to_previous_function" );
action->plug( &m_dummyActionWidget );
- m_syncTimer = new QTimer(this);
- connect(m_syncTimer, SIGNAL(timeout()), this, SLOT(syncFunctionNav()));
+ m_syncTimer = new TQTimer(this);
+ connect(m_syncTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(syncFunctionNav()));
}
Navigator::~Navigator()
{
}
-void Navigator::selectFunctionNav(QListViewItem *item)
+void Navigator::selectFunctionNav(TQListViewItem *item)
{
FunctionNavItem *nav = dynamic_cast<FunctionNavItem*>(item);
if (!nav)
@@ -247,7 +247,7 @@ void Navigator::syncFunctionNav()
m_part->m_functionsnav->view()->setCurrentText(NAV_NODEFINITION);
}
-void Navigator::refreshNavBars(const QString &activeFileName, bool clear)
+void Navigator::refreshNavBars(const TQString &activeFileName, bool clear)
{
kdDebug(9003) << k_funcinfo << endl;
if (clear)
@@ -261,13 +261,13 @@ void Navigator::refreshNavBars(const QString &activeFileName, bool clear)
if (!file)
return;
- QStringList toLeave;
+ TQStringList toLeave;
FunctionList list1 = CodeModelUtils::allFunctionsExhaustive(file);
FunctionList::const_iterator flEnd = list1.end();
for (FunctionList::const_iterator it = list1.begin(); it != flEnd; ++it)
{
- QString fullName = fullFunctionDeclarationName(*it);
+ TQString fullName = fullFunctionDeclarationName(*it);
if (clear || !m_functionNavDecls[fullName] && m_part->m_functionsnav->view()->listView())
{
@@ -284,10 +284,10 @@ void Navigator::refreshNavBars(const QString &activeFileName, bool clear)
kdDebug(9003) << k_funcinfo << "leave list: " << toLeave << endl;
//remove items not in toLeave list
- QMap<QString, QListViewItem*>::iterator it = m_functionNavDecls.begin();
+ TQMap<TQString, TQListViewItem*>::iterator it = m_functionNavDecls.begin();
while ( it != m_functionNavDecls.end() )
{
- QMap<QString, QListViewItem*>::iterator it2 = it;
+ TQMap<TQString, TQListViewItem*>::iterator it2 = it;
++it;
if ( !toLeave.contains( it2.key() ) )
{
@@ -303,7 +303,7 @@ void Navigator::refreshNavBars(const QString &activeFileName, bool clear)
FunctionDefinitionList list = CodeModelUtils::allFunctionDefinitionsExhaustive(file);
for (FunctionDefinitionList::const_iterator it = list.begin(); it != list.end(); ++it)
{
- QString fullName = fullFunctionDefinitionName(*it);
+ TQString fullName = fullFunctionDefinitionName(*it);
if (clear || !m_functionNavDefs[fullName])
{
@@ -326,10 +326,10 @@ void Navigator::refreshNavBars(const QString &activeFileName, bool clear)
kdDebug(9003) << k_funcinfo << "leave list: " << toLeave << endl;
//remove items not in toLeave list
- QMap<QString, QListViewItem*>::iterator itt = m_functionNavDefs.begin();
+ TQMap<TQString, TQListViewItem*>::iterator itt = m_functionNavDefs.begin();
while ( itt != m_functionNavDefs.end() )
{
- QMap<QString, QListViewItem*>::iterator it2 = itt;
+ TQMap<TQString, TQListViewItem*>::iterator it2 = itt;
++itt;
if ( !toLeave.contains( it2.key() ) )
{
@@ -347,7 +347,7 @@ void Navigator::refresh()
refreshNavBars(m_part->m_activeFileName, true);
}
-void Navigator::addFile(const QString & file)
+void Navigator::addFile(const TQString & file)
{
kdDebug(9003) << k_funcinfo << "file: " << file << endl;
if (file == m_part->m_activeFileName)
@@ -374,16 +374,16 @@ FunctionDom Navigator::currentFunction()
///Some time this might be moved into the language-support-part, so each language
///can highlight as it likes
-TextPaintItem highlightFunctionName(QString function, int type, TextPaintStyleStore& styles) {
+TextPaintItem highlightFunctionName(TQString function, int type, TextPaintStyleStore& styles) {
TextPaintItem ret;
if( !styles.hasStyle( type ) ) {
- QFont font = styles.getStyle( 0 ).font;
+ TQFont font = styles.getStyle( 0 ).font;
switch(type) {
case 1:
default:
- font.setWeight( QFont::DemiBold );
+ font.setWeight( TQFont::DemiBold );
///since bold makes the font a little bigger, make it smaller again
#ifdef BOLDFONTSMALLER
font.setPointSize( (font.pointSize() * 9) / 10 );
@@ -393,8 +393,8 @@ TextPaintItem highlightFunctionName(QString function, int type, TextPaintStyleSt
styles.addStyle( type, font );
}
- QString args;
- QString fScope;
+ TQString args;
+ TQString fScope;
int cutpos;
if((cutpos = function.find('(')) != -1) {
@@ -419,8 +419,8 @@ template <class DomType>
TextPaintItem Navigator::fullFunctionItem(DomType fun)
{
- QStringList scope = fun->scope();
- QString function = scope.join(".");
+ TQStringList scope = fun->scope();
+ TQString function = scope.join(".");
if (!function.isEmpty())
function += ".";
function += m_part->languageSupport()->formatModelItem(fun, true);
@@ -429,10 +429,10 @@ TextPaintItem Navigator::fullFunctionItem(DomType fun)
return highlightFunctionName(function, 1, m_styles);
}
-QString Navigator::fullFunctionDefinitionName(FunctionDefinitionDom fun)
+TQString Navigator::fullFunctionDefinitionName(FunctionDefinitionDom fun)
{
- QStringList scope = fun->scope();
- QString funName = scope.join(".");
+ TQStringList scope = fun->scope();
+ TQString funName = scope.join(".");
if (!funName.isEmpty())
funName += ".";
funName += m_part->languageSupport()->formatModelItem(fun, true);
@@ -441,10 +441,10 @@ QString Navigator::fullFunctionDefinitionName(FunctionDefinitionDom fun)
return funName;
}
-QString Navigator::fullFunctionDeclarationName(FunctionDom fun)
+TQString Navigator::fullFunctionDeclarationName(FunctionDom fun)
{
- QStringList scope = fun->scope();
- QString funName = scope.join(".");
+ TQStringList scope = fun->scope();
+ TQString funName = scope.join(".");
if (!funName.isEmpty())
funName += ".";
funName += m_part->languageSupport()->formatModelItem(fun, true);
@@ -474,10 +474,10 @@ void Navigator::slotJumpToNextFunction()
unsigned int currentLine, currentCol;
m_part->m_activeViewCursor->cursorPositionReal ( &currentLine, &currentCol );
- QValueList<int> lines = functionStartLines();
+ TQValueList<int> lines = functionStartLines();
if ( lines.isEmpty() ) return;
- QValueList<int>::iterator it = lines.begin();
+ TQValueList<int>::iterator it = lines.begin();
while ( it != lines.end() )
{
if ( *it > currentLine )
@@ -499,10 +499,10 @@ void Navigator::slotJumpToPreviousFunction()
unsigned int currentLine, currentCol;
m_part->m_activeViewCursor->cursorPositionReal ( &currentLine, &currentCol );
- QValueList<int> lines = QValueList_reversed<int> ( functionStartLines() );
+ TQValueList<int> lines = QValueList_reversed<int> ( functionStartLines() );
if ( lines.isEmpty() ) return;
- QValueList<int>::iterator it = lines.begin();
+ TQValueList<int>::iterator it = lines.begin();
while ( it != lines.end() )
{
if ( *it < currentLine )
@@ -516,12 +516,12 @@ void Navigator::slotJumpToPreviousFunction()
}
}
-QValueList<int> Navigator::functionStartLines()
+TQValueList<int> Navigator::functionStartLines()
{
FileDom file = m_part->codeModel()->fileByName ( m_part->m_activeFileName );
- if ( !file ) return QValueList<int>();
+ if ( !file ) return TQValueList<int>();
- QValueList<int> lines;
+ TQValueList<int> lines;
FunctionDefinitionList list = CodeModelUtils::allFunctionDefinitionsExhaustive ( file );
FunctionDefinitionList::const_iterator it = list.begin();
while ( it != list.end() )