Commit e34e7a5b authored by Josef Weidendorfer's avatar Josef Weidendorfer
Browse files

Enable icons for cycles

This was commented out long ago... compiles fine even with Qt4.
parent 5fcda87e
......@@ -1305,16 +1305,11 @@ CanvasEdgeLabel::CanvasEdgeLabel(CallGraphView* v, CanvasEdge* ce, int x,
_percentage = inclP;
if (_percentage > 100.0) _percentage = 100.0;
if (e->call() && (e->call()->isRecursion() || e->call()->inCycle())) {
QString icon = "edit-undo";
#if 0
KIconLoader* loader = KIconLoader::global();
QPixmap p= loader->loadIcon(icon, KIconLoader::Small, 0,
KIconLoader::DefaultState, QStringList(), 0,
true);
setPixmap(0, p);
#endif
}
if (e->call() && (e->call()->isRecursion() || e->call()->inCycle())) {
QFontMetrics fm(font());
QPixmap p = QIcon::fromTheme(QString("edit-undo")).pixmap(fm.height());
setPixmap(pixPos, p); // replace percentage pixmap
}
}
void CanvasEdgeLabel::paint(QPainter* p,
......
......@@ -147,13 +147,8 @@ void CallItem::updateCost()
QPixmap p;
if (sameCycle && !selectedIsCycle && !shownIsCycle) {
QString icon = "edit-undo";
#if 0 // TODO
KIconLoader* loader = KIconLoader::global();
p= loader->loadIcon(icon, KIconLoader::Small, 0,
KIconLoader::DefaultState, QStringList(), 0, true);
#endif
QFontMetrics fm(font(4));
p = QIcon::fromTheme(QString("edit-undo")).pixmap(fm.height());
}
setIcon(4, p);
}
......
......@@ -196,12 +196,8 @@ void InstrItem::updateCost()
QString str;
QPixmap p;
QString icon = "edit-undo";
#if 0 // TODO
KIconLoader* loader = KIconLoader::global();
p= loader->loadIcon(icon, KIconLoader::Small, 0,
KIconLoader::DefaultState, QStringList(), 0, true);
#endif
QFontMetrics fm(font(1));
p = QIcon::fromTheme(QString("edit-undo")).pixmap(fm.height());
if (p.isNull())
str = QObject::tr("(cycle)");
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment