1/*******************************************************************
2* drkonqidialog.h
3* Copyright 2009 Dario Andres Rodriguez <andresbajotierra@gmail.com>
4*
5* This program is free software; you can redistribute it and/or
6* modify it under the terms of the GNU General Public License as
7* published by the Free Software Foundation; either version 2 of
8* the License, or (at your option) any later version.
9*
10* This program is distributed in the hope that it will be useful,
11* but WITHOUT ANY WARRANTY; without even the implied warranty of
12* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13* GNU General Public License for more details.
14*
15* You should have received a copy of the GNU General Public License
16* along with this program. If not, see <http://www.gnu.org/licenses/>.
17*
18******************************************************************/
19
20#ifndef DRKONQIDIALOG__H
21#define DRKONQIDIALOG__H
22
23#include <QtCore/QPointer>
24#include <QtCore/QHash>
25
26#include <KDialog>
27
28#include "ui_maindialog.h"
29
30class BacktraceWidget;
31class AboutBugReportingDialog;
32class KTabWidget;
33class AbstractDebuggerLauncher;
34class KMenu;
35
36class DrKonqiDialog: public KDialog
37{
38 Q_OBJECT
39
40public:
41 explicit DrKonqiDialog(QWidget * parent = 0);
42 ~DrKonqiDialog();
43
44private Q_SLOTS:
45 void linkActivated(const QString&);
46 void startBugReportAssistant();
47
48 void applicationRestarted(bool success);
49
50 void addDebugger(AbstractDebuggerLauncher *launcher);
51 void removeDebugger(AbstractDebuggerLauncher *launcher);
52 void enableDebugMenu(bool);
53
54 //GUI
55 void buildIntroWidget();
56 void buildDialogButtons();
57
58 void tabIndexChanged(int);
59
60private:
61 void showAboutBugReporting();
62
63 KTabWidget * m_tabWidget;
64
65 QPointer<AboutBugReportingDialog> m_aboutBugReportingDialog;
66
67 QWidget * m_introWidget;
68 Ui::MainWidget ui;
69
70 BacktraceWidget * m_backtraceWidget;
71
72 KMenu *m_debugMenu;
73 QHash<AbstractDebuggerLauncher*, QAction*> m_debugMenuActions;
74};
75
76#endif
77