Debian Codegraph @

src/manageWizard.h

raw symbols SCIP
1 /* ---------------------------------- manageWizard.h ---------------------------------------------------------------------------
2 header file used by manageWizard.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 : 18 May 2011
27 ===============================================================================================================================
28 ===============================================================================================================================
29 */
30
31 #ifndef MANAGEWIZARD_H
32 #define MANAGEWIZARD_H
33
34 #include "ui_manageWizard.h"
35
36 //==============================================================================================================
37 //Declaration of manageWizard class (this is the dialog that launches a restore,delete backup wizard)
38
39 class manageWizard : public QDialog
40 {
41 Q_OBJECT
42
43 public:
44 manageWizard (QString, QString, QString, int, QWidget *parent=0);
45
46 private slots:
47 void cancelPressed(); // close the wizard
48 void startAction(); // start the action (restore/delete)
49 void procFinished(); // actions when a process has finished
50 void appendCommandOutput(); // update browser with command running data
51 void abortAction(); //abort the execution of commands
52 void deleteAfterChanged(); // DeleteAfter checkbox state changed
53 void prevError(); //jumb to previous error
54 void nextError(); //jumb to next error
55 void changeRestorePath(); //Change the restore path
56
57 private:
58 Ui::manageWizard uiW;
59
60 QString source; // holds the full path of the original source
61 QString sourceLast; // holds the last child directory of the original source
62 QString dest; // holds the full path of the original destination
63 QString time; // holds the execution time of the selected snapshot in yyyyMMddhhmmss format
64 QString timeReadable; // holds the execution time of the selected snapshot in "yyyy/MM/dd - hh:mm:ss" format
65 int currentSnap; // holds the current snapshot number in the snapshot's list
66 int snapshotsNo; // holds the snapshots number
67 QString wizard_type;// holds the type of the wizard (restore or delete)
68 QStringList commandArguments; // holds the command arguments
69
70 QString outputString; // holds the standard output of the commands to display at browser
71 QString outputError; // holds the standard error of the commands to display at browser
72 bool procRunning; // this becomes true if a process is running
73 bool procKilled; // this becomes true if a process is aborted
74 int errorCount; // count the errors of the command execution
75 bool DRYrun; // become true if dry-run is checked
76 bool MainRun; // becomes true when main rsync is run. False when the specific backed up snapshot files are transfered
77 bool DeleteAfter; // becomes true if "delete files on the source" is checked
78 bool firstScroll; // becomes false if first time next button pressed
79 bool snapSpecificDirExists; // becomes true if the snapshots specific directory exists
80 int count; // simple count variable
81 int snapToRestore; // holds the current snapshot that is restored
82
83 void calcCommandArgs(); // function to calculate command arguments for RESTORE purposes
84 void runProcess(); //function to run the desired processes
85 void guiInitialize(); //initialize the gui
86
87 protected:
88 void closeEvent(QCloseEvent *event);
89 };
90
91
92 #endif
93
94 // end of manageWizard.h ---------------------------------------------------------------------------