1 | /******************************************************************* |
2 | * reportassistantpage.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 REPORTASSISTANTPAGE__H |
21 | #define REPORTASSISTANTPAGE__H |
22 | |
23 | #include <QWidget> |
24 | |
25 | #include "reportassistantdialog.h" |
26 | |
27 | class BugzillaManager; |
28 | |
29 | /** BASE interface which implements some signals, and |
30 | ** aboutTo(Show|Hide) functions (also reimplements QWizard behaviour) **/ |
31 | class ReportAssistantPage: public QWidget |
32 | { |
33 | Q_OBJECT |
34 | |
35 | public: |
36 | explicit ReportAssistantPage(ReportAssistantDialog * parent); |
37 | |
38 | /** Load the widget data if empty **/ |
39 | virtual void aboutToShow() {} |
40 | /** Save the widget data **/ |
41 | virtual void aboutToHide() {} |
42 | /** Tells the KAssistantDialog to enable the Next button **/ |
43 | virtual bool isComplete(); |
44 | |
45 | /** Last time checks to see if you can turn the page **/ |
46 | virtual bool showNextPage(); |
47 | |
48 | ReportInterface *reportInterface() const; |
49 | BugzillaManager *bugzillaManager() const; |
50 | ReportAssistantDialog * assistant() const; |
51 | |
52 | public Q_SLOTS: |
53 | void emitCompleteChanged(); |
54 | |
55 | Q_SIGNALS: |
56 | /** Tells the KAssistantDialog that the isComplete function changed value **/ |
57 | void completeChanged(ReportAssistantPage*, bool); |
58 | |
59 | private: |
60 | ReportAssistantDialog * const m_assistant; |
61 | }; |
62 | |
63 | #endif |
64 | |