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

« back to all changes in this revision

Viewing changes to src/scheduleDialog.h

  • Committer: Bazaar Package Importer
  • Author(s): Patrick Matthäi
  • Date: 2009-05-21 20:09:36 UTC
  • Revision ID: james.westby@ubuntu.com-20090521200936-jcbu6euvoxz7sef7
Tags: upstream-0.3
Import upstream version 0.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* ---------------------------------- scheduleDialog.h ---------------------------------------------------------------------------
 
2
 Header file for scheduleDialog.cpp
 
3
 
 
4
===============================================================================================================================
 
5
===============================================================================================================================
 
6
     This file is part of "luckyBackup" project
 
7
     Copyright 2008-2009, 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              : luckyb 
 
26
 last modified          : 20 April 2009
 
27
===============================================================================================================================
 
28
===============================================================================================================================
 
29
*/
 
30
 
 
31
#ifndef SCHEDULEDIALOG_H
 
32
#define SCHEDULEDIALOG_H
 
33
 
 
34
//include  header file that qmake produces from "*.ui" created with qt designer
 
35
#include "ui_scheduleDialog.h"
 
36
 
 
37
 
 
38
//==============================================================================================================
 
39
//Declaration of rsyncDialog class (this will execute rsync and show progress in a dialog)
 
40
class scheduleDialog : public QDialog
 
41
{
 
42
        Q_OBJECT
 
43
        
 
44
        public:
 
45
                scheduleDialog (QDialog *parent=0);
 
46
 
 
47
                QString schedulename;           // schedule file filename
 
48
                int TotalSchedule;              //The number of available profiles schedulesin "schedule list"- starts from 1
 
49
                int currentSchedule;            //this holds the current row from the "schedule list"- starts from 0
 
50
                void createCron();              //creates a cron file & updates the user's crontab
 
51
                QString CronTab;                //QString to hold the user's crontab
 
52
                int count;              //simple count variable !!
 
53
                void clearScheduleDetails();    //function: when clear (schedule details) pushbutton pressed
 
54
                QString scheduleText(QString,int,int,int,int,int);              //returns the text displayed at the schedule list (eg execute profile default at .... every...)
 
55
 
 
56
 
 
57
        private slots:
 
58
                void schedulePressed(); //SLOT when schedule buutton pressed
 
59
                void cancelPressed();           //SLOT when cancel pushbutton pressed
 
60
 
 
61
                void modifyPressed();           //SLOT when modify pushbutton pressed
 
62
                void addPressed();              //SLOT to add an item in the list
 
63
                void removePressed();           //SLOT to remove an item from the list
 
64
                void okaySchedulePressed();     //function to add ot modify a profile schedule
 
65
                void modifyCancelPressed();     //SLOT to initialize widget views
 
66
 
 
67
                void fillDetails();             //SLOT to fill fields of schedule details
 
68
                void appendCrontabOutput();     //SLOT to read user's crontab to a QString
 
69
 
 
70
        private:
 
71
                Ui::scheduleDialog uiS;
 
72
                int currentProfileIndex;        //holds the current profile index inside the combobox
 
73
                bool noSchedules;               //becomes true when no schedules are declared
 
74
        
 
75
 
 
76
        protected:
 
77
                void closeEvent(QCloseEvent *event);    //when the close button of the dialog pressed
 
78
 
 
79
};
 
80
 
 
81
#endif
 
82
 
 
83
// end of scheduleDialog.h ---------------------------------------------------------------------------