File indexing completed on 2024-04-28 05:41:37

0001 /*
0002     This file is part of KCachegrind.
0003 
0004     SPDX-FileCopyrightText: 2008-2016 Josef Weidendorfer <Josef.Weidendorfer@gmx.de>
0005 
0006     SPDX-License-Identifier: GPL-2.0-only
0007 */
0008 
0009 /*
0010  * Abstract base class for top level windows
0011  * - provides services from the top level main window such as action
0012  *   bindings for popup menus
0013  * - consumes changes to visualization state
0014  */
0015 
0016 #ifndef TOPLEVELBASE_H
0017 #define TOPLEVELBASE_H
0018 
0019 #include "tracedata.h"
0020 #include "traceitemview.h"
0021 
0022 class QMenu;
0023 
0024 class TopLevelBase
0025 {
0026 public:
0027     virtual ~TopLevelBase();
0028 
0029     /* notify about changes in the visualization state from profile views */
0030     virtual void activePartsChangedSlot(const TracePartList& list) = 0;
0031     virtual void setTraceItemDelayed(CostItem*) = 0;
0032     virtual void setEventTypeDelayed(EventType*) = 0;
0033     virtual void setEventType2Delayed(EventType*) = 0;
0034     virtual void setGroupTypeDelayed(ProfileContext::Type) = 0;
0035     virtual void setGroupDelayed(TraceCostItem*) = 0;
0036     virtual void setDirectionDelayed(TraceItemView::Direction) = 0;
0037     virtual void configChanged() = 0;
0038 
0039     virtual TracePartList hiddenParts() = 0;
0040 
0041     virtual void addEventTypeMenu(QMenu*,bool) = 0;
0042     virtual void addGoMenu(QMenu*) = 0;
0043     virtual void showMessage(const QString&, int msec) = 0;
0044 };
0045 
0046 #endif // TOPLEVELBASE_H