• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdesdk API Reference
  • KDE Home
  • Contact Us
 

kcachegrind

  • sources
  • kde-4.14
  • kdesdk
  • kcachegrind
  • libviews
partselection.cpp
Go to the documentation of this file.
1 /* This file is part of KCachegrind.
2  Copyright (C) 2003 Josef Weidendorfer <Josef.Weidendorfer@gmx.de>
3 
4  KCachegrind is free software; you can redistribute it and/or
5  modify it under the terms of the GNU General Public
6  License as published by the Free Software Foundation, version 2.
7 
8  This program is distributed in the hope that it will be useful,
9  but WITHOUT ANY WARRANTY; without even the implied warranty of
10  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11  General Public License for more details.
12 
13  You should have received a copy of the GNU General Public License
14  along with this program; see the file COPYING. If not, write to
15  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
16  Boston, MA 02110-1301, USA.
17 */
18 
19 /*
20  * For part file selection, to be put into a QDockWindow
21  */
22 
23 #include "partselection.h"
24 
25 #include <QLabel>
26 #include <QPushButton>
27 #include <QVBoxLayout>
28 #include <QAction>
29 #include <QMenu>
30 
31 #include "toplevelbase.h"
32 #include "partgraph.h"
33 #include "globalconfig.h"
34 #include "config.h"
35 
36 //
37 // PartSelection
38 //
39 
40 // defaults
41 #define DEFAULT_PARTITIONMODE "Inclusive"
42 #define DEFAULT_DIAGRAMMODE false
43 #define DEFAULT_DRAWFRAMES true
44 #define DEFAULT_SHOWINFO false
45 #define DEFAULT_FUNCTIONZOOM false
46 #define DEFAULT_CALLEELEVELS 1
47 #define DEFAULT_DRAWNAME true
48 #define DEFAULT_DRAWCOST true
49 #define DEFAULT_FORCESTRINGS false
50 #define DEFAULT_ALLOWROTATION true
51 
52 PartSelection::PartSelection( TopLevelBase* top,
53  QWidget* parent)
54  : QWidget(parent), TraceItemView(0, top)
55 {
56  _inSelectionUpdate = false;
57 
58  setWindowTitle(tr("Parts Overview"));
59 
60  QVBoxLayout* vboxLayout = new QVBoxLayout(this);
61  vboxLayout->setSpacing(6);
62  vboxLayout->setMargin(6);
63 
64  _partAreaWidget = new PartAreaWidget(this);
65  _partAreaWidget->setMinimumHeight(50);
66  _partAreaWidget->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
67  _partAreaWidget->setMaxSelectDepth(2);
68  _partAreaWidget->setSelectionMode(TreeMapWidget::Extended);
69  _partAreaWidget->setSplitMode(TreeMapItem::HAlternate);
70  _partAreaWidget->setVisibleWidth(2, true);
71  _partAreaWidget->setFieldType(0, tr("Name", "A thing's name"));
72  _partAreaWidget->setFieldType(1, tr("Cost" ));
73  vboxLayout->addWidget(_partAreaWidget);
74 
75  _rangeLabel = new QLabel(this);
76  _rangeLabel->setWordWrap(false);
77  _rangeLabel->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);
78  vboxLayout->addWidget(_rangeLabel);
79  _rangeLabel->setText(tr("(no trace parts)"));
80  _showInfo = true; // label is currently shown
81 
82  _diagramMode = DEFAULT_DIAGRAMMODE;
83  _drawFrames = DEFAULT_DRAWFRAMES;
84 
85  // sets _showInfo
86  showInfo(DEFAULT_SHOWINFO);
87 
88  _partAreaWidget->setAllowRotation(DEFAULT_ALLOWROTATION);
89 
90  connect(_partAreaWidget, SIGNAL(selectionChanged()),
91  this, SLOT(selectionChanged()));
92  connect(_partAreaWidget, SIGNAL(currentChanged(TreeMapItem*, bool)),
93  this, SLOT(currentChangedSlot(TreeMapItem*, bool)));
94  connect(_partAreaWidget, SIGNAL(doubleClicked(TreeMapItem*)),
95  this, SLOT(doubleClicked(TreeMapItem*)));
96  connect(_partAreaWidget,
97  SIGNAL(contextMenuRequested(TreeMapItem*,const QPoint &)),
98  this,
99  SLOT(contextMenuRequested(TreeMapItem*,const QPoint &)));
100 
101  setWhatsThis(whatsThis());
102 }
103 
104 QString PartSelection::whatsThis() const
105 {
106  return tr( "<b>The Parts Overview</b>"
107  "<p>A trace consists of multiple trace parts when "
108  "there are several profile data files from one profile run. "
109  "The Trace Part Overview dockable shows these, "
110  "horizontally ordered in execution time; "
111  "the rectangle sizes are proportional to the total "
112  "cost spent in the parts. You can select one or several "
113  "parts to constrain all costs shown to these parts only."
114  "</p>"
115  "<p>The parts are further subdivided: there is a "
116  "partitioning and an callee split mode: "
117  "<ul><li>Partitioning: You see the "
118  "partitioning into groups for a trace part, according to "
119  "the group type selected. E.g. if ELF object groups are "
120  "selected, you see colored rectangles for each "
121  "used ELF object (shared library or executable), sized "
122  "according to the cost spent therein.</li>"
123  "<li>Callee: A rectangle showing the inclusive "
124  "cost of the current selected function in the trace part "
125  "is shown. "
126  "This is split up into smaller rectangles to show the costs of its "
127  "callees.</li></ul></p>");
128 }
129 
130 void PartSelection::setData(TraceData* data)
131 {
132  TraceItemView::setData(data);
133  _partAreaWidget->setData(data);
134 }
135 
136 
137 CostItem* PartSelection::canShow(CostItem* i)
138 {
139  ProfileContext::Type t = i ? i->type() : ProfileContext::InvalidType;
140 
141  switch(t) {
142  case ProfileContext::Function:
143  case ProfileContext::FunctionCycle:
144  return i;
145  default:
146  break;
147  }
148  return 0;
149 }
150 
151 /* Helper for doUpdate(), called on partsChanged event.
152  * This makes the graph selection the same to the parts in the list
153  */
154 void PartSelection::selectParts(const TracePartList& list)
155 {
156  _inSelectionUpdate = true;
157 
158  qDebug("Entering PartSelection::activePartsChangedSlot");
159 
160  TreeMapItemList l = *_partAreaWidget->base()->children();
161  // first deselect inactive, then select active (makes current active)
162  foreach(TreeMapItem* i, l) {
163  TracePart* part = ((PartItem*)i)->part();
164  bool active = list.contains(part);
165  if (!active && _partAreaWidget->isSelected(i)) {
166 #if 0
167  qDebug("PartSelection::selectParts: Part %s changed to unselected.",
168  ((PartItem*)i)->part()->shortName());
169 #endif
170 
171  _partAreaWidget->setSelected(i, false);
172  }
173  }
174  foreach(TreeMapItem* i, l) {
175  TracePart* part = ((PartItem*)i)->part();
176  bool active = list.contains(part);
177  if (active && !_partAreaWidget->isSelected(i)) {
178 #if 0
179  qDebug("PartSelection::selectParts: Part %s changed to selected.",
180  ((PartItem*)i)->part()->shortName()));
181 #endif
182  _partAreaWidget->setSelected(i, true);
183  }
184  }
185 
186  _inSelectionUpdate = false;
187 
188  qDebug("Leaving PartSelection::activePartsChangedSlot");
189 }
190 
191 
192 void PartSelection::doUpdate(int changeType, bool)
193 {
194  if (changeType == eventType2Changed) return;
195  if (changeType == selectedItemChanged) return;
196 
197  if (changeType & eventTypeChanged)
198  _partAreaWidget->setEventType(_eventType);
199 
200  if (changeType & groupTypeChanged)
201  _partAreaWidget->setGroupType(_groupType);
202 
203  if (changeType & activeItemChanged) {
204  TraceFunction* f = 0;
205 
206  if (_activeItem) {
207  switch(_activeItem->type()) {
208  case ProfileContext::Function:
209  case ProfileContext::FunctionCycle:
210  f = (TraceFunction*)_activeItem;
211  break;
212  default:
213  break;
214  }
215  }
216 
217  _inSelectionUpdate = true;
218  _partAreaWidget->setFunction(f);
219  _inSelectionUpdate = false;
220  }
221 
222  if (changeType & partsChanged)
223  selectParts(_partList);
224 
225  _partAreaWidget->redraw();
226  fillInfo();
227 }
228 
229 
230 
231 void PartSelection::currentChangedSlot(TreeMapItem* i, bool kbd)
232 {
233  if (!i) return;
234  if (!kbd) return;
235  if (i->text(0).isEmpty()) return;
236 
237  if (_topLevel) {
238  QString str = i->text(0);
239  if (!i->text(1).isEmpty())
240  str += " (" + i->text(1) + ')';
241  QString msg = tr("Profile Part Overview: Current is '%1'").arg(str);
242 
243  _topLevel->showMessage(msg, 5000);
244  }
245 
246  if (_showInfo) fillInfo();
247 }
248 
249 
250 void PartSelection::doubleClicked(TreeMapItem* i)
251 {
252  if (!i || i->rtti() != 3) return;
253 
254  ProfileCostArray* c = ((SubPartItem*) i)->partCostItem();
255  TraceCostItem* ci = 0;
256 
257  switch(c->type()) {
258  case ProfileContext::PartFunction:
259  {
260  TraceFunction* f = ((TracePartFunction*)c)->function();
261  if (f)
262  activated(f);
263  }
264  return;
265 
266  case ProfileContext::PartObject:
267  ci = ((TracePartObject*)c)->object();
268  break;
269  case ProfileContext::PartClass:
270  ci = ((TracePartClass*)c)->cls();
271  break;
272  case ProfileContext::PartFile:
273  ci = ((TracePartFile*)c)->file();
274  break;
275  default:
276  break;
277  }
278 
279  if (ci)
280  activated(ci);
281 }
282 
283 
284 void PartSelection::selectionChanged()
285 {
286  if (_inSelectionUpdate) return;
287 
288  qDebug("PartSelection::selectionChanged");
289 
290  bool something_changed = false;
291  bool nothingSelected = true;
292 
293  TracePartList pList;
294  TracePart* part;
295 
296  // if nothing is selected, activate all parts
297  TreeMapItemList* list = _partAreaWidget->base()->children();
298  if (!list) return;
299 
300  foreach(TreeMapItem* i, *list)
301  if (_partAreaWidget->isSelected(i)) {
302  nothingSelected = false;
303  break;
304  }
305 
306  foreach(TreeMapItem* i, *list) {
307  part = ((PartItem*)i)->part();
308  bool active = nothingSelected || _partAreaWidget->isSelected(i);
309  if (active) {
310  pList.append(part);
311  something_changed = true;
312  }
313  }
314 
315  if (something_changed) {
316  //qDebug("PartSelection: Something changed.");
317  partsSelected(pList);
318  }
319 }
320 
321 void PartSelection::itemSelected()
322 {
323  QAction* a = qobject_cast<QAction*>(sender());
324  if (a)
325  doubleClicked( (TreeMapItem*) a->data().value<void*>() );
326 }
327 
328 void PartSelection::contextMenuRequested(TreeMapItem* i,
329  const QPoint & p)
330 {
331  if (!i) return;
332 
333  QMenu popup;
334  QAction* a;
335 
336  QString str;
337  TreeMapItem* s = 0;
338 
339  QAction* selectPartAction = 0;
340  QAction* selectAllPartsAction = 0;
341  QAction* hidePartsAction = 0;
342  QAction* showPartsAction = 0;
343  if (_data && (_data->parts().count()>1)) {
344  s = _partAreaWidget->possibleSelection(i);
345  if (!s->text(0).isEmpty()) {
346  if (_partAreaWidget->isSelected(s))
347  str = tr("Deselect '%1'").arg(s->text(0));
348  else
349  str = tr("Select '%1'").arg(s->text(0));
350 
351  selectPartAction = popup.addAction(str);
352  }
353 
354  selectAllPartsAction = popup.addAction(tr("Select All Parts"));
355  QMenu* ppopup = popup.addMenu(tr("Visible Parts"));
356  hidePartsAction = ppopup->addAction(tr("Hide Selected Parts"));
357  showPartsAction = ppopup->addAction(tr("Show Hidden Parts"));
358 
359  popup.addSeparator();
360  }
361 
362  addGoMenu(&popup);
363 
364  if (i->rtti() == 3) {
365  TreeMapItem* ni = i;
366  while (ni && ni->rtti() == 3) {
367  ProfileCostArray* c = ((SubPartItem*)ni)->partCostItem();
368  if (c->type() == ProfileContext::PartFunction)
369  if ( ((TracePartFunction*)c)->function() == _selectedItem) break;
370 
371  str = tr("Go to '%1'").arg(GlobalConfig::shortenSymbol(ni->text(0)));
372  a = popup.addAction(str);
373  a->setData(QVariant::fromValue( (void*)ni ));
374  connect(a, SIGNAL(triggered()), this, SLOT(itemSelected()));
375  ni = ni->parent();
376  }
377  }
378  popup.addSeparator();
379 
380  QMenu* vpopup = popup.addMenu(tr("Visualization"));
381  QAction* showPartitioningAction = vpopup->addAction(tr("Partitioning Mode"));
382  showPartitioningAction->setCheckable(true);
383  QAction* zoomFunctionAction = vpopup->addAction(tr("Zoom Function"));
384  zoomFunctionAction->setCheckable(true);
385  QAction* directCallsAction = vpopup->addAction(tr("Show Direct Calls"));
386  QAction* incCallsAction = vpopup->addAction(tr("Increment Shown Call Levels"));
387  QAction* showDiagramAction = vpopup->addAction(tr("Diagram Mode"));
388  showDiagramAction->setCheckable(true);
389  if (_partAreaWidget->visualization() == PartAreaWidget::Partitioning) {
390  showPartitioningAction->setChecked(true);
391  zoomFunctionAction->setEnabled(false);
392  directCallsAction->setEnabled(false);
393  incCallsAction->setEnabled(false);
394  }
395  else {
396  zoomFunctionAction->setChecked(_partAreaWidget->zoomFunction());
397  }
398  showDiagramAction->setChecked(_diagramMode);
399 
400  vpopup->addSeparator();
401 
402  QAction* drawNamesAction = vpopup->addAction(tr("Draw Names"));
403  drawNamesAction->setCheckable(true);
404  QAction* drawCostsAction = vpopup->addAction(tr("Draw Costs"));
405  drawCostsAction->setCheckable(true);
406  QAction* ignorePropsAction = vpopup->addAction(tr("Ignore Proportions"));
407  ignorePropsAction->setCheckable(true);
408  QAction* allowRotationAction = vpopup->addAction(tr("Allow Rotation"));
409  allowRotationAction->setCheckable(true);
410  QAction* drawFramesAction = vpopup->addAction(tr("Draw Frames"));
411  drawFramesAction->setCheckable(true);
412  if (!_partAreaWidget->fieldVisible(0) &&
413  !_partAreaWidget->fieldVisible(1)) {
414  ignorePropsAction->setEnabled(false);
415  allowRotationAction->setEnabled(false);
416  }
417  else {
418  drawNamesAction->setChecked(_partAreaWidget->fieldVisible(0));
419  drawCostsAction->setChecked(_partAreaWidget->fieldVisible(1));
420  ignorePropsAction->setChecked(_partAreaWidget->fieldForced(0));
421  allowRotationAction->setChecked(_partAreaWidget->allowRotation());
422  drawFramesAction->setChecked(_drawFrames);
423  }
424  QAction* showInfoAction = popup.addAction(_showInfo ? tr("Hide Info"):tr("Show Info"));
425 
426  a = popup.exec(_partAreaWidget->mapToGlobal(p));
427 
428  if (a == selectPartAction) {
429  // select/deselect part under mouse
430  _partAreaWidget->setSelected(s, !_partAreaWidget->isSelected(s));
431  }
432  else if (a == selectAllPartsAction) {
433  // select all parts
434  TreeMapItemList list = *_partAreaWidget->base()->children();
435  _partAreaWidget->setRangeSelection(list.first(), list.last(), true);
436  }
437  else if (a == hidePartsAction)
438  emit partsHideSelected();
439  else if (a == showPartsAction)
440  emit partsUnhideAll();
441  else if (a == drawNamesAction)
442  _partAreaWidget->setFieldVisible(0, !_partAreaWidget->fieldVisible(0));
443  else if (a == drawCostsAction)
444  _partAreaWidget->setFieldVisible(1, !_partAreaWidget->fieldVisible(1));
445  else if (a == ignorePropsAction) {
446  _partAreaWidget->setFieldForced(0, !_partAreaWidget->fieldForced(0));
447  _partAreaWidget->setFieldForced(1, !_partAreaWidget->fieldForced(0));
448  }
449  else if (a == allowRotationAction)
450  _partAreaWidget->setAllowRotation(!_partAreaWidget->allowRotation());
451  else if (a == drawFramesAction) {
452  _drawFrames = !_drawFrames;
453  _partAreaWidget->drawFrame(2,_drawFrames);
454  _partAreaWidget->drawFrame(3,_drawFrames);
455  }
456  else if (a == showInfoAction)
457  showInfo(!_showInfo);
458  else if (a == showPartitioningAction)
459  _partAreaWidget->setVisualization(
460  (_partAreaWidget->visualization() != PartAreaWidget::Partitioning) ?
461  PartAreaWidget::Partitioning : PartAreaWidget::Inclusive );
462  else if (a == zoomFunctionAction) {
463  // zoom/unzoom function
464  _partAreaWidget->setZoomFunction(!_partAreaWidget->zoomFunction());
465  }
466  else if (a == directCallsAction)
467  _partAreaWidget->setCallLevels(1);
468  else if (a == incCallsAction) {
469  int l = _partAreaWidget->callLevels()+1;
470  _partAreaWidget->setCallLevels(l);
471  }
472  else if (a == showDiagramAction) {
473  _diagramMode = !_diagramMode;
474  _partAreaWidget->setTransparent(2,_diagramMode);
475  }
476 }
477 
478 void PartSelection::hiddenPartsChangedSlot(const TracePartList& list)
479 {
480  _partAreaWidget->changeHidden(list);
481 }
482 
483 void PartSelection::restoreOptions(const QString& prefix, const QString& postfix)
484 {
485  ConfigGroup* g = ConfigStorage::group(prefix, postfix);
486 
487  QString pmode = g->value("PartitionMode",
488  QString(DEFAULT_PARTITIONMODE)).toString();
489  if (pmode == "Inclusive")
490  _partAreaWidget->setVisualization(PartAreaWidget::Inclusive);
491  else
492  _partAreaWidget->setVisualization(PartAreaWidget::Partitioning);
493 
494  _diagramMode = g->value("DiagramMode", DEFAULT_DIAGRAMMODE).toBool();
495  _partAreaWidget->setTransparent(2,_diagramMode);
496 
497  _drawFrames = g->value("DrawFrames", DEFAULT_DRAWFRAMES).toBool();
498  _partAreaWidget->drawFrame(2,_drawFrames);
499  _partAreaWidget->drawFrame(3,_drawFrames);
500 
501  showInfo(g->value("ShowInfo", DEFAULT_SHOWINFO).toBool());
502 
503  bool enable = g->value("FunctionZoom", DEFAULT_FUNCTIONZOOM).toBool();
504  _partAreaWidget->setZoomFunction(enable);
505 
506  int levels = g->value("CalleeLevels", DEFAULT_CALLEELEVELS).toInt();
507  _partAreaWidget->setCallLevels(levels);
508 
509  enable = g->value("DrawName", DEFAULT_DRAWNAME).toBool();
510  _partAreaWidget->setFieldVisible(0, enable);
511 
512  enable = g->value("DrawCost", DEFAULT_DRAWCOST).toBool();
513  _partAreaWidget->setFieldVisible(1, enable);
514 
515  enable = g->value("ForceStrings", DEFAULT_FORCESTRINGS).toBool();
516  _partAreaWidget->setFieldForced(0, enable);
517  _partAreaWidget->setFieldForced(1, enable);
518 
519  enable = g->value("AllowRotation", DEFAULT_ALLOWROTATION).toBool();
520  _partAreaWidget->setAllowRotation(enable);
521 
522  delete g;
523 }
524 
525 void PartSelection::saveOptions(const QString& prefix, const QString& postfix)
526 {
527  ConfigGroup* g = ConfigStorage::group(prefix + postfix);
528 
529  QString mode;
530  if (_partAreaWidget->visualization() == PartAreaWidget::Inclusive)
531  mode = "Inclusive";
532  else
533  mode = "Partitioning";
534 
535  g->setValue("PartitionMode", mode, QString(DEFAULT_PARTITIONMODE));
536  g->setValue("DiagramMode", _diagramMode, DEFAULT_DIAGRAMMODE);
537  g->setValue("DrawFrames", _drawFrames, DEFAULT_DRAWFRAMES);
538  g->setValue("ShowInfo", _showInfo, DEFAULT_SHOWINFO);
539 
540  g->setValue("FunctionZoom",
541  _partAreaWidget->zoomFunction(), DEFAULT_FUNCTIONZOOM);
542  g->setValue("CalleeLevels",
543  _partAreaWidget->callLevels(), DEFAULT_CALLEELEVELS);
544  g->setValue("DrawName",
545  _partAreaWidget->fieldVisible(0), DEFAULT_DRAWNAME);
546  g->setValue("DrawCost",
547  _partAreaWidget->fieldVisible(1), DEFAULT_DRAWCOST);
548  g->setValue("ForceStrings",
549  _partAreaWidget->fieldForced(0), DEFAULT_FORCESTRINGS);
550  g->setValue("AllowRotation",
551  _partAreaWidget->allowRotation(), DEFAULT_ALLOWROTATION);
552 
553  delete g;
554 }
555 
556 void PartSelection::showInfo(bool enable)
557 {
558  if (_showInfo == enable) return;
559 
560  _showInfo = enable;
561  if (enable) {
562  _rangeLabel->show();
563  fillInfo();
564  }
565  else
566  _rangeLabel->hide();
567 }
568 
569 void PartSelection::fillInfo()
570 {
571  if (!_data) {
572  _rangeLabel->setText(tr("(no trace loaded)"));
573  return;
574  }
575 
576  QString info = _data->activePartRange();
577 
578  TreeMapItem* i = _partAreaWidget->current();
579  while (i && i->rtti()!=2) i = i->parent();
580  if (i) {
581  TracePart* part = ((PartItem*)i)->part();
582 
583  //if (!part->trigger().isEmpty()) info += ", " + part->trigger();
584  if (!part->timeframe().isEmpty())
585  info += ", Time " + part->timeframe() + " BBs";
586  }
587  else {
588  TracePart* part = _data->parts().first();
589 
590  if (part && !part->version().isEmpty())
591  info += ", Cachegrind " + part->version();
592  }
593 
594 
595  _rangeLabel->setText(info);
596 }
597 
598 #include "partselection.moc"
TreeMapWidget::base
TreeMapItem * base() const
Returns the TreeMapItem filling out the widget space.
Definition: treemap.h:410
PartSelection::doubleClicked
void doubleClicked(TreeMapItem *)
Definition: partselection.cpp:250
TraceItemView::selectedItemChanged
Definition: traceitemview.h:86
TraceItemView::_topLevel
TopLevelBase * _topLevel
Definition: traceitemview.h:207
QWidget
TraceItemView::_selectedItem
CostItem * _selectedItem
Definition: traceitemview.h:211
PartAreaWidget::setData
void setData(TraceData *d)
Definition: partgraph.cpp:46
globalconfig.h
ProfileContext::PartClass
Definition: context.h:47
TreeMapWidget::setSplitMode
void setSplitMode(TreeMapItem::SplitMode m)
for setting/getting global split direction
Definition: treemap.cpp:1209
ProfileContext::FunctionCycle
Definition: context.h:46
TreeMapWidget::allowRotation
bool allowRotation() const
Definition: treemap.h:601
TreeMapWidget::current
TreeMapItem * current() const
Definition: treemap.h:613
TraceItemView::partsSelected
virtual void partsSelected(TraceItemView *sender, const TracePartList &)
Definition: traceitemview.cpp:331
PartAreaWidget::setFunction
void setFunction(TraceFunction *f)
Definition: partgraph.cpp:103
QObject::sender
QObject * sender() const
PartAreaWidget::setGroupType
void setGroupType(ProfileContext::Type gt)
Definition: partgraph.cpp:111
QAction::setChecked
void setChecked(bool)
CostItem::type
ProfileContext::Type type() const
Definition: costitem.h:45
QAction::data
QVariant data() const
PartSelection::partsHideSelected
void partsHideSelected()
TreeMapWidget::setSelected
void setSelected(TreeMapItem *, bool selected=true)
Selects or unselects an item.
Definition: treemap.cpp:1626
TraceFunction
A traced function.
Definition: tracedata.h:1122
TraceItemView::_data
TraceData * _data
Definition: traceitemview.h:209
TraceCostItem
Definition: tracedata.h:980
QMenu::addAction
void addAction(QAction *action)
TraceItemView::addGoMenu
void addGoMenu(QMenu *)
Definition: traceitemview.cpp:471
QWidget::mapToGlobal
QPoint mapToGlobal(const QPoint &pos) const
ConfigGroup::setValue
virtual void setValue(const QString &key, const QVariant &value, const QVariant &defaultValue=QVariant())
Definition: config.cpp:57
TreeMapItem::rtti
virtual int rtti() const
Definition: treemap.cpp:1084
QVariant::value
T value() const
ProfileContext::PartFile
Definition: context.h:48
partgraph.h
CostItem
Base class for cost items.
Definition: costitem.h:37
config.h
DEFAULT_ALLOWROTATION
#define DEFAULT_ALLOWROTATION
Definition: partselection.cpp:50
PartAreaWidget::visualization
VisualizationMode visualization() const
Definition: partgraph.h:52
PartSelection::currentChangedSlot
void currentChangedSlot(TreeMapItem *, bool)
Definition: partselection.cpp:231
QPoint
PartSelection::partsUnhideAll
void partsUnhideAll()
TraceData::activePartRange
QString activePartRange()
Definition: tracedata.cpp:3280
PartAreaWidget::Partitioning
Definition: partgraph.h:37
TreeMapWidget::setFieldVisible
void setFieldVisible(int, bool)
Should the text with number textNo be visible? This is only done if remaining space is enough to allo...
Definition: treemap.cpp:1404
QObject::tr
QString tr(const char *sourceText, const char *disambiguation, int n)
TracePart::part
virtual TracePart * part()
Definition: tracedata.h:661
TraceItemView::_groupType
ProfileContext::Type _groupType
Definition: traceitemview.h:213
PartSelection::hiddenPartsChangedSlot
void hiddenPartsChangedSlot(const TracePartList &list)
Definition: partselection.cpp:478
TreeMapWidget::fieldForced
bool fieldForced(int) const
Definition: treemap.cpp:1434
TreeMapWidget::isSelected
bool isSelected(TreeMapItem *i) const
Definition: treemap.cpp:1722
ConfigStorage::group
static ConfigGroup * group(const QString &group, const QString &optSuffix=QString())
Definition: config.cpp:80
TraceItemView
Abstract Base Class for KCachegrind Views.
Definition: traceitemview.h:70
TraceItemView::setData
virtual void setData(TraceData *d)
Definition: traceitemview.cpp:169
PartSelection::restoreOptions
void restoreOptions(const QString &prefix, const QString &postfix)
Definition: partselection.cpp:483
TreeMapWidget::setTransparent
void setTransparent(int d, bool b)
Definition: treemap.cpp:1273
TraceData::parts
TracePartList parts() const
Definition: tracedata.h:1397
PartSelection::itemSelected
void itemSelected()
Definition: partselection.cpp:321
ProfileContext::PartFunction
Definition: context.h:46
TraceItemView::_eventType
EventType * _eventType
Definition: traceitemview.h:212
TraceItemView::partsChanged
Definition: traceitemview.h:84
TreeMapItem::parent
TreeMapItem * parent() const
Parent Item.
Definition: treemap.h:285
PartSelection::showInfo
void showInfo(bool)
Definition: partselection.cpp:556
ProfileCostArray
An array of basic cost metrics for a trace item.
Definition: costitem.h:144
DEFAULT_FUNCTIONZOOM
#define DEFAULT_FUNCTIONZOOM
Definition: partselection.cpp:45
QBoxLayout::addWidget
void addWidget(QWidget *widget, int stretch, QFlags< Qt::AlignmentFlag > alignment)
QList::count
int count(const T &value) const
toplevelbase.h
QList::append
void append(const T &value)
PartSelection::PartSelection
PartSelection(TopLevelBase *, QWidget *parent=0)
Definition: partselection.cpp:52
TreeMapWidget::setAllowRotation
void setAllowRotation(bool)
Do we allow the texts to be rotated by 90 degrees for better fitting?
Definition: treemap.cpp:1281
QVariant::toInt
int toInt(bool *ok) const
TracePartClass
Cost of a class, from a single trace file.
Definition: tracedata.h:607
TreeMapWidget::fieldVisible
bool fieldVisible(int) const
Definition: treemap.cpp:1415
TreeMapWidget::setMaxSelectDepth
void setMaxSelectDepth(int d)
Set the maximal depth a selected item can have.
Definition: treemap.h:486
TopLevelBase
Definition: toplevelbase.h:34
PartAreaWidget::setCallLevels
void setCallLevels(int callLevels)
Definition: partgraph.cpp:84
QString::isEmpty
bool isEmpty() const
TreeMapWidget::possibleSelection
TreeMapItem * possibleSelection(TreeMapItem *) const
Returns the item possible for selection.
Definition: treemap.cpp:1593
StoredDrawParams::text
QString text(int) const
Definition: treemap.cpp:79
QVBoxLayout
TreeMapWidget::setVisibleWidth
void setVisibleWidth(int width, bool reuseSpace=false)
Items usually have a size proportional to their value().
Definition: treemap.cpp:1289
QList::first
T & first()
TraceItemView::_activeItem
CostItem * _activeItem
Definition: traceitemview.h:211
QLabel::setText
void setText(const QString &)
QMenu::addSeparator
QAction * addSeparator()
QString
QList< TracePart * >
QWidget::hide
void hide()
PartAreaWidget::setZoomFunction
void setZoomFunction(bool zoomFunction)
Definition: partgraph.cpp:78
TreeMapWidget::setFieldType
void setFieldType(int, const QString &)
Set the type name of a field.
Definition: treemap.cpp:1373
PartSelection::whatsThis
QString whatsThis() const
Definition: partselection.cpp:104
PartAreaWidget
Definition: partgraph.h:31
QLayout::setMargin
void setMargin(int margin)
GlobalConfig::shortenSymbol
static QString shortenSymbol(const QString &)
Definition: globalconfig.cpp:395
QMenu::exec
QAction * exec()
ConfigGroup
A group of configuration settings.
Definition: config.h:35
TracePartFunction
Cost of a function, from a single trace file.
Definition: tracedata.h:543
QWidget::setSizePolicy
void setSizePolicy(QSizePolicy)
PartAreaWidget::changeHidden
void changeHidden(const TracePartList &list)
Definition: partgraph.cpp:57
TraceItemView::eventTypeChanged
Definition: traceitemview.h:81
TreeMapWidget::redraw
void redraw(TreeMapItem *)
Redraws an item with all children.
Definition: treemap.cpp:2231
QAction::setData
void setData(const QVariant &userData)
QMenu
PartSelection::saveOptions
void saveOptions(const QString &prefix, const QString &postfix)
Definition: partselection.cpp:525
TreeMapItem::children
virtual TreeMapItemList * children()
Definition: treemap.cpp:1089
DEFAULT_CALLEELEVELS
#define DEFAULT_CALLEELEVELS
Definition: partselection.cpp:46
TraceItemView::activated
virtual void activated(TraceItemView *sender, CostItem *)
Definition: traceitemview.cpp:347
QList::contains
bool contains(const T &value) const
QVariant::fromValue
QVariant fromValue(const T &value)
QAction::setCheckable
void setCheckable(bool)
DEFAULT_PARTITIONMODE
#define DEFAULT_PARTITIONMODE
Definition: partselection.cpp:41
PartSelection::selectionChanged
void selectionChanged()
Definition: partselection.cpp:284
PartAreaWidget::callLevels
int callLevels() const
Definition: partgraph.h:54
PartAreaWidget::setEventType
void setEventType(EventType *ct)
Definition: partgraph.cpp:64
DEFAULT_DIAGRAMMODE
#define DEFAULT_DIAGRAMMODE
Definition: partselection.cpp:42
TracePart::timeframe
QString timeframe() const
Definition: tracedata.h:670
SubPartItem
Definition: partgraph.h:113
PartAreaWidget::setVisualization
void setVisualization(VisualizationMode)
Definition: partgraph.cpp:72
TreeMapWidget::setRangeSelection
void setRangeSelection(TreeMapItem *i1, TreeMapItem *i2, bool selected)
Selects or unselects items in a range.
Definition: treemap.cpp:1764
TreeMapWidget::Extended
Definition: treemap.h:401
TracePart
A Trace Part: All data read from a trace file, containing all costs that happened in a specified time...
Definition: tracedata.h:655
QWidget::setWhatsThis
void setWhatsThis(const QString &)
DEFAULT_DRAWCOST
#define DEFAULT_DRAWCOST
Definition: partselection.cpp:48
PartAreaWidget::Inclusive
Definition: partgraph.h:37
TraceItemView::activeItemChanged
Definition: traceitemview.h:85
ProfileContext::Type
Type
Definition: context.h:36
DEFAULT_DRAWNAME
#define DEFAULT_DRAWNAME
Definition: partselection.cpp:47
TracePart::version
QString version() const
Definition: tracedata.h:671
QMenu::addMenu
QAction * addMenu(QMenu *menu)
TracePartFile
Cost of a source file, from a single trace file.
Definition: tracedata.h:624
QWidget::setWindowTitle
void setWindowTitle(const QString &)
QAction
ProfileContext::PartObject
Definition: context.h:49
QList::last
T & last()
TraceItemView::groupTypeChanged
Definition: traceitemview.h:83
QWidget::setMinimumHeight
void setMinimumHeight(int minh)
QVariant::toBool
bool toBool() const
PartItem
Definition: partgraph.h:94
TopLevelBase::showMessage
virtual void showMessage(const QString &, int msec)=0
PartAreaWidget::zoomFunction
bool zoomFunction() const
Definition: partgraph.h:53
DEFAULT_SHOWINFO
#define DEFAULT_SHOWINFO
Definition: partselection.cpp:44
TraceItemView::eventType2Changed
Definition: traceitemview.h:82
QWidget::show
void show()
DEFAULT_FORCESTRINGS
#define DEFAULT_FORCESTRINGS
Definition: partselection.cpp:49
TraceData
This class holds profiling data of multiple tracefiles generated with cachegrind on one command...
Definition: tracedata.h:1363
TreeMapWidget::drawFrame
void drawFrame(int d, bool b)
Definition: treemap.cpp:1265
QObject::connect
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
QLabel
TreeMapItem
Base class of items in TreeMap.
Definition: treemap.h:220
TraceItemView::_partList
TracePartList _partList
Definition: traceitemview.h:210
QString::arg
QString arg(qlonglong a, int fieldWidth, int base, const QChar &fillChar) const
QVariant::toString
QString toString() const
QLabel::setWordWrap
void setWordWrap(bool on)
QAction::setEnabled
void setEnabled(bool)
DEFAULT_DRAWFRAMES
#define DEFAULT_DRAWFRAMES
Definition: partselection.cpp:43
partselection.h
QBoxLayout::setSpacing
void setSpacing(int spacing)
TreeMapWidget::setSelectionMode
void setSelectionMode(SelectionMode m)
Definition: treemap.h:489
TreeMapWidget::setFieldForced
void setFieldForced(int, bool)
Should the drawing of the name into the rectangle be forced? This enables drawing of the name before ...
Definition: treemap.cpp:1423
PartSelection::contextMenuRequested
void contextMenuRequested(TreeMapItem *, const QPoint &)
Definition: partselection.cpp:328
TreeMapItem::HAlternate
Definition: treemap.h:237
TreeMapItemList
Definition: treemap.h:201
TracePartObject
Cost of a object, from a single trace file.
Definition: tracedata.h:639
ProfileContext::Function
Definition: context.h:46
PartSelection::setData
void setData(TraceData *)
Definition: partselection.cpp:130
ProfileContext::InvalidType
Definition: context.h:37
ConfigGroup::value
virtual QVariant value(const QString &key, const QVariant &defaultValue) const
Definition: config.cpp:60
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:39:50 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kcachegrind

Skip menu "kcachegrind"
  • Main Page
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members

kdesdk API Reference

Skip menu "kdesdk API Reference"
  • kapptemplate
  • kcachegrind
  • kompare
  • lokalize
  • umbrello
  •   umbrello

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal