File indexing completed on 2024-05-12 04:37:36

0001 /*
0002     SPDX-FileCopyrightText: 1999 John Birch <jbb@kdevelop.org>
0003     SPDX-FileCopyrightText: 2007 Hamish Rodda <rodda@kde.org>
0004     SPDX-FileCopyrightText: 2009 Niko Sams <niko.sams@gmail.com>
0005 
0006     SPDX-License-Identifier: GPL-2.0-or-later
0007 */
0008 
0009 #ifndef KDEVPLATFORM_FRAMESTACKWIDGET_H
0010 #define KDEVPLATFORM_FRAMESTACKWIDGET_H
0011 
0012 #include <debugger/debuggerexport.h>
0013 #include <debugger/interfaces/idebugsession.h>
0014 #include <util/autoorientedsplitter.h>
0015 
0016 class QMenu;
0017 class QTreeView;
0018 class QModelIndex;
0019 class QListView;
0020 
0021 namespace KDevelop {
0022 class IDebugController;
0023 
0024 class KDEVPLATFORMDEBUGGER_EXPORT FramestackWidget : public AutoOrientedSplitter
0025 {
0026     Q_OBJECT
0027     public:
0028         explicit FramestackWidget( IDebugController* controller, QWidget *parent=nullptr );
0029         ~FramestackWidget() override;
0030     Q_SIGNALS:
0031         void requestRaise();
0032     private Q_SLOTS:
0033         void currentSessionChanged(KDevelop::IDebugSession* session);
0034 
0035         void setThreadShown(const QModelIndex& current);
0036         void checkFetchMoreFrames();
0037         void currentThreadChanged(int);
0038         void currentFrameChanged(int);
0039         void frameSelectionChanged(const QModelIndex& current);
0040         void frameContextMenuRequested(const QPoint &pos);
0041         void copySelection();
0042         void selectAll();
0043         void sessionStateChanged(KDevelop::IDebugSession::DebuggerState state);
0044 
0045     private:
0046         IDebugSession *m_session;
0047         QListView *m_threadsListView;
0048         QWidget *m_threadsWidget;
0049         QTreeView *m_framesTreeView;
0050         QMenu *m_framesContextMenu;
0051 };
0052 
0053 }
0054 
0055 #endif // KDEVPLATFORM_FRAMESTACKWIDGET_H