5 Bacula® - The Network Backup Solution
7 Copyright (C) 2007-2007 Free Software Foundation Europe e.V.
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 three of the GNU Affero General Public
13 License as published by the Free Software Foundation and included
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.
21 You should have received a copy of the GNU Affero 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
26 Bacula® is a registered trademark of Kern Sibbald.
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.
34 * Kern Sibbald, February 2007
39 #include "ui_runrestore.h"
41 class bRestoreTable : public QTableWidget
45 QPoint dragStartPosition;
47 bRestoreTable(QWidget *parent)
48 : QTableWidget(parent)
51 void mousePressEvent(QMouseEvent *event);
52 void mouseMoveEvent(QMouseEvent *event);
54 void dragEnterEvent(QDragEnterEvent *event);
55 void dragMoveEvent(QDragMoveEvent *event);
56 void dropEvent(QDropEvent *event);
59 #include "ui_brestore.h"
60 #include "ui_restore.h"
61 #include "ui_prerestore.h"
70 * The pre-restore dialog selects the Job/Client to be restored
71 * It really could use considerable enhancement.
73 class prerestorePage : public Pages, public Ui::prerestoreForm
79 prerestorePage(QString &data, unsigned int);
82 void okButtonPushed();
83 void cancelButtonPushed();
84 void job_name_change(int index);
85 void recentChanged(int);
86 void jobRadioClicked(bool);
87 void jobidsRadioClicked(bool);
88 void jobIdEditFinished();
92 int jobdefsFromJob(QStringList &, QString &);
94 bool checkJobIdList();
96 unsigned int m_dataInType;
100 * The restore dialog is brought up once we are in the Bacula
101 * restore tree routines. It handles putting up a GUI tree
102 * representation of the files to be restored.
104 class restorePage : public Pages, public Ui::restoreForm
109 restorePage(int conn);
111 void fillDirectory();
113 bool cwd(const char *);
116 void okButtonPushed();
117 void cancelButtonPushed();
118 void fileDoubleClicked(QTreeWidgetItem *item, int column);
119 void directoryItemChanged(QTreeWidgetItem *, QTreeWidgetItem *);
120 void upButtonPushed();
121 void unmarkButtonPushed();
122 void markButtonPushed();
123 void addDirectory(QString &);
127 void writeSettings();
130 QHash<QString, QTreeWidgetItem *> m_dirPaths;
131 QHash<QTreeWidgetItem *,QString> m_dirTreeItems;
136 class bRestore : public Pages, public Ui::bRestoreForm
143 void PgSeltreeWidgetClicked();
146 void get_info_from_selection(QStringList &fileids, QStringList &jobids,
147 QStringList &dirids, QStringList &fileindexes);
152 void showInfoForFile(QTableWidgetItem *);
153 void applyLocation();
154 void clearVersions(QTableWidgetItem *);
155 void clearRestoreList();
160 QTableWidgetItem *m_current;
163 void displayFiles(int64_t pathid, QString path);
164 void displayFileVersion(QString pathid, QString fnid,
165 QString client, QString filename);
168 class bRunRestore : public QDialog, public Ui::bRunRestoreForm
173 QStringList m_fileids, m_jobids, m_dirids, m_findexes;
176 bRunRestore(bRestore *parent);
178 void computeVolumeList();
183 void computeRestore();
186 #endif /* _RESTORE_H_ */