Changeset View
Changeset View
Standalone View
Standalone View
src/part/canvasnode.cpp
Show All 18 Lines | |||||
19 | /* This file was callgraphview.cpp, part of KCachegrind. | 19 | /* This file was callgraphview.cpp, part of KCachegrind. | ||
20 | Copyright (C) 2003 Josef Weidendorfer <Josef.Weidendorfer@gmx.de> | 20 | Copyright (C) 2003 Josef Weidendorfer <Josef.Weidendorfer@gmx.de> | ||
21 | 21 | | |||
22 | KCachegrind is free software; you can redistribute it and/or | 22 | KCachegrind is free software; you can redistribute it and/or | ||
23 | modify it under the terms of the GNU General Public | 23 | modify it under the terms of the GNU General Public | ||
24 | License as published by the Free Software Foundation, version 2. | 24 | License as published by the Free Software Foundation, version 2. | ||
25 | */ | 25 | */ | ||
26 | 26 | | |||
27 | | ||||
28 | /* | 27 | /* | ||
29 | * Callgraph View | 28 | * Callgraph View | ||
30 | */ | 29 | */ | ||
31 | 30 | | |||
32 | #include "canvasnode.h" | 31 | #include "canvasnode.h" | ||
32 | #include "FontsCache.h" | ||||
33 | #include "dot2qtconsts.h" | ||||
34 | #include "dotdefaults.h" | ||||
33 | #include "dotgraphview.h" | 35 | #include "dotgraphview.h" | ||
34 | #include "graphnode.h" | 36 | #include "graphnode.h" | ||
35 | #include "dotdefaults.h" | | |||
36 | #include "dot2qtconsts.h" | | |||
37 | #include "FontsCache.h" | | |||
38 | #include "kgraphviewerlib_debug.h" | 37 | #include "kgraphviewerlib_debug.h" | ||
39 | 38 | | |||
40 | #include <stdlib.h> | | |||
41 | #include <math.h> | | |||
42 | #include <iostream> | 39 | #include <iostream> | ||
40 | #include <math.h> | ||||
41 | #include <stdlib.h> | ||||
43 | 42 | | |||
43 | #include <QDebug> | ||||
44 | #include <QGraphicsScene> | 44 | #include <QGraphicsScene> | ||
45 | #include <QMatrix> | 45 | #include <QMatrix> | ||
46 | #include <QPainter> | 46 | #include <QPainter> | ||
47 | #include <QStyle> | | |||
48 | #include <QPolygonF> | | |||
49 | #include <QPixmap> | 47 | #include <QPixmap> | ||
50 | #include <QDebug> | 48 | #include <QPolygonF> | ||
49 | #include <QStyle> | ||||
51 | 50 | | |||
52 | #include <klocalizedstring.h> | 51 | #include <klocalizedstring.h> | ||
53 | 52 | | |||
54 | namespace KGraphViewer | 53 | namespace KGraphViewer | ||
55 | { | 54 | { | ||
56 | 55 | CanvasNode::CanvasNode(DotGraphView *v, GraphNode *s, QGraphicsScene *c, QGraphicsItem *parent) | |||
57 | CanvasNode::CanvasNode(DotGraphView* v, | | |||
58 | GraphNode* s, | | |||
59 | QGraphicsScene* c, | | |||
60 | QGraphicsItem* parent) | | |||
61 | : CanvasElement(v,(GraphElement*)s, c, parent) | 56 | : CanvasElement(v, (GraphElement *)s, c, parent) | ||
62 | 57 | | |||
63 | { | 58 | { | ||
64 | qCDebug(KGRAPHVIEWERLIB_LOG) << s->id(); | 59 | qCDebug(KGRAPHVIEWERLIB_LOG) << s->id(); | ||
65 | connect(s, &GraphNode::changed, | 60 | connect(s, &GraphNode::changed, this, &CanvasNode::modelChanged); | ||
66 | this, &CanvasNode::modelChanged); | | |||
67 | 61 | | |||
68 | QString tipStr; | 62 | QString tipStr; | ||
69 | QString id = s->id(); | 63 | QString id = s->id(); | ||
70 | QString label = s->label(); | 64 | QString label = s->label(); | ||
71 | tipStr = i18n("id='%1'\nlabel='%2'",id,label); | 65 | tipStr = i18n("id='%1'\nlabel='%2'", id, label); | ||
72 | // qCDebug(KGRAPHVIEWERLIB_LOG) << "CanvasEllipseNode setToolTip " << tipStr; | 66 | // qCDebug(KGRAPHVIEWERLIB_LOG) << "CanvasEllipseNode setToolTip " << tipStr; | ||
73 | setToolTip(tipStr); | 67 | setToolTip(tipStr); | ||
74 | } | 68 | } | ||
75 | 69 | | |||
76 | // CanvasHtmlNode::CanvasHtmlNode( | 70 | // CanvasHtmlNode::CanvasHtmlNode( | ||
77 | // DotGraphView* v, | 71 | // DotGraphView* v, | ||
78 | // GraphNode* n, | 72 | // GraphNode* n, | ||
79 | // const DotRenderOp& dro, | 73 | // const DotRenderOp& dro, | ||
▲ Show 20 Lines • Show All 69 Lines • Show Last 20 Lines |