5 Bacula® - The Network Backup Solution
7 Copyright (C) 2007-2014 Free Software Foundation Europe e.V.
9 The main author of Bacula is Kern Sibbald, with contributions from many
10 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 Bacula® is a registered trademark of Kern Sibbald.
21 * Kern Sibbald, February 2007
24 #include <sys/types.h>
28 #include "ui_runrestore.h"
30 class bRestoreTable : public QTableWidget
34 QPoint dragStartPosition;
36 bRestoreTable(QWidget *parent)
37 : QTableWidget(parent)
40 void mousePressEvent(QMouseEvent *event);
41 void mouseMoveEvent(QMouseEvent *event);
43 void dragEnterEvent(QDragEnterEvent *event);
44 void dragMoveEvent(QDragMoveEvent *event);
45 void dropEvent(QDropEvent *event);
48 #include "ui_brestore.h"
49 #include "ui_restore.h"
50 #include "ui_prerestore.h"
59 * The pre-restore dialog selects the Job/Client to be restored
60 * It really could use considerable enhancement.
62 class prerestorePage : public Pages, public Ui::prerestoreForm
68 prerestorePage(QString &data, unsigned int);
71 void okButtonPushed();
72 void cancelButtonPushed();
73 void job_name_change(int index);
74 void recentChanged(int);
75 void jobRadioClicked(bool);
76 void jobidsRadioClicked(bool);
77 void jobIdEditFinished();
81 int jobdefsFromJob(QStringList &, QString &);
83 bool checkJobIdList();
85 unsigned int m_dataInType;
89 * The restore dialog is brought up once we are in the Bacula
90 * restore tree routines. It handles putting up a GUI tree
91 * representation of the files to be restored.
93 class restorePage : public Pages, public Ui::restoreForm
98 restorePage(int conn);
100 void fillDirectory();
102 bool cwd(const char *);
105 void okButtonPushed();
106 void cancelButtonPushed();
107 void fileDoubleClicked(QTreeWidgetItem *item, int column);
108 void directoryItemChanged(QTreeWidgetItem *, QTreeWidgetItem *);
109 void upButtonPushed();
110 void unmarkButtonPushed();
111 void markButtonPushed();
112 void addDirectory(QString &);
116 void writeSettings();
119 QHash<QString, QTreeWidgetItem *> m_dirPaths;
120 QHash<QTreeWidgetItem *,QString> m_dirTreeItems;
125 class bRestore : public Pages, public Ui::bRestoreForm
132 void PgSeltreeWidgetClicked();
135 void get_info_from_selection(QStringList &fileids, QStringList &jobids,
136 QStringList &dirids, QStringList &fileindexes);
141 void showInfoForFile(QTableWidgetItem *);
142 void applyLocation();
143 void clearVersions(QTableWidgetItem *);
144 void clearRestoreList();
150 QTableWidgetItem *m_current;
153 void displayFiles(int64_t pathid, QString path);
154 void displayFileVersion(QString pathid, QString fnid,
155 QString client, QString filename);
158 class bRunRestore : public QDialog, public Ui::bRunRestoreForm
163 QStringList m_fileids, m_jobids, m_dirids, m_findexes;
166 bRunRestore(bRestore *parent);
168 void computeVolumeList();
169 int64_t runRestore(QString tablename);
174 void computeRestore();
177 #endif /* _RESTORE_H_ */