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
38 #include "ui_runrestore.h"
40 class bRestoreTable : public QTableWidget
44 QPoint dragStartPosition;
46 bRestoreTable(QWidget *parent)
47 : QTableWidget(parent)
50 void mousePressEvent(QMouseEvent *event);
51 void mouseMoveEvent(QMouseEvent *event);
53 void dragEnterEvent(QDragEnterEvent *event);
54 void dragMoveEvent(QDragMoveEvent *event);
55 void dropEvent(QDropEvent *event);
58 #include "ui_brestore.h"
59 #include "ui_restore.h"
60 #include "ui_prerestore.h"
69 * The pre-restore dialog selects the Job/Client to be restored
70 * It really could use considerable enhancement.
72 class prerestorePage : public Pages, public Ui::prerestoreForm
78 prerestorePage(QString &data, unsigned int);
81 void okButtonPushed();
82 void cancelButtonPushed();
83 void job_name_change(int index);
84 void recentChanged(int);
85 void jobRadioClicked(bool);
86 void jobidsRadioClicked(bool);
87 void jobIdEditFinished();
91 int jobdefsFromJob(QStringList &, QString &);
93 bool checkJobIdList();
95 unsigned int m_dataInType;
99 * The restore dialog is brought up once we are in the Bacula
100 * restore tree routines. It handles putting up a GUI tree
101 * representation of the files to be restored.
103 class restorePage : public Pages, public Ui::restoreForm
108 restorePage(int conn);
110 void fillDirectory();
112 bool cwd(const char *);
115 void okButtonPushed();
116 void cancelButtonPushed();
117 void fileDoubleClicked(QTreeWidgetItem *item, int column);
118 void directoryItemChanged(QTreeWidgetItem *, QTreeWidgetItem *);
119 void upButtonPushed();
120 void unmarkButtonPushed();
121 void markButtonPushed();
122 void addDirectory(QString &);
126 void writeSettings();
129 QHash<QString, QTreeWidgetItem *> m_dirPaths;
130 QHash<QTreeWidgetItem *,QString> m_dirTreeItems;
135 class bRestore : public Pages, public Ui::bRestoreForm
142 void PgSeltreeWidgetClicked();
145 void get_info_from_selection(QStringList &fileids, QStringList &jobids,
146 QStringList &dirids, QStringList &fileindexes);
151 void showInfoForFile(QTableWidgetItem *);
152 void applyLocation();
153 void clearVersions(QTableWidgetItem *);
154 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();
179 int64_t runRestore(QString tablename);
184 void computeRestore();
187 #endif /* _RESTORE_H_ */