File indexing completed on 2024-04-21 16:12:22

0001 /*******************************************************************
0002  * drkonqidialog.h
0003  * SPDX-FileCopyrightText: 2009 Dario Andres Rodriguez <andresbajotierra@gmail.com>
0004  * SPDX-FileCopyrightText: 2022 Harald Sitter <sitter@kde.org>
0005  *
0006  * SPDX-License-Identifier: GPL-2.0-or-later
0007  *
0008  ******************************************************************/
0009 
0010 #ifndef DRKONQIDIALOG__H
0011 #define DRKONQIDIALOG__H
0012 
0013 #include <QHash>
0014 #include <QPointer>
0015 
0016 #include <QDialog>
0017 
0018 #include "ui_maindialog.h"
0019 
0020 class BacktraceWidget;
0021 class QTabWidget;
0022 class AbstractDebuggerLauncher;
0023 class QDialogButtonBox;
0024 class QMenu;
0025 
0026 class DrKonqiDialog : public QDialog
0027 {
0028     Q_OBJECT
0029 
0030 public:
0031     explicit DrKonqiDialog(QWidget *parent = nullptr);
0032     ~DrKonqiDialog() override;
0033 
0034     void show();
0035 
0036 private Q_SLOTS:
0037     void linkActivated(const QString &);
0038 
0039     void applicationRestarted(bool success);
0040 
0041     void addDebugger(AbstractDebuggerLauncher *launcher);
0042     void removeDebugger(AbstractDebuggerLauncher *launcher);
0043     void enableDebugMenu(bool);
0044 
0045     // GUI
0046     void buildIntroWidget();
0047     void buildDialogButtons();
0048 
0049     void tabIndexChanged(int);
0050 
0051 private:
0052     QTabWidget *m_tabWidget = nullptr;
0053 
0054     QWidget *m_introWidget = nullptr;
0055     Ui::MainWidget ui;
0056 
0057     BacktraceWidget *m_backtraceWidget = nullptr;
0058 
0059     QMenu *m_debugMenu = nullptr;
0060     QHash<AbstractDebuggerLauncher *, QAction *> m_debugMenuActions;
0061     QDialogButtonBox *m_buttonBox = nullptr;
0062     QPushButton *m_debugButton = nullptr;
0063     QPushButton *m_restartButton = nullptr;
0064     bool m_debugButtonInBox = false;
0065 };
0066 
0067 #endif