]> git.sur5r.net Git - bacula/bacula/blob - bacula/src/qt-console/restore/restore.h
Have m_dtformat be a member of mainwin only. m_dtformat is a QString which is
[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 enum {
44    R_NONE,
45    R_JOBIDLIST,
46    R_JOBDATETIME
47 };
48
49 /*
50  * The pre-restore dialog selects the Job/Client to be restored
51  * It really could use considerable enhancement.
52  */
53 class prerestorePage : public Pages, public Ui::prerestoreForm
54 {
55    Q_OBJECT 
56
57 public:
58    prerestorePage();
59    prerestorePage(QString &data, unsigned int);
60
61 private slots:
62    void okButtonPushed();
63    void cancelButtonPushed();
64    void job_name_change(int index);
65    void recentChanged(int);
66    void jobRadioClicked(bool);
67    void jobidsRadioClicked(bool);
68    void jobIdEditFinished();
69
70 private:
71    int jobdefsFromJob(QStringList &, QString &);
72    void buildPage();
73    bool checkJobIdList();
74    QString m_dataIn;
75    unsigned int m_dataInType;
76 };
77
78 /*  
79  * The restore dialog is brought up once we are in the Bacula
80  * restore tree routines.  It handles putting up a GUI tree
81  * representation of the files to be restored.
82  */
83 class restorePage : public Pages, public Ui::restoreForm
84 {
85    Q_OBJECT 
86
87 public:
88    restorePage();
89    void fillDirectory();
90    char *get_cwd();
91    bool cwd(const char *);
92
93 private slots:
94    void okButtonPushed();
95    void cancelButtonPushed();
96    void fileDoubleClicked(QTreeWidgetItem *item, int column);
97    void directoryItemChanged(QTreeWidgetItem *, QTreeWidgetItem *);
98    void upButtonPushed();
99    void unmarkButtonPushed();
100    void markButtonPushed();
101    void addDirectory(QString &);
102
103 private:
104    QString m_cwd;
105    QHash<QString, QTreeWidgetItem *> m_dirPaths;
106    QHash<QTreeWidgetItem *,QString> m_dirTreeItems;
107 };
108
109
110 class bRestore : public Pages, public Ui::bRestoreForm
111 {
112    Q_OBJECT 
113
114 public:
115    bRestore();
116    ~bRestore();
117
118 public slots:
119
120 private:
121
122 };
123
124 #endif /* _RESTORE_H_ */