File indexing completed on 2024-04-28 05:41:36
0001 /* 0002 This file is part of KCachegrind. 0003 0004 SPDX-FileCopyrightText: 2003-2016 Josef Weidendorfer <Josef.Weidendorfer@gmx.de> 0005 0006 SPDX-License-Identifier: GPL-2.0-only 0007 */ 0008 0009 /* 0010 * Items of stack dockable. 0011 */ 0012 0013 #ifndef STACKITEM_H 0014 #define STACKITEM_H 0015 0016 #include <QTreeWidget> 0017 0018 #include "tracedata.h" 0019 0020 class StackSelection; 0021 0022 0023 // for the stack browser 0024 0025 class StackItem: public QTreeWidgetItem 0026 { 0027 public: 0028 // for top 0029 StackItem(StackSelection* ss, QTreeWidget* parent, TraceFunction* f); 0030 StackItem(StackSelection* ss, QTreeWidget* parent, TraceCall* c); 0031 0032 TraceFunction* function() { return _function; } 0033 TraceCall* call() { return _call; } 0034 void updateGroup(); 0035 void updateCost(); 0036 0037 private: 0038 StackSelection* _view; 0039 SubCost _sum; 0040 TraceFunction* _function; 0041 TraceCall* _call; 0042 }; 0043 0044 #endif // STACKITEM_H