summaryrefslogtreecommitdiffstats
path: root/kcachegrind/kcachegrind/instritem.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:51:49 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:51:49 +0000
commit4ae0c208b66e0f7954e194384464fe2d0a2c56dd (patch)
treeb0a7cd1c184f0003c0292eb416ed27f674f9cc43 /kcachegrind/kcachegrind/instritem.cpp
parent1964ea0fb4ab57493ca2ebb709c8d3b5395fd653 (diff)
downloadtdesdk-4ae0c208b66e0f7954e194384464fe2d0a2c56dd.tar.gz
tdesdk-4ae0c208b66e0f7954e194384464fe2d0a2c56dd.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdesdk@1157652 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kcachegrind/kcachegrind/instritem.cpp')
-rw-r--r--kcachegrind/kcachegrind/instritem.cpp92
1 files changed, 46 insertions, 46 deletions
diff --git a/kcachegrind/kcachegrind/instritem.cpp b/kcachegrind/kcachegrind/instritem.cpp
index c7cdfba3..97c09661 100644
--- a/kcachegrind/kcachegrind/instritem.cpp
+++ b/kcachegrind/kcachegrind/instritem.cpp
@@ -20,8 +20,8 @@
* Items of instruction view.
*/
-#include <qpixmap.h>
-#include <qpainter.h>
+#include <tqpixmap.h>
+#include <tqpainter.h>
#include <klocale.h>
#include <kapplication.h>
@@ -37,9 +37,9 @@
// InstrItem
// for messages
-InstrItem::InstrItem(InstrView* iv, QListView* parent,
- Addr addr, const QString& msg)
- : QListViewItem(parent)
+InstrItem::InstrItem(InstrView* iv, TQListView* parent,
+ Addr addr, const TQString& msg)
+ : TQListViewItem(parent)
{
_view = iv;
_addr = addr;
@@ -56,11 +56,11 @@ InstrItem::InstrItem(InstrView* iv, QListView* parent,
}
// for code lines
-InstrItem::InstrItem(InstrView* iv, QListView* parent,
+InstrItem::InstrItem(InstrView* iv, TQListView* parent,
Addr addr, bool inside,
- const QString& code, const QString& cmd,
- const QString& args, TraceInstr* instr)
- : QListViewItem(parent)
+ const TQString& code, const TQString& cmd,
+ const TQString& args, TraceInstr* instr)
+ : TQListViewItem(parent)
{
_view = iv;
_addr = addr;
@@ -86,9 +86,9 @@ InstrItem::InstrItem(InstrView* iv, QListView* parent,
}
// for call lines
-InstrItem::InstrItem(InstrView* iv, QListViewItem* parent, Addr addr,
+InstrItem::InstrItem(InstrView* iv, TQListViewItem* parent, Addr addr,
TraceInstr* instr, TraceInstrCall* instrCall)
- : QListViewItem(parent)
+ : TQListViewItem(parent)
{
_view = iv;
_addr = addr;
@@ -101,13 +101,13 @@ InstrItem::InstrItem(InstrView* iv, QListViewItem* parent, Addr addr,
// fileno, lineno, _lineCall->call()->called()->prettyName().ascii());
SubCost cc = _instrCall->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(_instrCall->call()->calledName());
+ TQString callStr = templ.arg(_instrCall->call()->calledName());
TraceFunction* calledF = _instrCall->call()->called();
calledF->addPrettyLocation(callStr);
@@ -118,9 +118,9 @@ InstrItem::InstrItem(InstrView* iv, QListViewItem* parent, Addr addr,
}
// for jump lines
-InstrItem::InstrItem(InstrView* iv, QListViewItem* parent, Addr addr,
+InstrItem::InstrItem(InstrView* iv, TQListViewItem* parent, Addr addr,
TraceInstr* instr, TraceInstrJump* instrJump)
- : QListViewItem(parent)
+ : TQListViewItem(parent)
{
_view = iv;
_addr = addr;
@@ -132,7 +132,7 @@ InstrItem::InstrItem(InstrView* iv, QListViewItem* parent, Addr addr,
//qDebug("SourceItem: (file %d, line %d) Linecall to %s",
// fileno, lineno, _lineCall->call()->called()->prettyName().ascii());
- QString jStr;
+ TQString jStr;
if (_instrJump->isCondJump())
jStr = i18n("Jump %1 of %2 times to 0x%3")
.arg(_instrJump->followedCount().pretty())
@@ -155,7 +155,7 @@ void InstrItem::updateGroup()
if (!_instrCall) return;
TraceFunction* f = _instrCall->call()->called();
- QColor c = Configuration::functionColor(_view->groupType(), f);
+ TQColor c = Configuration::functionColor(_view->groupType(), f);
setPixmap(6, colorPixmap(10, 10, c));
}
@@ -174,10 +174,10 @@ void InstrItem::updateCost()
if (_instrCall &&
((_instrCall->call()->inCycle()>0) ||
(_instrCall->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);
@@ -200,15 +200,15 @@ void InstrItem::updateCost()
TraceCostType *ct = _view->costType();
_pure = ct ? instrCost->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());
@@ -219,15 +219,15 @@ void InstrItem::updateCost()
TraceCostType *ct2 = _view->costType2();
_pure2 = ct2 ? instrCost->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 pure = 100.0 * _pure2 / total;
if (Configuration::showPercentage())
- setText(2, QString("%1")
+ setText(2, TQString("%1")
.arg(pure, 0, 'f', Configuration::percentPrecision()));
else
setText(2, _pure2.pretty());
@@ -237,7 +237,7 @@ void InstrItem::updateCost()
}
-int InstrItem::compare(QListViewItem * i, int col, bool ascending ) const
+int InstrItem::compare(TQListViewItem * i, int col, bool ascending ) const
{
const InstrItem* ii1 = this;
const InstrItem* ii2 = (InstrItem*) i;
@@ -293,50 +293,50 @@ int InstrItem::compare(QListViewItem * i, int col, bool ascending ) const
return 0;
}
- return QListViewItem::compare(i, col, ascending);
+ return TQListViewItem::compare(i, col, ascending);
}
-void InstrItem::paintCell( QPainter *p, const QColorGroup &cg,
+void InstrItem::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 ((_instrCall || _instrJump) && 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 InstrItem::setJumpArray(const QMemArray<TraceInstrJump*>& a)
+void InstrItem::setJumpArray(const TQMemArray<TraceInstrJump*>& a)
{
_jump.duplicate(a);
}
-void InstrItem::paintArrows(QPainter *p, const QColorGroup &cg, int width)
+void InstrItem::paintArrows(TQPainter *p, const TQColorGroup &cg, int width)
{
- QListView *lv = listView();
+ TQListView *lv = listView();
if ( !lv ) return;
InstrView* iv = (InstrView*) 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
- iv->paintEmptyArea( p, QRect( 0, 0, width, height() ) );
+ iv->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;
@@ -372,7 +372,7 @@ void InstrItem::paintArrows(QPainter *p, const QColorGroup &cg, int width)
if (_jump[i] == ((TraceItemView*)_view)->selectedItem()) {
p->fillRect( marg + 6*i-2, (y1==0) ? y1: y1-2,
8, (y2-y1==height())? y2:y2+2,
- cg.brush( QColorGroup::Highlight ) );
+ cg.brush( TQColorGroup::Highlight ) );
c = lv->colorGroup().highlightedText();
}
#endif
@@ -407,7 +407,7 @@ void InstrItem::paintArrows(QPainter *p, const QColorGroup &cg, int width)
x = marg + 6*end;
w = 6*(iv->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,
@@ -453,10 +453,10 @@ void InstrItem::paintArrows(QPainter *p, const QColorGroup &cg, int width)
}
-int InstrItem::width( const QFontMetrics& fm,
- const QListView* lv, int c ) const
+int InstrItem::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);
InstrView* iv = (InstrView*) lv;
int levels = iv->arrowLevels();