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 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.
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 PgSeltreeWidgetClicked();
53 virtual void currentStackItem();
57 FolderGreenChecked = 1,
58 FolderWhiteChecked = 2,
63 void refreshButtonPushed();
64 void restoreButtonPushed();
65 void jobComboChanged(int);
66 void directoryCurrentItemChanged(QTreeWidgetItem *, QTreeWidgetItem *);
67 void fileCurrentItemChanged(QTableWidgetItem *,QTableWidgetItem *);
68 void directoryItemExpanded(QTreeWidgetItem *);
69 void setCheckofChildren(QTreeWidgetItem *item, Qt::CheckState);
70 void directoryItemChanged(QTreeWidgetItem *, int);
71 void fileTableItemChanged(QTableWidgetItem *);
72 void versionTableItemChanged(QTableWidgetItem *);
74 void jobTableCellClicked(int, int);
77 void populateDirectoryTree();
78 void populateJobTable();
79 void parseDirectory(QString &dir_in);
80 bool addDirectory(QString &, QString &);
84 void fileExceptionInsert(QString &, QString &, Qt::CheckState);
85 void fileExceptionRemove(QString &, QString &);
86 void directoryTreeDisconnectedSet(QTreeWidgetItem *, Qt::CheckState);
87 void fileTableDisconnectedSet(QTableWidgetItem *, Qt::CheckState, bool color);
88 void versionTableDisconnectedSet(QTableWidgetItem *, Qt::CheckState);
89 void updateFileTableChecks();
90 void updateVersionTableChecks();
91 void directoryIconStateInsert(QString &, Qt::CheckState);
92 void directoryIconStateRemove();
93 void directorySetIcon(int operation, int change, QString &, QTreeWidgetItem* item);
94 void fullPathtoSubPaths(QStringList &, QString &);
95 int mostRecentVersionfromFullPath(QString &);
96 void setJobsCheckedList();
97 int queryFileIndex(QString &fullPath, int jobID);
99 QSplitter *m_splitter;
101 QString m_splitText1;
102 QString m_splitText2;
104 bool m_dropdownChanged;
106 QHash<QString, QTreeWidgetItem *> m_dirPaths;
107 QString m_checkedJobs, m_prevJobCombo, m_prevClientCombo, m_prevFileSetCombo;
108 int m_prevLimitSpinBox, m_prevDaysSpinBox;
109 Qt::CheckState m_prevLimitCheckState, m_prevDaysCheckState;
110 QString m_JobsCheckedList;
113 QList<Qt::CheckState> m_fileCheckStateList;
114 QList<Qt::CheckState> m_versionCheckStateList;
115 QHash<QString, Qt::CheckState> m_fileExceptionHash;
116 QMultiHash<QString, QString> m_fileExceptionMulti;
117 QHash<QString, int> m_versionExceptionHash;
118 QHash<QString, int> m_directoryIconStateHash;
119 QHash<QString, int> m_directoryPathIdHash;
120 int m_toggleUpIndex, m_toggleDownIndex, m_nullFileNameId;
123 #endif /* _RESTORETREE_H_ */