Debian Codegraph @

src/scheduleDialog.h

raw symbols SCIP
1 /* ---------------------------------- scheduleDialog.h ---------------------------------------------------------------------------
2 Header file for scheduleDialog.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 : luckyb
26 last modified : 22 May 2016
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 #include <QFile>
38
39 //==============================================================================================================
40 //Declaration of rsyncDialog class (this will execute rsync and show progress in a dialog)
41 class scheduleDialog : public QDialog
42 {
43 Q_OBJECT
44
45 public:
46 scheduleDialog (QDialog *parent=0);
47
48 QString schedulename; // schedule file filename
49 int TotalSchedule; //The number of available profiles schedulesin "schedule list"- starts from 1
50 int currentSchedule; //this holds the current row from the "schedule list"- starts from 0
51 void createCron(); //creates a cron file & updates the user's crontab
52 QString CronTab; //QString to hold the user's crontab
53 int count; //simple count variable !!
54 void clearScheduleDetails(); //function: when clear (schedule details) pushbutton pressed
55 bool saveScheduleFile (); //function to save the schedule-file
56 QString scheduleText(QString,int,int,int,int,int,bool); //returns the text displayed at the schedule list (eg execute profile default at .... every...)
57
58
59 private slots:
60 void schedulePressed(); //SLOT when schedule buutton pressed
61 void cancelPressed(); //SLOT when cancel pushbutton pressed
62
63 void modifyPressed(); //SLOT when modify pushbutton pressed
64 void addPressed(); //SLOT to add an item in the list
65 void removePressed(); //SLOT to remove an item from the list
66 void okaySchedulePressed(); //function to add ot modify a profile schedule
67 void modifyCancelPressed(); //SLOT to initialize widget views
68 void viewCrontab(); //SLOT to display the currenr crontab
69
70 void fillDetails(); //SLOT to fill fields of schedule details
71 void appendCrontabOutput(); //SLOT to read user's crontab to a QString
72
73 private:
74 Ui::scheduleDialog uiS;
75 QFile scheduleFile; //holds the scheduleFile filename
76 int currentProfileIndex; //holds the current profile index inside the combobox
77 bool noSchedules; //becomes true when no schedules are declared
78 bool changesMade; //becomes true if changes are made but no cronIt is pressed
79
80
81 protected:
82 void closeEvent(QCloseEvent *event); //when the close button of the dialog pressed
83
84 };
85
86 #endif
87
88 // end of scheduleDialog.h ---------------------------------------------------------------------------