5 Bacula® - The Network Backup Solution
7 Copyright (C) 2007-2010 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.
33 * Kern Sibbald, February 2007
36 #include <sys/types.h>
40 #include "ui_runrestore.h"
42 class bRestoreTable : public QTableWidget
46 QPoint dragStartPosition;
48 bRestoreTable(QWidget *parent)
49 : QTableWidget(parent)
52 void mousePressEvent(QMouseEvent *event);
53 void mouseMoveEvent(QMouseEvent *event);
55 void dragEnterEvent(QDragEnterEvent *event);
56 void dragMoveEvent(QDragMoveEvent *event);
57 void dropEvent(QDropEvent *event);
60 #include "ui_brestore.h"
61 #include "ui_restore.h"
62 #include "ui_prerestore.h"
71 * The pre-restore dialog selects the Job/Client to be restored
72 * It really could use considerable enhancement.
74 class prerestorePage : public Pages, public Ui::prerestoreForm
80 prerestorePage(QString &data, unsigned int);
83 void okButtonPushed();
84 void cancelButtonPushed();
85 void job_name_change(int index);
86 void recentChanged(int);
87 void jobRadioClicked(bool);
88 void jobidsRadioClicked(bool);
89 void jobIdEditFinished();
93 int jobdefsFromJob(QStringList &, QString &);
95 bool checkJobIdList();
97 unsigned int m_dataInType;
101 * The restore dialog is brought up once we are in the Bacula
102 * restore tree routines. It handles putting up a GUI tree
103 * representation of the files to be restored.
105 class restorePage : public Pages, public Ui::restoreForm
110 restorePage(int conn);
112 void fillDirectory();
114 bool cwd(const char *);
117 void okButtonPushed();
118 void cancelButtonPushed();
119 void fileDoubleClicked(QTreeWidgetItem *item, int column);
120 void directoryItemChanged(QTreeWidgetItem *, QTreeWidgetItem *);
121 void upButtonPushed();
122 void unmarkButtonPushed();
123 void markButtonPushed();
124 void addDirectory(QString &);
128 void writeSettings();
131 QHash<QString, QTreeWidgetItem *> m_dirPaths;
132 QHash<QTreeWidgetItem *,QString> m_dirTreeItems;
137 class bRestore : public Pages, public Ui::bRestoreForm
144 void PgSeltreeWidgetClicked();
147 void get_info_from_selection(QStringList &fileids, QStringList &jobids,
148 QStringList &dirids, QStringList &fileindexes);
153 void showInfoForFile(QTableWidgetItem *);
154 void applyLocation();
155 void clearVersions(QTableWidgetItem *);
156 void clearRestoreList();
162 QTableWidgetItem *m_current;
165 void displayFiles(int64_t pathid, QString path);
166 void displayFileVersion(QString pathid, QString fnid,
167 QString client, QString filename);
170 class bRunRestore : public QDialog, public Ui::bRunRestoreForm
175 QStringList m_fileids, m_jobids, m_dirids, m_findexes;
178 bRunRestore(bRestore *parent);
180 void computeVolumeList();
181 int64_t runRestore(QString tablename);
186 void computeRestore();
189 #endif /* _RESTORE_H_ */