1 #ifndef _RESTORETREE_H_
2 #define _RESTORETREE_H_
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.
23 * Kern Sibbald, February 2007
26 #if QT_VERSION >= 0x050000
32 #include "ui_restoretree.h"
36 * A restore tree to view files in the catalog
38 class restoreTree : public Pages, public Ui::restoreTreeForm
45 virtual void PgSeltreeWidgetClicked();
46 virtual void currentStackItem();
50 FolderGreenChecked = 1,
51 FolderWhiteChecked = 2,
56 void refreshButtonPushed();
57 void restoreButtonPushed();
58 void jobComboChanged(int);
59 void directoryCurrentItemChanged(QTreeWidgetItem *, QTreeWidgetItem *);
60 void fileCurrentItemChanged(QTableWidgetItem *,QTableWidgetItem *);
61 void directoryItemExpanded(QTreeWidgetItem *);
62 void setCheckofChildren(QTreeWidgetItem *item, Qt::CheckState);
63 void directoryItemChanged(QTreeWidgetItem *, int);
64 void fileTableItemChanged(QTableWidgetItem *);
65 void versionTableItemChanged(QTableWidgetItem *);
67 void jobTableCellClicked(int, int);
70 void populateDirectoryTree();
71 void populateJobTable();
72 void parseDirectory(const QString &dir_in);
76 void fileExceptionInsert(QString &, QString &, Qt::CheckState);
77 void fileExceptionRemove(QString &, QString &);
78 void directoryTreeDisconnectedSet(QTreeWidgetItem *, Qt::CheckState);
79 void fileTableDisconnectedSet(QTableWidgetItem *, Qt::CheckState, bool color);
80 void versionTableDisconnectedSet(QTableWidgetItem *, Qt::CheckState);
81 void updateFileTableChecks();
82 void updateVersionTableChecks();
83 void directoryIconStateInsert(QString &, Qt::CheckState);
84 void directoryIconStateRemove();
85 void directorySetIcon(int operation, int change, QString &, QTreeWidgetItem* item);
86 void fullPathtoSubPaths(QStringList &, QString &);
87 int mostRecentVersionfromFullPath(QString &);
88 void setJobsCheckedList();
89 int queryFileIndex(QString &fullPath, int jobID);
91 QSplitter *m_splitter;
96 bool m_dropdownChanged;
98 QHash<QString, QTreeWidgetItem *> m_dirPaths;
99 QString m_checkedJobs, m_prevJobCombo, m_prevClientCombo, m_prevFileSetCombo;
100 int m_prevLimitSpinBox, m_prevDaysSpinBox;
101 Qt::CheckState m_prevLimitCheckState, m_prevDaysCheckState;
102 QString m_JobsCheckedList;
105 QList<Qt::CheckState> m_fileCheckStateList;
106 QList<Qt::CheckState> m_versionCheckStateList;
107 QHash<QString, Qt::CheckState> m_fileExceptionHash;
108 QMultiHash<QString, QString> m_fileExceptionMulti;
109 QHash<QString, int> m_versionExceptionHash;
110 QHash<QString, int> m_directoryIconStateHash;
111 QHash<QString, int> m_directoryPathIdHash;
112 int m_toggleUpIndex, m_toggleDownIndex, m_nullFileNameId;
115 #endif /* _RESTORETREE_H_ */