1/*******************************************************************
2* reportassistantdialog.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 REPORTASSISTANTDIALOG__H
21#define REPORTASSISTANTDIALOG__H
22
23#include <QtCore/QPointer>
24
25#include <KAssistantDialog>
26
27class ReportAssistantPage;
28class AboutBugReportingDialog;
29class ReportInterface;
30class QCloseEvent;
31
32class ReportAssistantDialog: public KAssistantDialog
33{
34 Q_OBJECT
35
36public:
37 explicit ReportAssistantDialog(QWidget * parent = 0);
38 ~ReportAssistantDialog();
39
40 ReportInterface *reportInterface() const {
41 return m_reportInterface;
42 }
43
44private Q_SLOTS:
45 void currentPageChanged_slot(KPageWidgetItem *, KPageWidgetItem *);
46
47 void completeChanged(ReportAssistantPage*, bool);
48
49 void loginFinished();
50
51 void assistantFinished(bool);
52
53 void enableNextButton(bool);
54
55 void showHelp();
56
57 void next();
58 void back();
59
60 //Override default reject method
61 void reject();
62
63private:
64 void connectSignals(ReportAssistantPage *);
65 void closeEvent(QCloseEvent*);
66
67 QHash<QLatin1String, KPageWidgetItem*> m_pageWidgetMap;
68
69 QPointer<AboutBugReportingDialog> m_aboutBugReportingDialog;
70 ReportInterface * m_reportInterface;
71
72 bool m_canClose;
73};
74
75#endif
76