~ubuntu-branches/ubuntu/maverick/luckybackup/maverick

« back to all changes in this revision

Viewing changes to src/manageWizard.h

  • Committer: Andrew Starr-Bochicchio
  • Date: 2010-05-26 04:01:25 UTC
  • mfrom: (4.1.1 sid)
  • Revision ID: a.starr.b@gmail.com-20100526040125-9fjy5y0jyzlrbkny
Tags: 0.4.0-1ubuntu1
* Merge from Debian unstable. Remaining Ubuntu changes:
 - Use gksu to launch in superuser mode as Ubuntu
   doesn't use su-to-root.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* ---------------------------------- manageWizard.h ---------------------------------------------------------------------------
 
2
 header file used by manageWizard.cpp
 
3
 
 
4
===============================================================================================================================
 
5
===============================================================================================================================
 
6
     This file is part of "luckyBackup" project
 
7
     Copyright 2008-2010, 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          : 15 Apr 2010
 
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
 
 
56
        private:
 
57
                Ui::manageWizard uiW;
 
58
                
 
59
                QString source;         // holds the full path of the original source
 
60
                QString sourceLast;     // holds the last child directory of the original source
 
61
                QString dest;           // holds the full path of the original destination
 
62
                QString time;           // holds the execution time of the selected snapshot in yyyyMMddhhmmss format
 
63
                QString timeReadable; // holds the execution time of the selected snapshot in "yyyy/MM/dd - hh:mm:ss" format
 
64
                int currentSnap;        // holds the current snapshot number in the snapshot's list
 
65
                int snapshotsNo;        // holds the snapshots number
 
66
                QString wizard_type;//  holds the type of the wizard (restore or delete)
 
67
                QStringList commandArguments;   // holds the command arguments
 
68
                
 
69
                QString outputString;   // holds the standard output of the commands to display at browser
 
70
                QString outputError;    // holds the standard error of the commands to display at browser
 
71
                bool procRunning;               // this becomes true if a process is running
 
72
                bool procKilled;                // this becomes true if a process is aborted
 
73
                int errorCount;                 // count the errors of the command execution
 
74
                bool DRYrun;                    // become true if dry-run is checked
 
75
                bool MainRun;                   // becomes true when main rsync is run. False when the dpecific backed up snapshot files are transfered
 
76
                bool DeleteAfter;               // becomes true if "delete files on the source" is checked
 
77
                bool firstScroll;               // becomes false if first time next button pressed
 
78
                int count;                      // simple count variable
 
79
                
 
80
                void calcCommandArgs(); // function to calculate command arguments for RESTORE purposes
 
81
                void runProcess();      //function to run the desired processes
 
82
                
 
83
        protected:
 
84
                void closeEvent(QCloseEvent *event);
 
85
}; 
 
86
 
 
87
 
 
88
#endif
 
89
 
 
90
// end of manageWizard.h ---------------------------------------------------------------------------