| 1 | /* ---------------------------------- scheduleDialog.cpp --------------------------------------------------------------------------- |
| 2 | Display a dialog. Schedules profiles via cron |
| 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 | |
| 32 | |
| 33 | #include "scheduleDialog.h"cxx . . $ `<file>/src/scheduleDialog.h`/ |
| 34 | |
| 35 | #include <QTextStream> |
| 36 | #include <QTextCodec> |
| 37 | #include <QMessageBox> |
| 38 | #include <QProcess> |
| 39 | |
| 40 | #include "scheduleClass.h"cxx . . $ `<file>/src/scheduleClass.h`/ |
| 41 | #include "global.h"cxx . . $ `<file>/src/global.h`/ |
| 42 | #include "textDialog.h"cxx . . $ `<file>/src/textDialog.h`/ |
| 43 | |
| 44 | int const maxSchedulecxx . . $ maxSchedule. = 20; //The maximum number or profiles schedule permitted |
| 45 | schedulecxx . . $ schedule# *Schedulecxx . . $ Schedule.[maxSchedulecxx . . $ maxSchedule.]; //The array that holds name etc of "schedule list" |
| 46 | //QFile scheduleFile (schedulefilename ); |
| 47 | QProcesscxx . . $ QProcess# *cronProcesscxx . . $ cronProcess.; //crontab process |
| 48 | |
| 49 | // class scheduleDialog Constructor================================================================================================= |
| 50 | // schedule existing profiles to execute via cron |
| 51 | scheduleDialogcxx . . $ scheduleDialog#::scheduleDialogcxx . . $ scheduleDialog#scheduleDialog(d194de0c0f68c28b). (QDialogcxx . . $ QDialog# *parent) |
| 52 | : QDialogcxx . . $ QDialog#QDialog(872e7b0c281abd8d). (parent) |
| 53 | , scheduleFilecxx . . $ scheduleDialog#scheduleFile.(schedulefilenamecxx . . $ Global/schedulefilename.) |
| 54 | { |
| 55 | uiScxx . . $ scheduleDialog#uiS..setupUicxx . . $ Ui_scheduleDialog#setupUi(d194de0c0f68c28b).(this); |
| 56 | |
| 57 | //variables initialization |
| 58 | TotalSchedulecxx . . $ scheduleDialog#TotalSchedule.=0; //The number of available profiles schedulesin "schedule list"- starts from 1 |
| 59 | currentSchedulecxx . . $ scheduleDialog#currentSchedule.=0; //this holds the current row from the "schedule list"- starts from 0 |
| 60 | noSchedulescxx . . $ scheduleDialog#noSchedules. = true; //becomes true when no schedules are declared |
| 61 | changesMadecxx . . $ scheduleDialog#changesMade. = false; //becomes true if changes are made but no cronIt is pressed |
| 62 | |
| 63 | //connections ---------------------------------------------------------------------------------------------------- |
| 64 | connectcxx . . $ QObject#connect(158df1d9a01a3410).(uiScxx . . $ scheduleDialog#uiS..pushButton_schedulecxx . . $ Ui_scheduleDialog#pushButton_schedule., SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`!( pressed() ), this, SLOTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:270:10`!(schedulePressed() ) ); //cronIT pushButton |
| 65 | connectcxx . . $ QObject#connect(158df1d9a01a3410).(uiScxx . . $ scheduleDialog#uiS..pushButton_cancelcxx . . $ Ui_scheduleDialog#pushButton_cancel., SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`!( pressed() ), this, SLOTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:270:10`!(cancelPressed() ) ); //cancel pushButton |
| 66 | |
| 67 | connectcxx . . $ QObject#connect(158df1d9a01a3410).(uiScxx . . $ scheduleDialog#uiS..pushButton_addcxx . . $ Ui_scheduleDialog#pushButton_add., SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`!( pressed() ), this, SLOTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:270:10`!(addPressed() ) ); //add command pushButton |
| 68 | connectcxx . . $ QObject#connect(158df1d9a01a3410).(uiScxx . . $ scheduleDialog#uiS..pushButton_removecxx . . $ Ui_scheduleDialog#pushButton_remove., SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`!( pressed() ), this, SLOTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:270:10`!(removePressed() ) ); //remove command pushButton |
| 69 | connectcxx . . $ QObject#connect(158df1d9a01a3410).(uiScxx . . $ scheduleDialog#uiS..pushButton_modifycxx . . $ Ui_scheduleDialog#pushButton_modify., SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`!( pressed() ), this, SLOTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:270:10`!(modifyPressed() ) ); //modify command pushButton |
| 70 | |
| 71 | connectcxx . . $ QObject#connect(158df1d9a01a3410).(uiScxx . . $ scheduleDialog#uiS..pushButton_viewCrontabcxx . . $ Ui_scheduleDialog#pushButton_viewCrontab., SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`!( pressed() ), this, SLOTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:270:10`!(viewCrontab() ) ); //view curreent crontab command pushButton |
| 72 | |
| 73 | connectcxx . . $ QObject#connect(158df1d9a01a3410).(uiScxx . . $ scheduleDialog#uiS..pushButton_modifyOkaycxx . . $ Ui_scheduleDialog#pushButton_modifyOkay., SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`!( pressed() ), this, SLOTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:270:10`!(okaySchedulePressed() ) ); //modify okay pushButton |
| 74 | connectcxx . . $ QObject#connect(158df1d9a01a3410).(uiScxx . . $ scheduleDialog#uiS..pushButton_modifyCancelcxx . . $ Ui_scheduleDialog#pushButton_modifyCancel., SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`!( pressed() ), this, SLOTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:270:10`!(modifyCancelPressed() ) ); //modify cancel pushButton |
| 75 | |
| 76 | connectcxx . . $ QObject#connect(158df1d9a01a3410).(uiScxx . . $ scheduleDialog#uiS..listWidget_schedulecxx . . $ Ui_scheduleDialog#listWidget_schedule. , SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`!( currentRowChanged(int) ), this, SLOTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:270:10`!(fillDetails() ) ); //list item selection changed |
| 77 | |
| 78 | |
| 79 | cronProcesscxx . . $ cronProcess. = new QProcesscxx . . $ QProcess#(this); //create a new qprocess (for crontab) & connect signals |
| 80 | connectcxx . . $ QObject#connect(158df1d9a01a3410).(cronProcesscxx . . $ cronProcess., SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`!(readyReadStandardError()), this, SLOTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:270:10`!(appendCrontabOutput())); |
| 81 | connectcxx . . $ QObject#connect(158df1d9a01a3410).(cronProcesscxx . . $ cronProcess., SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`!(readyReadStandardOutput()), this, SLOTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:270:10`!(appendCrontabOutput())); |
| 82 | |
| 83 | //initialize view of widgets |
| 84 | uiScxx . . $ scheduleDialog#uiS..groupBox_addProfileSchedulecxx . . $ Ui_scheduleDialog#groupBox_addProfileSchedule. -> setVisiblecxx . . $ QWidget#setVisible(b45ddcbc8423892c).(false); |
| 85 | uiScxx . . $ scheduleDialog#uiS..listWidget_schedulecxx . . $ Ui_scheduleDialog#listWidget_schedule. -> setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(true); |
| 86 | uiScxx . . $ scheduleDialog#uiS..pushButton_addcxx . . $ Ui_scheduleDialog#pushButton_add. -> setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(true); |
| 87 | uiScxx . . $ scheduleDialog#uiS..pushButton_modifycxx . . $ Ui_scheduleDialog#pushButton_modify. -> setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(true); |
| 88 | uiScxx . . $ scheduleDialog#uiS..pushButton_removecxx . . $ Ui_scheduleDialog#pushButton_remove. -> setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(true); |
| 89 | uiScxx . . $ scheduleDialog#uiS..pushButton_cancelcxx . . $ Ui_scheduleDialog#pushButton_cancel. -> setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(true); |
| 90 | uiScxx . . $ scheduleDialog#uiS..pushButton_schedulecxx . . $ Ui_scheduleDialog#pushButton_schedule. -> setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(true); |
| 91 | |
| 92 | //profile combobox initialization |
| 93 | uiScxx . . $ scheduleDialog#uiS..comboBox_profilecxx . . $ Ui_scheduleDialog#comboBox_profile. -> clearcxx . . $ QComboBox#clear(49f6e7a06ebc5aa8).(); |
| 94 | currentProfileIndexcxx . . $ scheduleDialog#currentProfileIndex. = -1; |
| 95 | QDircxx . . $ QDir# profiledircxx . . $ QDir#QDir(3520e46b33348bf6).(profileDircxx . . $ Global/profileDir.); |
| 96 | profiledir.setFiltercxx . . $ QDir#setFilter(3cb6a626764edf13).(QDircxx . . $ QDir#::AllEntriescxx . . $ QDir#AllEntries. |cxx . . $ `operator|`(153b300229e4e3d0). QDircxx . . $ QDir#::Hiddencxx . . $ QDir#Hidden. |cxx . . $ QFlags#`operator|`(2cc1994e0be6f18e). QDircxx . . $ QDir#::NoDotAndDotDotcxx . . $ QDir#NoDotAndDotDot.); |
| 97 | profiledir.setSortingcxx . . $ QDir#setSorting(d6e6037501f8ac03).(QDircxx . . $ QDir#::Namecxx . . $ QDir#Name. |cxx . . $ `operator|`(2e9dd8934c680bb9). QDircxx . . $ QDir#::LocaleAwarecxx . . $ QDir#LocaleAware.); |
| 98 | QStringListcxx . . $ QStringList# profileNames = profiledir.entryListcxx . . $ QDir#entryList(4575c08c50802968).(QStringListcxx . . $ QStringList#QStringList(3520e46b33348bf6).("*.profile"cxx . . $ QString#QString(85c52e162fed56f9).)); |
| 99 | QStringcxx . . $ QString# profilename=""cxx . . $ QString#QString(85c52e162fed56f9).; |
| 100 | for (countcxx . . $ scheduleDialog#count. = 0; countcxx . . $ scheduleDialog#count. < profileNames.sizecxx . . $ QList#size(ea6fe5115c70a13f).(); ++countcxx . . $ scheduleDialog#count.) |
| 101 | { |
| 102 | profilename =cxx . . $ QString#`operator=`(b79fde0b0ce9b948). profileNames[cxx . . $ QList#`operator[]`(7a0ef1c7079e8533).countcxx . . $ scheduleDialog#count.]; |
| 103 | if (currentProfilecxx . . $ Global/currentProfile. ==cxx . . $ `operator==`(5bc2975d2d751687). profileDircxx . . $ Global/profileDir. +cxx . . $ operator+(fab9b4f80031f353). profilename) // set the currentProfileIndex to the index of the current profile |
| 104 | currentProfileIndexcxx . . $ scheduleDialog#currentProfileIndex. = countcxx . . $ scheduleDialog#count.; |
| 105 | profilename.chopcxx . . $ QString#chop(d4f767463ce0a6b3).(8); |
| 106 | uiScxx . . $ scheduleDialog#uiS..comboBox_profilecxx . . $ Ui_scheduleDialog#comboBox_profile. -> addItemcxx . . $ QComboBox#addItem(1c60a90c724e6bfb). (profilename); |
| 107 | } |
| 108 | if (currentProfileIndexcxx . . $ scheduleDialog#currentProfileIndex. == -1) // if no default profile exists |
| 109 | currentProfileIndexcxx . . $ scheduleDialog#currentProfileIndex. = 0; |
| 110 | |
| 111 | //open the schedule.dat file and fill arrays & schedule list |
| 112 | if (!scheduleFilecxx . . $ scheduleDialog#scheduleFile..opencxx . . $ QFile#open(dca164408be960c8).(QIODevicecxx . . $ QFlags#QFlags(93d577a3e9528307).::ReadOnlycxx . . $ QIODevice#ReadOnly.)) //if there is an error opening it, delete it to create a new one |
| 113 | scheduleFilecxx . . $ scheduleDialog#scheduleFile..removecxx . . $ QFile#remove(c9857a73d68e59ba).(); |
| 114 | else |
| 115 | { |
| 116 | QTextStreamcxx . . $ QTextStream# incxx . . $ QTextStream#QTextStream(bebe8f2dee7f9e86).(&scheduleFilecxx . . $ scheduleDialog#scheduleFile.); |
| 117 | |
| 118 | QStringcxx . . $ QString# ScheduleLine=""cxx . . $ QString#QString(85c52e162fed56f9).; //temp variable to import the profile line by line |
| 119 | ScheduleLine =cxx . . $ QString#`operator=`(4f35bf974e7f8568). in.readLinecxx . . $ QTextStream#readLine(20e0a2766677f583).(); |
| 120 | |
| 121 | // First check if the profile is a text or data stream |
| 122 | // if data, use the qvariant style |
| 123 | if (ScheduleLine !=cxx . . $ QString#`operator!=`(7d4bdb1abc417636)."***************************** WARNING *****************************") |
| 124 | { |
| 125 | //in.reset(); |
| 126 | scheduleFilecxx . . $ scheduleDialog#scheduleFile..closecxx . . $ QFileDevice#close(49f6e7a06ebc5aa8).(); scheduleFilecxx . . $ scheduleDialog#scheduleFile..opencxx . . $ QFile#open(dca164408be960c8).(QIODevicecxx . . $ QFlags#QFlags(93d577a3e9528307).::ReadOnlycxx . . $ QIODevice#ReadOnly.); //close & reopen the file |
| 127 | |
| 128 | // Try to read the schedulefile in the old data/qvariant format (not a text) |
| 129 | // This will probably become obsolete after some time |
| 130 | // Last version qvariant is used: 0.4.6 |
| 131 | QDataStreamcxx . . $ QDataStream# inVcxx . . $ QDataStream#QDataStream(bebe8f2dee7f9e86).(&scheduleFilecxx . . $ scheduleDialog#scheduleFile.); |
| 132 | inV.setVersioncxx . . $ QDataStream#setVersion(d4f767463ce0a6b3).(QDataStreamcxx . . $ QDataStream#::Qt_4_3cxx . . $ QDataStream#Qt_4_3.); |
| 133 | |
| 134 | QVariantcxx . . $ QVariant# vcxx . . $ QVariant#QVariant(ced63f7c635d850d).; //we will import everything as QVariant using this temp variable |
| 135 | QStringcxx . . $ QString# vStringcxx . . $ QString#QString(ced63f7c635d850d).; //temp variable to import "labels" of real data |
| 136 | QStringcxx . . $ QString# tempAppName = "asxeto"cxx . . $ QString#QString(85c52e162fed56f9).; |
| 137 | double tempAppVersion=0; |
| 138 | |
| 139 | inV>>cxx . . $ `operator>>`(ff92eee7bfdd49b7).v; if (v.toStringcxx . . $ QVariant#toString(6ef7b6c27b00b43d).()==cxx . . $ QString#`operator==`(7d4bdb1abc417636)."appName") |
| 140 | {inV >>cxx . . $ `operator>>`(ff92eee7bfdd49b7). v; tempAppName =cxx . . $ QString#`operator=`(4f35bf974e7f8568). v.toStringcxx . . $ QVariant#toString(6ef7b6c27b00b43d).();} //input the application name & version-------------------------- |
| 141 | inV>>cxx . . $ `operator>>`(ff92eee7bfdd49b7).v; if (v.toStringcxx . . $ QVariant#toString(6ef7b6c27b00b43d).()==cxx . . $ QString#`operator==`(7d4bdb1abc417636)."appVersion") |
| 142 | {inV >>cxx . . $ `operator>>`(ff92eee7bfdd49b7). v; tempAppVersion = v.toDoublecxx . . $ QVariant#toDouble(1bd8e57dd4a29c14).();} |
| 143 | |
| 144 | if ( (tempAppName !=cxx . . $ `operator!=`(5bc2975d2d751687). appNamecxx . . $ Global/appName.) || (tempAppVersion < validScheduleVersioncxx . . $ Global/validScheduleVersion.) )//check if the file is a valid luckybackup schedule file |
| 145 | { |
| 146 | messagecxx . . $ Global/message. =cxx . . $ QString#`operator=`(b79fde0b0ce9b948). trcxx . . $ scheduleDialog#tr(75d9f1c324b4579d).("The existent schedule file is not a valid luckyBackup v.","v is for version") |
| 147 | +cxx . . $ operator+(fab9b4f80031f353). countStrcxx . . $ Global/countStr..setNumcxx . . $ QString#setNum(3becbeaf5ad69e3c).(appVersioncxx . . $ Global/appVersion.) +cxx . . $ operator+(fab9b4f80031f353). trcxx . . $ scheduleDialog#tr(75d9f1c324b4579d).(" file","BEWARE of the whitespace before file")+cxx . . $ operator+(3d22f08efddf8107)."<br><br>"+cxx . . $ operator+(fab9b4f80031f353).trcxx . . $ scheduleDialog#tr(75d9f1c324b4579d).("Starting from scratch")+cxx . . $ operator+(3d22f08efddf8107)."...<br>" ; |
| 148 | textDialogcxx . . $ textDialog# textdialogWcxx . . $ textDialog#textDialog(9c8c077708043c75). ("QtWarning"cxx . . $ QString#QString(85c52e162fed56f9)., messagecxx . . $ QString#QString(132dd6869045752b)., this); |
| 149 | textdialogW.execcxx . . $ QDialog#exec(b126dc7c1de90089).(); |
| 150 | scheduleFilecxx . . $ scheduleDialog#scheduleFile..removecxx . . $ QFile#remove(c9857a73d68e59ba).(); |
| 151 | return; |
| 152 | } |
| 153 | |
| 154 | inV>>cxx . . $ `operator>>`(ff92eee7bfdd49b7).v; if (v.toStringcxx . . $ QVariant#toString(6ef7b6c27b00b43d).()==cxx . . $ QString#`operator==`(7d4bdb1abc417636)."TotalSchedules") |
| 155 | {inV >>cxx . . $ `operator>>`(ff92eee7bfdd49b7). v; TotalSchedulecxx . . $ scheduleDialog#TotalSchedule. = v.toIntcxx . . $ QVariant#toInt(5bd9a3493f6a7a21).();} //input the size of the schedule list first |
| 156 | |
| 157 | currentSchedulecxx . . $ scheduleDialog#currentSchedule. = 0; vString=cxx . . $ QString#`operator=`(d02845eef0c33901).""; |
| 158 | while (currentSchedulecxx . . $ scheduleDialog#currentSchedule. < TotalSchedulecxx . . $ scheduleDialog#TotalSchedule.) |
| 159 | { |
| 160 | schedulecxx . . $ schedule# *tempSchedule = new schedulecxx . . $ schedule#; |
| 161 | |
| 162 | inV>>cxx . . $ `operator>>`(ff92eee7bfdd49b7).v; vString =cxx . . $ QString#`operator=`(4f35bf974e7f8568). v.toStringcxx . . $ QVariant#toString(6ef7b6c27b00b43d).(); inV >>cxx . . $ `operator>>`(ff92eee7bfdd49b7). v; //input a label in vString and real data in v |
| 163 | |
| 164 | while (vString !=cxx . . $ QString#`operator!=`(7d4bdb1abc417636). "current schedule end") |
| 165 | { |
| 166 | if (vString ==cxx . . $ QString#`operator==`(7d4bdb1abc417636). "ScheduleName") tempSchedule -> SetNamecxx . . $ schedule#SetName(7df51288a9ebd664).(v.toStringcxx . . $ QVariant#toString(6ef7b6c27b00b43d).()); |
| 167 | |
| 168 | if (vString ==cxx . . $ QString#`operator==`(7d4bdb1abc417636). "ProfilePath") tempSchedule -> SetProfilePathcxx . . $ schedule#SetProfilePath(7df51288a9ebd664).(v.toStringcxx . . $ QVariant#toString(6ef7b6c27b00b43d).()); |
| 169 | if (vString ==cxx . . $ QString#`operator==`(7d4bdb1abc417636). "ProfileName") tempSchedule -> SetProfileNamecxx . . $ schedule#SetProfileName(7df51288a9ebd664).(v.toStringcxx . . $ QVariant#toString(6ef7b6c27b00b43d).()); |
| 170 | |
| 171 | if (vString ==cxx . . $ QString#`operator==`(7d4bdb1abc417636). "ScheduleMonth") tempSchedule -> SetMonthcxx . . $ schedule#SetMonth(d4f767463ce0a6b3).(v.toIntcxx . . $ QVariant#toInt(5bd9a3493f6a7a21).()); |
| 172 | if (vString ==cxx . . $ QString#`operator==`(7d4bdb1abc417636). "ScheduleMonthDay") tempSchedule -> SetMonthDaycxx . . $ schedule#SetMonthDay(d4f767463ce0a6b3).(v.toIntcxx . . $ QVariant#toInt(5bd9a3493f6a7a21).()); |
| 173 | if (vString ==cxx . . $ QString#`operator==`(7d4bdb1abc417636). "ScheduleWeekDay") tempSchedule -> SetWeekDaycxx . . $ schedule#SetWeekDay(d4f767463ce0a6b3).(v.toIntcxx . . $ QVariant#toInt(5bd9a3493f6a7a21).()); |
| 174 | if (vString ==cxx . . $ QString#`operator==`(7d4bdb1abc417636). "ScheduleHour") tempSchedule -> SetHourcxx . . $ schedule#SetHour(d4f767463ce0a6b3).(v.toIntcxx . . $ QVariant#toInt(5bd9a3493f6a7a21).()); |
| 175 | if (vString ==cxx . . $ QString#`operator==`(7d4bdb1abc417636). "ScheduleMinute") tempSchedule -> SetMinutecxx . . $ schedule#SetMinute(d4f767463ce0a6b3).(v.toIntcxx . . $ QVariant#toInt(5bd9a3493f6a7a21).()); |
| 176 | |
| 177 | if (vString ==cxx . . $ QString#`operator==`(7d4bdb1abc417636). "ScheduleSkipCritical") tempSchedule -> SetSkipCriticalcxx . . $ schedule#SetSkipCritical(b45ddcbc8423892c).(v.toBoolcxx . . $ QVariant#toBool(50ce9a9e25b4a850).()); |
| 178 | if (vString ==cxx . . $ QString#`operator==`(7d4bdb1abc417636). "ScheduleConsoleMode") tempSchedule -> SetConsoleModecxx . . $ schedule#SetConsoleMode(b45ddcbc8423892c).(v.toBoolcxx . . $ QVariant#toBool(50ce9a9e25b4a850).()); |
| 179 | if (vString ==cxx . . $ QString#`operator==`(7d4bdb1abc417636). "ScheduleAtReboot") tempSchedule -> SetRebootcxx . . $ schedule#SetReboot(b45ddcbc8423892c).(v.toBoolcxx . . $ QVariant#toBool(50ce9a9e25b4a850).()); |
| 180 | if (vString ==cxx . . $ QString#`operator==`(7d4bdb1abc417636). "ScheduleAtRebootDelay") tempSchedule -> SetDelayRebootcxx . . $ schedule#SetDelayReboot(d4f767463ce0a6b3).(v.toIntcxx . . $ QVariant#toInt(5bd9a3493f6a7a21).()); |
| 181 | |
| 182 | inV>>cxx . . $ `operator>>`(ff92eee7bfdd49b7).v; vString =cxx . . $ QString#`operator=`(4f35bf974e7f8568). v.toStringcxx . . $ QVariant#toString(6ef7b6c27b00b43d).(); |
| 183 | if (vString!=cxx . . $ QString#`operator!=`(7d4bdb1abc417636)."current schedule end") |
| 184 | inV >>cxx . . $ `operator>>`(ff92eee7bfdd49b7). v; |
| 185 | else |
| 186 | Schedulecxx . . $ Schedule.[currentSchedulecxx . . $ scheduleDialog#currentSchedule.] = tempSchedule; |
| 187 | |
| 188 | } |
| 189 | uiScxx . . $ scheduleDialog#uiS..listWidget_schedulecxx . . $ Ui_scheduleDialog#listWidget_schedule. -> addItemcxx . . $ QListWidget#addItem(3520e46b33348bf6).(scheduleTextcxx . . $ scheduleDialog#scheduleText(4fb06a9531431799).(Schedulecxx . . $ Schedule.[currentSchedulecxx . . $ scheduleDialog#currentSchedule.] -> GetProfileNamecxx . . $ schedule#GetProfileName(6ef7b6c27b00b43d).(), |
| 190 | Schedulecxx . . $ Schedule.[currentSchedulecxx . . $ scheduleDialog#currentSchedule.] -> GetMonthcxx . . $ schedule#GetMonth(455f465bc33b4cdf).(), |
| 191 | Schedulecxx . . $ Schedule.[currentSchedulecxx . . $ scheduleDialog#currentSchedule.] -> GetMonthDaycxx . . $ schedule#GetMonthDay(455f465bc33b4cdf).(), |
| 192 | Schedulecxx . . $ Schedule.[currentSchedulecxx . . $ scheduleDialog#currentSchedule.] -> GetWeekDaycxx . . $ schedule#GetWeekDay(455f465bc33b4cdf).(), |
| 193 | Schedulecxx . . $ Schedule.[currentSchedulecxx . . $ scheduleDialog#currentSchedule.] -> GetHourcxx . . $ schedule#GetHour(455f465bc33b4cdf).(), |
| 194 | Schedulecxx . . $ Schedule.[currentSchedulecxx . . $ scheduleDialog#currentSchedule.] -> GetMinutecxx . . $ schedule#GetMinute(455f465bc33b4cdf).(), |
| 195 | Schedulecxx . . $ Schedule.[currentSchedulecxx . . $ scheduleDialog#currentSchedule.] -> GetRebootcxx . . $ schedule#GetReboot(50ce9a9e25b4a850).() )); |
| 196 | currentSchedulecxx . . $ scheduleDialog#currentSchedule.++; |
| 197 | } |
| 198 | saveScheduleFilecxx . . $ scheduleDialog#saveScheduleFile(c9857a73d68e59ba).(); //re-save the scheduleFile as text |
| 199 | } |
| 200 | |
| 201 | // This is the normal text schedule file used from version 0.4.7 and after |
| 202 | else |
| 203 | { |
| 204 | QStringcxx . . $ QString# tempAppName = "asxeto"cxx . . $ QString#QString(85c52e162fed56f9).; |
| 205 | profileDescriptioncxx . . $ Global/profileDescription. =cxx . . $ QString#`operator=`(d02845eef0c33901). ""; |
| 206 | double tempAppVersion=0; |
| 207 | bool IntOk; |
| 208 | |
| 209 | // Read all lines until the first task line or end of file if invalid |
| 210 | while ( !(ScheduleLine.startsWithcxx . . $ QString#startsWith(8cce4688c16f48f3).("[Schedule]"cxx . . $ QString#QString(85c52e162fed56f9).)) && (!in.atEndcxx . . $ QTextStream#atEnd(50ce9a9e25b4a850).()) ) |
| 211 | { |
| 212 | ScheduleLine =cxx . . $ QString#`operator=`(4f35bf974e7f8568). in.readLinecxx . . $ QTextStream#readLine(20e0a2766677f583).(); |
| 213 | |
| 214 | //input the application name & version-------------------------- |
| 215 | if (ScheduleLine.startsWithcxx . . $ QString#startsWith(8cce4688c16f48f3).("appName="cxx . . $ QString#QString(85c52e162fed56f9).)) tempAppName =cxx . . $ QString#`operator=`(b79fde0b0ce9b948). ScheduleLine.removecxx . . $ QString#remove(d7c3fdecc68f03c6).("appName="cxx . . $ QString#QString(85c52e162fed56f9).); |
| 216 | if (ScheduleLine.startsWithcxx . . $ QString#startsWith(8cce4688c16f48f3).("appVersion="cxx . . $ QString#QString(85c52e162fed56f9).)) tempAppVersion = (ScheduleLine.removecxx . . $ QString#remove(d7c3fdecc68f03c6).("appVersion="cxx . . $ QString#QString(85c52e162fed56f9).)).toDoublecxx . . $ QString#toDouble(1bd8e57dd4a29c14).(&IntOk); |
| 217 | |
| 218 | //input the number of schedules |
| 219 | if (ScheduleLine.startsWithcxx . . $ QString#startsWith(8cce4688c16f48f3).("TotalSchedules="cxx . . $ QString#QString(85c52e162fed56f9).)) TotalSchedulecxx . . $ scheduleDialog#TotalSchedule. = (ScheduleLine.removecxx . . $ QString#remove(d7c3fdecc68f03c6).("TotalSchedules="cxx . . $ QString#QString(85c52e162fed56f9).)).toIntcxx . . $ QString#toInt(d7972accae11ee1f).(&IntOk,10); |
| 220 | } |
| 221 | |
| 222 | if ( (tempAppName !=cxx . . $ `operator!=`(5bc2975d2d751687). appNamecxx . . $ Global/appName.) || (tempAppVersion < validScheduleVersioncxx . . $ Global/validScheduleVersion.) )//check if the file is a valid luckybackup schedule file |
| 223 | { |
| 224 | messagecxx . . $ Global/message. =cxx . . $ QString#`operator=`(b79fde0b0ce9b948). trcxx . . $ scheduleDialog#tr(75d9f1c324b4579d).("The existent schedule file is not a valid luckyBackup v.","v is for version") |
| 225 | +cxx . . $ operator+(fab9b4f80031f353). countStrcxx . . $ Global/countStr..setNumcxx . . $ QString#setNum(3becbeaf5ad69e3c).(appVersioncxx . . $ Global/appVersion.) +cxx . . $ operator+(fab9b4f80031f353). trcxx . . $ scheduleDialog#tr(75d9f1c324b4579d).(" file","BEWARE of the whitespace before file")+cxx . . $ operator+(3d22f08efddf8107)."<br><br>"+cxx . . $ operator+(fab9b4f80031f353).trcxx . . $ scheduleDialog#tr(75d9f1c324b4579d).("Starting from scratch")+cxx . . $ operator+(3d22f08efddf8107)."...<br>" ; |
| 226 | textDialogcxx . . $ textDialog# textdialogWcxx . . $ textDialog#textDialog(9c8c077708043c75). ("QtWarning"cxx . . $ QString#QString(85c52e162fed56f9)., messagecxx . . $ QString#QString(132dd6869045752b)., this); |
| 227 | textdialogW.execcxx . . $ QDialog#exec(b126dc7c1de90089).(); |
| 228 | scheduleFilecxx . . $ scheduleDialog#scheduleFile..removecxx . . $ QFile#remove(c9857a73d68e59ba).(); |
| 229 | return; |
| 230 | } |
| 231 | |
| 232 | currentSchedulecxx . . $ scheduleDialog#currentSchedule. = 0; ScheduleLine=cxx . . $ QString#`operator=`(d02845eef0c33901).""; |
| 233 | while (currentSchedulecxx . . $ scheduleDialog#currentSchedule. < TotalSchedulecxx . . $ scheduleDialog#TotalSchedule.) |
| 234 | { |
| 235 | schedulecxx . . $ schedule# *tempSchedule = new schedulecxx . . $ schedule#; |
| 236 | ScheduleLine =cxx . . $ QString#`operator=`(4f35bf974e7f8568). in.readLinecxx . . $ QTextStream#readLine(20e0a2766677f583).(); // inport the next line |
| 237 | while ( (!ScheduleLine.startsWithcxx . . $ QString#startsWith(8cce4688c16f48f3).("[Schedule_end]"cxx . . $ QString#QString(85c52e162fed56f9).)) && (!in.atEndcxx . . $ QTextStream#atEnd(50ce9a9e25b4a850).()) ) |
| 238 | { |
| 239 | if (ScheduleLine.startsWithcxx . . $ QString#startsWith(8cce4688c16f48f3).("ScheduleName="cxx . . $ QString#QString(85c52e162fed56f9).)) tempSchedule -> SetNamecxx . . $ schedule#SetName(7df51288a9ebd664).(ScheduleLinecxx . . $ QString#QString(132dd6869045752b)..removecxx . . $ QString#remove(d7c3fdecc68f03c6).("ScheduleName="cxx . . $ QString#QString(85c52e162fed56f9).)); |
| 240 | |
| 241 | if (ScheduleLine.startsWithcxx . . $ QString#startsWith(8cce4688c16f48f3).("ProfilePath="cxx . . $ QString#QString(85c52e162fed56f9).)) tempSchedule -> SetProfilePathcxx . . $ schedule#SetProfilePath(7df51288a9ebd664).(ScheduleLinecxx . . $ QString#QString(132dd6869045752b)..removecxx . . $ QString#remove(d7c3fdecc68f03c6).("ProfilePath="cxx . . $ QString#QString(85c52e162fed56f9).)); |
| 242 | if (ScheduleLine.startsWithcxx . . $ QString#startsWith(8cce4688c16f48f3).("ProfileName="cxx . . $ QString#QString(85c52e162fed56f9).)) tempSchedule -> SetProfileNamecxx . . $ schedule#SetProfileName(7df51288a9ebd664).(ScheduleLinecxx . . $ QString#QString(132dd6869045752b)..removecxx . . $ QString#remove(d7c3fdecc68f03c6).("ProfileName="cxx . . $ QString#QString(85c52e162fed56f9).)); |
| 243 | |
| 244 | if (ScheduleLine.startsWithcxx . . $ QString#startsWith(8cce4688c16f48f3).("ScheduleMonth="cxx . . $ QString#QString(85c52e162fed56f9).)) tempSchedule -> SetMonthcxx . . $ schedule#SetMonth(d4f767463ce0a6b3).(ScheduleLine.removecxx . . $ QString#remove(d7c3fdecc68f03c6).("ScheduleMonth="cxx . . $ QString#QString(85c52e162fed56f9).).toIntcxx . . $ QString#toInt(d7972accae11ee1f).(&IntOk,10)); |
| 245 | if (ScheduleLine.startsWithcxx . . $ QString#startsWith(8cce4688c16f48f3).("ScheduleMonthDay="cxx . . $ QString#QString(85c52e162fed56f9).)) tempSchedule -> SetMonthDaycxx . . $ schedule#SetMonthDay(d4f767463ce0a6b3).(ScheduleLine.removecxx . . $ QString#remove(d7c3fdecc68f03c6).("ScheduleMonthDay="cxx . . $ QString#QString(85c52e162fed56f9).).toIntcxx . . $ QString#toInt(d7972accae11ee1f).(&IntOk,10)); |
| 246 | if (ScheduleLine.startsWithcxx . . $ QString#startsWith(8cce4688c16f48f3).("ScheduleWeekDay="cxx . . $ QString#QString(85c52e162fed56f9).)) tempSchedule -> SetWeekDaycxx . . $ schedule#SetWeekDay(d4f767463ce0a6b3).(ScheduleLine.removecxx . . $ QString#remove(d7c3fdecc68f03c6).("ScheduleWeekDay="cxx . . $ QString#QString(85c52e162fed56f9).).toIntcxx . . $ QString#toInt(d7972accae11ee1f).(&IntOk,10)); |
| 247 | if (ScheduleLine.startsWithcxx . . $ QString#startsWith(8cce4688c16f48f3).("ScheduleHour="cxx . . $ QString#QString(85c52e162fed56f9).)) tempSchedule -> SetHourcxx . . $ schedule#SetHour(d4f767463ce0a6b3).(ScheduleLine.removecxx . . $ QString#remove(d7c3fdecc68f03c6).("ScheduleHour="cxx . . $ QString#QString(85c52e162fed56f9).).toIntcxx . . $ QString#toInt(d7972accae11ee1f).(&IntOk,10)); |
| 248 | if (ScheduleLine.startsWithcxx . . $ QString#startsWith(8cce4688c16f48f3).("ScheduleMinute="cxx . . $ QString#QString(85c52e162fed56f9).)) tempSchedule -> SetMinutecxx . . $ schedule#SetMinute(d4f767463ce0a6b3).(ScheduleLine.removecxx . . $ QString#remove(d7c3fdecc68f03c6).("ScheduleMinute="cxx . . $ QString#QString(85c52e162fed56f9).).toIntcxx . . $ QString#toInt(d7972accae11ee1f).(&IntOk,10)); |
| 249 | |
| 250 | if (ScheduleLine.startsWithcxx . . $ QString#startsWith(8cce4688c16f48f3).("ScheduleSkipCritical="cxx . . $ QString#QString(85c52e162fed56f9).)) tempSchedule -> SetSkipCriticalcxx . . $ schedule#SetSkipCritical(b45ddcbc8423892c).(ScheduleLine.removecxx . . $ QString#remove(d7c3fdecc68f03c6).("ScheduleSkipCritical="cxx . . $ QString#QString(85c52e162fed56f9).).toIntcxx . . $ QString#toInt(d7972accae11ee1f).(&IntOk,10)); |
| 251 | if (ScheduleLine.startsWithcxx . . $ QString#startsWith(8cce4688c16f48f3).("ScheduleConsoleMode="cxx . . $ QString#QString(85c52e162fed56f9).)) tempSchedule -> SetConsoleModecxx . . $ schedule#SetConsoleMode(b45ddcbc8423892c).(ScheduleLine.removecxx . . $ QString#remove(d7c3fdecc68f03c6).("ScheduleConsoleMode="cxx . . $ QString#QString(85c52e162fed56f9).).toIntcxx . . $ QString#toInt(d7972accae11ee1f).(&IntOk,10)); |
| 252 | if (ScheduleLine.startsWithcxx . . $ QString#startsWith(8cce4688c16f48f3).("ScheduleAtReboot="cxx . . $ QString#QString(85c52e162fed56f9).)) tempSchedule -> SetRebootcxx . . $ schedule#SetReboot(b45ddcbc8423892c).(ScheduleLine.removecxx . . $ QString#remove(d7c3fdecc68f03c6).("ScheduleAtReboot="cxx . . $ QString#QString(85c52e162fed56f9).).toIntcxx . . $ QString#toInt(d7972accae11ee1f).(&IntOk,10)); |
| 253 | if (ScheduleLine.startsWithcxx . . $ QString#startsWith(8cce4688c16f48f3).("ScheduleAtRebootDelay="cxx . . $ QString#QString(85c52e162fed56f9).)) tempSchedule -> SetDelayRebootcxx . . $ schedule#SetDelayReboot(d4f767463ce0a6b3).(ScheduleLine.removecxx . . $ QString#remove(d7c3fdecc68f03c6).("ScheduleAtRebootDelay="cxx . . $ QString#QString(85c52e162fed56f9).).toIntcxx . . $ QString#toInt(d7972accae11ee1f).(&IntOk,10)); |
| 254 | |
| 255 | ScheduleLine =cxx . . $ QString#`operator=`(4f35bf974e7f8568). in.readLinecxx . . $ QTextStream#readLine(20e0a2766677f583).(); // import the next line |
| 256 | if (ScheduleLine.startsWithcxx . . $ QString#startsWith(8cce4688c16f48f3).("[Schedule_end]"cxx . . $ QString#QString(85c52e162fed56f9).)) // all properties of the specific schedule have been loaded |
| 257 | Schedulecxx . . $ Schedule.[currentSchedulecxx . . $ scheduleDialog#currentSchedule.] = tempSchedule; |
| 258 | } |
| 259 | uiScxx . . $ scheduleDialog#uiS..listWidget_schedulecxx . . $ Ui_scheduleDialog#listWidget_schedule. -> addItemcxx . . $ QListWidget#addItem(3520e46b33348bf6).(scheduleTextcxx . . $ scheduleDialog#scheduleText(4fb06a9531431799).(Schedulecxx . . $ Schedule.[currentSchedulecxx . . $ scheduleDialog#currentSchedule.] -> GetProfileNamecxx . . $ schedule#GetProfileName(6ef7b6c27b00b43d).(), |
| 260 | Schedulecxx . . $ Schedule.[currentSchedulecxx . . $ scheduleDialog#currentSchedule.] -> GetMonthcxx . . $ schedule#GetMonth(455f465bc33b4cdf).(), |
| 261 | Schedulecxx . . $ Schedule.[currentSchedulecxx . . $ scheduleDialog#currentSchedule.] -> GetMonthDaycxx . . $ schedule#GetMonthDay(455f465bc33b4cdf).(), |
| 262 | Schedulecxx . . $ Schedule.[currentSchedulecxx . . $ scheduleDialog#currentSchedule.] -> GetWeekDaycxx . . $ schedule#GetWeekDay(455f465bc33b4cdf).(), |
| 263 | Schedulecxx . . $ Schedule.[currentSchedulecxx . . $ scheduleDialog#currentSchedule.] -> GetHourcxx . . $ schedule#GetHour(455f465bc33b4cdf).(), |
| 264 | Schedulecxx . . $ Schedule.[currentSchedulecxx . . $ scheduleDialog#currentSchedule.] -> GetMinutecxx . . $ schedule#GetMinute(455f465bc33b4cdf).(), |
| 265 | Schedulecxx . . $ Schedule.[currentSchedulecxx . . $ scheduleDialog#currentSchedule.] -> GetRebootcxx . . $ schedule#GetReboot(50ce9a9e25b4a850).() )); |
| 266 | |
| 267 | currentSchedulecxx . . $ scheduleDialog#currentSchedule.++; |
| 268 | } |
| 269 | } |
| 270 | //TotalSchedule = uiS.listWidget_schedule -> count(); //Get the schedule list size |
| 271 | |
| 272 | if (TotalSchedulecxx . . $ scheduleDialog#TotalSchedule. > 0) |
| 273 | { |
| 274 | uiScxx . . $ scheduleDialog#uiS..listWidget_schedulecxx . . $ Ui_scheduleDialog#listWidget_schedule. -> setCurrentRowcxx . . $ QListWidget#setCurrentRow(d4f767463ce0a6b3).(0); |
| 275 | noSchedulescxx . . $ scheduleDialog#noSchedules. = false; |
| 276 | } |
| 277 | else |
| 278 | uiScxx . . $ scheduleDialog#uiS..listWidget_schedulecxx . . $ Ui_scheduleDialog#listWidget_schedule. -> addItemcxx . . $ QListWidget#addItem(3520e46b33348bf6).(trcxx . . $ scheduleDialog#tr(75d9f1c324b4579d).("No schedules are declared !!")); |
| 279 | |
| 280 | scheduleFilecxx . . $ scheduleDialog#scheduleFile..closecxx . . $ QFileDevice#close(49f6e7a06ebc5aa8).(); //close the file |
| 281 | } |
| 282 | |
| 283 | // use this cause when the dialog starts and ther's only 1 schedule the filldetails cannot be called !! |
| 284 | currentSchedulecxx . . $ scheduleDialog#currentSchedule. = uiScxx . . $ scheduleDialog#uiS..listWidget_schedulecxx . . $ Ui_scheduleDialog#listWidget_schedule. -> currentRowcxx . . $ QListWidget#currentRow(455f465bc33b4cdf).(); //current operations list row number |
| 285 | fillDetailscxx . . $ scheduleDialog#fillDetails(49f6e7a06ebc5aa8).(); |
| 286 | } |
| 287 | //=================================================================================================================================================== |
| 288 | //------------------------------------------------------------------SLOTS---------------------------------------------------------------------------- |
| 289 | //=================================================================================================================================================== |
| 290 | |
| 291 | |
| 292 | // CLOSE button pressed===================================================================================================== |
| 293 | void scheduleDialogcxx . . $ scheduleDialog#::cancelPressedcxx . . $ scheduleDialog#cancelPressed(49f6e7a06ebc5aa8).() |
| 294 | { |
| 295 | closecxx . . $ QWidget#close(c9857a73d68e59ba).(); //emmit a QcloseEvent |
| 296 | } |
| 297 | |
| 298 | //window closebutton pressed or QcloseEvent emitted========================================================================== |
| 299 | void scheduleDialogcxx . . $ scheduleDialog#::closeEventcxx . . $ scheduleDialog#closeEvent(642e80679aeb34f8).(QCloseEventcxx . . $ QCloseEvent# *event) |
| 300 | { |
| 301 | if (changesMadecxx . . $ scheduleDialog#changesMade.) |
| 302 | { |
| 303 | textDialogcxx . . $ textDialog# textdialogQcxx . . $ textDialog#textDialog(9c8c077708043c75). ("QtQuestion"cxx . . $ QString#QString(85c52e162fed56f9)., trcxx . . $ scheduleDialog#tr(75d9f1c324b4579d).("You have made changes without clicking the cronIT button") +cxx . . $ operator+(3d22f08efddf8107). ".<br>" +cxx . . $ operator+(fab9b4f80031f353). |
| 304 | trcxx . . $ scheduleDialog#tr(75d9f1c324b4579d).("Are you sure you want to close the schedule dialog ?"), this); |
| 305 | textdialogQ.execcxx . . $ QDialog#exec(b126dc7c1de90089).(); |
| 306 | |
| 307 | if (textdialogQ.getGoOncxx . . $ textDialog#getGoOn(b126dc7c1de90089).() > 0) //if user answers yes |
| 308 | event->acceptcxx . . $ QEvent#accept(49f6e7a06ebc5aa8).(); |
| 309 | else |
| 310 | event->ignorecxx . . $ QEvent#ignore(49f6e7a06ebc5aa8).(); |
| 311 | } |
| 312 | else |
| 313 | event->acceptcxx . . $ QEvent#accept(49f6e7a06ebc5aa8).(); |
| 314 | } |
| 315 | |
| 316 | |
| 317 | // schedule button pressed======================================================================================================= |
| 318 | // Read all fields of dialog, fill appropriate variables, saves crontab file and creates a cron job |
| 319 | void scheduleDialogcxx . . $ scheduleDialog#::schedulePressedcxx . . $ scheduleDialog#schedulePressed(49f6e7a06ebc5aa8).() |
| 320 | { |
| 321 | if (noSchedulescxx . . $ scheduleDialog#noSchedules.) // if no schedules are declared, remove the info line first |
| 322 | uiScxx . . $ scheduleDialog#uiS..listWidget_schedulecxx . . $ Ui_scheduleDialog#listWidget_schedule. -> takeItemcxx . . $ QListWidget#takeItem(ffbac97cfc278ea8). (0); |
| 323 | |
| 324 | TotalSchedulecxx . . $ scheduleDialog#TotalSchedule. = uiScxx . . $ scheduleDialog#uiS..listWidget_schedulecxx . . $ Ui_scheduleDialog#listWidget_schedule. -> countcxx . . $ QListWidget#count(455f465bc33b4cdf).(); //Get the schedule list size |
| 325 | |
| 326 | //update schedule file ------------------------------------------------------------------------------------------ |
| 327 | if (!saveScheduleFilecxx . . $ scheduleDialog#saveScheduleFile(c9857a73d68e59ba).()) //create a new schedule file |
| 328 | { |
| 329 | textDialogcxx . . $ textDialog# textdialogIcxx . . $ textDialog#textDialog(9c8c077708043c75). ("QtInformation"cxx . . $ QString#QString(85c52e162fed56f9)., trcxx . . $ scheduleDialog#tr(75d9f1c324b4579d).("Unable to create schedule file")+cxx . . $ operator+(3d22f08efddf8107)." !!<br><br>"+cxx . . $ operator+(fab9b4f80031f353). scheduleFilecxx . . $ scheduleDialog#scheduleFile..errorStringcxx . . $ QIODevice#errorString(6ef7b6c27b00b43d).(), this); |
| 330 | textdialogI.execcxx . . $ QDialog#exec(b126dc7c1de90089).(); |
| 331 | } |
| 332 | |
| 333 | createCroncxx . . $ scheduleDialog#createCron(49f6e7a06ebc5aa8).(); //create a cronfile & update user's crontab |
| 334 | crontabUpdatedcxx . . $ Global/crontabUpdated. = true; |
| 335 | changesMadecxx . . $ scheduleDialog#changesMade. = false; |
| 336 | |
| 337 | textDialogcxx . . $ textDialog# textdialogIcxx . . $ textDialog#textDialog(9c8c077708043c75). ("QtInformation"cxx . . $ QString#QString(85c52e162fed56f9)., "<font color=blue><b>" +cxx . . $ operator+(c75c3ae4eb9af1a8). currentUsercxx . . $ Global/currentUser. +cxx . . $ operator+(3d22f08efddf8107). "</b></font><br><br>" +cxx . . $ operator+(fab9b4f80031f353). |
| 338 | trcxx . . $ scheduleDialog#tr(75d9f1c324b4579d).("Your crontab is updated successfully"), this); |
| 339 | textdialogI.execcxx . . $ QDialog#exec(b126dc7c1de90089).(); |
| 340 | |
| 341 | //close(); //emmit a QcloseEvent |
| 342 | } |
| 343 | |
| 344 | // add button pressed===================================================================================================== |
| 345 | // shows part of the widget to add a new profile schedule |
| 346 | void scheduleDialogcxx . . $ scheduleDialog#::addPressedcxx . . $ scheduleDialog#addPressed(49f6e7a06ebc5aa8).() |
| 347 | { |
| 348 | if (noSchedulescxx . . $ scheduleDialog#noSchedules.) // if no schedules are declared, remove the info line first |
| 349 | { |
| 350 | uiScxx . . $ scheduleDialog#uiS..listWidget_schedulecxx . . $ Ui_scheduleDialog#listWidget_schedule. -> takeItemcxx . . $ QListWidget#takeItem(ffbac97cfc278ea8). (0); |
| 351 | noSchedulescxx . . $ scheduleDialog#noSchedules. = false; |
| 352 | } |
| 353 | |
| 354 | TotalSchedulecxx . . $ scheduleDialog#TotalSchedule. = uiScxx . . $ scheduleDialog#uiS..listWidget_schedulecxx . . $ Ui_scheduleDialog#listWidget_schedule. -> countcxx . . $ QListWidget#count(455f465bc33b4cdf).(); //Get the schedule list size |
| 355 | currentSchedulecxx . . $ scheduleDialog#currentSchedule. = TotalSchedulecxx . . $ scheduleDialog#TotalSchedule.; //We will add an item !! |
| 356 | if ( (TotalSchedulecxx . . $ scheduleDialog#TotalSchedule.) >= (maxSchedulecxx . . $ maxSchedule.-1) ) //if the maxSchedulelimit-1 is reached |
| 357 | { |
| 358 | QMessageBoxcxx . . $ QMessageBox#::warningcxx . . $ QMessageBox#warning(a9e3742e6f7b4147).(this, appNamecxx . . $ Global/appName., |
| 359 | trcxx . . $ scheduleDialog#tr(75d9f1c324b4579d).("You have reached the maximum limit of supported scheduled profiles")+cxx . . $ operator+(3d22f08efddf8107). "<br><br>"+cxx . . $ operator+(fab9b4f80031f353). |
| 360 | trcxx . . $ scheduleDialog#tr(75d9f1c324b4579d).("You have to remove an item if you wish to add another")+cxx . . $ operator+(3d22f08efddf8107)." !!", |
| 361 | QMessageBoxcxx . . $ QMessageBox#::Okcxx . . $ QMessageBox#Ok. |cxx . . $ `operator|`(67530149e923fc12). QMessageBoxcxx . . $ QMessageBox#::Defaultcxx . . $ QMessageBox#Default.); |
| 362 | return; |
| 363 | } |
| 364 | |
| 365 | uiScxx . . $ scheduleDialog#uiS..groupBox_addProfileSchedulecxx . . $ Ui_scheduleDialog#groupBox_addProfileSchedule. -> setVisiblecxx . . $ QWidget#setVisible(b45ddcbc8423892c).(true); |
| 366 | uiScxx . . $ scheduleDialog#uiS..listWidget_schedulecxx . . $ Ui_scheduleDialog#listWidget_schedule. -> setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(false); |
| 367 | uiScxx . . $ scheduleDialog#uiS..groupBox_addProfileSchedulecxx . . $ Ui_scheduleDialog#groupBox_addProfileSchedule. -> setTitlecxx . . $ QGroupBox#setTitle(3520e46b33348bf6).(trcxx . . $ scheduleDialog#tr(75d9f1c324b4579d).("Add profile schedule")); |
| 368 | uiScxx . . $ scheduleDialog#uiS..pushButton_addcxx . . $ Ui_scheduleDialog#pushButton_add. -> setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(false); |
| 369 | uiScxx . . $ scheduleDialog#uiS..pushButton_modifycxx . . $ Ui_scheduleDialog#pushButton_modify. -> setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(false); |
| 370 | uiScxx . . $ scheduleDialog#uiS..pushButton_removecxx . . $ Ui_scheduleDialog#pushButton_remove. -> setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(false); |
| 371 | uiScxx . . $ scheduleDialog#uiS..pushButton_cancelcxx . . $ Ui_scheduleDialog#pushButton_cancel. -> setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(false); |
| 372 | uiScxx . . $ scheduleDialog#uiS..pushButton_schedulecxx . . $ Ui_scheduleDialog#pushButton_schedule. -> setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(false); |
| 373 | uiScxx . . $ scheduleDialog#uiS..pushButton_viewCrontabcxx . . $ Ui_scheduleDialog#pushButton_viewCrontab. -> setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(false); |
| 374 | clearScheduleDetailscxx . . $ scheduleDialog#clearScheduleDetails(49f6e7a06ebc5aa8).(); |
| 375 | } |
| 376 | |
| 377 | // modify button pressed===================================================================================================== |
| 378 | // modifies a profile schedule |
| 379 | void scheduleDialogcxx . . $ scheduleDialog#::modifyPressedcxx . . $ scheduleDialog#modifyPressed(49f6e7a06ebc5aa8).() |
| 380 | { |
| 381 | currentSchedulecxx . . $ scheduleDialog#currentSchedule. = uiScxx . . $ scheduleDialog#uiS..listWidget_schedulecxx . . $ Ui_scheduleDialog#listWidget_schedule. -> currentRowcxx . . $ QListWidget#currentRow(455f465bc33b4cdf).(); //current operations list row number |
| 382 | if ((currentSchedulecxx . . $ scheduleDialog#currentSchedule. < 0) || (noSchedulescxx . . $ scheduleDialog#noSchedules.)) //if nothing is selected or no schedules declared, do nothing |
| 383 | return; |
| 384 | |
| 385 | uiScxx . . $ scheduleDialog#uiS..groupBox_addProfileSchedulecxx . . $ Ui_scheduleDialog#groupBox_addProfileSchedule. -> setVisiblecxx . . $ QWidget#setVisible(b45ddcbc8423892c).(true); |
| 386 | uiScxx . . $ scheduleDialog#uiS..groupBox_addProfileSchedulecxx . . $ Ui_scheduleDialog#groupBox_addProfileSchedule. -> setTitlecxx . . $ QGroupBox#setTitle(3520e46b33348bf6).(trcxx . . $ scheduleDialog#tr(75d9f1c324b4579d).("Modify profile schedule")); |
| 387 | uiScxx . . $ scheduleDialog#uiS..listWidget_schedulecxx . . $ Ui_scheduleDialog#listWidget_schedule. -> setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(false); |
| 388 | uiScxx . . $ scheduleDialog#uiS..pushButton_addcxx . . $ Ui_scheduleDialog#pushButton_add. -> setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(false); |
| 389 | uiScxx . . $ scheduleDialog#uiS..pushButton_modifycxx . . $ Ui_scheduleDialog#pushButton_modify. -> setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(false); |
| 390 | uiScxx . . $ scheduleDialog#uiS..pushButton_removecxx . . $ Ui_scheduleDialog#pushButton_remove. -> setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(false); |
| 391 | uiScxx . . $ scheduleDialog#uiS..pushButton_cancelcxx . . $ Ui_scheduleDialog#pushButton_cancel. -> setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(false); |
| 392 | uiScxx . . $ scheduleDialog#uiS..pushButton_schedulecxx . . $ Ui_scheduleDialog#pushButton_schedule. -> setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(false); |
| 393 | uiScxx . . $ scheduleDialog#uiS..pushButton_viewCrontabcxx . . $ Ui_scheduleDialog#pushButton_viewCrontab. -> setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(false); |
| 394 | } |
| 395 | |
| 396 | |
| 397 | // List item Remove button pressed============================================================================================== |
| 398 | // Removes an item from the schedule list |
| 399 | void scheduleDialogcxx . . $ scheduleDialog#::removePressedcxx . . $ scheduleDialog#removePressed(49f6e7a06ebc5aa8).() |
| 400 | { |
| 401 | int selected; |
| 402 | |
| 403 | //schedule list remove button |
| 404 | selected = uiScxx . . $ scheduleDialog#uiS..listWidget_schedulecxx . . $ Ui_scheduleDialog#listWidget_schedule. -> currentRowcxx . . $ QListWidget#currentRow(455f465bc33b4cdf).(); //current list row number |
| 405 | if (selected < 0) //if nothing is selected do nothing |
| 406 | return; |
| 407 | uiScxx . . $ scheduleDialog#uiS..listWidget_schedulecxx . . $ Ui_scheduleDialog#listWidget_schedule. -> takeItemcxx . . $ QListWidget#takeItem(ffbac97cfc278ea8).(selected); |
| 408 | |
| 409 | //update the Schedules array by shifting the elements one position to the left |
| 410 | for (int i = selected; i < TotalSchedulecxx . . $ scheduleDialog#TotalSchedule.+1; ++i) |
| 411 | Schedulecxx . . $ Schedule.[i] = Schedulecxx . . $ Schedule.[i + 1]; // copy next element left |
| 412 | |
| 413 | TotalSchedulecxx . . $ scheduleDialog#TotalSchedule. = uiScxx . . $ scheduleDialog#uiS..listWidget_schedulecxx . . $ Ui_scheduleDialog#listWidget_schedule. -> countcxx . . $ QListWidget#count(455f465bc33b4cdf).(); //Get the schedule list size |
| 414 | if (TotalSchedulecxx . . $ scheduleDialog#TotalSchedule. == 0) |
| 415 | { |
| 416 | noSchedulescxx . . $ scheduleDialog#noSchedules. = true; |
| 417 | uiScxx . . $ scheduleDialog#uiS..listWidget_schedulecxx . . $ Ui_scheduleDialog#listWidget_schedule. -> addItemcxx . . $ QListWidget#addItem(3520e46b33348bf6).(trcxx . . $ scheduleDialog#tr(75d9f1c324b4579d).("No schedules are declared !!")); |
| 418 | } |
| 419 | changesMadecxx . . $ scheduleDialog#changesMade. = true; |
| 420 | } |
| 421 | |
| 422 | // current button pressed============================================================================================== |
| 423 | // Displays the current crontab |
| 424 | void scheduleDialogcxx . . $ scheduleDialog#::viewCrontabcxx . . $ scheduleDialog#viewCrontab(49f6e7a06ebc5aa8).() |
| 425 | { |
| 426 | // copy user's crontab to QString CronTab |
| 427 | CronTabcxx . . $ scheduleDialog#CronTab. =cxx . . $ QString#`operator=`(d02845eef0c33901). ""; |
| 428 | |
| 429 | if (WINrunningcxx . . $ Global/WINrunning.) |
| 430 | cronProcesscxx . . $ cronProcess. -> startcxx . . $ QProcess#start(8f4bc4a0c00c3d3f). ("at "cxx . . $ QString#QString(85c52e162fed56f9).); // execute crontab -l command & capture output to QString CronTab |
| 431 | else |
| 432 | cronProcesscxx . . $ cronProcess. -> startcxx . . $ QProcess#start(5e315ba9c811784d). ("crontab"cxx . . $ QString#QString(85c52e162fed56f9).,QStringListcxx . . $ QStringList#QStringList(ced63f7c635d850d).() <<cxx . . $ QStringList#`operator<<`(85116071a693d053). "-l"cxx . . $ QString#QString(85c52e162fed56f9).); // execute crontab -l command & capture output to QString CronTab |
| 433 | |
| 434 | cronProcesscxx . . $ cronProcess. -> waitForStartedcxx . . $ QProcess#waitForStarted(83c267b20bac841a).(); |
| 435 | cronProcesscxx . . $ cronProcess. -> waitForFinishedcxx . . $ QProcess#waitForFinished(83c267b20bac841a).(); |
| 436 | |
| 437 | if (CronTabcxx . . $ scheduleDialog#CronTab. ==cxx . . $ QString#`operator==`(7d4bdb1abc417636). "") |
| 438 | CronTabcxx . . $ scheduleDialog#CronTab. =cxx . . $ QString#`operator=`(b79fde0b0ce9b948). currentUsercxx . . $ Global/currentUser. +cxx . . $ operator+(3d22f08efddf8107). " - " +cxx . . $ operator+(fab9b4f80031f353). trcxx . . $ scheduleDialog#tr(75d9f1c324b4579d).("no crontab entries exist"); |
| 439 | else |
| 440 | CronTabcxx . . $ scheduleDialog#CronTab..prependcxx . . $ QString#prepend(6a89d0b7f4d2681c).("User: " +cxx . . $ operator+(c75c3ae4eb9af1a8). currentUsercxx . . $ Global/currentUser. +cxx . . $ operator+(3d22f08efddf8107). " - " +cxx . . $ operator+(fab9b4f80031f353). trcxx . . $ scheduleDialog#tr(75d9f1c324b4579d).("crontab content") +cxx . . $ operator+(3d22f08efddf8107). "\n\n"); |
| 441 | textDialogcxx . . $ textDialog# textdialogcxx . . $ textDialog#textDialog(9c8c077708043c75). ("ViewCurrentCrontab"cxx . . $ QString#QString(85c52e162fed56f9)., CronTabcxx . . $ QString#QString(132dd6869045752b)., this); |
| 442 | textdialog.execcxx . . $ QDialog#exec(b126dc7c1de90089).(); |
| 443 | } |
| 444 | |
| 445 | // modify cancel button pressed================================================================================================= |
| 446 | void scheduleDialogcxx . . $ scheduleDialog#::modifyCancelPressedcxx . . $ scheduleDialog#modifyCancelPressed(49f6e7a06ebc5aa8).() |
| 447 | { |
| 448 | uiScxx . . $ scheduleDialog#uiS..groupBox_addProfileSchedulecxx . . $ Ui_scheduleDialog#groupBox_addProfileSchedule. -> setTitlecxx . . $ QGroupBox#setTitle(3520e46b33348bf6).(trcxx . . $ scheduleDialog#tr(75d9f1c324b4579d).("Profile schedule details")); |
| 449 | uiScxx . . $ scheduleDialog#uiS..groupBox_addProfileSchedulecxx . . $ Ui_scheduleDialog#groupBox_addProfileSchedule. -> setVisiblecxx . . $ QWidget#setVisible(b45ddcbc8423892c).(false); |
| 450 | uiScxx . . $ scheduleDialog#uiS..listWidget_schedulecxx . . $ Ui_scheduleDialog#listWidget_schedule. -> setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(true); |
| 451 | uiScxx . . $ scheduleDialog#uiS..pushButton_addcxx . . $ Ui_scheduleDialog#pushButton_add. -> setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(true); |
| 452 | uiScxx . . $ scheduleDialog#uiS..pushButton_modifycxx . . $ Ui_scheduleDialog#pushButton_modify. -> setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(true); |
| 453 | uiScxx . . $ scheduleDialog#uiS..pushButton_removecxx . . $ Ui_scheduleDialog#pushButton_remove. -> setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(true); |
| 454 | uiScxx . . $ scheduleDialog#uiS..pushButton_cancelcxx . . $ Ui_scheduleDialog#pushButton_cancel. -> setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(true); |
| 455 | uiScxx . . $ scheduleDialog#uiS..pushButton_schedulecxx . . $ Ui_scheduleDialog#pushButton_schedule. -> setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(true); |
| 456 | uiScxx . . $ scheduleDialog#uiS..pushButton_viewCrontabcxx . . $ Ui_scheduleDialog#pushButton_viewCrontab. -> setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(true); |
| 457 | |
| 458 | TotalSchedulecxx . . $ scheduleDialog#TotalSchedule. = uiScxx . . $ scheduleDialog#uiS..listWidget_schedulecxx . . $ Ui_scheduleDialog#listWidget_schedule. -> countcxx . . $ QListWidget#count(455f465bc33b4cdf).(); //Get the schedule list size |
| 459 | if (TotalSchedulecxx . . $ scheduleDialog#TotalSchedule. == 0) |
| 460 | { |
| 461 | noSchedulescxx . . $ scheduleDialog#noSchedules. = true; |
| 462 | uiScxx . . $ scheduleDialog#uiS..listWidget_schedulecxx . . $ Ui_scheduleDialog#listWidget_schedule. -> addItemcxx . . $ QListWidget#addItem(3520e46b33348bf6).(trcxx . . $ scheduleDialog#tr(75d9f1c324b4579d).("No schedules are declared !!")); |
| 463 | } |
| 464 | } |
| 465 | |
| 466 | // cancelSchedulePressed button pressed=============================================================================================== |
| 467 | // sets the Profile Schedule details fields to default values |
| 468 | void scheduleDialogcxx . . $ scheduleDialog#::clearScheduleDetailscxx . . $ scheduleDialog#clearScheduleDetails(49f6e7a06ebc5aa8).() |
| 469 | { |
| 470 | //initialize all fields |
| 471 | uiScxx . . $ scheduleDialog#uiS..comboBox_profilecxx . . $ Ui_scheduleDialog#comboBox_profile. -> setCurrentIndexcxx . . $ QComboBox#setCurrentIndex(d4f767463ce0a6b3).(currentProfileIndexcxx . . $ scheduleDialog#currentProfileIndex.); |
| 472 | uiScxx . . $ scheduleDialog#uiS..comboBox_monthcxx . . $ Ui_scheduleDialog#comboBox_month. -> setCurrentIndexcxx . . $ QComboBox#setCurrentIndex(d4f767463ce0a6b3).(0); |
| 473 | uiScxx . . $ scheduleDialog#uiS..comboBox_dayOfMonthcxx . . $ Ui_scheduleDialog#comboBox_dayOfMonth. -> setCurrentIndexcxx . . $ QComboBox#setCurrentIndex(d4f767463ce0a6b3).(0); |
| 474 | uiScxx . . $ scheduleDialog#uiS..comboBox_DayOfWeekcxx . . $ Ui_scheduleDialog#comboBox_DayOfWeek. -> setCurrentIndexcxx . . $ QComboBox#setCurrentIndex(d4f767463ce0a6b3).(0); |
| 475 | uiScxx . . $ scheduleDialog#uiS..spinBox_hourcxx . . $ Ui_scheduleDialog#spinBox_hour. -> setValuecxx . . $ QSpinBox#setValue(d4f767463ce0a6b3).(0); |
| 476 | uiScxx . . $ scheduleDialog#uiS..spinBox_minutecxx . . $ Ui_scheduleDialog#spinBox_minute. -> setValuecxx . . $ QSpinBox#setValue(d4f767463ce0a6b3).(0); |
| 477 | uiScxx . . $ scheduleDialog#uiS..spinBox_delayRebootcxx . . $ Ui_scheduleDialog#spinBox_delayReboot. -> setValuecxx . . $ QSpinBox#setValue(d4f767463ce0a6b3).(3); |
| 478 | uiScxx . . $ scheduleDialog#uiS..checkBox_skipCriticalcxx . . $ Ui_scheduleDialog#checkBox_skipCritical. -> setCheckStatecxx . . $ QCheckBox#setCheckState(537692883700039).(Qtcxx . . $ Qt/::Checkedcxx . . $ Qt/Checked.); |
| 479 | uiScxx . . $ scheduleDialog#uiS..checkBox_consoleModecxx . . $ Ui_scheduleDialog#checkBox_consoleMode. -> setCheckStatecxx . . $ QCheckBox#setCheckState(537692883700039).(Qtcxx . . $ Qt/::Uncheckedcxx . . $ Qt/Unchecked.); |
| 480 | uiScxx . . $ scheduleDialog#uiS..checkBox_rebootcxx . . $ Ui_scheduleDialog#checkBox_reboot. -> setCheckStatecxx . . $ QCheckBox#setCheckState(537692883700039).(Qtcxx . . $ Qt/::Uncheckedcxx . . $ Qt/Unchecked.); |
| 481 | } |
| 482 | |
| 483 | // fillDetails===================================================================================================== |
| 484 | //function to fill the fields of schedule details from arrays |
| 485 | void scheduleDialogcxx . . $ scheduleDialog#::fillDetailscxx . . $ scheduleDialog#fillDetails(49f6e7a06ebc5aa8).() |
| 486 | { |
| 487 | currentSchedulecxx . . $ scheduleDialog#currentSchedule. = uiScxx . . $ scheduleDialog#uiS..listWidget_schedulecxx . . $ Ui_scheduleDialog#listWidget_schedule. -> currentRowcxx . . $ QListWidget#currentRow(455f465bc33b4cdf).(); //current operations list row number |
| 488 | if ((currentSchedulecxx . . $ scheduleDialog#currentSchedule. < 0) || (noSchedulescxx . . $ scheduleDialog#noSchedules.)) //if nothing is selected or no schedules declared, do nothing |
| 489 | return; |
| 490 | |
| 491 | //read array currentSchedule element data & fill add fields |
| 492 | uiScxx . . $ scheduleDialog#uiS..comboBox_profilecxx . . $ Ui_scheduleDialog#comboBox_profile. -> setCurrentIndexcxx . . $ QComboBox#setCurrentIndex(d4f767463ce0a6b3).( uiScxx . . $ scheduleDialog#uiS..comboBox_profilecxx . . $ Ui_scheduleDialog#comboBox_profile. -> findTextcxx . . $ QComboBox#findText(c6a792a10ea0b85).(Schedulecxx . . $ Schedule.[currentSchedulecxx . . $ scheduleDialog#currentSchedule.] -> GetProfileNamecxx . . $ schedule#GetProfileName(6ef7b6c27b00b43d).()) ); |
| 493 | uiScxx . . $ scheduleDialog#uiS..comboBox_monthcxx . . $ Ui_scheduleDialog#comboBox_month. -> setCurrentIndexcxx . . $ QComboBox#setCurrentIndex(d4f767463ce0a6b3).(Schedulecxx . . $ Schedule.[currentSchedulecxx . . $ scheduleDialog#currentSchedule.] -> GetMonthcxx . . $ schedule#GetMonth(455f465bc33b4cdf).()); |
| 494 | uiScxx . . $ scheduleDialog#uiS..comboBox_dayOfMonthcxx . . $ Ui_scheduleDialog#comboBox_dayOfMonth. -> setCurrentIndexcxx . . $ QComboBox#setCurrentIndex(d4f767463ce0a6b3).(Schedulecxx . . $ Schedule.[currentSchedulecxx . . $ scheduleDialog#currentSchedule.] -> GetMonthDaycxx . . $ schedule#GetMonthDay(455f465bc33b4cdf).()); |
| 495 | uiScxx . . $ scheduleDialog#uiS..comboBox_DayOfWeekcxx . . $ Ui_scheduleDialog#comboBox_DayOfWeek. -> setCurrentIndexcxx . . $ QComboBox#setCurrentIndex(d4f767463ce0a6b3).(Schedulecxx . . $ Schedule.[currentSchedulecxx . . $ scheduleDialog#currentSchedule.] -> GetWeekDaycxx . . $ schedule#GetWeekDay(455f465bc33b4cdf).()); |
| 496 | uiScxx . . $ scheduleDialog#uiS..spinBox_hourcxx . . $ Ui_scheduleDialog#spinBox_hour. -> setValuecxx . . $ QSpinBox#setValue(d4f767463ce0a6b3).(Schedulecxx . . $ Schedule.[currentSchedulecxx . . $ scheduleDialog#currentSchedule.] -> GetHourcxx . . $ schedule#GetHour(455f465bc33b4cdf).()); |
| 497 | uiScxx . . $ scheduleDialog#uiS..spinBox_minutecxx . . $ Ui_scheduleDialog#spinBox_minute. -> setValuecxx . . $ QSpinBox#setValue(d4f767463ce0a6b3).(Schedulecxx . . $ Schedule.[currentSchedulecxx . . $ scheduleDialog#currentSchedule.] -> GetMinutecxx . . $ schedule#GetMinute(455f465bc33b4cdf).()); |
| 498 | uiScxx . . $ scheduleDialog#uiS..spinBox_delayRebootcxx . . $ Ui_scheduleDialog#spinBox_delayReboot. -> setValuecxx . . $ QSpinBox#setValue(d4f767463ce0a6b3).(Schedulecxx . . $ Schedule.[currentSchedulecxx . . $ scheduleDialog#currentSchedule.] -> GetDelayRebootcxx . . $ schedule#GetDelayReboot(455f465bc33b4cdf).()); |
| 499 | |
| 500 | if (Schedulecxx . . $ Schedule.[currentSchedulecxx . . $ scheduleDialog#currentSchedule.] -> GetSkipCriticalcxx . . $ schedule#GetSkipCritical(50ce9a9e25b4a850).()) |
| 501 | uiScxx . . $ scheduleDialog#uiS..checkBox_skipCriticalcxx . . $ Ui_scheduleDialog#checkBox_skipCritical. -> setCheckStatecxx . . $ QCheckBox#setCheckState(537692883700039).(Qtcxx . . $ Qt/::Checkedcxx . . $ Qt/Checked.); |
| 502 | else |
| 503 | uiScxx . . $ scheduleDialog#uiS..checkBox_skipCriticalcxx . . $ Ui_scheduleDialog#checkBox_skipCritical. -> setCheckStatecxx . . $ QCheckBox#setCheckState(537692883700039).(Qtcxx . . $ Qt/::Uncheckedcxx . . $ Qt/Unchecked.); |
| 504 | |
| 505 | if (Schedulecxx . . $ Schedule.[currentSchedulecxx . . $ scheduleDialog#currentSchedule.] -> GetConsoleModecxx . . $ schedule#GetConsoleMode(50ce9a9e25b4a850).()) |
| 506 | uiScxx . . $ scheduleDialog#uiS..checkBox_consoleModecxx . . $ Ui_scheduleDialog#checkBox_consoleMode. -> setCheckStatecxx . . $ QCheckBox#setCheckState(537692883700039).(Qtcxx . . $ Qt/::Checkedcxx . . $ Qt/Checked.); |
| 507 | else |
| 508 | uiScxx . . $ scheduleDialog#uiS..checkBox_consoleModecxx . . $ Ui_scheduleDialog#checkBox_consoleMode. -> setCheckStatecxx . . $ QCheckBox#setCheckState(537692883700039).(Qtcxx . . $ Qt/::Uncheckedcxx . . $ Qt/Unchecked.); |
| 509 | if (Schedulecxx . . $ Schedule.[currentSchedulecxx . . $ scheduleDialog#currentSchedule.] -> GetRebootcxx . . $ schedule#GetReboot(50ce9a9e25b4a850).()) |
| 510 | uiScxx . . $ scheduleDialog#uiS..checkBox_rebootcxx . . $ Ui_scheduleDialog#checkBox_reboot. -> setCheckStatecxx . . $ QCheckBox#setCheckState(537692883700039).(Qtcxx . . $ Qt/::Checkedcxx . . $ Qt/Checked.); |
| 511 | else |
| 512 | uiScxx . . $ scheduleDialog#uiS..checkBox_rebootcxx . . $ Ui_scheduleDialog#checkBox_reboot. -> setCheckStatecxx . . $ QCheckBox#setCheckState(537692883700039).(Qtcxx . . $ Qt/::Uncheckedcxx . . $ Qt/Unchecked.); |
| 513 | } |
| 514 | |
| 515 | // okaySchedulePressed===================================================================================================== |
| 516 | // adss a new profile scedule to the list or modifies an existing one |
| 517 | void scheduleDialogcxx . . $ scheduleDialog#::okaySchedulePressedcxx . . $ scheduleDialog#okaySchedulePressed(49f6e7a06ebc5aa8).() |
| 518 | { |
| 519 | noSchedulescxx . . $ scheduleDialog#noSchedules. = false; |
| 520 | schedulecxx . . $ schedule# *tempOp = new schedulecxx . . $ schedule#; |
| 521 | |
| 522 | //check valid & existent profile***************************************************** |
| 523 | QFilecxx . . $ QFile# proFilecxx . . $ QFile#QFile(3520e46b33348bf6). (profileDircxx . . $ Global/profileDir. +cxx . . $ operator+(fab9b4f80031f353). uiScxx . . $ scheduleDialog#uiS..comboBox_profilecxx . . $ Ui_scheduleDialog#comboBox_profile. -> currentTextcxx . . $ QComboBox#currentText(6ef7b6c27b00b43d).() +cxx . . $ operator+(3d22f08efddf8107). ".profile"); |
| 524 | if (!proFile.opencxx . . $ QFile#open(dca164408be960c8).(QIODevicecxx . . $ QFlags#QFlags(93d577a3e9528307).::ReadOnlycxx . . $ QIODevice#ReadOnly.)) |
| 525 | { |
| 526 | QMessageBoxcxx . . $ QMessageBox#::informationcxx . . $ QMessageBox#information(a9e3742e6f7b4147).(this, appNamecxx . . $ Global/appName., trcxx . . $ scheduleDialog#tr(75d9f1c324b4579d).("Invalid profile")+cxx . . $ operator+(3d22f08efddf8107)."<br><br>" +cxx . . $ operator+(fab9b4f80031f353). proFile.errorStringcxx . . $ QIODevice#errorString(6ef7b6c27b00b43d).()); |
| 527 | return; |
| 528 | } |
| 529 | /* I have disabled this check as TOO much. If you wish to re-enable it, use the new profile "text format" from loadcurrentprofile() |
| 530 | else //read the file to check if it's valid |
| 531 | { |
| 532 | QDataStream in(&proFile); |
| 533 | in.setVersion(QDataStream::Qt_4_3); |
| 534 | |
| 535 | QVariant v; //we will import everything as QVariant using this temp variable |
| 536 | QString vString; //temp variable to import "labels" of real data |
| 537 | QString tempAppName = "asxeto"; |
| 538 | double tempAppVersion=0; |
| 539 | in>>v; if (v.toString()=="appName") |
| 540 | in >> v; tempAppName = v.toString(); //input the application name & version-------------------------- |
| 541 | in>>v; if (v.toString()=="appVersion") |
| 542 | in >> v; tempAppVersion = v.toDouble(); |
| 543 | if ( (tempAppName != appName) || (tempAppVersion < validProfileVersion) )//check if the file is a valid luckybackup profile |
| 544 | { |
| 545 | message = tr("The profile you are trying to open is not a valid luckyBackup v.","v is for version")+" " |
| 546 | + countStr.setNum(appVersion) + tr(" profile","BEWARE of the whitespace in the beginning")+"<br><br>"; |
| 547 | QMessageBox::warning(this, appName, message, QMessageBox::Ok | QMessageBox::Default); |
| 548 | return; |
| 549 | } |
| 550 | } |
| 551 | */ proFile.closecxx . . $ QFileDevice#close(49f6e7a06ebc5aa8).(); |
| 552 | |
| 553 | //read fields & fill array |
| 554 | tempOp -> SetProfileNamecxx . . $ schedule#SetProfileName(7df51288a9ebd664). (uiScxx . . $ scheduleDialog#uiS..comboBox_profilecxx . . $ Ui_scheduleDialog#comboBox_profile. -> currentTextcxx . . $ QComboBox#currentText(6ef7b6c27b00b43d).()); |
| 555 | tempOp -> SetProfilePathcxx . . $ schedule#SetProfilePath(7df51288a9ebd664). (profileDircxx . . $ Global/profileDir. +cxx . . $ operator+(fab9b4f80031f353). uiScxx . . $ scheduleDialog#uiS..comboBox_profilecxx . . $ Ui_scheduleDialog#comboBox_profile. -> currentTextcxx . . $ QComboBox#currentText(6ef7b6c27b00b43d).() +cxx . . $ operator+(3d22f08efddf8107). ".profile"); |
| 556 | |
| 557 | tempOp -> SetRebootcxx . . $ schedule#SetReboot(b45ddcbc8423892c). (uiScxx . . $ scheduleDialog#uiS..checkBox_rebootcxx . . $ Ui_scheduleDialog#checkBox_reboot. -> isCheckedcxx . . $ QAbstractButton#isChecked(50ce9a9e25b4a850).()); |
| 558 | tempOp -> SetMonthcxx . . $ schedule#SetMonth(d4f767463ce0a6b3). (uiScxx . . $ scheduleDialog#uiS..comboBox_monthcxx . . $ Ui_scheduleDialog#comboBox_month. -> currentIndexcxx . . $ QComboBox#currentIndex(455f465bc33b4cdf).()); |
| 559 | tempOp -> SetMonthDaycxx . . $ schedule#SetMonthDay(d4f767463ce0a6b3). (uiScxx . . $ scheduleDialog#uiS..comboBox_dayOfMonthcxx . . $ Ui_scheduleDialog#comboBox_dayOfMonth. -> currentIndexcxx . . $ QComboBox#currentIndex(455f465bc33b4cdf).()); |
| 560 | tempOp -> SetWeekDaycxx . . $ schedule#SetWeekDay(d4f767463ce0a6b3). (uiScxx . . $ scheduleDialog#uiS..comboBox_DayOfWeekcxx . . $ Ui_scheduleDialog#comboBox_DayOfWeek. -> currentIndexcxx . . $ QComboBox#currentIndex(455f465bc33b4cdf).()); |
| 561 | tempOp -> SetHourcxx . . $ schedule#SetHour(d4f767463ce0a6b3). (uiScxx . . $ scheduleDialog#uiS..spinBox_hourcxx . . $ Ui_scheduleDialog#spinBox_hour. -> valuecxx . . $ QSpinBox#value(455f465bc33b4cdf).()); |
| 562 | tempOp -> SetMinutecxx . . $ schedule#SetMinute(d4f767463ce0a6b3). (uiScxx . . $ scheduleDialog#uiS..spinBox_minutecxx . . $ Ui_scheduleDialog#spinBox_minute. -> valuecxx . . $ QSpinBox#value(455f465bc33b4cdf).()); |
| 563 | tempOp -> SetDelayRebootcxx . . $ schedule#SetDelayReboot(d4f767463ce0a6b3). (uiScxx . . $ scheduleDialog#uiS..spinBox_delayRebootcxx . . $ Ui_scheduleDialog#spinBox_delayReboot. -> valuecxx . . $ QSpinBox#value(455f465bc33b4cdf).()); |
| 564 | tempOp -> SetSkipCriticalcxx . . $ schedule#SetSkipCritical(b45ddcbc8423892c). (uiScxx . . $ scheduleDialog#uiS..checkBox_skipCriticalcxx . . $ Ui_scheduleDialog#checkBox_skipCritical. -> isCheckedcxx . . $ QAbstractButton#isChecked(50ce9a9e25b4a850).()); |
| 565 | tempOp -> SetConsoleModecxx . . $ schedule#SetConsoleMode(b45ddcbc8423892c). (uiScxx . . $ scheduleDialog#uiS..checkBox_consoleModecxx . . $ Ui_scheduleDialog#checkBox_consoleMode. -> isCheckedcxx . . $ QAbstractButton#isChecked(50ce9a9e25b4a850).()); |
| 566 | tempOp -> SetNamecxx . . $ schedule#SetName(7df51288a9ebd664). (scheduleTextcxx . . $ scheduleDialog#scheduleText(4fb06a9531431799).(tempOp -> GetProfileNamecxx . . $ schedule#GetProfileName(6ef7b6c27b00b43d).(), |
| 567 | tempOp -> GetMonthcxx . . $ schedule#GetMonth(455f465bc33b4cdf).(), |
| 568 | tempOp -> GetMonthDaycxx . . $ schedule#GetMonthDay(455f465bc33b4cdf).(), |
| 569 | tempOp -> GetWeekDaycxx . . $ schedule#GetWeekDay(455f465bc33b4cdf).(), |
| 570 | tempOp -> GetHourcxx . . $ schedule#GetHour(455f465bc33b4cdf).(), |
| 571 | tempOp -> GetMinutecxx . . $ schedule#GetMinute(455f465bc33b4cdf).(), |
| 572 | tempOp -> GetRebootcxx . . $ schedule#GetReboot(50ce9a9e25b4a850).())); |
| 573 | Schedulecxx . . $ Schedule.[currentSchedulecxx . . $ scheduleDialog#currentSchedule.] = tempOp; |
| 574 | |
| 575 | if (currentSchedulecxx . . $ scheduleDialog#currentSchedule. == TotalSchedulecxx . . $ scheduleDialog#TotalSchedule.) |
| 576 | { |
| 577 | uiScxx . . $ scheduleDialog#uiS..listWidget_schedulecxx . . $ Ui_scheduleDialog#listWidget_schedule. -> addItemcxx . . $ QListWidget#addItem(3520e46b33348bf6).( Schedulecxx . . $ Schedule.[currentSchedulecxx . . $ scheduleDialog#currentSchedule.] -> GetNamecxx . . $ schedule#GetName(6ef7b6c27b00b43d).() ); //add item at schedule list |
| 578 | uiScxx . . $ scheduleDialog#uiS..listWidget_schedulecxx . . $ Ui_scheduleDialog#listWidget_schedule. -> setCurrentRowcxx . . $ QListWidget#setCurrentRow(d4f767463ce0a6b3).(currentSchedulecxx . . $ scheduleDialog#currentSchedule.); |
| 579 | } |
| 580 | else //take out the selected item from the list & insert a new one at the same position with the new name |
| 581 | (uiScxx . . $ scheduleDialog#uiS..listWidget_schedulecxx . . $ Ui_scheduleDialog#listWidget_schedule. -> currentItemcxx . . $ QListWidget#currentItem(a843e491ce3ee2b1).()) -> setTextcxx . . $ QListWidgetItem#setText(3520e46b33348bf6).(Schedulecxx . . $ Schedule.[currentSchedulecxx . . $ scheduleDialog#currentSchedule.] -> GetNamecxx . . $ schedule#GetName(6ef7b6c27b00b43d).()); |
| 582 | |
| 583 | TotalSchedulecxx . . $ scheduleDialog#TotalSchedule. = uiScxx . . $ scheduleDialog#uiS..listWidget_schedulecxx . . $ Ui_scheduleDialog#listWidget_schedule. -> countcxx . . $ QListWidget#count(455f465bc33b4cdf).(); //set the TotalSchedule to what it is now |
| 584 | |
| 585 | modifyCancelPressedcxx . . $ scheduleDialog#modifyCancelPressed(49f6e7a06ebc5aa8).(); |
| 586 | changesMadecxx . . $ scheduleDialog#changesMade. = true; |
| 587 | } |
| 588 | |
| 589 | // scheduleText===================================================================================================== |
| 590 | // returns the text displayed at the schedule list (eg execute profile default at .... every...) |
| 591 | QStringcxx . . $ QString# scheduleDialogcxx . . $ scheduleDialog#::scheduleTextcxx . . $ scheduleDialog#scheduleText(4fb06a9531431799).(QStringcxx . . $ QString# name,int month,int monthday, int weekday, int hour, int minute, bool reboot) |
| 592 | { |
| 593 | QStringcxx . . $ QString# tempProfileName = trcxx . . $ scheduleDialog#tr(75d9f1c324b4579d).("Execute profile")+cxx . . $ operator+(3d22f08efddf8107)." '"+cxx . . $ operator+(fab9b4f80031f353). name +cxx . . $ operator+(3d22f08efddf8107). "', "; |
| 594 | if (reboot) |
| 595 | { |
| 596 | tempProfileName.appendcxx . . $ QString#append(6a89d0b7f4d2681c).(trcxx . . $ scheduleDialog#tr(75d9f1c324b4579d).("once, at system startup","full phrase: Execute profile xxxxx, once at system startup")); |
| 597 | return tempProfileNamecxx . . $ QString#QString(28715ad661ad3cec).; |
| 598 | } |
| 599 | |
| 600 | if (hour == -1) // this means every hour |
| 601 | { |
| 602 | tempProfileName.appendcxx . . $ QString#append(6a89d0b7f4d2681c).(trcxx . . $ scheduleDialog#tr(75d9f1c324b4579d).("hourly at minute ","full phrase: Execute profile <PROFILENAME> hourly at minute <MM>") +cxx . . $ operator+(3d22f08efddf8107). " "); |
| 603 | } |
| 604 | else |
| 605 | { |
| 606 | tempProfileName.appendcxx . . $ QString#append(6a89d0b7f4d2681c).(trcxx . . $ scheduleDialog#tr(75d9f1c324b4579d).("at")+cxx . . $ operator+(3d22f08efddf8107)." "); |
| 607 | if (hour < 10) |
| 608 | tempProfileName.appendcxx . . $ QString#append(6a89d0b7f4d2681c).("0"+cxx . . $ operator+(c75c3ae4eb9af1a8).countStrcxx . . $ Global/countStr..setNumcxx . . $ QString#setNum(6483560ce2afa901).(hour) +cxx . . $ operator+(3d22f08efddf8107). ":"); |
| 609 | else |
| 610 | tempProfileName.appendcxx . . $ QString#append(6a89d0b7f4d2681c).(countStrcxx . . $ Global/countStr..setNumcxx . . $ QString#setNum(6483560ce2afa901).(hour) +cxx . . $ operator+(3d22f08efddf8107). ":"); |
| 611 | } |
| 612 | if (minute < 10) |
| 613 | tempProfileName.appendcxx . . $ QString#append(6a89d0b7f4d2681c).("0"+cxx . . $ operator+(c75c3ae4eb9af1a8).countStrcxx . . $ Global/countStr..setNumcxx . . $ QString#setNum(6483560ce2afa901).(minute)); |
| 614 | else |
| 615 | tempProfileName.appendcxx . . $ QString#append(6a89d0b7f4d2681c).(countStrcxx . . $ Global/countStr..setNumcxx . . $ QString#setNum(6483560ce2afa901).(minute)); |
| 616 | tempProfileName.appendcxx . . $ QString#append(6a89d0b7f4d2681c).(", "+cxx . . $ operator+(c75c3ae4eb9af1a8).trcxx . . $ scheduleDialog#tr(75d9f1c324b4579d).("every")+cxx . . $ operator+(3d22f08efddf8107)." "); |
| 617 | |
| 618 | if ((weekday==0) && (monthday== 0)) |
| 619 | tempProfileName.appendcxx . . $ QString#append(6a89d0b7f4d2681c).(trcxx . . $ scheduleDialog#tr(75d9f1c324b4579d).("day")); |
| 620 | if (weekday==1) |
| 621 | tempProfileName.appendcxx . . $ QString#append(6a89d0b7f4d2681c).(trcxx . . $ scheduleDialog#tr(75d9f1c324b4579d).("Sunday")); |
| 622 | if (weekday==2) |
| 623 | tempProfileName.appendcxx . . $ QString#append(6a89d0b7f4d2681c).(trcxx . . $ scheduleDialog#tr(75d9f1c324b4579d).("Monday")); |
| 624 | if (weekday==3) |
| 625 | tempProfileName.appendcxx . . $ QString#append(6a89d0b7f4d2681c).(trcxx . . $ scheduleDialog#tr(75d9f1c324b4579d).("Tuesday")); |
| 626 | if (weekday==4) |
| 627 | tempProfileName.appendcxx . . $ QString#append(6a89d0b7f4d2681c).(trcxx . . $ scheduleDialog#tr(75d9f1c324b4579d).("Wednesday")); |
| 628 | if (weekday==5) |
| 629 | tempProfileName.appendcxx . . $ QString#append(6a89d0b7f4d2681c).(trcxx . . $ scheduleDialog#tr(75d9f1c324b4579d).("Thursday")); |
| 630 | if (weekday==6) |
| 631 | tempProfileName.appendcxx . . $ QString#append(6a89d0b7f4d2681c).(trcxx . . $ scheduleDialog#tr(75d9f1c324b4579d).("Friday")); |
| 632 | if (weekday==7) |
| 633 | tempProfileName.appendcxx . . $ QString#append(6a89d0b7f4d2681c).(trcxx . . $ scheduleDialog#tr(75d9f1c324b4579d).("Saturday")); |
| 634 | |
| 635 | if (monthday != 0) |
| 636 | { |
| 637 | if (weekday!=0) |
| 638 | tempProfileName.appendcxx . . $ QString#append(6a89d0b7f4d2681c).(" "+cxx . . $ operator+(c75c3ae4eb9af1a8).trcxx . . $ scheduleDialog#tr(75d9f1c324b4579d).("& on the")+cxx . . $ operator+(3d22f08efddf8107)." "); |
| 639 | |
| 640 | tempProfileName.appendcxx . . $ QString#append(6a89d0b7f4d2681c).(countStrcxx . . $ Global/countStr..setNumcxx . . $ QString#setNum(6483560ce2afa901).(monthday)); |
| 641 | |
| 642 | if (monthday == 1) tempProfileName.appendcxx . . $ QString#append(6a89d0b7f4d2681c).(trcxx . . $ scheduleDialog#tr(75d9f1c324b4579d).("st","as in 1st day")); |
| 643 | if (monthday == 2) tempProfileName.appendcxx . . $ QString#append(6a89d0b7f4d2681c).(trcxx . . $ scheduleDialog#tr(75d9f1c324b4579d).("nd","as in 2nd day")); |
| 644 | if (monthday == 3) tempProfileName.appendcxx . . $ QString#append(6a89d0b7f4d2681c).(trcxx . . $ scheduleDialog#tr(75d9f1c324b4579d).("rd","as in 3rd day")); |
| 645 | if ((monthday > 3) && (monthday < 8)) tempProfileName.appendcxx . . $ QString#append(6a89d0b7f4d2681c).(trcxx . . $ scheduleDialog#tr(75d9f1c324b4579d).("th","as in 4th, 5th, 6th or 7th day")); |
| 646 | if (monthday == 8) tempProfileName.appendcxx . . $ QString#append(6a89d0b7f4d2681c).(trcxx . . $ scheduleDialog#tr(75d9f1c324b4579d).("th","as in 8th day")); |
| 647 | if (monthday == 9) tempProfileName.appendcxx . . $ QString#append(6a89d0b7f4d2681c).(trcxx . . $ scheduleDialog#tr(75d9f1c324b4579d).("th","as in 9th day")); |
| 648 | if (monthday == 10) tempProfileName.appendcxx . . $ QString#append(6a89d0b7f4d2681c).(trcxx . . $ scheduleDialog#tr(75d9f1c324b4579d).("th","as in 10th day")); |
| 649 | if (monthday == 11) tempProfileName.appendcxx . . $ QString#append(6a89d0b7f4d2681c).(trcxx . . $ scheduleDialog#tr(75d9f1c324b4579d).("th","as in 11th day")); |
| 650 | if ((monthday > 11) && (monthday < 20)) tempProfileName.appendcxx . . $ QString#append(6a89d0b7f4d2681c).(trcxx . . $ scheduleDialog#tr(75d9f1c324b4579d).("th","as in 12th....19th day")); |
| 651 | if (monthday == 20) tempProfileName.appendcxx . . $ QString#append(6a89d0b7f4d2681c).(trcxx . . $ scheduleDialog#tr(75d9f1c324b4579d).("th","as in 20th day")); |
| 652 | if (monthday == 21) tempProfileName.appendcxx . . $ QString#append(6a89d0b7f4d2681c).(trcxx . . $ scheduleDialog#tr(75d9f1c324b4579d).("st","as in 21st day")); |
| 653 | if (monthday == 22) tempProfileName.appendcxx . . $ QString#append(6a89d0b7f4d2681c).(trcxx . . $ scheduleDialog#tr(75d9f1c324b4579d).("nd","as in 22nd day")); |
| 654 | if (monthday == 23) tempProfileName.appendcxx . . $ QString#append(6a89d0b7f4d2681c).(trcxx . . $ scheduleDialog#tr(75d9f1c324b4579d).("rd","as in 23rd day")); |
| 655 | if ((monthday > 23) && (monthday < 31)) tempProfileName.appendcxx . . $ QString#append(6a89d0b7f4d2681c).(trcxx . . $ scheduleDialog#tr(75d9f1c324b4579d).("th","as in 24th...30th day")); |
| 656 | if (monthday == 31) tempProfileName.appendcxx . . $ QString#append(6a89d0b7f4d2681c).(trcxx . . $ scheduleDialog#tr(75d9f1c324b4579d).("st","as in 31st day")); |
| 657 | tempProfileName.appendcxx . . $ QString#append(6a89d0b7f4d2681c).(" "+cxx . . $ operator+(c75c3ae4eb9af1a8).trcxx . . $ scheduleDialog#tr(75d9f1c324b4579d).("day")); |
| 658 | } |
| 659 | if (month == 0) |
| 660 | { |
| 661 | tempProfileName.appendcxx . . $ QString#append(6a89d0b7f4d2681c).(" "+cxx . . $ operator+(c75c3ae4eb9af1a8).trcxx . . $ scheduleDialog#tr(75d9f1c324b4579d).("of any month")); |
| 662 | return tempProfileNamecxx . . $ QString#QString(28715ad661ad3cec).; |
| 663 | } |
| 664 | if (month == 1) |
| 665 | tempProfileName.appendcxx . . $ QString#append(6a89d0b7f4d2681c).(" "+cxx . . $ operator+(c75c3ae4eb9af1a8).trcxx . . $ scheduleDialog#tr(75d9f1c324b4579d).("of")+cxx . . $ operator+(3d22f08efddf8107)." "+cxx . . $ operator+(fab9b4f80031f353).trcxx . . $ scheduleDialog#tr(75d9f1c324b4579d).("January","full phrase: 'of January'")); |
| 666 | if (month == 2) |
| 667 | tempProfileName.appendcxx . . $ QString#append(6a89d0b7f4d2681c).(" "+cxx . . $ operator+(c75c3ae4eb9af1a8).trcxx . . $ scheduleDialog#tr(75d9f1c324b4579d).("of")+cxx . . $ operator+(3d22f08efddf8107)." "+cxx . . $ operator+(fab9b4f80031f353).trcxx . . $ scheduleDialog#tr(75d9f1c324b4579d).("February","full phrase: 'of February'")); |
| 668 | if (month == 3) |
| 669 | tempProfileName.appendcxx . . $ QString#append(6a89d0b7f4d2681c).(" "+cxx . . $ operator+(c75c3ae4eb9af1a8).trcxx . . $ scheduleDialog#tr(75d9f1c324b4579d).("of")+cxx . . $ operator+(3d22f08efddf8107)." "+cxx . . $ operator+(fab9b4f80031f353).trcxx . . $ scheduleDialog#tr(75d9f1c324b4579d).("March","full phrase: 'of March'")); |
| 670 | if (month == 4) |
| 671 | tempProfileName.appendcxx . . $ QString#append(6a89d0b7f4d2681c).(" "+cxx . . $ operator+(c75c3ae4eb9af1a8).trcxx . . $ scheduleDialog#tr(75d9f1c324b4579d).("of")+cxx . . $ operator+(3d22f08efddf8107)." "+cxx . . $ operator+(fab9b4f80031f353).trcxx . . $ scheduleDialog#tr(75d9f1c324b4579d).("April","full phrase: 'of April'")); |
| 672 | if (month == 5) |
| 673 | tempProfileName.appendcxx . . $ QString#append(6a89d0b7f4d2681c).(" "+cxx . . $ operator+(c75c3ae4eb9af1a8).trcxx . . $ scheduleDialog#tr(75d9f1c324b4579d).("of")+cxx . . $ operator+(3d22f08efddf8107)." "+cxx . . $ operator+(fab9b4f80031f353).trcxx . . $ scheduleDialog#tr(75d9f1c324b4579d).("May","full phrase: 'of May'")); |
| 674 | if (month == 6) |
| 675 | tempProfileName.appendcxx . . $ QString#append(6a89d0b7f4d2681c).(" "+cxx . . $ operator+(c75c3ae4eb9af1a8).trcxx . . $ scheduleDialog#tr(75d9f1c324b4579d).("of")+cxx . . $ operator+(3d22f08efddf8107)." "+cxx . . $ operator+(fab9b4f80031f353).trcxx . . $ scheduleDialog#tr(75d9f1c324b4579d).("June","full phrase: 'of June'")); |
| 676 | if (month == 7) |
| 677 | tempProfileName.appendcxx . . $ QString#append(6a89d0b7f4d2681c).(" "+cxx . . $ operator+(c75c3ae4eb9af1a8).trcxx . . $ scheduleDialog#tr(75d9f1c324b4579d).("of")+cxx . . $ operator+(3d22f08efddf8107)." "+cxx . . $ operator+(fab9b4f80031f353).trcxx . . $ scheduleDialog#tr(75d9f1c324b4579d).("July","full phrase: 'of July'")); |
| 678 | if (month == 8) |
| 679 | tempProfileName.appendcxx . . $ QString#append(6a89d0b7f4d2681c).(" "+cxx . . $ operator+(c75c3ae4eb9af1a8).trcxx . . $ scheduleDialog#tr(75d9f1c324b4579d).("of")+cxx . . $ operator+(3d22f08efddf8107)." "+cxx . . $ operator+(fab9b4f80031f353).trcxx . . $ scheduleDialog#tr(75d9f1c324b4579d).("August","full phrase: 'of August'")); |
| 680 | if (month == 9) |
| 681 | tempProfileName.appendcxx . . $ QString#append(6a89d0b7f4d2681c).(" "+cxx . . $ operator+(c75c3ae4eb9af1a8).trcxx . . $ scheduleDialog#tr(75d9f1c324b4579d).("of")+cxx . . $ operator+(3d22f08efddf8107)." "+cxx . . $ operator+(fab9b4f80031f353).trcxx . . $ scheduleDialog#tr(75d9f1c324b4579d).("September","full phrase: 'of September'")); |
| 682 | if (month == 10) |
| 683 | tempProfileName.appendcxx . . $ QString#append(6a89d0b7f4d2681c).(" "+cxx . . $ operator+(c75c3ae4eb9af1a8).trcxx . . $ scheduleDialog#tr(75d9f1c324b4579d).("of")+cxx . . $ operator+(3d22f08efddf8107)." "+cxx . . $ operator+(fab9b4f80031f353).trcxx . . $ scheduleDialog#tr(75d9f1c324b4579d).("October","full phrase: 'of October'")); |
| 684 | if (month == 11) |
| 685 | tempProfileName.appendcxx . . $ QString#append(6a89d0b7f4d2681c).(" "+cxx . . $ operator+(c75c3ae4eb9af1a8).trcxx . . $ scheduleDialog#tr(75d9f1c324b4579d).("of")+cxx . . $ operator+(3d22f08efddf8107)." "+cxx . . $ operator+(fab9b4f80031f353).trcxx . . $ scheduleDialog#tr(75d9f1c324b4579d).("November","full phrase: 'of November'")); |
| 686 | if (month == 12) |
| 687 | tempProfileName.appendcxx . . $ QString#append(6a89d0b7f4d2681c).(" "+cxx . . $ operator+(c75c3ae4eb9af1a8).trcxx . . $ scheduleDialog#tr(75d9f1c324b4579d).("of")+cxx . . $ operator+(3d22f08efddf8107)." "+cxx . . $ operator+(fab9b4f80031f353).trcxx . . $ scheduleDialog#tr(75d9f1c324b4579d).("December","full phrase: 'of December'")); |
| 688 | |
| 689 | return tempProfileNamecxx . . $ QString#QString(28715ad661ad3cec).; |
| 690 | } |
| 691 | |
| 692 | // createCron===================================================================================================== |
| 693 | //creates a cron file & updates the user's crontab |
| 694 | void scheduleDialogcxx . . $ scheduleDialog#::createCroncxx . . $ scheduleDialog#createCron(49f6e7a06ebc5aa8).() |
| 695 | { |
| 696 | QStringcxx . . $ QString# ScheduleLine = ""cxx . . $ QString#QString(85c52e162fed56f9).; |
| 697 | QStringcxx . . $ QString# ProfilePath=""cxx . . $ QString#QString(85c52e162fed56f9).; |
| 698 | QStringcxx . . $ QString# ProfileName=""cxx . . $ QString#QString(85c52e162fed56f9).; |
| 699 | QStringcxx . . $ QString# luckyEntryStart = "\n# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ luckybackup entries ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n"cxx . . $ QString#QString(85c52e162fed56f9).; |
| 700 | QStringcxx . . $ QString# luckyEntryEnd = "# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ end of luckybackup entries ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n"cxx . . $ QString#QString(85c52e162fed56f9).; |
| 701 | |
| 702 | // windows used variables: |
| 703 | QStringcxx . . $ QString# WinScheduleLine = ""cxx . . $ QString#QString(85c52e162fed56f9).; |
| 704 | int WinScheduleType; |
| 705 | QStringcxx . . $ QString# batFileName =""cxx . . $ QString#QString(85c52e162fed56f9).; |
| 706 | QStringcxx . . $ QString# batLine =""cxx . . $ QString#QString(85c52e162fed56f9).; |
| 707 | |
| 708 | // copy user's crontab to QString CronTab & delete luckybackup's entries |
| 709 | CronTabcxx . . $ scheduleDialog#CronTab. =cxx . . $ QString#`operator=`(d02845eef0c33901). ""; |
| 710 | cronProcesscxx . . $ cronProcess. -> startcxx . . $ QProcess#start(5e315ba9c811784d). ("crontab"cxx . . $ QString#QString(85c52e162fed56f9).,QStringListcxx . . $ QStringList#QStringList(ced63f7c635d850d).() <<cxx . . $ QStringList#`operator<<`(85116071a693d053). "-l"cxx . . $ QString#QString(85c52e162fed56f9).); // execute crontab -l command & capture output to QString CronTab |
| 711 | cronProcesscxx . . $ cronProcess. -> waitForStartedcxx . . $ QProcess#waitForStarted(83c267b20bac841a).(); |
| 712 | cronProcesscxx . . $ cronProcess. -> waitForFinishedcxx . . $ QProcess#waitForFinished(83c267b20bac841a).(); |
| 713 | int x = CronTabcxx . . $ scheduleDialog#CronTab..indexOfcxx . . $ QString#indexOf(a1e52806cd31c200).(luckyEntryStart); |
| 714 | int y = CronTabcxx . . $ scheduleDialog#CronTab..indexOfcxx . . $ QString#indexOf(a1e52806cd31c200).(luckyEntryEnd) + luckyEntryEnd.sizecxx . . $ QString#size(455f465bc33b4cdf).() - x; |
| 715 | |
| 716 | //--------------------windows part - Juan patch --------------------------------------------- |
| 717 | //--------------------Windows 8: Use New-ScheduledTaskTrigger---------------------------- |
| 718 | //Get-ScheduledTask------New-ScheduledTaskTrigger |
| 719 | if (WINrunningcxx . . $ Global/WINrunning.) |
| 720 | { |
| 721 | //windows execute at to delete command |
| 722 | cronProcesscxx . . $ cronProcess. -> startcxx . . $ QProcess#start(8f4bc4a0c00c3d3f). ("at /delete /yes"cxx . . $ QString#QString(85c52e162fed56f9).); // execute crontab command to replace the user's crontab with luckybackup cron |
| 723 | cronProcesscxx . . $ cronProcess. -> waitForStartedcxx . . $ QProcess#waitForStarted(83c267b20bac841a).(); |
| 724 | cronProcesscxx . . $ cronProcess. -> waitForFinishedcxx . . $ QProcess#waitForFinished(83c267b20bac841a).(); |
| 725 | cronProcesscxx . . $ cronProcess. -> startcxx . . $ QProcess#start(8f4bc4a0c00c3d3f). ("del "+cxx . . $ operator+(c75c3ae4eb9af1a8).scheduleDircxx . . $ Global/scheduleDir.+cxx . . $ operator+(3d22f08efddf8107)." *.bat"); // execute crontab command to replace the user's crontab with luckybackup cron |
| 726 | cronProcesscxx . . $ cronProcess. -> waitForStartedcxx . . $ QProcess#waitForStarted(83c267b20bac841a).(); |
| 727 | cronProcesscxx . . $ cronProcess. -> waitForFinishedcxx . . $ QProcess#waitForFinished(83c267b20bac841a).(); |
| 728 | currentSchedulecxx . . $ scheduleDialog#currentSchedule. = 0; |
| 729 | while (currentSchedulecxx . . $ scheduleDialog#currentSchedule. < TotalSchedulecxx . . $ scheduleDialog#TotalSchedule.) |
| 730 | { |
| 731 | if (!Schedulecxx . . $ Schedule.[currentSchedulecxx . . $ scheduleDialog#currentSchedule.] -> GetRebootcxx . . $ schedule#GetReboot(50ce9a9e25b4a850).() ) //append @reboot if checkbox selected NOT SUPPORTED |
| 732 | { |
| 733 | WinScheduleLine =cxx . . $ QString#`operator=`(d02845eef0c33901). ""; |
| 734 | WinScheduleType=0; |
| 735 | batFileName=cxx . . $ QString#`operator=`(b79fde0b0ce9b948).scheduleDircxx . . $ Global/scheduleDir.; |
| 736 | //begin windows time procesing: using at, cannot have hourly or monthly schedules |
| 737 | WinScheduleLine.appendcxx . . $ QString#append(6a89d0b7f4d2681c).(" "+cxx . . $ operator+(c75c3ae4eb9af1a8).countStrcxx . . $ Global/countStr..setNumcxx . . $ QString#setNum(6483560ce2afa901).(Schedulecxx . . $ Schedule.[currentSchedulecxx . . $ scheduleDialog#currentSchedule.] -> GetHourcxx . . $ schedule#GetHour(455f465bc33b4cdf).())+cxx . . $ operator+(3d22f08efddf8107).":"); |
| 738 | batFileName.appendcxx . . $ QString#append(6a89d0b7f4d2681c).(countStrcxx . . $ Global/countStr..setNumcxx . . $ QString#setNum(6483560ce2afa901).(Schedulecxx . . $ Schedule.[currentSchedulecxx . . $ scheduleDialog#currentSchedule.] -> GetHourcxx . . $ schedule#GetHour(455f465bc33b4cdf).())); |
| 739 | WinScheduleLine.appendcxx . . $ QString#append(6a89d0b7f4d2681c).(countStrcxx . . $ Global/countStr..setNumcxx . . $ QString#setNum(6483560ce2afa901).(Schedulecxx . . $ Schedule.[currentSchedulecxx . . $ scheduleDialog#currentSchedule.] -> GetMinutecxx . . $ schedule#GetMinute(455f465bc33b4cdf).()) +cxx . . $ operator+(3d22f08efddf8107). " /every:"); |
| 740 | batFileName.appendcxx . . $ QString#append(6a89d0b7f4d2681c).(countStrcxx . . $ Global/countStr..setNumcxx . . $ QString#setNum(6483560ce2afa901).(Schedulecxx . . $ Schedule.[currentSchedulecxx . . $ scheduleDialog#currentSchedule.] -> GetMinutecxx . . $ schedule#GetMinute(455f465bc33b4cdf).())); |
| 741 | if (Schedulecxx . . $ Schedule.[currentSchedulecxx . . $ scheduleDialog#currentSchedule.] -> GetMonthDaycxx . . $ schedule#GetMonthDay(455f465bc33b4cdf).() != 0) //Day of month |
| 742 | { |
| 743 | WinScheduleType=1; |
| 744 | WinScheduleLine.appendcxx . . $ QString#append(6a89d0b7f4d2681c).(countStrcxx . . $ Global/countStr..setNumcxx . . $ QString#setNum(6483560ce2afa901).(Schedulecxx . . $ Schedule.[currentSchedulecxx . . $ scheduleDialog#currentSchedule.] -> GetMonthDaycxx . . $ schedule#GetMonthDay(455f465bc33b4cdf).()) +cxx . . $ operator+(3d22f08efddf8107). " "); |
| 745 | batFileName.appendcxx . . $ QString#append(6a89d0b7f4d2681c).(countStrcxx . . $ Global/countStr..setNumcxx . . $ QString#setNum(6483560ce2afa901).(Schedulecxx . . $ Schedule.[currentSchedulecxx . . $ scheduleDialog#currentSchedule.] -> GetMonthDaycxx . . $ schedule#GetMonthDay(455f465bc33b4cdf).()) ); |
| 746 | } |
| 747 | if (Schedulecxx . . $ Schedule.[currentSchedulecxx . . $ scheduleDialog#currentSchedule.] -> GetWeekDaycxx . . $ schedule#GetWeekDay(455f465bc33b4cdf).() != 0) //Day of week |
| 748 | { |
| 749 | WinScheduleType=2; |
| 750 | QListcxx . . $ QList#<QStringcxx . . $ QString#> daytypescxx . . $ QList#QList(ced63f7c635d850d).; |
| 751 | daytypes <<cxx . . $ QList#`operator<<`(309d1580d8f5dc58). "L"cxx . . $ QString#QString(85c52e162fed56f9). <<cxx . . $ QList#`operator<<`(309d1580d8f5dc58). "M"cxx . . $ QString#QString(85c52e162fed56f9). <<cxx . . $ QList#`operator<<`(309d1580d8f5dc58). "X"cxx . . $ QString#QString(85c52e162fed56f9). <<cxx . . $ QList#`operator<<`(309d1580d8f5dc58). "J"cxx . . $ QString#QString(85c52e162fed56f9). <<cxx . . $ QList#`operator<<`(309d1580d8f5dc58). "V"cxx . . $ QString#QString(85c52e162fed56f9). <<cxx . . $ QList#`operator<<`(309d1580d8f5dc58). "S"cxx . . $ QString#QString(85c52e162fed56f9). <<cxx . . $ QList#`operator<<`(309d1580d8f5dc58). "D"cxx . . $ QString#QString(85c52e162fed56f9). ; |
| 752 | WinScheduleLine.appendcxx . . $ QString#append(6a89d0b7f4d2681c).(daytypes[cxx . . $ QList#`operator[]`(7a0ef1c7079e8533).Schedulecxx . . $ Schedule.[currentSchedulecxx . . $ scheduleDialog#currentSchedule.] -> GetWeekDaycxx . . $ schedule#GetWeekDay(455f465bc33b4cdf).() -1]+cxx . . $ operator+(3d22f08efddf8107). " "); |
| 753 | batFileName.appendcxx . . $ QString#append(6a89d0b7f4d2681c).(daytypes[cxx . . $ QList#`operator[]`(7a0ef1c7079e8533).Schedulecxx . . $ Schedule.[currentSchedulecxx . . $ scheduleDialog#currentSchedule.] -> GetWeekDaycxx . . $ schedule#GetWeekDay(455f465bc33b4cdf).() -1]); |
| 754 | } |
| 755 | if (WinScheduleType==0) |
| 756 | WinScheduleLine.appendcxx . . $ QString#append(d02845eef0c33901).("D,L,M,Mi,J,V,S "); |
| 757 | batFileName.appendcxx . . $ QString#append(d02845eef0c33901).(".bat"); |
| 758 | WinScheduleLine.appendcxx . . $ QString#append(d02845eef0c33901).(" cmd /c \""); |
| 759 | WinScheduleLine.appendcxx . . $ QString#append(6a89d0b7f4d2681c).(batFileName+cxx . . $ operator+(3d22f08efddf8107)."\""); |
| 760 | batLine.appendcxx . . $ QString#append(6a89d0b7f4d2681c).("\""+cxx . . $ operator+(c75c3ae4eb9af1a8).luckyBackupDircxx . . $ Global/luckyBackupDir.+cxx . . $ operator+(3d22f08efddf8107)."luckybackup_console.exe\" -c --no-questions "); |
| 761 | |
| 762 | if (Schedulecxx . . $ Schedule.[currentSchedulecxx . . $ scheduleDialog#currentSchedule.] -> GetSkipCriticalcxx . . $ schedule#GetSkipCritical(50ce9a9e25b4a850).()) //append --skip-critical |
| 763 | batLine.appendcxx . . $ QString#append(d02845eef0c33901).("--skip-critical "); |
| 764 | |
| 765 | ProfilePath =cxx . . $ QString#`operator=`(4f35bf974e7f8568). Schedulecxx . . $ Schedule.[currentSchedulecxx . . $ scheduleDialog#currentSchedule.] -> GetProfilePathcxx . . $ schedule#GetProfilePath(6ef7b6c27b00b43d).(); |
| 766 | //ProfilePath.replace(" ", "\\ "); |
| 767 | batLine.appendcxx . . $ QString#append(6a89d0b7f4d2681c).("\""+cxx . . $ operator+(c75c3ae4eb9af1a8).ProfilePath+cxx . . $ operator+(3d22f08efddf8107)."\""); //append profile full path |
| 768 | |
| 769 | // append cron logfile part |
| 770 | ProfileName =cxx . . $ QString#`operator=`(4f35bf974e7f8568). Schedulecxx . . $ Schedule.[currentSchedulecxx . . $ scheduleDialog#currentSchedule.] -> GetProfileNamecxx . . $ schedule#GetProfileName(6ef7b6c27b00b43d).(); |
| 771 | //ProfileName.replace(" ", "\\ "); |
| 772 | batLine.appendcxx . . $ QString#append(6a89d0b7f4d2681c).(" > \"" +cxx . . $ operator+(c75c3ae4eb9af1a8). logDircxx . . $ Global/logDir. +cxx . . $ operator+(fab9b4f80031f353). ProfileName +cxx . . $ operator+(3d22f08efddf8107). "-" +cxx . . $ operator+(fab9b4f80031f353). cronlogStringcxx . . $ Global/cronlogString. +cxx . . $ operator+(3d22f08efddf8107). |
| 773 | "\" 2>&1"+cxx . . $ operator+(3d22f08efddf8107). "\n"); //append logfile output with >> instead of single > |
| 774 | |
| 775 | QFilecxx . . $ QFile# batFilecxx . . $ QFile#QFile(3520e46b33348bf6). (batFileName); |
| 776 | if (!batFile.opencxx . . $ QFile#open(dca164408be960c8).(QIODevicecxx . . $ QIODevice#::WriteOnlycxx . . $ QIODevice#WriteOnly. |cxx . . $ `operator|`(c9e45f682471e48d). QIODevicecxx . . $ QIODevice#::Textcxx . . $ QIODevice#Text.)) //create a new batFile as textfile |
| 777 | QMessageBoxcxx . . $ QMessageBox#::informationcxx . . $ QMessageBox#information(a9e3742e6f7b4147).(this, appNamecxx . . $ Global/appName., trcxx . . $ scheduleDialog#tr(75d9f1c324b4579d).("Unable to create cron file")+cxx . . $ operator+(3d22f08efddf8107)." !!<br><br>"+cxx . . $ operator+(fab9b4f80031f353). batFile.errorStringcxx . . $ QIODevice#errorString(6ef7b6c27b00b43d).()); |
| 778 | else{ |
| 779 | //windows execute at to create command |
| 780 | QTextStreamcxx . . $ QTextStream# batOutcxx . . $ QTextStream#QTextStream(bebe8f2dee7f9e86).(&batFile); |
| 781 | batOut <<cxx . . $ QTextStream#`operator<<`(f61e69e0d177108f). batLine; |
| 782 | batFile.closecxx . . $ QFileDevice#close(49f6e7a06ebc5aa8).(); |
| 783 | cronProcesscxx . . $ cronProcess. -> startcxx . . $ QProcess#start(8f4bc4a0c00c3d3f). ("at "+cxx . . $ operator+(c75c3ae4eb9af1a8).WinScheduleLine); // execute crontab command to replace the user's crontab with luckybackup cron |
| 784 | cronProcesscxx . . $ cronProcess. -> waitForStartedcxx . . $ QProcess#waitForStarted(83c267b20bac841a).(); |
| 785 | cronProcesscxx . . $ cronProcess. -> waitForFinishedcxx . . $ QProcess#waitForFinished(83c267b20bac841a).(); |
| 786 | } |
| 787 | |
| 788 | currentSchedulecxx . . $ scheduleDialog#currentSchedule.++; |
| 789 | } |
| 790 | } |
| 791 | QStringcxx . . $ QString# nada=cronProcesscxx . . $ QString#QString(45672f3c6961a244). -> readAllStandardOutputcxx . . $ QProcess#readAllStandardOutput(b3c286cec66e09f4).(); |
| 792 | return; |
| 793 | } //----------------windows part END--------------------------------- |
| 794 | |
| 795 | |
| 796 | CronTabcxx . . $ scheduleDialog#CronTab..removecxx . . $ QString#remove(6483560ce2afa901). (x,y); //remove luckyBackup entries from CronTab |
| 797 | |
| 798 | QFilecxx . . $ QFile# cronFilecxx . . $ QFile#QFile(3520e46b33348bf6). (cronfilenamecxx . . $ Global/cronfilename.); |
| 799 | if (cronFile.existscxx . . $ QFile#exists(50ce9a9e25b4a850).()) //if a cronFile exists delete it |
| 800 | cronFile.removecxx . . $ QFile#remove(c9857a73d68e59ba).(); |
| 801 | |
| 802 | if (!cronFile.opencxx . . $ QFile#open(dca164408be960c8).(QIODevicecxx . . $ QIODevice#::WriteOnlycxx . . $ QIODevice#WriteOnly. |cxx . . $ `operator|`(c9e45f682471e48d). QIODevicecxx . . $ QIODevice#::Textcxx . . $ QIODevice#Text.)) //create a new cronFile as textfile |
| 803 | QMessageBoxcxx . . $ QMessageBox#::informationcxx . . $ QMessageBox#information(a9e3742e6f7b4147).(this, appNamecxx . . $ Global/appName., trcxx . . $ scheduleDialog#tr(75d9f1c324b4579d).("Unable to create cron file")+cxx . . $ operator+(3d22f08efddf8107)." !!<br><br>"+cxx . . $ operator+(fab9b4f80031f353). cronFile.errorStringcxx . . $ QIODevice#errorString(6ef7b6c27b00b43d).()); |
| 804 | else //write some stuff to schedule file |
| 805 | { |
| 806 | QTextStreamcxx . . $ QTextStream# outcxx . . $ QTextStream#QTextStream(bebe8f2dee7f9e86).(&cronFile); |
| 807 | out <<cxx . . $ QTextStream#`operator<<`(f61e69e0d177108f). CronTabcxx . . $ scheduleDialog#CronTab.; //append the old user's crontab first (minus the luckybackup entries) |
| 808 | out <<cxx . . $ QTextStream#`operator<<`(f61e69e0d177108f). luckyEntryStart; //# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ luckybackup entries ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n |
| 809 | currentSchedulecxx . . $ scheduleDialog#currentSchedule. = 0; |
| 810 | while (currentSchedulecxx . . $ scheduleDialog#currentSchedule. < TotalSchedulecxx . . $ scheduleDialog#TotalSchedule.) |
| 811 | { |
| 812 | if (Schedulecxx . . $ Schedule.[currentSchedulecxx . . $ scheduleDialog#currentSchedule.] -> GetRebootcxx . . $ schedule#GetReboot(50ce9a9e25b4a850).()) //append @reboot if checkbox selected |
| 813 | { |
| 814 | ScheduleLine.appendcxx . . $ QString#append(d02845eef0c33901).("@reboot "); |
| 815 | if (Schedulecxx . . $ Schedule.[currentSchedulecxx . . $ scheduleDialog#currentSchedule.] -> GetDelayRebootcxx . . $ schedule#GetDelayReboot(455f465bc33b4cdf).() > 0 ) |
| 816 | ScheduleLine.appendcxx . . $ QString#append(6a89d0b7f4d2681c).("sleep " +cxx . . $ operator+(c75c3ae4eb9af1a8). countStrcxx . . $ Global/countStr..setNumcxx . . $ QString#setNum(6483560ce2afa901).(Schedulecxx . . $ Schedule.[currentSchedulecxx . . $ scheduleDialog#currentSchedule.] -> GetDelayRebootcxx . . $ schedule#GetDelayReboot(455f465bc33b4cdf).() * 60) +cxx . . $ operator+(3d22f08efddf8107)."; "); |
| 817 | } |
| 818 | else // else append time-day etc |
| 819 | { |
| 820 | ScheduleLine.appendcxx . . $ QString#append(6a89d0b7f4d2681c).(countStrcxx . . $ Global/countStr..setNumcxx . . $ QString#setNum(6483560ce2afa901).(Schedulecxx . . $ Schedule.[currentSchedulecxx . . $ scheduleDialog#currentSchedule.] -> GetMinutecxx . . $ schedule#GetMinute(455f465bc33b4cdf).()) +cxx . . $ operator+(3d22f08efddf8107). " "); //minute |
| 821 | if (Schedulecxx . . $ Schedule.[currentSchedulecxx . . $ scheduleDialog#currentSchedule.] -> GetHourcxx . . $ schedule#GetHour(455f465bc33b4cdf).() == -1) |
| 822 | ScheduleLine.appendcxx . . $ QString#append(d02845eef0c33901).("* "); //hourly |
| 823 | else |
| 824 | ScheduleLine.appendcxx . . $ QString#append(6a89d0b7f4d2681c).(countStrcxx . . $ Global/countStr..setNumcxx . . $ QString#setNum(6483560ce2afa901).(Schedulecxx . . $ Schedule.[currentSchedulecxx . . $ scheduleDialog#currentSchedule.] -> GetHourcxx . . $ schedule#GetHour(455f465bc33b4cdf).()) +cxx . . $ operator+(3d22f08efddf8107). " "); //hour |
| 825 | |
| 826 | if (Schedulecxx . . $ Schedule.[currentSchedulecxx . . $ scheduleDialog#currentSchedule.] -> GetMonthDaycxx . . $ schedule#GetMonthDay(455f465bc33b4cdf).() == 0) //Day of month |
| 827 | ScheduleLine.appendcxx . . $ QString#append(d02845eef0c33901).("* "); |
| 828 | else |
| 829 | ScheduleLine.appendcxx . . $ QString#append(6a89d0b7f4d2681c).(countStrcxx . . $ Global/countStr..setNumcxx . . $ QString#setNum(6483560ce2afa901).(Schedulecxx . . $ Schedule.[currentSchedulecxx . . $ scheduleDialog#currentSchedule.] -> GetMonthDaycxx . . $ schedule#GetMonthDay(455f465bc33b4cdf).()) +cxx . . $ operator+(3d22f08efddf8107). " "); |
| 830 | |
| 831 | if (Schedulecxx . . $ Schedule.[currentSchedulecxx . . $ scheduleDialog#currentSchedule.] -> GetMonthcxx . . $ schedule#GetMonth(455f465bc33b4cdf).() == 0) //Month |
| 832 | ScheduleLine.appendcxx . . $ QString#append(d02845eef0c33901).("* "); |
| 833 | else |
| 834 | ScheduleLine.appendcxx . . $ QString#append(6a89d0b7f4d2681c).(countStrcxx . . $ Global/countStr..setNumcxx . . $ QString#setNum(6483560ce2afa901).(Schedulecxx . . $ Schedule.[currentSchedulecxx . . $ scheduleDialog#currentSchedule.] -> GetMonthcxx . . $ schedule#GetMonth(455f465bc33b4cdf).()) +cxx . . $ operator+(3d22f08efddf8107). " "); |
| 835 | |
| 836 | if (Schedulecxx . . $ Schedule.[currentSchedulecxx . . $ scheduleDialog#currentSchedule.] -> GetWeekDaycxx . . $ schedule#GetWeekDay(455f465bc33b4cdf).() == 0) //Day of week |
| 837 | ScheduleLine.appendcxx . . $ QString#append(d02845eef0c33901).("* "); |
| 838 | else |
| 839 | ScheduleLine.appendcxx . . $ QString#append(6a89d0b7f4d2681c).(countStrcxx . . $ Global/countStr..setNumcxx . . $ QString#setNum(6483560ce2afa901).(Schedulecxx . . $ Schedule.[currentSchedulecxx . . $ scheduleDialog#currentSchedule.] -> GetWeekDaycxx . . $ schedule#GetWeekDay(455f465bc33b4cdf).() -1 ) +cxx . . $ operator+(3d22f08efddf8107). " "); |
| 840 | } |
| 841 | |
| 842 | if (Schedulecxx . . $ Schedule.[currentSchedulecxx . . $ scheduleDialog#currentSchedule.] -> GetConsoleModecxx . . $ schedule#GetConsoleMode(50ce9a9e25b4a850).()) //append -c --no-questions for CL or --silent for gui |
| 843 | ScheduleLine.appendcxx . . $ QString#append(d02845eef0c33901).("/usr/bin/luckybackup -c --no-questions "); |
| 844 | else |
| 845 | ScheduleLine.appendcxx . . $ QString#append(d02845eef0c33901).("env DISPLAY=:0 /usr/bin/luckybackup --silent "); |
| 846 | |
| 847 | if (Schedulecxx . . $ Schedule.[currentSchedulecxx . . $ scheduleDialog#currentSchedule.] -> GetSkipCriticalcxx . . $ schedule#GetSkipCritical(50ce9a9e25b4a850).()) //append --skip-critical |
| 848 | ScheduleLine.appendcxx . . $ QString#append(d02845eef0c33901).("--skip-critical "); |
| 849 | |
| 850 | ProfilePath =cxx . . $ QString#`operator=`(4f35bf974e7f8568). Schedulecxx . . $ Schedule.[currentSchedulecxx . . $ scheduleDialog#currentSchedule.] -> GetProfilePathcxx . . $ schedule#GetProfilePath(6ef7b6c27b00b43d).(); |
| 851 | ProfilePath.replacecxx . . $ QString#replace(192e628656427d1c).(" "cxx . . $ QString#QString(85c52e162fed56f9)., "\\ "cxx . . $ QString#QString(85c52e162fed56f9).); |
| 852 | ScheduleLine.appendcxx . . $ QString#append(6a89d0b7f4d2681c).(ProfilePath); //append profile full path |
| 853 | |
| 854 | // append cron logfile part |
| 855 | ProfileName =cxx . . $ QString#`operator=`(4f35bf974e7f8568). Schedulecxx . . $ Schedule.[currentSchedulecxx . . $ scheduleDialog#currentSchedule.] -> GetProfileNamecxx . . $ schedule#GetProfileName(6ef7b6c27b00b43d).(); |
| 856 | ProfileName.replacecxx . . $ QString#replace(192e628656427d1c).(" "cxx . . $ QString#QString(85c52e162fed56f9)., "\\ "cxx . . $ QString#QString(85c52e162fed56f9).); |
| 857 | ScheduleLine.appendcxx . . $ QString#append(6a89d0b7f4d2681c).(" > " +cxx . . $ operator+(c75c3ae4eb9af1a8). logDircxx . . $ Global/logDir. +cxx . . $ operator+(fab9b4f80031f353). ProfileName +cxx . . $ operator+(3d22f08efddf8107). "-" +cxx . . $ operator+(fab9b4f80031f353). cronlogStringcxx . . $ Global/cronlogString. +cxx . . $ operator+(3d22f08efddf8107). |
| 858 | " 2>&1"+cxx . . $ operator+(3d22f08efddf8107). "\n"); //append logfile output with >> instead of single > |
| 859 | |
| 860 | out <<cxx . . $ QTextStream#`operator<<`(f61e69e0d177108f). ScheduleLine; |
| 861 | |
| 862 | ScheduleLine =cxx . . $ QString#`operator=`(d02845eef0c33901). ""; |
| 863 | currentSchedulecxx . . $ scheduleDialog#currentSchedule.++; |
| 864 | } |
| 865 | out <<cxx . . $ QTextStream#`operator<<`(f61e69e0d177108f). luckyEntryEnd; //# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ end of luckybackup entries ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n |
| 866 | } |
| 867 | |
| 868 | cronFile.closecxx . . $ QFileDevice#close(49f6e7a06ebc5aa8).(); |
| 869 | |
| 870 | cronProcesscxx . . $ cronProcess. -> startcxx . . $ QProcess#start(5e315ba9c811784d). ("crontab"cxx . . $ QString#QString(85c52e162fed56f9).,QStringListcxx . . $ QStringList#QStringList(ced63f7c635d850d).() <<cxx . . $ QStringList#`operator<<`(85116071a693d053). cronfilenamecxx . . $ Global/cronfilename.); // execute crontab command to replace the user's crontab with luckybackup cron |
| 871 | cronProcesscxx . . $ cronProcess. -> waitForStartedcxx . . $ QProcess#waitForStarted(83c267b20bac841a).(); |
| 872 | cronProcesscxx . . $ cronProcess. -> waitForFinishedcxx . . $ QProcess#waitForFinished(83c267b20bac841a).(); |
| 873 | |
| 874 | //if the new user's crontab contains no actual schedules > remove user's crontab completely |
| 875 | CronTabcxx . . $ scheduleDialog#CronTab. =cxx . . $ QString#`operator=`(d02845eef0c33901). ""; |
| 876 | cronProcesscxx . . $ cronProcess. -> startcxx . . $ QProcess#start(5e315ba9c811784d). ("crontab"cxx . . $ QString#QString(85c52e162fed56f9).,QStringListcxx . . $ QStringList#QStringList(ced63f7c635d850d).() <<cxx . . $ QStringList#`operator<<`(85116071a693d053). "-l"cxx . . $ QString#QString(85c52e162fed56f9).); // execute crontab -l command & capture output to QString CronTab |
| 877 | cronProcesscxx . . $ cronProcess. -> waitForStartedcxx . . $ QProcess#waitForStarted(83c267b20bac841a).(); |
| 878 | cronProcesscxx . . $ cronProcess. -> waitForFinishedcxx . . $ QProcess#waitForFinished(83c267b20bac841a).(); |
| 879 | if (CronTabcxx . . $ scheduleDialog#CronTab. ==cxx . . $ `operator==`(5bc2975d2d751687). luckyEntryStart +cxx . . $ operator+(fab9b4f80031f353). luckyEntryEnd) |
| 880 | { |
| 881 | cronProcesscxx . . $ cronProcess. -> startcxx . . $ QProcess#start(5e315ba9c811784d). ("crontab"cxx . . $ QString#QString(85c52e162fed56f9).,QStringListcxx . . $ QStringList#QStringList(ced63f7c635d850d).() <<cxx . . $ QStringList#`operator<<`(85116071a693d053). "-r"cxx . . $ QString#QString(85c52e162fed56f9).); // remove user's crontab |
| 882 | cronProcesscxx . . $ cronProcess. -> waitForStartedcxx . . $ QProcess#waitForStarted(83c267b20bac841a).(); |
| 883 | cronProcesscxx . . $ cronProcess. -> waitForFinishedcxx . . $ QProcess#waitForFinished(83c267b20bac841a).(); |
| 884 | } |
| 885 | } |
| 886 | |
| 887 | // appendCrontabOutput===================================================================================================== |
| 888 | //appends the user's crontab to a QString |
| 889 | void scheduleDialogcxx . . $ scheduleDialog#::appendCrontabOutputcxx . . $ scheduleDialog#appendCrontabOutput(49f6e7a06ebc5aa8).() |
| 890 | { |
| 891 | QTextCodeccxx . . $ QTextCodec# *codec = QTextCodeccxx . . $ QTextCodec#::codecForNamecxx . . $ QTextCodec#codecForName(914382192c9ca379).("UTF-8"); |
| 892 | CronTabcxx . . $ scheduleDialog#CronTab. =cxx . . $ QString#`operator=`(4f35bf974e7f8568). codec->toUnicodecxx . . $ QTextCodec#toUnicode(5b58488ffc88f4c0).(cronProcesscxx . . $ cronProcess. -> readAllStandardOutputcxx . . $ QProcess#readAllStandardOutput(b3c286cec66e09f4).()); |
| 893 | //CronTab = QString(cronProcess -> readAllStandardOutput()); |
| 894 | } |
| 895 | |
| 896 | // saveScheduleFile===================================================================================================== |
| 897 | // saves the schedule file in text format |
| 898 | bool scheduleDialogcxx . . $ scheduleDialog#::saveScheduleFilecxx . . $ scheduleDialog#saveScheduleFile(c9857a73d68e59ba).() |
| 899 | { |
| 900 | if (scheduleFilecxx . . $ scheduleDialog#scheduleFile..existscxx . . $ QFile#exists(50ce9a9e25b4a850).()) //if a schedule file exists delete it |
| 901 | scheduleFilecxx . . $ scheduleDialog#scheduleFile..removecxx . . $ QFile#remove(c9857a73d68e59ba).(); |
| 902 | |
| 903 | if (!scheduleFilecxx . . $ scheduleDialog#scheduleFile..opencxx . . $ QFile#open(dca164408be960c8).(QIODevicecxx . . $ QFlags#QFlags(93d577a3e9528307).::WriteOnlycxx . . $ QIODevice#WriteOnly.)) //create a new schedule file |
| 904 | return false; |
| 905 | else //write some stuff to schedule file |
| 906 | { |
| 907 | QTextStreamcxx . . $ QTextStream# outcxx . . $ QTextStream#QTextStream(bebe8f2dee7f9e86).(&scheduleFilecxx . . $ scheduleDialog#scheduleFile.); |
| 908 | |
| 909 | out <<cxx . . $ QTextStream#`operator<<`(a8e98279dde0dccf). "***************************** WARNING *****************************\n"; |
| 910 | out <<cxx . . $ QTextStream#`operator<<`(a8e98279dde0dccf). "Do NOT edit this file directly, unless you REALLY know what you are doing !!\n\n\n"; |
| 911 | |
| 912 | out <<cxx . . $ QTextStream#`operator<<`(a8e98279dde0dccf). "[app_global]\n"; |
| 913 | out <<cxx . . $ QTextStream#`operator<<`(a8e98279dde0dccf). "appName=" <<cxx . . $ QTextStream#`operator<<`(f61e69e0d177108f). appNamecxx . . $ Global/appName. <<cxx . . $ QTextStream#`operator<<`(a8e98279dde0dccf). "\n"; //output the application name |
| 914 | out <<cxx . . $ QTextStream#`operator<<`(a8e98279dde0dccf). "appVersion=" <<cxx . . $ QTextStream#`operator<<`(51d1d7ce4274ad92). appVersioncxx . . $ Global/appVersion. <<cxx . . $ QTextStream#`operator<<`(a8e98279dde0dccf). "\n"; //output the application version |
| 915 | out <<cxx . . $ QTextStream#`operator<<`(a8e98279dde0dccf). "File_Type=" <<cxx . . $ QTextStream#`operator<<`(a8e98279dde0dccf). "luckybackup_schedule_file" <<cxx . . $ QTextStream#`operator<<`(a8e98279dde0dccf). "\n\n"; //output the application file type (?) |
| 916 | |
| 917 | out <<cxx . . $ QTextStream#`operator<<`(a8e98279dde0dccf). "\n[schedule_global]\n"; |
| 918 | out <<cxx . . $ QTextStream#`operator<<`(a8e98279dde0dccf). "TotalSchedules=" <<cxx . . $ QTextStream#`operator<<`(b419665206d30821). TotalSchedulecxx . . $ scheduleDialog#TotalSchedule. <<cxx . . $ QTextStream#`operator<<`(a8e98279dde0dccf). "\n\n"; //output the size of the schedule list |
| 919 | |
| 920 | currentSchedulecxx . . $ scheduleDialog#currentSchedule. = 0; |
| 921 | while (currentSchedulecxx . . $ scheduleDialog#currentSchedule. < TotalSchedulecxx . . $ scheduleDialog#TotalSchedule.) |
| 922 | { |
| 923 | out <<cxx . . $ QTextStream#`operator<<`(a8e98279dde0dccf). "[Schedule] - " <<cxx . . $ QTextStream#`operator<<`(b419665206d30821). currentSchedulecxx . . $ scheduleDialog#currentSchedule. <<cxx . . $ QTextStream#`operator<<`(a8e98279dde0dccf). "\n"; |
| 924 | |
| 925 | out <<cxx . . $ QTextStream#`operator<<`(a8e98279dde0dccf). "ScheduleName=" <<cxx . . $ QTextStream#`operator<<`(f61e69e0d177108f). Schedulecxx . . $ Schedule.[currentSchedulecxx . . $ scheduleDialog#currentSchedule.] -> GetNamecxx . . $ schedule#GetName(6ef7b6c27b00b43d).() <<cxx . . $ QTextStream#`operator<<`(a8e98279dde0dccf). "\n"; |
| 926 | |
| 927 | out <<cxx . . $ QTextStream#`operator<<`(a8e98279dde0dccf). "ProfilePath=" <<cxx . . $ QTextStream#`operator<<`(f61e69e0d177108f). Schedulecxx . . $ Schedule.[currentSchedulecxx . . $ scheduleDialog#currentSchedule.] -> GetProfilePathcxx . . $ schedule#GetProfilePath(6ef7b6c27b00b43d).() <<cxx . . $ QTextStream#`operator<<`(a8e98279dde0dccf). "\n"; |
| 928 | out <<cxx . . $ QTextStream#`operator<<`(a8e98279dde0dccf). "ProfileName=" <<cxx . . $ QTextStream#`operator<<`(f61e69e0d177108f). Schedulecxx . . $ Schedule.[currentSchedulecxx . . $ scheduleDialog#currentSchedule.] -> GetProfileNamecxx . . $ schedule#GetProfileName(6ef7b6c27b00b43d).() <<cxx . . $ QTextStream#`operator<<`(a8e98279dde0dccf). "\n"; |
| 929 | |
| 930 | out <<cxx . . $ QTextStream#`operator<<`(a8e98279dde0dccf). "ScheduleMonth=" <<cxx . . $ QTextStream#`operator<<`(b419665206d30821). Schedulecxx . . $ Schedule.[currentSchedulecxx . . $ scheduleDialog#currentSchedule.] -> GetMonthcxx . . $ schedule#GetMonth(455f465bc33b4cdf).() <<cxx . . $ QTextStream#`operator<<`(a8e98279dde0dccf). "\n"; |
| 931 | out <<cxx . . $ QTextStream#`operator<<`(a8e98279dde0dccf). "ScheduleMonthDay=" <<cxx . . $ QTextStream#`operator<<`(b419665206d30821). Schedulecxx . . $ Schedule.[currentSchedulecxx . . $ scheduleDialog#currentSchedule.] -> GetMonthDaycxx . . $ schedule#GetMonthDay(455f465bc33b4cdf).() <<cxx . . $ QTextStream#`operator<<`(a8e98279dde0dccf). "\n"; |
| 932 | out <<cxx . . $ QTextStream#`operator<<`(a8e98279dde0dccf). "ScheduleWeekDay=" <<cxx . . $ QTextStream#`operator<<`(b419665206d30821). Schedulecxx . . $ Schedule.[currentSchedulecxx . . $ scheduleDialog#currentSchedule.] -> GetWeekDaycxx . . $ schedule#GetWeekDay(455f465bc33b4cdf).() <<cxx . . $ QTextStream#`operator<<`(a8e98279dde0dccf). "\n"; |
| 933 | out <<cxx . . $ QTextStream#`operator<<`(a8e98279dde0dccf). "ScheduleHour=" <<cxx . . $ QTextStream#`operator<<`(b419665206d30821). Schedulecxx . . $ Schedule.[currentSchedulecxx . . $ scheduleDialog#currentSchedule.] -> GetHourcxx . . $ schedule#GetHour(455f465bc33b4cdf).() <<cxx . . $ QTextStream#`operator<<`(a8e98279dde0dccf). "\n"; |
| 934 | out <<cxx . . $ QTextStream#`operator<<`(a8e98279dde0dccf). "ScheduleMinute=" <<cxx . . $ QTextStream#`operator<<`(b419665206d30821). Schedulecxx . . $ Schedule.[currentSchedulecxx . . $ scheduleDialog#currentSchedule.] -> GetMinutecxx . . $ schedule#GetMinute(455f465bc33b4cdf).() <<cxx . . $ QTextStream#`operator<<`(a8e98279dde0dccf). "\n"; |
| 935 | |
| 936 | out <<cxx . . $ QTextStream#`operator<<`(a8e98279dde0dccf). "ScheduleSkipCritical=" <<cxx . . $ QTextStream#`operator<<`(b419665206d30821). Schedulecxx . . $ Schedule.[currentSchedulecxx . . $ scheduleDialog#currentSchedule.] -> GetSkipCriticalcxx . . $ schedule#GetSkipCritical(50ce9a9e25b4a850).() <<cxx . . $ QTextStream#`operator<<`(a8e98279dde0dccf). "\n"; |
| 937 | out <<cxx . . $ QTextStream#`operator<<`(a8e98279dde0dccf). "ScheduleConsoleMode=" <<cxx . . $ QTextStream#`operator<<`(b419665206d30821). Schedulecxx . . $ Schedule.[currentSchedulecxx . . $ scheduleDialog#currentSchedule.] -> GetConsoleModecxx . . $ schedule#GetConsoleMode(50ce9a9e25b4a850).() <<cxx . . $ QTextStream#`operator<<`(a8e98279dde0dccf). "\n"; |
| 938 | out <<cxx . . $ QTextStream#`operator<<`(a8e98279dde0dccf). "ScheduleAtReboot=" <<cxx . . $ QTextStream#`operator<<`(b419665206d30821). Schedulecxx . . $ Schedule.[currentSchedulecxx . . $ scheduleDialog#currentSchedule.] -> GetRebootcxx . . $ schedule#GetReboot(50ce9a9e25b4a850).() <<cxx . . $ QTextStream#`operator<<`(a8e98279dde0dccf). "\n"; |
| 939 | out <<cxx . . $ QTextStream#`operator<<`(a8e98279dde0dccf). "ScheduleAtRebootDelay=" <<cxx . . $ QTextStream#`operator<<`(b419665206d30821). Schedulecxx . . $ Schedule.[currentSchedulecxx . . $ scheduleDialog#currentSchedule.] -> GetDelayRebootcxx . . $ schedule#GetDelayReboot(455f465bc33b4cdf).() <<cxx . . $ QTextStream#`operator<<`(a8e98279dde0dccf). "\n"; |
| 940 | |
| 941 | out <<cxx . . $ QTextStream#`operator<<`(a8e98279dde0dccf). "[Schedule_end] - " <<cxx . . $ QTextStream#`operator<<`(b419665206d30821). currentSchedulecxx . . $ scheduleDialog#currentSchedule. <<cxx . . $ QTextStream#`operator<<`(a8e98279dde0dccf). "\n\n"; |
| 942 | currentSchedulecxx . . $ scheduleDialog#currentSchedule.++; |
| 943 | } |
| 944 | |
| 945 | out <<cxx . . $ QTextStream#`operator<<`(a8e98279dde0dccf). "\n[all_schedules_end]" <<cxx . . $ QTextStream#`operator<<`(a8e98279dde0dccf). "\n"; |
| 946 | } |
| 947 | |
| 948 | scheduleFilecxx . . $ scheduleDialog#scheduleFile..closecxx . . $ QFileDevice#close(49f6e7a06ebc5aa8).(); //close the file |
| 949 | return true; |
| 950 | } |
| 951 | |
| 952 | // end of scheduleDialog.cpp --------------------------------------------------------------------------- |
| 953 |