1 /*
2     This file is part of KCachegrind.
3 
4     SPDX-FileCopyrightText: 2003-2016 Josef Weidendorfer <Josef.Weidendorfer@gmx.de>
5 
6     SPDX-License-Identifier: GPL-2.0-only
7 */
8 
9 /*
10  * Items of stack dockable.
11  */
12 
13 #ifndef STACKITEM_H
14 #define STACKITEM_H
15 
16 #include <QTreeWidget>
17 
18 #include "tracedata.h"
19 
20 class StackSelection;
21 
22 
23 // for the stack browser
24 
25 class StackItem: public QTreeWidgetItem
26 {
27 public:
28     // for top
29     StackItem(StackSelection* ss, QTreeWidget* parent, TraceFunction* f);
30     StackItem(StackSelection* ss, QTreeWidget* parent, TraceCall* c);
31 
function()32     TraceFunction* function() { return _function; }
call()33     TraceCall* call() { return _call; }
34     void updateGroup();
35     void updateCost();
36 
37 private:
38     StackSelection* _view;
39     SubCost _sum;
40     TraceFunction* _function;
41     TraceCall* _call;
42 };
43 
44 #endif // STACKITEM_H
45