1 | /******************************************************************* |
2 | * reportassistantpages_base.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 REPORTASSISTANTPAGES__BASE__H |
21 | #define REPORTASSISTANTPAGES__BASE__H |
22 | |
23 | #include <QtCore/QPointer> |
24 | |
25 | #include "reportassistantdialog.h" |
26 | #include "reportassistantpage.h" |
27 | |
28 | #include "ui_assistantpage_introduction.h" |
29 | #include "ui_assistantpage_bugawareness.h" |
30 | #include "ui_assistantpage_conclusions.h" |
31 | #include "ui_assistantpage_conclusions_dialog.h" |
32 | |
33 | class BacktraceWidget; |
34 | |
35 | /** Introduction page **/ |
36 | class IntroductionPage: public ReportAssistantPage |
37 | { |
38 | Q_OBJECT |
39 | |
40 | public: |
41 | explicit IntroductionPage(ReportAssistantDialog *); |
42 | |
43 | private: |
44 | Ui::AssistantPageIntroduction ui; |
45 | }; |
46 | |
47 | /** Backtrace page **/ |
48 | class CrashInformationPage: public ReportAssistantPage |
49 | { |
50 | Q_OBJECT |
51 | |
52 | public: |
53 | explicit CrashInformationPage(ReportAssistantDialog *); |
54 | |
55 | void aboutToShow(); |
56 | void aboutToHide(); |
57 | bool isComplete(); |
58 | bool showNextPage(); |
59 | |
60 | private: |
61 | BacktraceWidget * m_backtraceWidget; |
62 | }; |
63 | |
64 | /** Bug Awareness page **/ |
65 | class BugAwarenessPage: public ReportAssistantPage |
66 | { |
67 | Q_OBJECT |
68 | |
69 | public: |
70 | explicit BugAwarenessPage(ReportAssistantDialog *); |
71 | |
72 | void aboutToShow(); |
73 | void aboutToHide(); |
74 | |
75 | private Q_SLOTS: |
76 | void showApplicationDetailsExamples(); |
77 | |
78 | void updateCheckBoxes(); |
79 | |
80 | private: |
81 | Ui::AssistantPageBugAwareness ui; |
82 | }; |
83 | |
84 | /** Conclusions page **/ |
85 | class ConclusionPage : public ReportAssistantPage |
86 | { |
87 | Q_OBJECT |
88 | |
89 | public: |
90 | explicit ConclusionPage(ReportAssistantDialog *); |
91 | |
92 | void aboutToShow(); |
93 | void aboutToHide(); |
94 | |
95 | bool isComplete(); |
96 | |
97 | private Q_SLOTS: |
98 | void finishClicked(); |
99 | |
100 | void openReportInformation(); |
101 | |
102 | private: |
103 | Ui::AssistantPageConclusions ui; |
104 | |
105 | QPointer<KDialog> m_infoDialog; |
106 | |
107 | bool m_isBKO; |
108 | bool m_needToReport; |
109 | |
110 | Q_SIGNALS: |
111 | void finished(bool); |
112 | }; |
113 | |
114 | class ReportInformationDialog : public KDialog |
115 | { |
116 | Q_OBJECT |
117 | public: |
118 | explicit ReportInformationDialog(const QString & reportText); |
119 | ~ReportInformationDialog(); |
120 | |
121 | private Q_SLOTS: |
122 | void saveReport(); |
123 | |
124 | private: |
125 | Ui::AssistantPageConclusionsDialog ui; |
126 | }; |
127 | |
128 | #endif |
129 | |