| 1 | /* ---------------------------------- manage.h --------------------------------------------------------------------------- |
| 2 | header file used by manage.cpp |
| 3 | |
| 4 | =============================================================================================================================== |
| 5 | =============================================================================================================================== |
| 6 | This file is part of "luckyBackup" project |
| 7 | Copyright, Loukas Avgeriou |
| 8 | luckyBackup is distributed under the terms of the GNU General Public License |
| 9 | luckyBackup is free software: you can redistribute it and/or modify |
| 10 | it under the terms of the GNU General Public License as published by |
| 11 | the Free Software Foundation, either version 3 of the License, or |
| 12 | (at your option) any later version. |
| 13 | |
| 14 | luckyBackup is distributed in the hope that it will be useful, |
| 15 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 17 | GNU General Public License for more details. |
| 18 | |
| 19 | You should have received a copy of the GNU General Public License |
| 20 | along with luckyBackup. If not, see <http://www.gnu.org/licenses/>. |
| 21 | |
| 22 | |
| 23 | project version : Please see "main.cpp" for project version |
| 24 | |
| 25 | developer : Loukas Avgeriou |
| 26 | last modified : 01 Sep 2010 |
| 27 | =============================================================================================================================== |
| 28 | =============================================================================================================================== |
| 29 | */ |
| 30 | |
| 31 | #ifndef MANAGE_H |
| 32 | #define MANAGE_H |
| 33 | |
| 34 | #include "ui_manage.h" |
| 35 | |
| 36 | class CalcDiffThread; |
| 37 | |
| 38 | //============================================================================================================== |
| 39 | //Declaration of manageDialog class (this is the dialog that manages existing backups of a task) |
| 40 | |
| 41 | class manageDialog : public QDialog |
| 42 | { |
| 43 | Q_OBJECT |
| 44 | |
| 45 | public: |
| 46 | manageDialog (QDialog *parent=0); |
| 47 | |
| 48 | private slots: |
| 49 | void cancel(); // close the manage dialog |
| 50 | void logView(); // view the log file |
| 51 | void restoreBackup(); // launch the restore wizard |
| 52 | void deleteBackup(); // launch the delete wizard |
| 53 | void fixGui(); // makes some changes to the gui according to various stuff |
| 54 | void SnapshotsListSelected(); //Triggered when selection changes |
| 55 | void hideSourceStuff(); // hide -show source stuff |
| 56 | |
| 57 | void calculateDifferences(); // calculate differences between source and snapshot |
| 58 | void calcDiffEnd(); // diffs have been calculated - update viewer with new text |
| 59 | void refreshDifWindow(const QString &, const bool &); // update window with text concerning diff calculations |
| 60 | |
| 61 | private: |
| 62 | Ui::manageDialog uiG; |
| 63 | |
| 64 | QString source; |
| 65 | QString sourceLast; |
| 66 | QString dest; |
| 67 | QString time; |
| 68 | QString CurrentSnapshotString; // This is the current snapshot in YYYYmmddHHmmss format |
| 69 | QString CurrentSnapshotDirectory ; // This is the full path of the current snapshot directory |
| 70 | int CurrentSnapshotNo; // This is the current snapshot number (order in list). Becomes 0,1,2 .... currentSnaps |
| 71 | int currentSnaps; // this is the current number of already created snapshots |
| 72 | int count; //simple count variable |
| 73 | bool syncTYPE; // This will become true if it is a sync task |
| 74 | bool abortCalcThread; // This will become true if the calculations thread is aborted |
| 75 | bool sourceVisible,viewLogVisible,deleteVisible,restoreVisible; // Helps to hide/show source stuff |
| 76 | QStringList calculatedDifferences;// Text of calculated deifferences is stored here for each snapshot |
| 77 | QList<bool> snapCalculated; // becomes true if differences have been calculated for a snapshot |
| 78 | |
| 79 | void updateSnapshots(); |
| 80 | |
| 81 | CalcDiffThread * calcdiffthread; //thread to calculate differences between snap & source |
| 82 | |
| 83 | protected: |
| 84 | void closeEvent(QCloseEvent *event); |
| 85 | }; |
| 86 | |
| 87 | #endif |
| 88 | |
| 89 | // end of manage.h --------------------------------------------------------------------------- |