1 | /******************************************************************* |
---|---|
2 | * backtracewidget.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 BACKTRACEWIDGET__H |
21 | #define BACKTRACEWIDGET__H |
22 | |
23 | #include <QWidget> |
24 | |
25 | #include "debugpackageinstaller.h" |
26 | #include "ui_backtracewidget.h" |
27 | |
28 | class QSyntaxHighlighter; |
29 | class BacktraceRatingWidget; |
30 | class BacktraceGenerator; |
31 | |
32 | class BacktraceWidget: public QWidget |
33 | { |
34 | Q_OBJECT |
35 | |
36 | public: |
37 | explicit BacktraceWidget(BacktraceGenerator *generator, QWidget *parent = 0, |
38 | bool showToggleBacktrace = false); |
39 | |
40 | bool canInstallDebugPackages() const; |
41 | |
42 | public Q_SLOTS: |
43 | void generateBacktrace(); |
44 | void hilightExtraDetailsLabel(bool hilight); |
45 | void focusImproveBacktraceButton(); |
46 | |
47 | void toggleBacktrace(bool show); |
48 | void extraDetailsLinkActivated(QString link); |
49 | |
50 | Q_SIGNALS: |
51 | void stateChanged(); |
52 | |
53 | private: |
54 | BacktraceGenerator * m_btGenerator; |
55 | Ui::Form ui; |
56 | BacktraceRatingWidget * m_backtraceRatingWidget; |
57 | QSyntaxHighlighter *m_highlighter; |
58 | DebugPackageInstaller * m_debugPackageInstaller; |
59 | |
60 | void setAsLoading(); |
61 | |
62 | private Q_SLOTS: |
63 | void loadData(); |
64 | void backtraceNewLine(const QString &); |
65 | |
66 | void regenerateBacktrace(); |
67 | |
68 | void saveClicked(); |
69 | void copyClicked(); |
70 | |
71 | void anotherDebuggerRunning(); |
72 | |
73 | void installDebugPackages(); |
74 | void debugPackageError(const QString &); |
75 | void debugPackageCanceled(); |
76 | }; |
77 | |
78 | #endif |
79 |