1 #ifndef _RESTORETREE_H_
2 #define _RESTORETREE_H_
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 two of the GNU 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 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 John Walker.
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_restoretree.h"
43 * A restore tree to view files in the catalog
45 class restoreTree : public Pages, public Ui::restoreTreeForm
52 virtual void currentStackItem();
56 FolderGreenChecked = 1,
57 FolderWhiteChecked = 2,
62 void refreshButtonPushed();
63 void restoreButtonPushed();
64 void jobComboChanged(int);
65 void directoryCurrentItemChanged(QTreeWidgetItem *, QTreeWidgetItem *);
66 void fileCurrentItemChanged(QTableWidgetItem *,QTableWidgetItem *);
67 void directoryItemExpanded(QTreeWidgetItem *);
68 void setCheckofChildren(QTreeWidgetItem *item, Qt::CheckState);
69 void directoryItemChanged(QTreeWidgetItem *, int);
70 void fileTableItemChanged(QTableWidgetItem *);
71 void versionTableItemChanged(QTableWidgetItem *);
75 void populateDirectoryTree();
76 void populateJobTable();
77 void parseDirectory(QString &dir_in);
78 bool addDirectory(QString &, QString &);
82 void fileExceptionInsert(QString &, QString &, Qt::CheckState);
83 void fileExceptionRemove(QString &, QString &);
84 void directoryTreeDisconnectedSet(QTreeWidgetItem *, Qt::CheckState);
85 void fileTableDisconnectedSet(QTableWidgetItem *, Qt::CheckState, bool color);
86 void versionTableDisconnectedSet(QTableWidgetItem *, Qt::CheckState);
87 void updateFileTableChecks();
88 void updateVersionTableChecks();
89 void directoryIconStateInsert(QString &, Qt::CheckState);
90 void directoryIconStateRemove();
91 void directorySetIcon(int operation, int change, QString &, QTreeWidgetItem* item);
92 void fullPathtoSubPaths(QStringList &, QString &);
93 int mostRecentVersionfromFullPath(QString &);
94 void setJobsCheckedList();
95 int queryFileIndex(QString &fullPath, int jobID);
98 bool m_dropdownChanged;
99 QRegExp m_winRegExpDrive;
100 QRegExp m_winRegExpPath;
101 QRegExp m_slashregex;
103 QHash<QString, QTreeWidgetItem *> m_dirPaths;
104 QString m_checkedJobs;
105 QString m_jobQueryPart;
106 QString m_prevJobCombo;
107 QString m_prevClientCombo;
108 QString m_prevFileSetCombo;
109 int m_prevLimitSpinBox;
110 int m_prevDaysSpinBox;
111 Qt::CheckState m_prevLimitCheckState;
112 Qt::CheckState m_prevDaysCheckState;
113 QString m_JobsCheckedList;
116 QList<Qt::CheckState> m_fileCheckStateList;
117 QList<Qt::CheckState> m_versionCheckStateList;
118 QHash<QString, Qt::CheckState> m_fileExceptionHash;
119 QMultiHash<QString, QString> m_fileExceptionMulti;
120 QHash<QString, int> m_versionExceptionHash;
121 QHash<QString, int> m_directoryIconStateHash;
124 #endif /* _RESTORETREE_H_ */