5 Bacula(R) - The Network Backup Solution
7 Copyright (C) 2000-2016 Kern Sibbald
9 The original author of Bacula is Kern Sibbald, with contributions
10 from many others, a complete list can be found in the file AUTHORS.
12 You may use this file and others of this release according to the
13 license defined in the LICENSE file, which includes the Affero General
14 Public License, v3.0 ("AGPLv3") and some additional permissions and
15 terms pursuant to its AGPLv3 Section 7.
17 This notice must be preserved when any source code is
18 conveyed and/or propagated.
20 Bacula(R) is a registered trademark of Kern Sibbald.
24 * Kern Sibbald, February 2007
28 #include <sys/types.h> /* Needed for some systems */
31 #include "ui_runrestore.h"
33 class bRestoreTable : public QTableWidget
37 QPoint dragStartPosition;
39 bRestoreTable(QWidget *parent)
40 : QTableWidget(parent)
43 void mousePressEvent(QMouseEvent *event);
44 void mouseMoveEvent(QMouseEvent *event);
46 void dragEnterEvent(QDragEnterEvent *event);
47 void dragMoveEvent(QDragMoveEvent *event);
48 void dropEvent(QDropEvent *event);
51 #include "ui_brestore.h"
52 #include "ui_restore.h"
53 #include "ui_prerestore.h"
62 * The pre-restore dialog selects the Job/Client to be restored
63 * It really could use considerable enhancement.
65 class prerestorePage : public Pages, public Ui::prerestoreForm
71 prerestorePage(QString &data, unsigned int);
74 void okButtonPushed();
75 void cancelButtonPushed();
76 void job_name_change(int index);
77 void recentChanged(int);
78 void jobRadioClicked(bool);
79 void jobidsRadioClicked(bool);
80 void jobIdEditFinished();
84 int jobdefsFromJob(QStringList &, QString &);
86 bool checkJobIdList();
88 unsigned int m_dataInType;
92 * The restore dialog is brought up once we are in the Bacula
93 * restore tree routines. It handles putting up a GUI tree
94 * representation of the files to be restored.
96 class restorePage : public Pages, public Ui::restoreForm
101 restorePage(int conn);
103 void fillDirectory();
105 bool cwd(const char *);
108 void okButtonPushed();
109 void cancelButtonPushed();
110 void fileDoubleClicked(QTreeWidgetItem *item, int column);
111 void directoryItemChanged(QTreeWidgetItem *, QTreeWidgetItem *);
112 void upButtonPushed();
113 void unmarkButtonPushed();
114 void markButtonPushed();
115 void addDirectory(QString &);
119 void writeSettings();
122 QHash<QString, QTreeWidgetItem *> m_dirPaths;
123 QHash<QTreeWidgetItem *,QString> m_dirTreeItems;
128 class bRestore : public Pages, public Ui::bRestoreForm
135 void PgSeltreeWidgetClicked();
138 void get_info_from_selection(QStringList &fileids, QStringList &jobids,
139 QStringList &dirids, QStringList &fileindexes);
144 void showInfoForFile(QTableWidgetItem *);
145 void applyLocation();
146 void clearVersions(QTableWidgetItem *);
147 void clearRestoreList();
153 QTableWidgetItem *m_current;
156 void displayFiles(int64_t pathid, QString path);
157 void displayFileVersion(QString pathid, QString fnid,
158 QString client, QString filename);
161 class bRunRestore : public QDialog, public Ui::bRunRestoreForm
166 QStringList m_fileids, m_jobids, m_dirids, m_findexes;
169 bRunRestore(bRestore *parent);
171 void computeVolumeList();
172 int64_t runRestore(QString tablename);
177 void computeRestore();
180 #endif /* _RESTORE_H_ */