summaryrefslogtreecommitdiffstats
path: root/kcachegrind/kcachegrind/sourceitem.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kcachegrind/kcachegrind/sourceitem.cpp')
-rw-r--r--kcachegrind/kcachegrind/sourceitem.cpp92
1 files changed, 46 insertions, 46 deletions
diff --git a/kcachegrind/kcachegrind/sourceitem.cpp b/kcachegrind/kcachegrind/sourceitem.cpp
index cbb8db6e..40a97ca3 100644
--- a/kcachegrind/kcachegrind/sourceitem.cpp
+++ b/kcachegrind/kcachegrind/sourceitem.cpp
@@ -20,9 +20,9 @@
* Items of source view.
*/
-#include <qpixmap.h>
-#include <qregexp.h>
-#include <qpainter.h>
+#include <tqpixmap.h>
+#include <tqregexp.h>
+#include <tqpainter.h>
#include <klocale.h>
#include <kiconloader.h>
@@ -37,11 +37,11 @@
// SourceItem
// for source lines
-SourceItem::SourceItem(SourceView* sv, QListView* parent,
+SourceItem::SourceItem(SourceView* sv, TQListView* parent,
int fileno, unsigned int lineno,
- bool inside, const QString& src,
+ bool inside, const TQString& src,
TraceLine* line)
- : QListViewItem(parent)
+ : TQListViewItem(parent)
{
_view = sv;
_lineno = lineno;
@@ -54,20 +54,20 @@ SourceItem::SourceItem(SourceView* sv, QListView* parent,
if (src == "...")
setText(0, src);
else
- setText(0, QString::number(lineno));
+ setText(0, TQString::number(lineno));
- QString s = src;
- setText(4, s.replace( QRegExp("\t"), " " ));
+ TQString s = src;
+ setText(4, s.replace( TQRegExp("\t"), " " ));
updateGroup();
updateCost();
}
// for call lines
-SourceItem::SourceItem(SourceView* sv, QListViewItem* parent,
+SourceItem::SourceItem(SourceView* sv, TQListViewItem* parent,
int fileno, unsigned int lineno,
TraceLine* line, TraceLineCall* lineCall)
- : QListViewItem(parent)
+ : TQListViewItem(parent)
{
_view = sv;
_lineno = lineno;
@@ -81,13 +81,13 @@ SourceItem::SourceItem(SourceView* sv, QListViewItem* parent,
// fileno, lineno, _lineCall->call()->called()->prettyName().ascii());
SubCost cc = _lineCall->callCount();
- QString templ = " ";
+ TQString templ = " ";
if (cc==0)
templ += i18n("Active call to '%1'");
else
templ += i18n("%n call to '%1'", "%n calls to '%1'", cc);
- QString callStr = templ.arg(_lineCall->call()->calledName());
+ TQString callStr = templ.arg(_lineCall->call()->calledName());
TraceFunction* calledF = _lineCall->call()->called();
calledF->addPrettyLocation(callStr);
@@ -98,10 +98,10 @@ SourceItem::SourceItem(SourceView* sv, QListViewItem* parent,
}
// for jump lines
-SourceItem::SourceItem(SourceView* sv, QListViewItem* parent,
+SourceItem::SourceItem(SourceView* sv, TQListViewItem* parent,
int fileno, unsigned int lineno,
TraceLine* line, TraceLineJump* lineJump)
- : QListViewItem(parent)
+ : TQListViewItem(parent)
{
_view = sv;
_lineno = lineno;
@@ -114,13 +114,13 @@ SourceItem::SourceItem(SourceView* sv, QListViewItem* parent,
//qDebug("SourceItem: (file %d, line %d) Linecall to %s",
// fileno, lineno, _lineCall->call()->called()->prettyName().ascii());
- QString to;
+ TQString to;
if (_lineJump->lineTo()->functionSource() == _line->functionSource())
to = _lineJump->lineTo()->name();
else
to = _lineJump->lineTo()->prettyName();
- QString jStr;
+ TQString jStr;
if (_lineJump->isCondJump())
jStr = i18n("Jump %1 of %2 times to %3")
.arg(_lineJump->followedCount().pretty())
@@ -140,7 +140,7 @@ void SourceItem::updateGroup()
if (!_lineCall) return;
TraceFunction* f = _lineCall->call()->called();
- QColor c = Configuration::functionColor(_view->groupType(), f);
+ TQColor c = Configuration::functionColor(_view->groupType(), f);
setPixmap(4, colorPixmap(10, 10, c));
}
@@ -158,10 +158,10 @@ void SourceItem::updateCost()
if (_lineCall &&
((_lineCall->call()->inCycle()>0) ||
(_lineCall->call()->isRecursion()>0))) {
- QString str;
- QPixmap p;
+ TQString str;
+ TQPixmap p;
- QString icon = "undo";
+ TQString icon = "undo";
KIconLoader* loader = KApplication::kApplication()->iconLoader();
p= loader->loadIcon(icon, KIcon::Small, 0,
KIcon::DefaultState, 0, true);
@@ -184,15 +184,15 @@ void SourceItem::updateCost()
TraceCostType* ct = _view->costType();
_pure = ct ? lineCost->subCost(ct) : SubCost(0);
if (_pure == 0) {
- setText(1, QString::null);
- setPixmap(1, QPixmap());
+ setText(1, TQString::null);
+ setPixmap(1, TQPixmap());
}
else {
double total = totalCost->subCost(ct);
double pure = 100.0 * _pure / total;
if (Configuration::showPercentage())
- setText(1, QString("%1")
+ setText(1, TQString("%1")
.arg(pure, 0, 'f', Configuration::percentPrecision()));
else
setText(1, _pure.pretty());
@@ -203,15 +203,15 @@ void SourceItem::updateCost()
TraceCostType* ct2 = _view->costType2();
_pure2 = ct2 ? lineCost->subCost(ct2) : SubCost(0);
if (_pure2 == 0) {
- setText(2, QString::null);
- setPixmap(2, QPixmap());
+ setText(2, TQString::null);
+ setPixmap(2, TQPixmap());
}
else {
double total = totalCost->subCost(ct2);
double pure2 = 100.0 * _pure2 / total;
if (Configuration::showPercentage())
- setText(2, QString("%1")
+ setText(2, TQString("%1")
.arg(pure2, 0, 'f', Configuration::percentPrecision()));
else
setText(2, _pure2.pretty());
@@ -221,7 +221,7 @@ void SourceItem::updateCost()
}
-int SourceItem::compare(QListViewItem * i, int col, bool ascending ) const
+int SourceItem::compare(TQListViewItem * i, int col, bool ascending ) const
{
const SourceItem* si1 = this;
const SourceItem* si2 = (SourceItem*) i;
@@ -281,50 +281,50 @@ int SourceItem::compare(QListViewItem * i, int col, bool ascending ) const
return 1;
return 0;
}
- return QListViewItem::compare(i, col, ascending);
+ return TQListViewItem::compare(i, col, ascending);
}
-void SourceItem::paintCell( QPainter *p, const QColorGroup &cg,
+void SourceItem::paintCell( TQPainter *p, const TQColorGroup &cg,
int column, int width, int alignment )
{
- QColorGroup _cg( cg );
+ TQColorGroup _cg( cg );
if ( !_inside || ((column==1) || (column==2)))
- _cg.setColor( QColorGroup::Base, cg.button() );
+ _cg.setColor( TQColorGroup::Base, cg.button() );
else if ((_lineCall || _lineJump) && column>2)
- _cg.setColor( QColorGroup::Base, cg.midlight() );
+ _cg.setColor( TQColorGroup::Base, cg.midlight() );
if (column == 3)
paintArrows(p, _cg, width);
else
- QListViewItem::paintCell( p, _cg, column, width, alignment );
+ TQListViewItem::paintCell( p, _cg, column, width, alignment );
}
-void SourceItem::setJumpArray(const QMemArray<TraceLineJump*>& a)
+void SourceItem::setJumpArray(const TQMemArray<TraceLineJump*>& a)
{
_jump.duplicate(a);
}
-void SourceItem::paintArrows(QPainter *p, const QColorGroup &cg, int width)
+void SourceItem::paintArrows(TQPainter *p, const TQColorGroup &cg, int width)
{
- QListView *lv = listView();
+ TQListView *lv = listView();
if ( !lv ) return;
SourceView* sv = (SourceView*) lv;
const BackgroundMode bgmode = lv->viewport()->backgroundMode();
- const QColorGroup::ColorRole crole
- = QPalette::backgroundRoleFromMode( bgmode );
+ const TQColorGroup::ColorRole crole
+ = TQPalette::backgroundRoleFromMode( bgmode );
if ( cg.brush( crole ) != lv->colorGroup().brush( crole ) )
p->fillRect( 0, 0, width, height(), cg.brush( crole ) );
else
- sv->paintEmptyArea( p, QRect( 0, 0, width, height() ) );
+ sv->paintEmptyArea( p, TQRect( 0, 0, width, height() ) );
if ( isSelected() && lv->allColumnsShowFocus() )
- p->fillRect( 0, 0, width, height(), cg.brush( QColorGroup::Highlight ) );
+ p->fillRect( 0, 0, width, height(), cg.brush( TQColorGroup::Highlight ) );
int marg = lv->itemMargin();
int yy = height()/2, y1, y2;
- QColor c;
+ TQColor c;
int start = -1, end = -1;
@@ -382,7 +382,7 @@ void SourceItem::paintArrows(QPainter *p, const QColorGroup &cg, int width)
x = marg + 6*end;
w = 6*(sv->arrowLevels() - end) + 10;
- QPointArray a;
+ TQPointArray a;
a.putPoints(0, 7, x, y+h,
x,y, x+w-8, y, x+w-8, y-2,
x+w, yy,
@@ -428,10 +428,10 @@ void SourceItem::paintArrows(QPainter *p, const QColorGroup &cg, int width)
}
-int SourceItem::width( const QFontMetrics& fm,
- const QListView* lv, int c ) const
+int SourceItem::width( const TQFontMetrics& fm,
+ const TQListView* lv, int c ) const
{
- if (c != 3) return QListViewItem::width(fm, lv, c);
+ if (c != 3) return TQListViewItem::width(fm, lv, c);
SourceView* sv = (SourceView*) lv;
int levels = sv->arrowLevels();