]> git.sur5r.net Git - bacula/bacula/blob - bacula/src/qt-console/restore/restore.h
Addressed issue of long compiles. Simplify with Pages::setCurrent
[bacula/bacula] / bacula / src / qt-console / restore / restore.h
1 #ifndef _RESTORE_H_
2 #define _RESTORE_H_
3
4 /*
5    Bacula® - The Network Backup Solution
6
7    Copyright (C) 2007-2007 Free Software Foundation Europe e.V.
8
9    The main author of Bacula is Kern Sibbald, with contributions from
10    many others, a complete list can be found in the file AUTHORS.
11    This program is Free Software; you can redistribute it and/or
12    modify it under the terms of version two of the GNU General Public
13    License as published by the Free Software Foundation plus additions
14    that are listed in the file LICENSE.
15
16    This program is distributed in the hope that it will be useful, but
17    WITHOUT ANY WARRANTY; without even the implied warranty of
18    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19    General Public License for more details.
20
21    You should have received a copy of the GNU General Public License
22    along with this program; if not, write to the Free Software
23    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
24    02110-1301, USA.
25
26    Bacula® is a registered trademark of John Walker.
27    The licensor of Bacula is the Free Software Foundation Europe
28    (FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zürich,
29    Switzerland, email:ftf@fsfeurope.org.
30 */
31 /*
32  *   Version $Id$
33  *
34  *  Kern Sibbald, February 2007
35  */
36
37 #include <QtGui>
38 #include "pages.h"
39 #include "ui_brestore.h"
40 #include "ui_restore.h"
41 #include "ui_prerestore.h"
42
43 class Console;
44
45 /*
46  * The pre-restore dialog selects the Job/Client to be restored
47  * It really could use considerable enhancement.
48  */
49 class prerestorePage : public Pages, public Ui::prerestoreForm
50 {
51    Q_OBJECT 
52
53 public:
54    prerestorePage(Console *parent);
55
56 private slots:
57    void okButtonPushed();
58    void cancelButtonPushed();
59    void job_name_change(int index);
60
61 private:
62 };
63
64 /*  
65  * The restore dialog is brought up once we are in the Bacula
66  * restore tree routines.  It handles putting up a GUI tree
67  * representation of the files to be restored.
68  */
69 class restorePage : public Pages, public Ui::restoreForm
70 {
71    Q_OBJECT 
72
73 public:
74    restorePage(Console *parent);
75    void fillDirectory();
76    char *get_cwd();
77    bool cwd(const char *);
78
79 private slots:
80    void okButtonPushed();
81    void cancelButtonPushed();
82    void fileDoubleClicked(QTreeWidgetItem *item, int column);
83    void directoryItemChanged(QTreeWidgetItem *, QTreeWidgetItem *);
84    void upButtonPushed();
85    void unmarkButtonPushed();
86    void markButtonPushed();
87    void addDirectory(QString &);
88
89 private:
90    QString m_cwd;
91    QHash<QString, QTreeWidgetItem *> m_dirPaths;
92    QHash<QTreeWidgetItem *,QString> m_dirTreeItems;
93 };
94
95
96 class bRestore : public Pages, public Ui::bRestoreForm
97 {
98    Q_OBJECT 
99
100 public:
101    bRestore();
102    ~bRestore();
103
104 public slots:
105
106 private:
107
108 };
109
110 #endif /* _RESTORE_H_ */