| 1 | /* ---------------------------------- functions.cpp --------------------------------------------------------------------------- |
| 2 | file containing all functions for luckybackupwindow |
| 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 | project version : Please see "main.cpp" for project version |
| 23 | |
| 24 | developer : luckyb |
| 25 | last modified : 22 May 2016 |
| 26 | =============================================================================================================================== |
| 27 | =============================================================================================================================== |
| 28 | */ |
| 29 | |
| 30 | #include <QTextStream> |
| 31 | #include <QToolBar> |
| 32 | |
| 33 | #include "global.h"cxx . . $ `<file>/src/global.h`/ |
| 34 | #include "luckybackupwindow.h"cxx . . $ `<file>/src/luckybackupwindow.h`/ |
| 35 | #include "operationClass.h"cxx . . $ `<file>/src/operationClass.h`/ |
| 36 | #include "textDialog.h"cxx . . $ `<file>/src/textDialog.h`/ |
| 37 | |
| 38 | // InitializeVariables ============================================================================================================================= |
| 39 | // variables initialization |
| 40 | void luckyBackupWindowcxx . . $ luckyBackupWindow#::InitializeVariablescxx . . $ luckyBackupWindow#InitializeVariables(49f6e7a06ebc5aa8).() |
| 41 | { |
| 42 | TotalOperationscxx . . $ Global/TotalOperations. = 0; |
| 43 | currentOperationcxx . . $ Global/currentOperation.=-1; |
| 44 | NOWexecutingcxx . . $ luckyBackupWindow#NOWexecuting. = false; |
| 45 | guiModeNormalcxx . . $ luckyBackupWindow#guiModeNormal. = true; |
| 46 | modifyOKcxx . . $ Global/modifyOK. = false; |
| 47 | savedProfilecxx . . $ luckyBackupWindow#savedProfile. = true; |
| 48 | taskClickedcxx . . $ luckyBackupWindow#taskClicked. = false; |
| 49 | taskChangedcxx . . $ luckyBackupWindow#taskChanged. = false; |
| 50 | GoBackcxx . . $ luckyBackupWindow#GoBack. = false; |
| 51 | InfoDatacxx . . $ luckyBackupWindow#InfoData. =cxx . . $ QString#`operator=`(d02845eef0c33901). ""; |
| 52 | InfoIntcxx . . $ luckyBackupWindow#InfoInt. = 0; |
| 53 | defaultLanguagecxx . . $ luckyBackupWindow#defaultLanguage. =cxx . . $ QString#`operator=`(d02845eef0c33901). "en"; |
| 54 | mainWindowWidthcxx . . $ luckyBackupWindow#mainWindowWidth. = 615; |
| 55 | mainWindowHeightcxx . . $ luckyBackupWindow#mainWindowHeight. = 500; |
| 56 | AreToolbarsLockedcxx . . $ luckyBackupWindow#AreToolbarsLocked. = true; |
| 57 | IsVisibleProfileComboToolbarcxx . . $ luckyBackupWindow#IsVisibleProfileComboToolbar. = true; |
| 58 | IsVisibleProfileToolbarcxx . . $ luckyBackupWindow#IsVisibleProfileToolbar. = true; |
| 59 | IsVisibleProfileStartToolbarcxx . . $ luckyBackupWindow#IsVisibleProfileStartToolbar. = true; |
| 60 | IsVisibleToolbarTextcxx . . $ luckyBackupWindow#IsVisibleToolbarText. = false; |
| 61 | IsVisibleInfoWindowcxx . . $ luckyBackupWindow#IsVisibleInfoWindow. = true; |
| 62 | validationcxx . . $ Global/validation. = false; |
| 63 | deletedTaskNamescxx . . $ luckyBackupWindow#deletedTaskNames..clearcxx . . $ QList#clear(49f6e7a06ebc5aa8).(); |
| 64 | saveOrNotcxx . . $ luckyBackupWindow#saveOrNot. = true; |
| 65 | manualChaptercxx . . $ luckyBackupWindow#manualChapter. =cxx . . $ QString#`operator=`(d02845eef0c33901). ""; |
| 66 | showOnlyErrorscxx . . $ luckyBackupWindow#showOnlyErrors. = false; |
| 67 | |
| 68 | // Running desktop environment |
| 69 | // kde |
| 70 | char *isKDE = getenv("KDE_FULL_SESSION"); |
| 71 | if (QStringcxx . . $ QString#QString(85c52e162fed56f9).(isKDE) !=cxx . . $ QString#`operator!=`(7d4bdb1abc417636). "") |
| 72 | KDErunningcxx . . $ Global/KDErunning. = true; |
| 73 | else |
| 74 | KDErunningcxx . . $ Global/KDErunning. = false; |
| 75 | // if LB is run using kdesu the environmental variable does not work |
| 76 | // so we will check if kdesud is running as a process... |
| 77 | // It is commented because the super use cannot use eg the tray notification anyway, so he/she will use the qt stuff |
| 78 | /*if (currentUser == "super user") |
| 79 | { |
| 80 | QProcess *kdesuProcess; kdesuProcess = new QProcess(this); |
| 81 | QStringList kdesuArgs; kdesuArgs << "-c" << "ps aux | grep kdesud"; |
| 82 | kdesuProcess -> start ("/bin/sh",kdesuArgs); |
| 83 | kdesuProcess -> waitForFinished(); |
| 84 | if (kdesuProcess -> exitCode() == 0) // there is a root process "kdesu_stub running |
| 85 | KDErunning = true; |
| 86 | }*/ |
| 87 | |
| 88 | // gnome |
| 89 | char *isGnome = getenv("DESKTOP_SESSION"); |
| 90 | if ((QStringcxx . . $ QString#QString(85c52e162fed56f9).(isGnome) ==cxx . . $ QString#`operator==`(7d4bdb1abc417636). "gnome") || (QStringcxx . . $ QString#QString(85c52e162fed56f9).(isGnome) ==cxx . . $ QString#`operator==`(7d4bdb1abc417636). "GNOME")) |
| 91 | GNOMErunningcxx . . $ Global/GNOMErunning. = true; |
| 92 | else |
| 93 | GNOMErunningcxx . . $ Global/GNOMErunning. = true; |
| 94 | |
| 95 | // translations -------------------------------- |
| 96 | TransDircxx . . $ luckyBackupWindow#TransDir. =cxx . . $ QString#`operator=`(d02845eef0c33901). ""; |
| 97 | transDircxx . . $ Global/transDir..setPathcxx . . $ QDir#setPath(3520e46b33348bf6).(relativeTransDircxx . . $ Global/relativeTransDir.); |
| 98 | QStringListcxx . . $ QStringList# transContQm = transDircxx . . $ Global/transDir..entryListcxx . . $ QDir#entryList(4575c08c50802968). ( QStringListcxx . . $ QStringList#QStringList(3520e46b33348bf6).("luckybackup*.qm"cxx . . $ QString#QString(85c52e162fed56f9).), QDircxx . . $ QFlags#QFlags(93d577a3e9528307).::Filescxx . . $ QDir#Files., QDircxx . . $ QFlags#QFlags(93d577a3e9528307).::NoSortcxx . . $ QDir#NoSort.); // list of .qm files inside transdir |
| 99 | if ( (transDircxx . . $ Global/transDir..existscxx . . $ QDir#exists(50ce9a9e25b4a850).()) && (!transContQm.isEmptycxx . . $ QList#isEmpty(3482b152b9333168).()) ) |
| 100 | TransDircxx . . $ luckyBackupWindow#TransDir. =cxx . . $ QString#`operator=`(4f35bf974e7f8568). transDircxx . . $ Global/transDir..absolutePathcxx . . $ QDir#absolutePath(6ef7b6c27b00b43d).(); |
| 101 | else |
| 102 | { |
| 103 | transDircxx . . $ Global/transDir..setPathcxx . . $ QDir#setPath(3520e46b33348bf6).(systemTransDircxx . . $ Global/systemTransDir.); |
| 104 | TransDircxx . . $ luckyBackupWindow#TransDir. =cxx . . $ QString#`operator=`(4f35bf974e7f8568). transDircxx . . $ Global/transDir..absolutePathcxx . . $ QDir#absolutePath(6ef7b6c27b00b43d).(); |
| 105 | } |
| 106 | |
| 107 | // manual actual path (QUrl helpURL) -------------------------------- |
| 108 | helpURLcxx . . $ luckyBackupWindow#helpURL..setSchemecxx . . $ QUrl#setScheme(3520e46b33348bf6).("file"cxx . . $ QString#QString(85c52e162fed56f9).); |
| 109 | helpURLcxx . . $ luckyBackupWindow#helpURL..setUrlcxx . . $ QUrl#setUrl(ea1f3831e370f1cb).("Does_not_exist"cxx . . $ QString#QString(85c52e162fed56f9).); |
| 110 | QFilecxx . . $ QFile# manualcxx . . $ QFile#QFile(49f6e7a06ebc5aa8).; |
| 111 | manual.setFileNamecxx . . $ QFile#setFileName(3520e46b33348bf6).(suseManualcxx . . $ Global/suseManual.); |
| 112 | if (manual.existscxx . . $ QFile#exists(50ce9a9e25b4a850).()) //if the manual is located in /usr/share/doc/packages/luckybackup (normal installation) - openSuse |
| 113 | helpURLcxx . . $ luckyBackupWindow#helpURL..setUrlcxx . . $ QUrl#setUrl(ea1f3831e370f1cb).(suseManualcxx . . $ Global/suseManual.); |
| 114 | manual.setFileNamecxx . . $ QFile#setFileName(3520e46b33348bf6).(systemManualcxx . . $ Global/systemManual.); |
| 115 | if (manual.existscxx . . $ QFile#exists(50ce9a9e25b4a850).()) //if the manual is located in /usr/share/doc/luckybackup (normal installation) |
| 116 | helpURLcxx . . $ luckyBackupWindow#helpURL..setUrlcxx . . $ QUrl#setUrl(ea1f3831e370f1cb).(systemManualcxx . . $ Global/systemManual.); |
| 117 | manual.setFileNamecxx . . $ QFile#setFileName(3520e46b33348bf6).(relativeManualcxx . . $ Global/relativeManual.); |
| 118 | if (manual.existscxx . . $ QFile#exists(50ce9a9e25b4a850).()) //if the manual is located in relative path manual/ (app run from commandline) |
| 119 | helpURLcxx . . $ luckyBackupWindow#helpURL..setUrlcxx . . $ QUrl#setUrl(ea1f3831e370f1cb).(QApplicationcxx . . $ QApplication#::applicationDirPathcxx . . $ QCoreApplication#applicationDirPath(4365c3963150523e).() +cxx . . $ operator+(fab9b4f80031f353). SLASHcxx . . $ Global/SLASH. +cxx . . $ operator+(fab9b4f80031f353). relativeManualcxx . . $ Global/relativeManual.); |
| 120 | |
| 121 | // licence actual path (QUrllicenseURL) -------------------------------------------------------- |
| 122 | licenseURLcxx . . $ luckyBackupWindow#licenseURL..setSchemecxx . . $ QUrl#setScheme(3520e46b33348bf6).("file"cxx . . $ QString#QString(85c52e162fed56f9).); |
| 123 | licenseURLcxx . . $ luckyBackupWindow#licenseURL..setUrlcxx . . $ QUrl#setUrl(ea1f3831e370f1cb).("Does_not_exist"cxx . . $ QString#QString(85c52e162fed56f9).); |
| 124 | QFilecxx . . $ QFile# licensecxx . . $ QFile#QFile(49f6e7a06ebc5aa8).; |
| 125 | license.setFileNamecxx . . $ QFile#setFileName(3520e46b33348bf6).(debianLicensecxx . . $ Global/debianLicense.); |
| 126 | if (license.existscxx . . $ QFile#exists(50ce9a9e25b4a850).()) //if the licence file is located in the normal debian directory |
| 127 | licenseURLcxx . . $ luckyBackupWindow#licenseURL..setUrlcxx . . $ QUrl#setUrl(ea1f3831e370f1cb).(debianLicensecxx . . $ Global/debianLicense.); |
| 128 | license.setFileNamecxx . . $ QFile#setFileName(3520e46b33348bf6).(suseLicensecxx . . $ Global/suseLicense.); |
| 129 | if (license.existscxx . . $ QFile#exists(50ce9a9e25b4a850).()) //if the licence file is located in the normal suse directory |
| 130 | licenseURLcxx . . $ luckyBackupWindow#licenseURL..setUrlcxx . . $ QUrl#setUrl(ea1f3831e370f1cb).(suseLicensecxx . . $ Global/suseLicense.); |
| 131 | license.setFileNamecxx . . $ QFile#setFileName(3520e46b33348bf6).(systemLicensecxx . . $ Global/systemLicense.); |
| 132 | if (license.existscxx . . $ QFile#exists(50ce9a9e25b4a850).()) //if the licence file is located in the normal installation directory |
| 133 | licenseURLcxx . . $ luckyBackupWindow#licenseURL..setUrlcxx . . $ QUrl#setUrl(ea1f3831e370f1cb).(systemLicensecxx . . $ Global/systemLicense.); |
| 134 | license.setFileNamecxx . . $ QFile#setFileName(3520e46b33348bf6).(relativeLicensecxx . . $ Global/relativeLicense.); |
| 135 | if (license.existscxx . . $ QFile#exists(50ce9a9e25b4a850).()) //if the licence file is located in the same directory (compile directory) |
| 136 | licenseURLcxx . . $ luckyBackupWindow#licenseURL..setUrlcxx . . $ QUrl#setUrl(ea1f3831e370f1cb).(relativeLicensecxx . . $ Global/relativeLicense.); |
| 137 | |
| 138 | // fix OS/2 & win compatibility issues |
| 139 | if (notXnixRunningcxx . . $ Global/notXnixRunning.) |
| 140 | { |
| 141 | licenseURLcxx . . $ luckyBackupWindow#licenseURL..setUrlcxx . . $ QUrl#setUrl(ea1f3831e370f1cb).("Does_not_exist"cxx . . $ QString#QString(85c52e162fed56f9).); |
| 142 | helpURLcxx . . $ luckyBackupWindow#helpURL..setUrlcxx . . $ QUrl#setUrl(ea1f3831e370f1cb).("Does_not_exist"cxx . . $ QString#QString(85c52e162fed56f9).); |
| 143 | |
| 144 | QStringcxx . . $ QString# OS2manual = relativeManualcxx . . $ QString#QString(132dd6869045752b).; OS2manual.replacecxx . . $ QString#replace(192e628656427d1c).("/"cxx . . $ QString#QString(85c52e162fed56f9).,SLASHcxx . . $ Global/SLASH.); OS2manual =cxx . . $ QString#`operator=`(4f35bf974e7f8568). OS2manual.toLowercxx . . $ QString#toLower(dca2c5857e9adf82).(); |
| 145 | QStringcxx . . $ QString# OS2license = relativeLicensecxx . . $ QString#QString(132dd6869045752b).; OS2license.replacecxx . . $ QString#replace(192e628656427d1c).("/"cxx . . $ QString#QString(85c52e162fed56f9).,SLASHcxx . . $ Global/SLASH.); OS2license=cxx . . $ QString#`operator=`(4f35bf974e7f8568). OS2license.toLowercxx . . $ QString#toLower(dca2c5857e9adf82).(); |
| 146 | |
| 147 | manual.setFileNamecxx . . $ QFile#setFileName(3520e46b33348bf6).(OS2manual); license.setFileNamecxx . . $ QFile#setFileName(3520e46b33348bf6).(OS2license); |
| 148 | if (manual.existscxx . . $ QFile#exists(50ce9a9e25b4a850).()) |
| 149 | helpURLcxx . . $ luckyBackupWindow#helpURL..setUrlcxx . . $ QUrl#setUrl(ea1f3831e370f1cb).(OS2manual); |
| 150 | if (license.existscxx . . $ QFile#exists(50ce9a9e25b4a850).()) |
| 151 | licenseURLcxx . . $ luckyBackupWindow#licenseURL..setUrlcxx . . $ QUrl#setUrl(ea1f3831e370f1cb).(OS2license); |
| 152 | |
| 153 | myHomecxx . . $ Global/myHome..replacecxx . . $ QString#replace(192e628656427d1c).("/"cxx . . $ QString#QString(85c52e162fed56f9).,SLASHcxx . . $ Global/SLASH.); |
| 154 | luckyBackupDircxx . . $ Global/luckyBackupDir..replacecxx . . $ QString#replace(192e628656427d1c).("/"cxx . . $ QString#QString(85c52e162fed56f9).,SLASHcxx . . $ Global/SLASH.); |
| 155 | settingsFilecxx . . $ Global/settingsFile..replacecxx . . $ QString#replace(192e628656427d1c).("/"cxx . . $ QString#QString(85c52e162fed56f9).,SLASHcxx . . $ Global/SLASH.); |
| 156 | profileDircxx . . $ Global/profileDir..replacecxx . . $ QString#replace(192e628656427d1c).("/"cxx . . $ QString#QString(85c52e162fed56f9).,SLASHcxx . . $ Global/SLASH.); |
| 157 | defaultProfilecxx . . $ Global/defaultProfile..replacecxx . . $ QString#replace(192e628656427d1c).("/"cxx . . $ QString#QString(85c52e162fed56f9).,SLASHcxx . . $ Global/SLASH.); |
| 158 | defaultProfilecxx . . $ Global/defaultProfile..replacecxx . . $ QString#replace(192e628656427d1c).("/"cxx . . $ QString#QString(85c52e162fed56f9).,SLASHcxx . . $ Global/SLASH.); |
| 159 | standardDefaultProfilecxx . . $ Global/standardDefaultProfile..replacecxx . . $ QString#replace(192e628656427d1c).("/"cxx . . $ QString#QString(85c52e162fed56f9).,SLASHcxx . . $ Global/SLASH.); |
| 160 | logDircxx . . $ Global/logDir..replacecxx . . $ QString#replace(192e628656427d1c).("/"cxx . . $ QString#QString(85c52e162fed56f9).,SLASHcxx . . $ Global/SLASH.); |
| 161 | logfilenamecxx . . $ Global/logfilename..replacecxx . . $ QString#replace(192e628656427d1c).("/"cxx . . $ QString#QString(85c52e162fed56f9).,SLASHcxx . . $ Global/SLASH.); |
| 162 | snapDefaultDircxx . . $ Global/snapDefaultDir..replacecxx . . $ QString#replace(192e628656427d1c).("/"cxx . . $ QString#QString(85c52e162fed56f9).,SLASHcxx . . $ Global/SLASH.); |
| 163 | snapChangesDircxx . . $ Global/snapChangesDir..replacecxx . . $ QString#replace(192e628656427d1c).("/"cxx . . $ QString#QString(85c52e162fed56f9).,SLASHcxx . . $ Global/SLASH.); |
| 164 | snapEmptyDircxx . . $ Global/snapEmptyDir..replacecxx . . $ QString#replace(192e628656427d1c).("/"cxx . . $ QString#QString(85c52e162fed56f9).,SLASHcxx . . $ Global/SLASH.); |
| 165 | snapchangesfilenamecxx . . $ Global/snapchangesfilename..replacecxx . . $ QString#replace(192e628656427d1c).("/"cxx . . $ QString#QString(85c52e162fed56f9).,SLASHcxx . . $ Global/SLASH.); |
| 166 | scheduleDircxx . . $ Global/scheduleDir..replacecxx . . $ QString#replace(192e628656427d1c).("/"cxx . . $ QString#QString(85c52e162fed56f9).,SLASHcxx . . $ Global/SLASH.); |
| 167 | schedulefilenamecxx . . $ Global/schedulefilename..replacecxx . . $ QString#replace(192e628656427d1c).("/"cxx . . $ QString#QString(85c52e162fed56f9).,SLASHcxx . . $ Global/SLASH.); |
| 168 | cronfilenamecxx . . $ Global/cronfilename..replacecxx . . $ QString#replace(192e628656427d1c).("/"cxx . . $ QString#QString(85c52e162fed56f9).,SLASHcxx . . $ Global/SLASH.); |
| 169 | relativeTransDircxx . . $ Global/relativeTransDir..replacecxx . . $ QString#replace(192e628656427d1c).("/"cxx . . $ QString#QString(85c52e162fed56f9).,SLASHcxx . . $ Global/SLASH.); |
| 170 | systemTransDircxx . . $ Global/systemTransDir..replacecxx . . $ QString#replace(192e628656427d1c).("/"cxx . . $ QString#QString(85c52e162fed56f9).,SLASHcxx . . $ Global/SLASH.); |
| 171 | } |
| 172 | } |
| 173 | |
| 174 | |
| 175 | // retranslateUi =================================================================================================================================== |
| 176 | // retranslate the ui every time the user chooses a different language from the menu |
| 177 | void luckyBackupWindowcxx . . $ luckyBackupWindow#::retranslateUicxx . . $ luckyBackupWindow#retranslateUi(49f6e7a06ebc5aa8).() |
| 178 | { |
| 179 | uicxx . . $ luckyBackupWindow#ui..menuFilecxx . . $ Ui_luckyBackupWindow#menuFile. -> setTitlecxx . . $ QMenu#setTitle(3520e46b33348bf6).(trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("&Profile","This is a top menu item")); |
| 180 | uicxx . . $ luckyBackupWindow#ui..actionRefreshcxx . . $ Ui_luckyBackupWindow#actionRefresh. -> setTextcxx . . $ QAction#setText(3520e46b33348bf6).(trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("&Refresh","This is a top 'Profile' menu action")); |
| 181 | uicxx . . $ luckyBackupWindow#ui..actionDefaultcxx . . $ Ui_luckyBackupWindow#actionDefault. -> setTextcxx . . $ QAction#setText(3520e46b33348bf6).(trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("De&fault","This is a top 'Profile' menu action")); |
| 182 | uicxx . . $ luckyBackupWindow#ui..actionDefaultcxx . . $ Ui_luckyBackupWindow#actionDefault. -> setToolTipcxx . . $ QAction#setToolTip(3520e46b33348bf6).(trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("Set as Default","This is a top 'Profile' menu action tooltip")); |
| 183 | uicxx . . $ luckyBackupWindow#ui..actionDescriptioncxx . . $ Ui_luckyBackupWindow#actionDescription. -> setTextcxx . . $ QAction#setText(3520e46b33348bf6).(trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("&View/Edit Description","This is a top 'Profile' menu action")); |
| 184 | uicxx . . $ luckyBackupWindow#ui..actionDescriptioncxx . . $ Ui_luckyBackupWindow#actionDescription. -> setToolTipcxx . . $ QAction#setToolTip(3520e46b33348bf6).(trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("View/Edit the profile description","This is a top 'Profile' menu action tooltip")); |
| 185 | uicxx . . $ luckyBackupWindow#ui..actionRenamecxx . . $ Ui_luckyBackupWindow#actionRename. -> setTextcxx . . $ QAction#setText(3520e46b33348bf6).(trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("R&ename","This is a top 'Profile' menu action")); |
| 186 | uicxx . . $ luckyBackupWindow#ui..actionDeletecxx . . $ Ui_luckyBackupWindow#actionDelete. -> setTextcxx . . $ QAction#setText(3520e46b33348bf6).(trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("&Delete","This is a top 'Profile' menu action")); |
| 187 | uicxx . . $ luckyBackupWindow#ui..actionNewcxx . . $ Ui_luckyBackupWindow#actionNew. -> setTextcxx . . $ QAction#setText(3520e46b33348bf6).(trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("&New","This is a top 'Profile' menu action")); |
| 188 | uicxx . . $ luckyBackupWindow#ui..actionSavecxx . . $ Ui_luckyBackupWindow#actionSave. -> setTextcxx . . $ QAction#setText(3520e46b33348bf6).(trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("&Save","This is a top 'Profile' menu action")); |
| 189 | uicxx . . $ luckyBackupWindow#ui..actionExportcxx . . $ Ui_luckyBackupWindow#actionExport. -> setTextcxx . . $ QAction#setText(3520e46b33348bf6).(trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("E&xport","This is a top 'Profile' menu action")); |
| 190 | uicxx . . $ luckyBackupWindow#ui..actionImportcxx . . $ Ui_luckyBackupWindow#actionImport. -> setTextcxx . . $ QAction#setText(3520e46b33348bf6).(trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("&Import","This is a top 'Profile' menu action")); |
| 191 | uicxx . . $ luckyBackupWindow#ui..actionSchedulecxx . . $ Ui_luckyBackupWindow#actionSchedule. -> setTextcxx . . $ QAction#setText(3520e46b33348bf6).(trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("S&chedule","This is a top 'Profile' menu action")); |
| 192 | uicxx . . $ luckyBackupWindow#ui..actionEmailcxx . . $ Ui_luckyBackupWindow#actionEmail. -> setTextcxx . . $ QAction#setText(3520e46b33348bf6).(trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("E&mail","This is a top 'Profile' menu action")); |
| 193 | uicxx . . $ luckyBackupWindow#ui..actionEmailcxx . . $ Ui_luckyBackupWindow#actionEmail. -> setToolTipcxx . . $ QAction#setToolTip(3520e46b33348bf6).(trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("Email report after profile execution","This is a top 'Profile' menu action tooltip")); |
| 194 | uicxx . . $ luckyBackupWindow#ui..actionQuitcxx . . $ Ui_luckyBackupWindow#actionQuit. -> setTextcxx . . $ QAction#setText(3520e46b33348bf6).(trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("&Quit","This is a top 'Profile' menu action")); |
| 195 | uicxx . . $ luckyBackupWindow#ui..actionDuplicate_Profilecxx . . $ Ui_luckyBackupWindow#actionDuplicate_Profile. -> setTextcxx . . $ QAction#setText(3520e46b33348bf6).(trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("D&uplicate","This is a top 'Profile' menu action")); |
| 196 | |
| 197 | uicxx . . $ luckyBackupWindow#ui..menu_Taskcxx . . $ Ui_luckyBackupWindow#menu_Task. -> setTitlecxx . . $ QMenu#setTitle(3520e46b33348bf6).(trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("&Task","This is a top menu action")); |
| 198 | uicxx . . $ luckyBackupWindow#ui..action_TaskAddcxx . . $ Ui_luckyBackupWindow#action_TaskAdd. -> setTextcxx . . $ QAction#setText(3520e46b33348bf6).(trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("&Add","This is a top 'Task' menu action")); |
| 199 | uicxx . . $ luckyBackupWindow#ui..action_TaskRemovecxx . . $ Ui_luckyBackupWindow#action_TaskRemove. -> setTextcxx . . $ QAction#setText(3520e46b33348bf6).(trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("&Remove","This is a top 'Task' menu action")); |
| 200 | uicxx . . $ luckyBackupWindow#ui..action_TaskModifycxx . . $ Ui_luckyBackupWindow#action_TaskModify. -> setTextcxx . . $ QAction#setText(3520e46b33348bf6).(trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("&Modify","This is a top 'Task' menu action")); |
| 201 | uicxx . . $ luckyBackupWindow#ui..action_TaskDuplicatecxx . . $ Ui_luckyBackupWindow#action_TaskDuplicate. -> setTextcxx . . $ QAction#setText(3520e46b33348bf6).(trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("Create D&uplicate task","This is a top 'Task' menu action")); |
| 202 | uicxx . . $ luckyBackupWindow#ui..action_TaskCreateRestorecxx . . $ Ui_luckyBackupWindow#action_TaskCreateRestore. -> setTextcxx . . $ QAction#setText(3520e46b33348bf6).(trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("Create R&estore task","This is a top 'Task' menu action")); |
| 203 | uicxx . . $ luckyBackupWindow#ui..action_TaskManageBackupcxx . . $ Ui_luckyBackupWindow#action_TaskManageBackup. -> setTextcxx . . $ QAction#setText(3520e46b33348bf6).(trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("Manage &Backup","This is a top 'Task' menu action")); |
| 204 | uicxx . . $ luckyBackupWindow#ui..action_TaskManageBackupcxx . . $ Ui_luckyBackupWindow#action_TaskManageBackup. -> setToolTipcxx . . $ QAction#setToolTip(3520e46b33348bf6).(trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("display - restore - delete existing backups of highlighted task", |
| 205 | "This is a top 'Task' menu action tooltip")); |
| 206 | |
| 207 | settingsMenucxx . . $ luckyBackupWindow#settingsMenu. -> setTitlecxx . . $ QMenu#setTitle(3520e46b33348bf6).(trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("&Settings","This is a top menu item")); |
| 208 | visibleProfileToolbarcxx . . $ luckyBackupWindow#visibleProfileToolbar.-> setTextcxx . . $ QAction#setText(3520e46b33348bf6).(trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("Actions","This is a top menu action")); |
| 209 | visibleProfileComboToolbarcxx . . $ luckyBackupWindow#visibleProfileComboToolbar. -> setTextcxx . . $ QAction#setText(3520e46b33348bf6).(trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("Current Profile","This is a top menu action")); |
| 210 | actionLockToolbarscxx . . $ luckyBackupWindow#actionLockToolbars. -> setTextcxx . . $ QAction#setText(3520e46b33348bf6).(trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("Lock","This is a top menu action. Refers to toolbars")); |
| 211 | actionVisibleToolbarTextcxx . . $ luckyBackupWindow#actionVisibleToolbarText. -> setTextcxx . . $ QAction#setText(3520e46b33348bf6).(trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("Show text under icons","This is a top menu action")); |
| 212 | languageMenucxx . . $ luckyBackupWindow#languageMenu. -> setTitlecxx . . $ QMenu#setTitle(3520e46b33348bf6).(trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("&Language","This is a top menu item")); |
| 213 | toolbarsMenucxx . . $ luckyBackupWindow#toolbarsMenu. -> setTitlecxx . . $ QMenu#setTitle(3520e46b33348bf6).(trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("&Toolbars","This is a top menu item")); |
| 214 | |
| 215 | if (WINrunningcxx . . $ Global/WINrunning.) |
| 216 | { |
| 217 | actionSetWinPathscxx . . $ luckyBackupWindow#actionSetWinPaths. -> setTextcxx . . $ QAction#setText(3520e46b33348bf6).(trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("Set paths","This is a top menu action")); |
| 218 | actionSetWinPathscxx . . $ luckyBackupWindow#actionSetWinPaths. -> setToolTipcxx . . $ QAction#setToolTip(3520e46b33348bf6).(trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("Set paths for rsync and ssh commands","This is a top menu action tooltip")); |
| 219 | } |
| 220 | |
| 221 | helpMenucxx . . $ luckyBackupWindow#helpMenu. -> setTitlecxx . . $ QMenu#setTitle(3520e46b33348bf6).(trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("&Help","This is a top menu item")); |
| 222 | actionHelpcxx . . $ luckyBackupWindow#actionHelp. -> setTextcxx . . $ QAction#setText(3520e46b33348bf6).(appNamecxx . . $ Global/appName. +cxx . . $ operator+(3d22f08efddf8107). " " +cxx . . $ operator+(fab9b4f80031f353). trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("&Handbook","full phrase: 'luckyBackup Handbook'")); |
| 223 | actionAboutcxx . . $ luckyBackupWindow#actionAbout. -> setTextcxx . . $ QAction#setText(3520e46b33348bf6).(trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("&About","full phrase: 'about luckyBackup'") +cxx . . $ operator+(3d22f08efddf8107). " " +cxx . . $ operator+(fab9b4f80031f353). appNamecxx . . $ Global/appName.); |
| 224 | |
| 225 | uicxx . . $ luckyBackupWindow#ui..comboBox_profilecxx . . $ Ui_luckyBackupWindow#comboBox_profile. -> setToolTipcxx . . $ QWidget#setToolTip(3520e46b33348bf6).(trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("current profile")); |
| 226 | |
| 227 | uicxx . . $ luckyBackupWindow#ui..label_TaskListcxx . . $ Ui_luckyBackupWindow#label_TaskList. -> setTextcxx . . $ QLabel#setText(3520e46b33348bf6).(trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("Task list","task list label")); |
| 228 | uicxx . . $ luckyBackupWindow#ui..label_includecxx . . $ Ui_luckyBackupWindow#label_include. -> setTextcxx . . $ QLabel#setText(3520e46b33348bf6).(trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("include","label of 'include' checkboxes")); |
| 229 | uicxx . . $ luckyBackupWindow#ui..frame_operationscxx . . $ Ui_luckyBackupWindow#frame_operations. -> setToolTipcxx . . $ QWidget#setToolTip(3520e46b33348bf6).(trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("List of all the available tasks","task list tooltip - line1")+cxx . . $ operator+(3d22f08efddf8107)."\n"+cxx . . $ operator+(fab9b4f80031f353). |
| 230 | trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("Use the 'include checkboxes' to include or not a selected task","task list tooltip - line2")); |
| 231 | uicxx . . $ luckyBackupWindow#ui..pushButton_upcxx . . $ Ui_luckyBackupWindow#pushButton_up. -> setToolTipcxx . . $ QWidget#setToolTip(3520e46b33348bf6).(trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("Move the highlighted task up, by one position","button tooltip")); |
| 232 | uicxx . . $ luckyBackupWindow#ui..pushButton_downcxx . . $ Ui_luckyBackupWindow#pushButton_down. -> setToolTipcxx . . $ QWidget#setToolTip(3520e46b33348bf6).(trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("Move the highlighted task down, by one position","button tooltip")); |
| 233 | uicxx . . $ luckyBackupWindow#ui..pushButton_nextErrorcxx . . $ Ui_luckyBackupWindow#pushButton_nextError. -> setToolTipcxx . . $ QWidget#setToolTip(3520e46b33348bf6).(trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("jump to next error","button tooltip")); |
| 234 | uicxx . . $ luckyBackupWindow#ui..pushButton_previousErrorcxx . . $ Ui_luckyBackupWindow#pushButton_previousError. -> setToolTipcxx . . $ QWidget#setToolTip(3520e46b33348bf6).(trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("jump to previous error","button tooltip")); |
| 235 | uicxx . . $ luckyBackupWindow#ui..checkBox_onlyShowErrorscxx . . $ Ui_luckyBackupWindow#checkBox_onlyShowErrors. -> setTextcxx . . $ QAbstractButton#setText(3520e46b33348bf6). (trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("quiet mode")); |
| 236 | uicxx . . $ luckyBackupWindow#ui..checkBox_onlyShowErrorscxx . . $ Ui_luckyBackupWindow#checkBox_onlyShowErrors. -> setToolTipcxx . . $ QWidget#setToolTip(3520e46b33348bf6). (trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("Only show errors and important messages during window update")); |
| 237 | |
| 238 | uicxx . . $ luckyBackupWindow#ui..groupBox_taskcxx . . $ Ui_luckyBackupWindow#groupBox_task. -> setTitlecxx . . $ QGroupBox#setTitle(3520e46b33348bf6).(trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("Task","task groupbox (add, remove, modify buttons) label")); |
| 239 | uicxx . . $ luckyBackupWindow#ui..pushButton_addcxx . . $ Ui_luckyBackupWindow#pushButton_add. -> setTextcxx . . $ QAbstractButton#setText(3520e46b33348bf6).(trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("add","add task button label")); |
| 240 | uicxx . . $ luckyBackupWindow#ui..pushButton_addcxx . . $ Ui_luckyBackupWindow#pushButton_add. -> setToolTipcxx . . $ QWidget#setToolTip(3520e46b33348bf6).(trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("add task","add task button tooltip")); |
| 241 | uicxx . . $ luckyBackupWindow#ui..pushButton_removecxx . . $ Ui_luckyBackupWindow#pushButton_remove. -> setTextcxx . . $ QAbstractButton#setText(3520e46b33348bf6).(trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("remove","remove task button label")); |
| 242 | uicxx . . $ luckyBackupWindow#ui..pushButton_removecxx . . $ Ui_luckyBackupWindow#pushButton_remove. -> setToolTipcxx . . $ QWidget#setToolTip(3520e46b33348bf6).(trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("remove highlighted task","remove task button tooltip")); |
| 243 | uicxx . . $ luckyBackupWindow#ui..pushButton_editcxx . . $ Ui_luckyBackupWindow#pushButton_edit. -> setTextcxx . . $ QAbstractButton#setText(3520e46b33348bf6).(trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("modify","modify task button label")); |
| 244 | uicxx . . $ luckyBackupWindow#ui..pushButton_editcxx . . $ Ui_luckyBackupWindow#pushButton_edit. -> setToolTipcxx . . $ QWidget#setToolTip(3520e46b33348bf6).(trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("modify highlighted task","modify task button tooltip")); |
| 245 | |
| 246 | //ui.groupBox_operations -> setTitle(tr("Run","run groupbox label")); |
| 247 | uicxx . . $ luckyBackupWindow#ui..pushButton_startcxx . . $ Ui_luckyBackupWindow#pushButton_start. -> setTextcxx . . $ QAbstractButton#setText(3520e46b33348bf6).(trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("Run","start button label")); |
| 248 | uicxx . . $ luckyBackupWindow#ui..pushButton_startcxx . . $ Ui_luckyBackupWindow#pushButton_start. -> setToolTipcxx . . $ QWidget#setToolTip(3520e46b33348bf6).(trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("Begin the execution of all included tasks","start button tooltip")); |
| 249 | uicxx . . $ luckyBackupWindow#ui..AbortButtoncxx . . $ Ui_luckyBackupWindow#AbortButton. -> setTextcxx . . $ QAbstractButton#setText(3520e46b33348bf6).(trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("Abort","Abort button label")); |
| 250 | uicxx . . $ luckyBackupWindow#ui..AbortButtoncxx . . $ Ui_luckyBackupWindow#AbortButton. -> setToolTipcxx . . $ QWidget#setToolTip(3520e46b33348bf6).(trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("Stop the execution of running tasks NOW","Abort button tooltip")); |
| 251 | uicxx . . $ luckyBackupWindow#ui..DoneButtoncxx . . $ Ui_luckyBackupWindow#DoneButton. -> setTextcxx . . $ QAbstractButton#setText(3520e46b33348bf6). (trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("Done")); |
| 252 | uicxx . . $ luckyBackupWindow#ui..DoneButtoncxx . . $ Ui_luckyBackupWindow#DoneButton. -> setToolTipcxx . . $ QWidget#setToolTip(3520e46b33348bf6).(trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("Execution of tasks finished","Done button tooltip")); |
| 253 | uicxx . . $ luckyBackupWindow#ui..checkBox_DryRuncxx . . $ Ui_luckyBackupWindow#checkBox_DryRun. -> setTextcxx . . $ QAbstractButton#setText(3520e46b33348bf6).(trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("Dry","simulation checkbox label. Translate this as 'simulation'")); |
| 254 | uicxx . . $ luckyBackupWindow#ui..checkBox_DryRuncxx . . $ Ui_luckyBackupWindow#checkBox_DryRun. -> setToolTipcxx . . $ QWidget#setToolTip(3520e46b33348bf6).(trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("This will perform a <b>simulation run</b> that doesn't make any changes (and produces mostly the same output as a real run)","simulation checkbox tooltip - line1. Please leave tags <b> and </b> intact and surrounding 'simulation run'")+cxx . . $ operator+(3d22f08efddf8107).".<br>"+cxx . . $ operator+(fab9b4f80031f353).trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("NOTE","simulation checkbox tooltip - line2")+cxx . . $ operator+(3d22f08efddf8107).": "+cxx . . $ operator+(fab9b4f80031f353).trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("Progressbar update will not be realistic","simulation checkbox tooltip - line2")); |
| 255 | |
| 256 | uicxx . . $ luckyBackupWindow#ui..pushButton_shutdowncxx . . $ Ui_luckyBackupWindow#pushButton_shutdown. -> setTextcxx . . $ QAbstractButton#setText(3520e46b33348bf6).(trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("shutdown","shutdown button label")); |
| 257 | uicxx . . $ luckyBackupWindow#ui..pushButton_shutdowncxx . . $ Ui_luckyBackupWindow#pushButton_shutdown. -> setToolTipcxx . . $ QWidget#setToolTip(3520e46b33348bf6).(trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("Press down to shutdown the system when done","shutdown button tooltip")); |
| 258 | |
| 259 | uicxx . . $ luckyBackupWindow#ui..label_InformationWindowcxx . . $ Ui_luckyBackupWindow#label_InformationWindow. -> setTextcxx . . $ QLabel#setText(3520e46b33348bf6).(trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("Information window","information window title")); |
| 260 | uicxx . . $ luckyBackupWindow#ui..pushButton_exitcxx . . $ Ui_luckyBackupWindow#pushButton_exit. -> setToolTipcxx . . $ QWidget#setToolTip(3520e46b33348bf6).(trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("Exit","exit button tooltip. full phrase is: 'exit luckybackup'")+cxx . . $ operator+(3d22f08efddf8107)." "+cxx . . $ operator+(fab9b4f80031f353).appNamecxx . . $ Global/appName.); |
| 261 | uicxx . . $ luckyBackupWindow#ui..pushButton_exitcxx . . $ Ui_luckyBackupWindow#pushButton_exit. -> setTextcxx . . $ QAbstractButton#setText(3520e46b33348bf6).(trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("EXIT","EXIT button label")); |
| 262 | if (IsVisibleInfoWindowcxx . . $ luckyBackupWindow#IsVisibleInfoWindow.) |
| 263 | uicxx . . $ luckyBackupWindow#ui..pushButton_InfoCollapsecxx . . $ Ui_luckyBackupWindow#pushButton_InfoCollapse. -> setToolTipcxx . . $ QWidget#setToolTip(3520e46b33348bf6).(trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("Hide information window","show/hide information window button tooltip")); |
| 264 | else |
| 265 | uicxx . . $ luckyBackupWindow#ui..pushButton_InfoCollapsecxx . . $ Ui_luckyBackupWindow#pushButton_InfoCollapse. -> setToolTipcxx . . $ QWidget#setToolTip(3520e46b33348bf6).(trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("Show information window","show/hide information window button tooltip")); |
| 266 | |
| 267 | uicxx . . $ luckyBackupWindow#ui..pushButton_minimizeToTraycxx . . $ Ui_luckyBackupWindow#pushButton_minimizeToTray. -> setTextcxx . . $ QAbstractButton#setText(3520e46b33348bf6).(trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("minimize to tray")); |
| 268 | uicxx . . $ luckyBackupWindow#ui..pushButton_minimizeToTraycxx . . $ Ui_luckyBackupWindow#pushButton_minimizeToTray. -> setToolTipcxx . . $ QWidget#setToolTip(3520e46b33348bf6).(trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("minimizes the window to the tray area")); |
| 269 | } |
| 270 | |
| 271 | // createProfileCombo ============================================================================================================================= |
| 272 | // fill the profile combo box with existing profiles. |
| 273 | // Also sets the currentProfileIndex to the index of the current profile |
| 274 | // Executes when the app starts & when the list of profiles in ~/.luckybackup/profiles changes |
| 275 | void luckyBackupWindowcxx . . $ luckyBackupWindow#::createProfileCombocxx . . $ luckyBackupWindow#createProfileCombo(49f6e7a06ebc5aa8).() |
| 276 | { |
| 277 | GoBackcxx . . $ luckyBackupWindow#GoBack. = true; // the next line will execute function setCurrentProfile. set true to avoid that |
| 278 | uicxx . . $ luckyBackupWindow#ui..comboBox_profilecxx . . $ Ui_luckyBackupWindow#comboBox_profile. -> clearcxx . . $ QComboBox#clear(49f6e7a06ebc5aa8).(); |
| 279 | int currentProfileIndex = -1; |
| 280 | QDircxx . . $ QDir# profiledircxx . . $ QDir#QDir(3520e46b33348bf6).(profileDircxx . . $ Global/profileDir.); |
| 281 | 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.); |
| 282 | profiledir.setSortingcxx . . $ QDir#setSorting(d6e6037501f8ac03).(QDircxx . . $ QDir#::Namecxx . . $ QDir#Name. |cxx . . $ `operator|`(2e9dd8934c680bb9). QDircxx . . $ QDir#::LocaleAwarecxx . . $ QDir#LocaleAware.); |
| 283 | QStringListcxx . . $ QStringList# profileNames = profiledir.entryListcxx . . $ QDir#entryList(4575c08c50802968).(QStringListcxx . . $ QStringList#QStringList(3520e46b33348bf6).("*.profile"cxx . . $ QString#QString(85c52e162fed56f9).)); |
| 284 | |
| 285 | QStringcxx . . $ QString# profilename=""cxx . . $ QString#QString(85c52e162fed56f9).; |
| 286 | for (countcxx . . $ luckyBackupWindow#count. = 0; countcxx . . $ luckyBackupWindow#count. < profileNames.sizecxx . . $ QList#size(ea6fe5115c70a13f).(); ++countcxx . . $ luckyBackupWindow#count.) |
| 287 | { |
| 288 | profilename =cxx . . $ QString#`operator=`(b79fde0b0ce9b948). profileNames[cxx . . $ QList#`operator[]`(7a0ef1c7079e8533).countcxx . . $ luckyBackupWindow#count.]; |
| 289 | if (currentProfilecxx . . $ Global/currentProfile. ==cxx . . $ `operator==`(5bc2975d2d751687). profileDircxx . . $ Global/profileDir. +cxx . . $ operator+(fab9b4f80031f353). profilename) // set the currentProfileIndex to the index of the current profile |
| 290 | currentProfileIndex = countcxx . . $ luckyBackupWindow#count.; |
| 291 | |
| 292 | profilename.chopcxx . . $ QString#chop(d4f767463ce0a6b3).(8); |
| 293 | |
| 294 | GoBackcxx . . $ luckyBackupWindow#GoBack. = true; // the next line will execute function setCurrentProfile. set true to avoid that |
| 295 | uicxx . . $ luckyBackupWindow#ui..comboBox_profilecxx . . $ Ui_luckyBackupWindow#comboBox_profile. -> addItemcxx . . $ QComboBox#addItem(1c60a90c724e6bfb). (profilename); |
| 296 | } |
| 297 | if (currentProfileIndex == -1) // if no default profile exists |
| 298 | currentProfileIndex = 0; |
| 299 | |
| 300 | GoBackcxx . . $ luckyBackupWindow#GoBack. = true; // the next line will execute function setCurrentProfile. set true to avoid that |
| 301 | uicxx . . $ luckyBackupWindow#ui..comboBox_profilecxx . . $ Ui_luckyBackupWindow#comboBox_profile. -> setCurrentIndexcxx . . $ QComboBox#setCurrentIndex(d4f767463ce0a6b3).(currentProfileIndex); |
| 302 | GoBackcxx . . $ luckyBackupWindow#GoBack. = false; |
| 303 | |
| 304 | } |
| 305 | |
| 306 | // createActions ============================================================================================================================= |
| 307 | // create all main action |
| 308 | void luckyBackupWindowcxx . . $ luckyBackupWindow#::createActionscxx . . $ luckyBackupWindow#createActions(49f6e7a06ebc5aa8).() |
| 309 | { |
| 310 | actionHelpcxx . . $ luckyBackupWindow#actionHelp. = new QActioncxx . . $ QAction#QAction(ef44fe276c987e61).(QIconcxx . . $ QIcon#QIcon(3520e46b33348bf6).(":/luckyPrefix/book.png"cxx . . $ QString#QString(85c52e162fed56f9).), "Handbook"cxx . . $ QString#QString(85c52e162fed56f9)., this); |
| 311 | actionHelpcxx . . $ luckyBackupWindow#actionHelp. -> setShortcutcxx . . $ QAction#setShortcut(462600f892e8a1ee).(trcxx . . $ QKeySequence#QKeySequence(6905a94d1418a018).("F1")); |
| 312 | actionAboutcxx . . $ luckyBackupWindow#actionAbout. = new QActioncxx . . $ QAction#QAction(ef44fe276c987e61).(QIconcxx . . $ QIcon#QIcon(3520e46b33348bf6).(":/luckyPrefix/about.png"cxx . . $ QString#QString(85c52e162fed56f9).), "About"cxx . . $ QString#QString(85c52e162fed56f9)., this); |
| 313 | |
| 314 | actionLockToolbarscxx . . $ luckyBackupWindow#actionLockToolbars. = new QActioncxx . . $ QAction#QAction(6b24f83d17022bd9).("Lock Toolbars"cxx . . $ QString#QString(85c52e162fed56f9).,this); |
| 315 | actionLockToolbarscxx . . $ luckyBackupWindow#actionLockToolbars. -> setCheckablecxx . . $ QAction#setCheckable(b45ddcbc8423892c).(true); |
| 316 | actionLockToolbarscxx . . $ luckyBackupWindow#actionLockToolbars. -> setCheckedcxx . . $ QAction#setChecked(b45ddcbc8423892c).(AreToolbarsLockedcxx . . $ luckyBackupWindow#AreToolbarsLocked.); |
| 317 | actionVisibleToolbarTextcxx . . $ luckyBackupWindow#actionVisibleToolbarText. = new QActioncxx . . $ QAction#QAction(6b24f83d17022bd9).("Labels under icons"cxx . . $ QString#QString(85c52e162fed56f9).,this); |
| 318 | actionVisibleToolbarTextcxx . . $ luckyBackupWindow#actionVisibleToolbarText. -> setCheckablecxx . . $ QAction#setCheckable(b45ddcbc8423892c).(true); |
| 319 | actionVisibleToolbarTextcxx . . $ luckyBackupWindow#actionVisibleToolbarText. -> setCheckedcxx . . $ QAction#setChecked(b45ddcbc8423892c).(IsVisibleToolbarTextcxx . . $ luckyBackupWindow#IsVisibleToolbarText.); |
| 320 | |
| 321 | if (WINrunningcxx . . $ Global/WINrunning.) |
| 322 | { |
| 323 | actionSetWinPathscxx . . $ luckyBackupWindow#actionSetWinPaths. = new QActioncxx . . $ QAction#QAction(6b24f83d17022bd9).("Set paths"cxx . . $ QString#QString(85c52e162fed56f9).,this); |
| 324 | connectcxx . . $ QObject#connect(158df1d9a01a3410).( actionSetWinPathscxx . . $ luckyBackupWindow#actionSetWinPaths., SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`!(triggered()), this, SLOTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:270:10`!(setWinPaths())); //menu action set paths |
| 325 | } |
| 326 | |
| 327 | connectcxx . . $ QObject#connect(158df1d9a01a3410).( actionHelpcxx . . $ luckyBackupWindow#actionHelp., SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`!(triggered()), this, SLOTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:270:10`!(help())); //menu action help |
| 328 | connectcxx . . $ QObject#connect(158df1d9a01a3410).( actionAboutcxx . . $ luckyBackupWindow#actionAbout., SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`!(triggered()), this, SLOTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:270:10`!(about())); //menu action about |
| 329 | connectcxx . . $ QObject#connect(158df1d9a01a3410).( actionLockToolbarscxx . . $ luckyBackupWindow#actionLockToolbars., SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`!(triggered()), this, SLOTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:270:10`!(setToolbarAttrs())); //menu action lock toolbars |
| 330 | connectcxx . . $ QObject#connect(158df1d9a01a3410).( actionVisibleToolbarTextcxx . . $ luckyBackupWindow#actionVisibleToolbarText., SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`!(triggered()), this, SLOTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:270:10`!(setToolbarAttrs())); //menu action visible toolbar text |
| 331 | } |
| 332 | |
| 333 | // createMenus ============================================================================================================================= |
| 334 | // create the main window menus |
| 335 | void luckyBackupWindowcxx . . $ luckyBackupWindow#::createMenuscxx . . $ luckyBackupWindow#createMenus(49f6e7a06ebc5aa8).() |
| 336 | { |
| 337 | // settings menu ---------------------------------------------------------------------------------- |
| 338 | settingsMenucxx . . $ luckyBackupWindow#settingsMenu. = menuBarcxx . . $ QMainWindow#menuBar(752dea92cd67ab27).() -> addMenucxx . . $ QMenuBar#addMenu(7bd5d996bbe37ddf).("Settings"cxx . . $ QString#QString(85c52e162fed56f9).); |
| 339 | |
| 340 | // help menu ---------------------------------------------------------------------------------- |
| 341 | helpMenucxx . . $ luckyBackupWindow#helpMenu. = menuBarcxx . . $ QMainWindow#menuBar(752dea92cd67ab27).() -> addMenucxx . . $ QMenuBar#addMenu(7bd5d996bbe37ddf).("Help"cxx . . $ QString#QString(85c52e162fed56f9).); |
| 342 | helpMenucxx . . $ luckyBackupWindow#helpMenu. -> addActioncxx . . $ QWidget#addAction(92b1e80c0a7f1406).(actionHelpcxx . . $ luckyBackupWindow#actionHelp.); |
| 343 | helpMenucxx . . $ luckyBackupWindow#helpMenu. -> addSeparatorcxx . . $ QMenu#addSeparator(a590eff9f1ec9a95).(); |
| 344 | helpMenucxx . . $ luckyBackupWindow#helpMenu. -> addActioncxx . . $ QWidget#addAction(92b1e80c0a7f1406).(actionAboutcxx . . $ luckyBackupWindow#actionAbout.); |
| 345 | |
| 346 | // toolbars actions ------------------------------------------------------------------------------- |
| 347 | toolbarsGroupcxx . . $ luckyBackupWindow#toolbarsGroup. = new QActionGroupcxx . . $ QActionGroup#QActionGroup(749de1b6ae65bddd).(this); |
| 348 | toolbarsMenucxx . . $ luckyBackupWindow#toolbarsMenu. = settingsMenucxx . . $ luckyBackupWindow#settingsMenu. -> addMenucxx . . $ QMenu#addMenu(7bd5d996bbe37ddf).(""cxx . . $ QString#QString(85c52e162fed56f9).); |
| 349 | |
| 350 | visibleProfileComboToolbarcxx . . $ luckyBackupWindow#visibleProfileComboToolbar. = profileComboToolbarcxx . . $ luckyBackupWindow#profileComboToolbar.->toggleViewActioncxx . . $ QToolBar#toggleViewAction(50f6a0536a8019cb).(); |
| 351 | toolbarsMenucxx . . $ luckyBackupWindow#toolbarsMenu. -> addActioncxx . . $ QWidget#addAction(92b1e80c0a7f1406).(visibleProfileComboToolbarcxx . . $ luckyBackupWindow#visibleProfileComboToolbar.); |
| 352 | visibleProfileToolbarcxx . . $ luckyBackupWindow#visibleProfileToolbar. = profileToolbarcxx . . $ luckyBackupWindow#profileToolbar.->toggleViewActioncxx . . $ QToolBar#toggleViewAction(50f6a0536a8019cb).(); |
| 353 | toolbarsMenucxx . . $ luckyBackupWindow#toolbarsMenu. -> addActioncxx . . $ QWidget#addAction(92b1e80c0a7f1406).(visibleProfileToolbarcxx . . $ luckyBackupWindow#visibleProfileToolbar.); |
| 354 | toolbarsMenucxx . . $ luckyBackupWindow#toolbarsMenu. -> addSeparatorcxx . . $ QMenu#addSeparator(a590eff9f1ec9a95).(); |
| 355 | toolbarsMenucxx . . $ luckyBackupWindow#toolbarsMenu. -> addActioncxx . . $ QWidget#addAction(92b1e80c0a7f1406).(actionLockToolbarscxx . . $ luckyBackupWindow#actionLockToolbars.); |
| 356 | toolbarsMenucxx . . $ luckyBackupWindow#toolbarsMenu. -> addActioncxx . . $ QWidget#addAction(92b1e80c0a7f1406).(actionVisibleToolbarTextcxx . . $ luckyBackupWindow#actionVisibleToolbarText.); |
| 357 | settingsMenucxx . . $ luckyBackupWindow#settingsMenu. -> addSeparatorcxx . . $ QMenu#addSeparator(a590eff9f1ec9a95).(); |
| 358 | |
| 359 | // language sub-menu ------------------------------------------------------------------------------- |
| 360 | languageGroupcxx . . $ luckyBackupWindow#languageGroup. = new QActionGroupcxx . . $ QActionGroup#QActionGroup(749de1b6ae65bddd).(this); |
| 361 | languageMenucxx . . $ luckyBackupWindow#languageMenu. = settingsMenucxx . . $ luckyBackupWindow#settingsMenu. -> addMenucxx . . $ QMenu#addMenu(7bd5d996bbe37ddf).(""cxx . . $ QString#QString(85c52e162fed56f9).); |
| 362 | connectcxx . . $ QObject#connect(158df1d9a01a3410).(languageGroupcxx . . $ luckyBackupWindow#languageGroup., SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`!(triggered(QAction *)), this, SLOTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:270:10`!( setLanguage( QAction *) ) ); |
| 363 | |
| 364 | QStringListcxx . . $ QStringList# fileNames = transDircxx . . $ Global/transDir..entryListcxx . . $ QDir#entryList(4575c08c50802968).(QStringListcxx . . $ QStringList#QStringList(3520e46b33348bf6).("luckybackup_*.qm"cxx . . $ QString#QString(85c52e162fed56f9).)); |
| 365 | for (countcxx . . $ luckyBackupWindow#count. = 0; countcxx . . $ luckyBackupWindow#count. < fileNames.sizecxx . . $ QList#size(ea6fe5115c70a13f).(); ++countcxx . . $ luckyBackupWindow#count.) |
| 366 | { |
| 367 | QStringcxx . . $ QString# currentLocale = fileNamescxx . . $ QString#QString(132dd6869045752b).[cxx . . $ QList#`operator[]`(7a0ef1c7079e8533).countcxx . . $ luckyBackupWindow#count.]; |
| 368 | currentLocale.removecxx . . $ QString#remove(6483560ce2afa901).(0, currentLocale.indexOfcxx . . $ QString#indexOf(75b556ba78e4903c).('_'cxx . . $ QChar#QChar(f349c77f591a7878).) + 1); |
| 369 | currentLocale.chopcxx . . $ QString#chop(d4f767463ce0a6b3).(3); |
| 370 | |
| 371 | QTranslatorcxx . . $ QTranslator# translatorcxx . . $ QTranslator#QTranslator(749de1b6ae65bddd).; |
| 372 | translator.loadcxx . . $ QTranslator#load(142924642d8b819d).(fileNames[cxx . . $ QList#`operator[]`(7a0ef1c7079e8533).countcxx . . $ luckyBackupWindow#count.], TransDircxx . . $ luckyBackupWindow#TransDir.); |
| 373 | QStringcxx . . $ QString# language = translator.translatecxx . . $ QTranslator#translate(64fd1c2e76b23a6c).("luckyBackupWindow","English"); |
| 374 | |
| 375 | actioncxx . . $ luckyBackupWindow#action. = new QActioncxx . . $ QAction#QAction(6b24f83d17022bd9).(trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("&%1 %2").argcxx . . $ QString#arg(64ab2ed17cc11715).(countcxx . . $ luckyBackupWindow#count. + 1).argcxx . . $ QString#arg(bc823072288cbbb5).(language), this); |
| 376 | actioncxx . . $ luckyBackupWindow#action. -> setCheckablecxx . . $ QAction#setCheckable(b45ddcbc8423892c).(true); |
| 377 | actioncxx . . $ luckyBackupWindow#action. -> setDatacxx . . $ QAction#setData(244511558b20107a).(currentLocalecxx . . $ QVariant#QVariant(3520e46b33348bf6).); |
| 378 | |
| 379 | languageMenucxx . . $ luckyBackupWindow#languageMenu. -> addActioncxx . . $ QWidget#addAction(92b1e80c0a7f1406).(actioncxx . . $ luckyBackupWindow#action.); |
| 380 | languageGroupcxx . . $ luckyBackupWindow#languageGroup. -> addActioncxx . . $ QActionGroup#addAction(440174cb3ba1362).(actioncxx . . $ luckyBackupWindow#action.); |
| 381 | |
| 382 | if (currentLocale ==cxx . . $ `operator==`(5bc2975d2d751687). defaultLanguagecxx . . $ luckyBackupWindow#defaultLanguage.) |
| 383 | { |
| 384 | actioncxx . . $ luckyBackupWindow#action.->setCheckedcxx . . $ QAction#setChecked(b45ddcbc8423892c).(true); |
| 385 | setLanguagecxx . . $ luckyBackupWindow#setLanguage(92b1e80c0a7f1406).(actioncxx . . $ luckyBackupWindow#action.); |
| 386 | } |
| 387 | } |
| 388 | |
| 389 | // Win-OS2 paths sub-menu ------------------------------------------------------------------------------- |
| 390 | if (WINrunningcxx . . $ Global/WINrunning.) |
| 391 | settingsMenucxx . . $ luckyBackupWindow#settingsMenu. -> addActioncxx . . $ QWidget#addAction(92b1e80c0a7f1406).(actionSetWinPathscxx . . $ luckyBackupWindow#actionSetWinPaths.); |
| 392 | } |
| 393 | // createToolbar ============================================================================================================================= |
| 394 | // create the tool bars |
| 395 | void luckyBackupWindowcxx . . $ luckyBackupWindow#::createToolbarcxx . . $ luckyBackupWindow#createToolbar(49f6e7a06ebc5aa8).() |
| 396 | { |
| 397 | profileComboToolbarcxx . . $ luckyBackupWindow#profileComboToolbar. = new QToolBarcxx . . $ QToolBar#("current profile"cxx . . $ QString#QString(85c52e162fed56f9)., this); |
| 398 | profileToolbarcxx . . $ luckyBackupWindow#profileToolbar. = new QToolBarcxx . . $ QToolBar#("actions"cxx . . $ QString#QString(85c52e162fed56f9)., this); |
| 399 | profileStartToolbarcxx . . $ luckyBackupWindow#profileStartToolbar. = new QToolBarcxx . . $ QToolBar#("start"cxx . . $ QString#QString(85c52e162fed56f9)., this); |
| 400 | shutdownToolbarcxx . . $ luckyBackupWindow#shutdownToolbar. = new QToolBarcxx . . $ QToolBar#("shutdown"cxx . . $ QString#QString(85c52e162fed56f9)., this); |
| 401 | errorsToolbarcxx . . $ luckyBackupWindow#errorsToolbar. = new QToolBarcxx . . $ QToolBar#("errors"cxx . . $ QString#QString(85c52e162fed56f9)., this); |
| 402 | |
| 403 | this -> addToolBarcxx . . $ QMainWindow#addToolBar(c27adf9b57498543).(Qtcxx . . $ Qt/::TopToolBarAreacxx . . $ Qt/TopToolBarArea., profileComboToolbarcxx . . $ luckyBackupWindow#profileComboToolbar.); |
| 404 | this -> addToolBarcxx . . $ QMainWindow#addToolBar(c27adf9b57498543).(Qtcxx . . $ Qt/::TopToolBarAreacxx . . $ Qt/TopToolBarArea., profileToolbarcxx . . $ luckyBackupWindow#profileToolbar.); |
| 405 | this -> addToolBarcxx . . $ QMainWindow#addToolBar(c27adf9b57498543).(Qtcxx . . $ Qt/::TopToolBarAreacxx . . $ Qt/TopToolBarArea., shutdownToolbarcxx . . $ luckyBackupWindow#shutdownToolbar.); |
| 406 | this -> addToolBarcxx . . $ QMainWindow#addToolBar(c27adf9b57498543).(Qtcxx . . $ Qt/::TopToolBarAreacxx . . $ Qt/TopToolBarArea., errorsToolbarcxx . . $ luckyBackupWindow#errorsToolbar.); |
| 407 | this -> addToolBarcxx . . $ QMainWindow#addToolBar(c27adf9b57498543).(Qtcxx . . $ Qt/::TopToolBarAreacxx . . $ Qt/TopToolBarArea., profileStartToolbarcxx . . $ luckyBackupWindow#profileStartToolbar.); |
| 408 | |
| 409 | QSizecxx . . $ QSize# ToolbarIconSizecxx . . $ QSize#QSize(c0d38f4800714fae).(22,22); |
| 410 | profileToolbarcxx . . $ luckyBackupWindow#profileToolbar. -> setIconSizecxx . . $ QToolBar#setIconSize(1c5f201b4c2f0aba).(ToolbarIconSize); |
| 411 | |
| 412 | //Profile------------------------------------------------------------------- |
| 413 | profileComboToolbarcxx . . $ luckyBackupWindow#profileComboToolbar. -> addWidgetcxx . . $ QToolBar#addWidget(e05c3352fc75448e).(uicxx . . $ luckyBackupWindow#ui..comboBox_profilecxx . . $ Ui_luckyBackupWindow#comboBox_profile.); //profile drop-down list |
| 414 | |
| 415 | //Start & simulation buttons------------------------------------------------------------------- |
| 416 | profileStartToolbarcxx . . $ luckyBackupWindow#profileStartToolbar. -> addWidgetcxx . . $ QToolBar#addWidget(e05c3352fc75448e).(uicxx . . $ luckyBackupWindow#ui..groupBox_operationscxx . . $ Ui_luckyBackupWindow#groupBox_operations.);//profile start toolbar |
| 417 | |
| 418 | //shutdown system button------------------------------------------------------------------- |
| 419 | shutdownToolbarcxx . . $ luckyBackupWindow#shutdownToolbar. -> addWidgetcxx . . $ QToolBar#addWidget(e05c3352fc75448e).(uicxx . . $ luckyBackupWindow#ui..pushButton_shutdowncxx . . $ Ui_luckyBackupWindow#pushButton_shutdown.);//shutdown system toolbar |
| 420 | |
| 421 | // prev/next error buttons------------------------------------------------------------------- |
| 422 | errorsToolbarcxx . . $ luckyBackupWindow#errorsToolbar. -> addWidgetcxx . . $ QToolBar#addWidget(e05c3352fc75448e).(uicxx . . $ luckyBackupWindow#ui..pushButton_previousErrorcxx . . $ Ui_luckyBackupWindow#pushButton_previousError.); // errors toolbar |
| 423 | errorsToolbarcxx . . $ luckyBackupWindow#errorsToolbar. -> addWidgetcxx . . $ QToolBar#addWidget(e05c3352fc75448e).(uicxx . . $ luckyBackupWindow#ui..pushButton_nextErrorcxx . . $ Ui_luckyBackupWindow#pushButton_nextError.); |
| 424 | errorsToolbarcxx . . $ luckyBackupWindow#errorsToolbar. -> addWidgetcxx . . $ QToolBar#addWidget(e05c3352fc75448e).(uicxx . . $ luckyBackupWindow#ui..checkBox_onlyShowErrorscxx . . $ Ui_luckyBackupWindow#checkBox_onlyShowErrors.); |
| 425 | |
| 426 | //Profile Actions------------------------------------------------------------------- |
| 427 | profileToolbarcxx . . $ luckyBackupWindow#profileToolbar. -> addSeparatorcxx . . $ QToolBar#addSeparator(a590eff9f1ec9a95).(); //---seperator--- |
| 428 | profileToolbarcxx . . $ luckyBackupWindow#profileToolbar. -> addActioncxx . . $ QWidget#addAction(92b1e80c0a7f1406).(uicxx . . $ luckyBackupWindow#ui..actionSavecxx . . $ Ui_luckyBackupWindow#actionSave.); //save |
| 429 | // profileToolbar -> addAction(ui.actionDefault); //default |
| 430 | // profileToolbar -> addAction(ui.actionRename); //rename |
| 431 | profileToolbarcxx . . $ luckyBackupWindow#profileToolbar. -> addActioncxx . . $ QWidget#addAction(92b1e80c0a7f1406).(uicxx . . $ luckyBackupWindow#ui..actionNewcxx . . $ Ui_luckyBackupWindow#actionNew.); //new |
| 432 | profileToolbarcxx . . $ luckyBackupWindow#profileToolbar. -> addActioncxx . . $ QWidget#addAction(92b1e80c0a7f1406).(uicxx . . $ luckyBackupWindow#ui..actionDeletecxx . . $ Ui_luckyBackupWindow#actionDelete.); //delete |
| 433 | // profileToolbar -> addSeparator(); |
| 434 | // profileToolbar -> addAction(ui.actionExport); |
| 435 | // profileToolbar -> addAction(ui.actionImport); |
| 436 | profileToolbarcxx . . $ luckyBackupWindow#profileToolbar. -> addSeparatorcxx . . $ QToolBar#addSeparator(a590eff9f1ec9a95).(); //---seperator--- |
| 437 | profileToolbarcxx . . $ luckyBackupWindow#profileToolbar. -> addActioncxx . . $ QWidget#addAction(92b1e80c0a7f1406).(uicxx . . $ luckyBackupWindow#ui..actionSchedulecxx . . $ Ui_luckyBackupWindow#actionSchedule.); //schedule |
| 438 | profileToolbarcxx . . $ luckyBackupWindow#profileToolbar. -> addActioncxx . . $ QWidget#addAction(92b1e80c0a7f1406).(uicxx . . $ luckyBackupWindow#ui..actionEmailcxx . . $ Ui_luckyBackupWindow#actionEmail.); //email report |
| 439 | profileToolbarcxx . . $ luckyBackupWindow#profileToolbar. -> addActioncxx . . $ QWidget#addAction(92b1e80c0a7f1406).(uicxx . . $ luckyBackupWindow#ui..actionRefreshcxx . . $ Ui_luckyBackupWindow#actionRefresh.); //refresh |
| 440 | profileToolbarcxx . . $ luckyBackupWindow#profileToolbar. -> addSeparatorcxx . . $ QToolBar#addSeparator(a590eff9f1ec9a95).(); //---seperator--- |
| 441 | profileToolbarcxx . . $ luckyBackupWindow#profileToolbar. -> addActioncxx . . $ QWidget#addAction(92b1e80c0a7f1406).(uicxx . . $ luckyBackupWindow#ui..actionQuitcxx . . $ Ui_luckyBackupWindow#actionQuit.); //quit |
| 442 | profileToolbarcxx . . $ luckyBackupWindow#profileToolbar. -> addSeparatorcxx . . $ QToolBar#addSeparator(a590eff9f1ec9a95).(); //---seperator--- |
| 443 | |
| 444 | profileComboToolbarcxx . . $ luckyBackupWindow#profileComboToolbar. -> setVisiblecxx . . $ QWidget#setVisible(b45ddcbc8423892c). (IsVisibleProfileComboToolbarcxx . . $ luckyBackupWindow#IsVisibleProfileComboToolbar.); |
| 445 | profileToolbarcxx . . $ luckyBackupWindow#profileToolbar. -> setVisiblecxx . . $ QWidget#setVisible(b45ddcbc8423892c). (IsVisibleProfileToolbarcxx . . $ luckyBackupWindow#IsVisibleProfileToolbar.); |
| 446 | |
| 447 | setToolbarAttrscxx . . $ luckyBackupWindow#setToolbarAttrs(49f6e7a06ebc5aa8).(); |
| 448 | } |
| 449 | |
| 450 | |
| 451 | |
| 452 | // checkOperationsList=============================================================================================================================== |
| 453 | // Checks if the Operations list is ok to proceed |
| 454 | // calls global function checkTaskList() |
| 455 | bool luckyBackupWindowcxx . . $ luckyBackupWindow#::checkOperationListcxx . . $ luckyBackupWindow#checkOperationList(c9857a73d68e59ba).() |
| 456 | { |
| 457 | bool showBox = checkTaskListcxx . . $ Global/checkTaskList(c9857a73d68e59ba).(); |
| 458 | |
| 459 | if (askcxx . . $ Global/ask.) |
| 460 | { |
| 461 | messagecxx . . $ Global/message..prependcxx . . $ QString#prepend(6a89d0b7f4d2681c).("<font color=red><b>" +cxx . . $ operator+(c75c3ae4eb9af1a8). trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("ERROR") +cxx . . $ operator+(3d22f08efddf8107). "</b></font><br>"); |
| 462 | if (showBox) |
| 463 | { |
| 464 | textDialogcxx . . $ textDialog# textdialogCcxx . . $ textDialog#textDialog(9c8c077708043c75). ("QtCritical"cxx . . $ QString#QString(85c52e162fed56f9)., messagecxx . . $ QString#QString(132dd6869045752b)., this); |
| 465 | textdialogC.execcxx . . $ QDialog#exec(b126dc7c1de90089).(); |
| 466 | } |
| 467 | |
| 468 | uicxx . . $ luckyBackupWindow#ui..textBrowser_infocxx . . $ Ui_luckyBackupWindow#textBrowser_info. -> setTextcxx . . $ QTextEdit#setText(3520e46b33348bf6).(messagecxx . . $ Global/message.); |
| 469 | return false; |
| 470 | } |
| 471 | return true; |
| 472 | } |
| 473 | |
| 474 | //checkDeclared =================================================================================================================================== |
| 475 | //Check if the declared data are ok by calling checkBackupDirs, checkSyncDirs accordingly |
| 476 | //This is called from the gui |
| 477 | void luckyBackupWindowcxx . . $ luckyBackupWindow#::checkDeclaredcxx . . $ luckyBackupWindow#checkDeclared(49f6e7a06ebc5aa8).() |
| 478 | { |
| 479 | int currentSelection = uicxx . . $ luckyBackupWindow#ui..listWidget_operationscxx . . $ Ui_luckyBackupWindow#listWidget_operations. -> currentRowcxx . . $ QListWidget#currentRow(455f465bc33b4cdf).(); //keep the current selection |
| 480 | checkDeclaredDirscxx . . $ Global/checkDeclaredDirs(efaadfb7dc14930a).(true); |
| 481 | |
| 482 | currentOperationcxx . . $ Global/currentOperation. = 0; |
| 483 | CheckedDatacxx . . $ Global/CheckedData. =cxx . . $ QString#`operator=`(d02845eef0c33901). ""; |
| 484 | CheckedDataCLIcxx . . $ Global/CheckedDataCLI. =cxx . . $ QString#`operator=`(d02845eef0c33901). ""; |
| 485 | while (currentOperationcxx . . $ Global/currentOperation. < TotalOperationscxx . . $ Global/TotalOperations.) |
| 486 | { |
| 487 | uicxx . . $ luckyBackupWindow#ui..listWidget_operationscxx . . $ Ui_luckyBackupWindow#listWidget_operations. -> setCurrentRowcxx . . $ QListWidget#setCurrentRow(d4f767463ce0a6b3).(currentOperationcxx . . $ Global/currentOperation.); |
| 488 | if (Operationcxx . . $ Global/Operation.[currentOperationcxx . . $ Global/currentOperation.] -> GetIncludedcxx . . $ operation#GetIncluded(50ce9a9e25b4a850).()) //if the operations is "included" |
| 489 | { |
| 490 | if (Operationcxx . . $ Global/Operation.[currentOperationcxx . . $ Global/currentOperation.] -> GetOKcxx . . $ operation#GetOK(50ce9a9e25b4a850).()) |
| 491 | uicxx . . $ luckyBackupWindow#ui..listWidget_operationscxx . . $ Ui_luckyBackupWindow#listWidget_operations. -> currentItemcxx . . $ QListWidget#currentItem(a843e491ce3ee2b1).() -> setIconcxx . . $ QListWidgetItem#setIcon(71dcdac178620ed6).(QIconcxx . . $ QIcon#QIcon(3520e46b33348bf6).(":/luckyPrefix/okay.png"cxx . . $ QString#QString(85c52e162fed56f9).)); |
| 492 | if (Operationcxx . . $ Global/Operation.[currentOperationcxx . . $ Global/currentOperation.] -> GetWARNINGcxx . . $ operation#GetWARNING(50ce9a9e25b4a850).()) |
| 493 | uicxx . . $ luckyBackupWindow#ui..listWidget_operationscxx . . $ Ui_luckyBackupWindow#listWidget_operations. -> currentItemcxx . . $ QListWidget#currentItem(a843e491ce3ee2b1).() -> setIconcxx . . $ QListWidgetItem#setIcon(71dcdac178620ed6).(QIconcxx . . $ QIcon#QIcon(3520e46b33348bf6).(":/luckyPrefix/cancel.png"cxx . . $ QString#QString(85c52e162fed56f9).)); |
| 494 | if (Operationcxx . . $ Global/Operation.[currentOperationcxx . . $ Global/currentOperation.] -> GetCRITICALcxx . . $ operation#GetCRITICAL(50ce9a9e25b4a850).()) |
| 495 | uicxx . . $ luckyBackupWindow#ui..listWidget_operationscxx . . $ Ui_luckyBackupWindow#listWidget_operations. -> currentItemcxx . . $ QListWidget#currentItem(a843e491ce3ee2b1).() -> setIconcxx . . $ QListWidgetItem#setIcon(71dcdac178620ed6).(QIconcxx . . $ QIcon#QIcon(3520e46b33348bf6).(":/luckyPrefix/warning.png"cxx . . $ QString#QString(85c52e162fed56f9).)); |
| 496 | if (Operationcxx . . $ Global/Operation.[currentOperationcxx . . $ Global/currentOperation.] -> GetSourcePermscxx . . $ operation#GetSourcePerms(50ce9a9e25b4a850).()) |
| 497 | uicxx . . $ luckyBackupWindow#ui..listWidget_operationscxx . . $ Ui_luckyBackupWindow#listWidget_operations. -> currentItemcxx . . $ QListWidget#currentItem(a843e491ce3ee2b1).() -> setIconcxx . . $ QListWidgetItem#setIcon(71dcdac178620ed6).(QIconcxx . . $ QIcon#QIcon(3520e46b33348bf6).(":/luckyPrefix/cancel.png"cxx . . $ QString#QString(85c52e162fed56f9).)); |
| 498 | if (Operationcxx . . $ Global/Operation.[currentOperationcxx . . $ Global/currentOperation.] -> GetDestPermscxx . . $ operation#GetDestPerms(50ce9a9e25b4a850).()) |
| 499 | uicxx . . $ luckyBackupWindow#ui..listWidget_operationscxx . . $ Ui_luckyBackupWindow#listWidget_operations. -> currentItemcxx . . $ QListWidget#currentItem(a843e491ce3ee2b1).() -> setIconcxx . . $ QListWidgetItem#setIcon(71dcdac178620ed6).(QIconcxx . . $ QIcon#QIcon(3520e46b33348bf6).(":/luckyPrefix/cancel.png"cxx . . $ QString#QString(85c52e162fed56f9).)); |
| 500 | } |
| 501 | else |
| 502 | uicxx . . $ luckyBackupWindow#ui..listWidget_operationscxx . . $ Ui_luckyBackupWindow#listWidget_operations. -> currentItemcxx . . $ QListWidget#currentItem(a843e491ce3ee2b1).() -> setIconcxx . . $ QListWidgetItem#setIcon(71dcdac178620ed6).(QIconcxx . . $ QIcon#QIcon(3520e46b33348bf6).(":/luckyPrefix/about.png"cxx . . $ QString#QString(85c52e162fed56f9).)); |
| 503 | currentOperationcxx . . $ Global/currentOperation.++; |
| 504 | } |
| 505 | |
| 506 | if (currentSelection > -1) // re-select the current selection (don't leave the last task selected) |
| 507 | { |
| 508 | currentOperationcxx . . $ Global/currentOperation. = currentSelection; |
| 509 | uicxx . . $ luckyBackupWindow#ui..listWidget_operationscxx . . $ Ui_luckyBackupWindow#listWidget_operations. -> setCurrentRowcxx . . $ QListWidget#setCurrentRow(d4f767463ce0a6b3).(currentOperationcxx . . $ Global/currentOperation.); |
| 510 | } |
| 511 | } |
| 512 | |
| 513 | // setCurrentprofile ================================================================================================================================ |
| 514 | // function to set the currentProfile |
| 515 | void luckyBackupWindowcxx . . $ luckyBackupWindow#::setCurrentProfilecxx . . $ luckyBackupWindow#setCurrentProfile(7df51288a9ebd664).(QStringcxx . . $ QString# currentProfileSet) |
| 516 | { |
| 517 | if (notXnixRunningcxx . . $ Global/notXnixRunning.) // if OS2 or win is running and by mistake the path includes "/" instead of "\" |
| 518 | currentProfileSet.replacecxx . . $ QString#replace(192e628656427d1c).("/"cxx . . $ QString#QString(85c52e162fed56f9).,SLASHcxx . . $ Global/SLASH.); |
| 519 | |
| 520 | //current profile full absolut path |
| 521 | currentProfilecxx . . $ Global/currentProfile. =cxx . . $ QString#`operator=`(b79fde0b0ce9b948). currentProfileSet; |
| 522 | |
| 523 | //current profile QFile |
| 524 | profilecxx . . $ Global/profile..setFileNamecxx . . $ QFile#setFileName(3520e46b33348bf6).(currentProfilecxx . . $ Global/currentProfile.); |
| 525 | |
| 526 | //current profile's name (QString) |
| 527 | profileNamecxx . . $ Global/profileName. =cxx . . $ QString#`operator=`(b79fde0b0ce9b948). currentProfilecxx . . $ Global/currentProfile.; |
| 528 | profileNamecxx . . $ Global/profileName. =cxx . . $ QString#`operator=`(4f35bf974e7f8568). profileNamecxx . . $ Global/profileName..rightcxx . . $ QString#right(3f3c3d0e9c0eb37f).(profileNamecxx . . $ Global/profileName..sizecxx . . $ QString#size(455f465bc33b4cdf).() - profileNamecxx . . $ Global/profileName..lastIndexOfcxx . . $ QString#lastIndexOf(a1e52806cd31c200).(SLASHcxx . . $ Global/SLASH.) - 1); |
| 529 | profileNamecxx . . $ Global/profileName..chopcxx . . $ QString#chop(d4f767463ce0a6b3).(8); |
| 530 | } |
| 531 | |
| 532 | // loadCurrentprofile ================================================================================================================================ |
| 533 | // function to load the current profile |
| 534 | // calls global function loadProfile |
| 535 | bool luckyBackupWindowcxx . . $ luckyBackupWindow#::loadCurrentProfilecxx . . $ luckyBackupWindow#loadCurrentProfile(c9857a73d68e59ba).() |
| 536 | { |
| 537 | loadDatacxx . . $ luckyBackupWindow#loadData. =cxx . . $ QString#`operator=`(d02845eef0c33901). ""; |
| 538 | // Initialize arrays & window to zero values first |
| 539 | uicxx . . $ luckyBackupWindow#ui..listWidget_operationscxx . . $ Ui_luckyBackupWindow#listWidget_operations. -> clearcxx . . $ QListWidget#clear(49f6e7a06ebc5aa8).(); //clear the operations list |
| 540 | TotalOperationscxx . . $ Global/TotalOperations. = 0; //Set the operations list size to 0 |
| 541 | //taskAvailable -> ; //clear operations array ????????? |
| 542 | |
| 543 | if (currentProfilecxx . . $ Global/currentProfile. ==cxx . . $ `operator==`(5bc2975d2d751687). defaultProfilecxx . . $ Global/defaultProfile.) |
| 544 | loadDatacxx . . $ luckyBackupWindow#loadData..appendcxx . . $ QString#append(6a89d0b7f4d2681c).("<font color=blue><b>" +cxx . . $ operator+(c75c3ae4eb9af1a8). trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("loading default profile ...","information window message") +cxx . . $ operator+(3d22f08efddf8107). "</font></b><br>"); |
| 545 | else |
| 546 | loadDatacxx . . $ luckyBackupWindow#loadData..appendcxx . . $ QString#append(6a89d0b7f4d2681c).("<font color=blue><b>" +cxx . . $ operator+(c75c3ae4eb9af1a8). trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("loading profile ...","information window message") +cxx . . $ operator+(3d22f08efddf8107). "</font></b><br>"); |
| 547 | |
| 548 | int loadOK = loadProfilecxx . . $ Global/loadProfile(87a9b7c6fe1ccdba).(currentProfilecxx . . $ QString#QString(132dd6869045752b).); // try to load the currentProfile |
| 549 | if (loadOK == 1) // if it cannot open |
| 550 | { |
| 551 | loadDatacxx . . $ luckyBackupWindow#loadData..appendcxx . . $ QString#append(6a89d0b7f4d2681c).("<font color=red><b>" +cxx . . $ operator+(c75c3ae4eb9af1a8). trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("loading failed","information window message") +cxx . . $ operator+(3d22f08efddf8107). "</font></b><br>" +cxx . . $ operator+(fab9b4f80031f353). |
| 552 | trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("Unable to open profile","information window message. full phrase is 'Unable to open profile <PROFIENAME>'")+cxx . . $ operator+(3d22f08efddf8107)." <b>" +cxx . . $ operator+(fab9b4f80031f353). profileNamecxx . . $ Global/profileName. +cxx . . $ operator+(3d22f08efddf8107). "</b><br><font color=red>" |
| 553 | +cxx . . $ operator+(fab9b4f80031f353). profilecxx . . $ Global/profile..errorStringcxx . . $ QIODevice#errorString(6ef7b6c27b00b43d).()) +cxx . . $ operator+(3d22f08efddf8107)."</font>"; |
| 554 | return false; //do nothing more |
| 555 | } |
| 556 | |
| 557 | if (loadOK == 2) // if it is not a valid profile |
| 558 | { |
| 559 | loadDatacxx . . $ luckyBackupWindow#loadData..appendcxx . . $ QString#append(6a89d0b7f4d2681c).("<font color=red><b>" +cxx . . $ operator+(c75c3ae4eb9af1a8). trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("loading failed","information window message") +cxx . . $ operator+(3d22f08efddf8107). "</font></b><br>" +cxx . . $ operator+(fab9b4f80031f353). |
| 560 | trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("profile ","information window message. Full phrase is: 'profile <PROFILENAME> is not valid for luckybackup version:X.Y'. BEWARE of the whitespace in the end") |
| 561 | +cxx . . $ operator+(3d22f08efddf8107). "<b>" +cxx . . $ operator+(fab9b4f80031f353). profileNamecxx . . $ Global/profileName. +cxx . . $ operator+(3d22f08efddf8107). "</b> " +cxx . . $ operator+(fab9b4f80031f353). trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("is not valid for","information window message. Full phrase is: 'profile <PROFILENAME> is not valid for luckybackup version:X.Y") +cxx . . $ operator+(3d22f08efddf8107). " " +cxx . . $ operator+(fab9b4f80031f353). appNamecxx . . $ Global/appName. +cxx . . $ operator+(3d22f08efddf8107).", "+cxx . . $ operator+(fab9b4f80031f353). trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("version:","information window message. Full phrase is: 'profile <PROFILENAME> is not valid for luckybackup version:X.Y") +cxx . . $ operator+(fab9b4f80031f353). countStrcxx . . $ Global/countStr..setNumcxx . . $ QString#setNum(3becbeaf5ad69e3c).(appVersioncxx . . $ Global/appVersion.)); |
| 562 | return false; //do nothing more |
| 563 | } |
| 564 | |
| 565 | // if all went ok (profile loaded) - loadOK == 0 |
| 566 | savedProfilecxx . . $ luckyBackupWindow#savedProfile. = true; |
| 567 | uicxx . . $ luckyBackupWindow#ui..actionSavecxx . . $ Ui_luckyBackupWindow#actionSave. -> setEnabledcxx . . $ QAction#setEnabled(b45ddcbc8423892c).(false); |
| 568 | currentOperationcxx . . $ Global/currentOperation. = 0; |
| 569 | while (currentOperationcxx . . $ Global/currentOperation. < TotalOperationscxx . . $ Global/TotalOperations.) // fill in the task list |
| 570 | { |
| 571 | uicxx . . $ luckyBackupWindow#ui..listWidget_operationscxx . . $ Ui_luckyBackupWindow#listWidget_operations. -> addItemcxx . . $ QListWidget#addItem(3520e46b33348bf6).( Operationcxx . . $ Global/Operation.[currentOperationcxx . . $ Global/currentOperation.] -> GetNamecxx . . $ operation#GetName(6ef7b6c27b00b43d).() ); |
| 572 | uicxx . . $ luckyBackupWindow#ui..listWidget_operationscxx . . $ Ui_luckyBackupWindow#listWidget_operations. -> setCurrentRowcxx . . $ QListWidget#setCurrentRow(d4f767463ce0a6b3).(currentOperationcxx . . $ Global/currentOperation.); |
| 573 | if (Operationcxx . . $ Global/Operation.[currentOperationcxx . . $ Global/currentOperation.] -> GetIncludedcxx . . $ operation#GetIncluded(50ce9a9e25b4a850).()) |
| 574 | uicxx . . $ luckyBackupWindow#ui..listWidget_operationscxx . . $ Ui_luckyBackupWindow#listWidget_operations. -> currentItemcxx . . $ QListWidget#currentItem(a843e491ce3ee2b1).() -> setCheckStatecxx . . $ QListWidgetItem#setCheckState(537692883700039). (Qtcxx . . $ Qt/::Checkedcxx . . $ Qt/Checked.); |
| 575 | else |
| 576 | uicxx . . $ luckyBackupWindow#ui..listWidget_operationscxx . . $ Ui_luckyBackupWindow#listWidget_operations. -> currentItemcxx . . $ QListWidget#currentItem(a843e491ce3ee2b1).() -> setCheckStatecxx . . $ QListWidgetItem#setCheckState(537692883700039). (Qtcxx . . $ Qt/::Uncheckedcxx . . $ Qt/Unchecked.); |
| 577 | currentOperationcxx . . $ Global/currentOperation.++; |
| 578 | } |
| 579 | |
| 580 | TotalOperationscxx . . $ Global/TotalOperations. = uicxx . . $ luckyBackupWindow#ui..listWidget_operationscxx . . $ Ui_luckyBackupWindow#listWidget_operations. -> countcxx . . $ QListWidget#count(455f465bc33b4cdf).(); //Get the Operations list size |
| 581 | checkDeclaredcxx . . $ luckyBackupWindow#checkDeclared(49f6e7a06ebc5aa8).(); // Check tasks & set icons |
| 582 | loadDatacxx . . $ luckyBackupWindow#loadData..appendcxx . . $ QString#append(6a89d0b7f4d2681c).(trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("profile","info window message. full phrase: 'profile <PROFILENAME> loaded successfully'") +cxx . . $ operator+(3d22f08efddf8107). " <b>" +cxx . . $ operator+(fab9b4f80031f353). profileNamecxx . . $ Global/profileName. +cxx . . $ operator+(3d22f08efddf8107). "</b> <font color=green>" +cxx . . $ operator+(fab9b4f80031f353). trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("loaded successfully","info window message. full phrase: 'profile <PROFILENAME> loaded successfully'") +cxx . . $ operator+(3d22f08efddf8107). " !!</font>"); |
| 583 | uicxx . . $ luckyBackupWindow#ui..listWidget_operationscxx . . $ Ui_luckyBackupWindow#listWidget_operations. -> setSpacingcxx . . $ QListView#setSpacing(d4f767463ce0a6b3).(1); |
| 584 | |
| 585 | // Check to see if this profile is scheduled and inform user ~~~~~~~~ |
| 586 | QStringcxx . . $ QString# CronTab = ""cxx . . $ QString#QString(85c52e162fed56f9).; |
| 587 | QStringcxx . . $ QString# profileCheckCron = profileNamecxx . . $ QString#QString(132dd6869045752b).; |
| 588 | profileCheckCron =cxx . . $ QString#`operator=`(b79fde0b0ce9b948). profileCheckCron.replacecxx . . $ QString#replace(192e628656427d1c).(" "cxx . . $ QString#QString(85c52e162fed56f9).,"\\ "cxx . . $ QString#QString(85c52e162fed56f9).); |
| 589 | QFilecxx . . $ QFile# cronFilecxx . . $ QFile#QFile(3520e46b33348bf6). (cronfilenamecxx . . $ Global/cronfilename.); |
| 590 | if (cronFile.opencxx . . $ QFile#open(dca164408be960c8).(QIODevicecxx . . $ QIODevice#::ReadOnlycxx . . $ QIODevice#ReadOnly. |cxx . . $ `operator|`(c9e45f682471e48d). QIODevicecxx . . $ QIODevice#::Textcxx . . $ QIODevice#Text.)) //open the cronFile |
| 591 | { |
| 592 | loadDatacxx . . $ luckyBackupWindow#loadData..appendcxx . . $ QString#append(6a89d0b7f4d2681c).("<br>"+cxx . . $ operator+(c75c3ae4eb9af1a8).trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("scheduled","this refers to a profile") +cxx . . $ operator+(3d22f08efddf8107). ": <b>"); |
| 593 | QTextStreamcxx . . $ QTextStream# incxx . . $ QTextStream#QTextStream(bebe8f2dee7f9e86).(&cronFile); |
| 594 | while (!in.atEndcxx . . $ QTextStream#atEnd(50ce9a9e25b4a850).()) |
| 595 | CronTab.appendcxx . . $ QString#append(6a89d0b7f4d2681c).(in.readLinecxx . . $ QTextStream#readLine(20e0a2766677f583).()); |
| 596 | if (CronTab.containscxx . . $ QString#contains(8cce4688c16f48f3).(profileCheckCron, Qtcxx . . $ Qt/::CaseInsensitivecxx . . $ Qt/CaseInsensitive.)) |
| 597 | loadDatacxx . . $ luckyBackupWindow#loadData..appendcxx . . $ QString#append(6a89d0b7f4d2681c).(trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("YES") +cxx . . $ operator+(3d22f08efddf8107). "</b>"); |
| 598 | else |
| 599 | loadDatacxx . . $ luckyBackupWindow#loadData..appendcxx . . $ QString#append(6a89d0b7f4d2681c).(trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("NO") +cxx . . $ operator+(3d22f08efddf8107). "</b>"); |
| 600 | } |
| 601 | |
| 602 | //append the profile description if it exists |
| 603 | if (profileDescriptioncxx . . $ Global/profileDescription. !=cxx . . $ QString#`operator!=`(7d4bdb1abc417636). "") |
| 604 | { |
| 605 | QStringcxx . . $ QString# profileDescriptionDisplay = profileDescriptioncxx . . $ QString#QString(132dd6869045752b).; |
| 606 | profileDescriptionDisplay.replacecxx . . $ QString#replace(192e628656427d1c).("\n"cxx . . $ QString#QString(85c52e162fed56f9).,"<br>"cxx . . $ QString#QString(85c52e162fed56f9).); |
| 607 | loadDatacxx . . $ luckyBackupWindow#loadData..appendcxx . . $ QString#append(6a89d0b7f4d2681c).("<br><br><b>" +cxx . . $ operator+(c75c3ae4eb9af1a8). trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("Description") +cxx . . $ operator+(3d22f08efddf8107). ":</b><br>" +cxx . . $ operator+(fab9b4f80031f353). profileDescriptionDisplay); |
| 608 | } |
| 609 | |
| 610 | // Append a general directions message if the profile is empty |
| 611 | if ( TotalOperationscxx . . $ Global/TotalOperations. == 0 ) |
| 612 | loadDatacxx . . $ luckyBackupWindow#loadData..appendcxx . . $ QString#append(6a89d0b7f4d2681c).("<br><font color=magenta>" +cxx . . $ operator+(c75c3ae4eb9af1a8). trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("The task list is empty")+cxx . . $ operator+(3d22f08efddf8107). "<br><b>" +cxx . . $ operator+(fab9b4f80031f353). trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("Use the \"add\" button on the right to get started","Please keep the add word inside quotes") +cxx . . $ operator+(3d22f08efddf8107). "</b></font><br>"); |
| 613 | |
| 614 | return true; //profile loaded successfully |
| 615 | } |
| 616 | |
| 617 | // saveCurrentprofile =============================================================================================================================== |
| 618 | // function to save the current profile |
| 619 | // calls global function saveProfile() |
| 620 | bool luckyBackupWindowcxx . . $ luckyBackupWindow#::saveCurrentProfilecxx . . $ luckyBackupWindow#saveCurrentProfile(c9857a73d68e59ba).() |
| 621 | { |
| 622 | saveDatacxx . . $ luckyBackupWindow#saveData. =cxx . . $ QString#`operator=`(d02845eef0c33901). ""; |
| 623 | TotalOperationscxx . . $ Global/TotalOperations. = uicxx . . $ luckyBackupWindow#ui..listWidget_operationscxx . . $ Ui_luckyBackupWindow#listWidget_operations. -> countcxx . . $ QListWidget#count(455f465bc33b4cdf).(); //Get the Operations list size |
| 624 | |
| 625 | if (currentProfilecxx . . $ Global/currentProfile. ==cxx . . $ `operator==`(5bc2975d2d751687). defaultProfilecxx . . $ Global/defaultProfile.) |
| 626 | saveDatacxx . . $ luckyBackupWindow#saveData..appendcxx . . $ QString#append(6a89d0b7f4d2681c).("<font color=blue><b>" +cxx . . $ operator+(c75c3ae4eb9af1a8). trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("saving default profile ...","Information window message") +cxx . . $ operator+(3d22f08efddf8107). "</font></b><br>"); |
| 627 | else |
| 628 | saveDatacxx . . $ luckyBackupWindow#saveData..appendcxx . . $ QString#append(6a89d0b7f4d2681c).("<font color=blue><b>" +cxx . . $ operator+(c75c3ae4eb9af1a8). trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("saving profile ...","Information window message") +cxx . . $ operator+(3d22f08efddf8107). "</font></b><br>"); |
| 629 | |
| 630 | if (!saveProfilecxx . . $ Global/saveProfile(7dc6c9a0b6a7270f).(currentProfilecxx . . $ QString#QString(132dd6869045752b).)) |
| 631 | { |
| 632 | saveDatacxx . . $ luckyBackupWindow#saveData..appendcxx . . $ QString#append(6a89d0b7f4d2681c).("<font color=red><b>" +cxx . . $ operator+(c75c3ae4eb9af1a8). trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("WARNING") +cxx . . $ operator+(3d22f08efddf8107). "</b></font><br>"); |
| 633 | if (currentProfilecxx . . $ Global/currentProfile. ==cxx . . $ `operator==`(5bc2975d2d751687). defaultProfilecxx . . $ Global/defaultProfile.) |
| 634 | saveDatacxx . . $ luckyBackupWindow#saveData..appendcxx . . $ QString#append(6a89d0b7f4d2681c).(trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("default profile","Information window message. Full phrase: 'default profile <PROFILENAME> could not be saved'.")); |
| 635 | else |
| 636 | saveDatacxx . . $ luckyBackupWindow#saveData..appendcxx . . $ QString#append(6a89d0b7f4d2681c).(trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("profile","Information window message. Full phrase: 'profile <PROFILENAME> could not be saved'")); |
| 637 | |
| 638 | saveDatacxx . . $ luckyBackupWindow#saveData..appendcxx . . $ QString#append(6a89d0b7f4d2681c).(" <b>" +cxx . . $ operator+(c75c3ae4eb9af1a8). profileNamecxx . . $ Global/profileName. +cxx . . $ operator+(3d22f08efddf8107). "</b> "+cxx . . $ operator+(fab9b4f80031f353). trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("could not be saved","Information window message. Full phrase: '(default) profile <PROFILENAME> could not be saved'") +cxx . . $ operator+(3d22f08efddf8107). "<br>" +cxx . . $ operator+(3d22f08efddf8107). "<font color=red>"+cxx . . $ operator+(fab9b4f80031f353). profilecxx . . $ Global/profile..errorStringcxx . . $ QIODevice#errorString(6ef7b6c27b00b43d).() +cxx . . $ operator+(3d22f08efddf8107). "</font>"); |
| 639 | savedProfilecxx . . $ luckyBackupWindow#savedProfile. = false; |
| 640 | uicxx . . $ luckyBackupWindow#ui..actionSavecxx . . $ Ui_luckyBackupWindow#actionSave. -> setEnabledcxx . . $ QAction#setEnabled(b45ddcbc8423892c).(true); |
| 641 | return false; |
| 642 | } |
| 643 | |
| 644 | saveDatacxx . . $ luckyBackupWindow#saveData..appendcxx . . $ QString#append(6a89d0b7f4d2681c).(trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("profile","Information window message. Full phrase: 'profile <PROFILENAME> saved successfully'") +cxx . . $ operator+(3d22f08efddf8107). " <b>" +cxx . . $ operator+(fab9b4f80031f353). profileNamecxx . . $ Global/profileName. +cxx . . $ operator+(3d22f08efddf8107). "</b> <font color=green>" +cxx . . $ operator+(fab9b4f80031f353). trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("saved successfully","Information window message. Full phrase: 'profile <PROFILENAME> saved successfully'") +cxx . . $ operator+(3d22f08efddf8107). " !!</font>"); |
| 645 | |
| 646 | // Check to see if this profile is scheduled and inform user ~~~~~~~~ |
| 647 | QStringcxx . . $ QString# CronTab = ""cxx . . $ QString#QString(85c52e162fed56f9).; |
| 648 | QFilecxx . . $ QFile# cronFilecxx . . $ QFile#QFile(3520e46b33348bf6). (cronfilenamecxx . . $ Global/cronfilename.); |
| 649 | if (cronFile.opencxx . . $ QFile#open(dca164408be960c8).(QIODevicecxx . . $ QIODevice#::ReadOnlycxx . . $ QIODevice#ReadOnly. |cxx . . $ `operator|`(c9e45f682471e48d). QIODevicecxx . . $ QIODevice#::Textcxx . . $ QIODevice#Text.)) //open the cronFile |
| 650 | { |
| 651 | saveDatacxx . . $ luckyBackupWindow#saveData..appendcxx . . $ QString#append(6a89d0b7f4d2681c).("<br>"+cxx . . $ operator+(c75c3ae4eb9af1a8).trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("scheduled","this refers to a profile") +cxx . . $ operator+(3d22f08efddf8107). ": <b>"); |
| 652 | QTextStreamcxx . . $ QTextStream# incxx . . $ QTextStream#QTextStream(bebe8f2dee7f9e86).(&cronFile); |
| 653 | while (!in.atEndcxx . . $ QTextStream#atEnd(50ce9a9e25b4a850).()) |
| 654 | CronTab.appendcxx . . $ QString#append(6a89d0b7f4d2681c).(in.readLinecxx . . $ QTextStream#readLine(20e0a2766677f583).()); |
| 655 | if (CronTab.containscxx . . $ QString#contains(8cce4688c16f48f3).(profileNamecxx . . $ Global/profileName., Qtcxx . . $ Qt/::CaseInsensitivecxx . . $ Qt/CaseInsensitive.)) |
| 656 | saveDatacxx . . $ luckyBackupWindow#saveData..appendcxx . . $ QString#append(6a89d0b7f4d2681c).(trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("YES") +cxx . . $ operator+(3d22f08efddf8107). "</b>"); |
| 657 | else |
| 658 | saveDatacxx . . $ luckyBackupWindow#saveData..appendcxx . . $ QString#append(6a89d0b7f4d2681c).(trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("NO") +cxx . . $ operator+(3d22f08efddf8107). "</b>"); |
| 659 | } |
| 660 | |
| 661 | //append the profile description if it exists |
| 662 | if (profileDescriptioncxx . . $ Global/profileDescription. !=cxx . . $ QString#`operator!=`(7d4bdb1abc417636). "") |
| 663 | { |
| 664 | QStringcxx . . $ QString# profileDescriptionDisplay = profileDescriptioncxx . . $ QString#QString(132dd6869045752b).; |
| 665 | profileDescriptionDisplay.replacecxx . . $ QString#replace(192e628656427d1c).("\n"cxx . . $ QString#QString(85c52e162fed56f9).,"<br>"cxx . . $ QString#QString(85c52e162fed56f9).); |
| 666 | loadDatacxx . . $ luckyBackupWindow#loadData..appendcxx . . $ QString#append(6a89d0b7f4d2681c).("<br><br><b>" +cxx . . $ operator+(c75c3ae4eb9af1a8). trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("Description") +cxx . . $ operator+(3d22f08efddf8107). ":</b><br>" +cxx . . $ operator+(fab9b4f80031f353). profileDescriptionDisplay ); |
| 667 | } |
| 668 | |
| 669 | // if some tasks were deleted also delete the relevant .changes and log files |
| 670 | for (int count = 0; count < deletedTaskNamescxx . . $ luckyBackupWindow#deletedTaskNames..sizecxx . . $ QList#size(ea6fe5115c70a13f).(); ++count) |
| 671 | arrangeLogSnapcxx . . $ luckyBackupWindow#arrangeLogSnap(5f0f93a7bce497de).(0,"delete"cxx . . $ QString#QString(85c52e162fed56f9).,deletedTaskNamescxx . . $ QString#QString(132dd6869045752b)..atcxx . . $ QList#at(e2681f9bb6b2f357).(count)); |
| 672 | deletedTaskNamescxx . . $ luckyBackupWindow#deletedTaskNames..clearcxx . . $ QList#clear(49f6e7a06ebc5aa8).(); |
| 673 | |
| 674 | savedProfilecxx . . $ luckyBackupWindow#savedProfile. = true; //change profile status to "saved" |
| 675 | uicxx . . $ luckyBackupWindow#ui..actionSavecxx . . $ Ui_luckyBackupWindow#actionSave. -> setEnabledcxx . . $ QAction#setEnabled(b45ddcbc8423892c).(false); |
| 676 | |
| 677 | return true; |
| 678 | } |
| 679 | |
| 680 | // createCurrentprofile =============================================================================================================================== |
| 681 | // function to create the current profile with an empty task list |
| 682 | // calls global function saveProfile() |
| 683 | int luckyBackupWindowcxx . . $ luckyBackupWindow#::createCurrentProfilecxx . . $ luckyBackupWindow#createCurrentProfile(b126dc7c1de90089).() |
| 684 | { |
| 685 | createDatacxx . . $ luckyBackupWindow#createData. =cxx . . $ QString#`operator=`(d02845eef0c33901). ""; |
| 686 | if (!profilecxx . . $ Global/profile..existscxx . . $ QFile#exists(50ce9a9e25b4a850).()) //if the currentProfile does not exist, try to create it |
| 687 | { |
| 688 | TotalOperationscxx . . $ Global/TotalOperations. = 0; //Set the Operations list size to 0 |
| 689 | |
| 690 | //Set email default options |
| 691 | emailNevercxx . . $ Global/emailNever. = 1; |
| 692 | emailSubjectcxx . . $ Global/emailSubject. =cxx . . $ QString#`operator=`(b79fde0b0ce9b948). emailDefaultSubjectcxx . . $ Global/emailDefaultSubject.; |
| 693 | emailBodycxx . . $ Global/emailBody. =cxx . . $ QString#`operator=`(b79fde0b0ce9b948). emailDefaultBodycxx . . $ Global/emailDefaultBody.; |
| 694 | |
| 695 | if (currentProfilecxx . . $ Global/currentProfile. ==cxx . . $ `operator==`(5bc2975d2d751687). defaultProfilecxx . . $ Global/defaultProfile.) |
| 696 | createDatacxx . . $ luckyBackupWindow#createData..appendcxx . . $ QString#append(6a89d0b7f4d2681c).("<font color=blue><b>" +cxx . . $ operator+(c75c3ae4eb9af1a8). trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("creating default profile ...","Information window message") +cxx . . $ operator+(3d22f08efddf8107). "</font></b><br>"); |
| 697 | else |
| 698 | createDatacxx . . $ luckyBackupWindow#createData..appendcxx . . $ QString#append(6a89d0b7f4d2681c).("<font color=blue><b>" +cxx . . $ operator+(c75c3ae4eb9af1a8). trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("creating profile ...","Information window message") +cxx . . $ operator+(3d22f08efddf8107). "</font></b><br>"); |
| 699 | |
| 700 | if (!saveProfilecxx . . $ Global/saveProfile(7dc6c9a0b6a7270f).(currentProfilecxx . . $ QString#QString(132dd6869045752b).)) //if the profile cannot be created |
| 701 | { |
| 702 | createDatacxx . . $ luckyBackupWindow#createData..appendcxx . . $ QString#append(6a89d0b7f4d2681c).("<font color=red><b>" +cxx . . $ operator+(c75c3ae4eb9af1a8). trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("WARNING") +cxx . . $ operator+(3d22f08efddf8107). "</b></font><br>"); |
| 703 | if (currentProfilecxx . . $ Global/currentProfile. ==cxx . . $ `operator==`(5bc2975d2d751687). defaultProfilecxx . . $ Global/defaultProfile.) |
| 704 | createDatacxx . . $ luckyBackupWindow#createData..appendcxx . . $ QString#append(6a89d0b7f4d2681c).(trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("default profile","Information window message. Full phrase: 'default profile <PROFILENAME> could not be created'.")); |
| 705 | else |
| 706 | createDatacxx . . $ luckyBackupWindow#createData..appendcxx . . $ QString#append(6a89d0b7f4d2681c).(trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("profile","Information window message. Full phrase: 'profile <PROFILENAME> could not be created'.")); |
| 707 | createDatacxx . . $ luckyBackupWindow#createData..appendcxx . . $ QString#append(6a89d0b7f4d2681c).(" <b>" +cxx . . $ operator+(c75c3ae4eb9af1a8). profileNamecxx . . $ Global/profileName. +cxx . . $ operator+(3d22f08efddf8107). "</b> "+cxx . . $ operator+(fab9b4f80031f353). trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("could not be created","Information window message. Full phrase: '(default) profile <PROFILENAME> could not be created'") +cxx . . $ operator+(3d22f08efddf8107). "<br>" +cxx . . $ operator+(3d22f08efddf8107). "<font color=red>"+cxx . . $ operator+(fab9b4f80031f353). profilecxx . . $ Global/profile..errorStringcxx . . $ QIODevice#errorString(6ef7b6c27b00b43d).() +cxx . . $ operator+(3d22f08efddf8107). "</font>"); |
| 708 | return 2; //profile could not be created |
| 709 | } |
| 710 | |
| 711 | createDatacxx . . $ luckyBackupWindow#createData..appendcxx . . $ QString#append(6a89d0b7f4d2681c).(trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("profile","Information window message. Full phrase: 'profile <PROFILENAME> created successfully'") +cxx . . $ operator+(3d22f08efddf8107). " <b>" +cxx . . $ operator+(fab9b4f80031f353). profileNamecxx . . $ Global/profileName. +cxx . . $ operator+(3d22f08efddf8107). "</b> <font color=green>" +cxx . . $ operator+(fab9b4f80031f353). trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("created successfully","Information window message. Full phrase: 'profile <PROFILENAME> created successfully'") +cxx . . $ operator+(3d22f08efddf8107). " !!</font>"); |
| 712 | createDatacxx . . $ luckyBackupWindow#createData..appendcxx . . $ QString#append(6a89d0b7f4d2681c).("<br><font color=magenta>" +cxx . . $ operator+(c75c3ae4eb9af1a8). trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("Use the \"add\" button on the right to get started","Please keep the add word inside quotes") +cxx . . $ operator+(3d22f08efddf8107). "</font><br>"); |
| 713 | createProfileCombocxx . . $ luckyBackupWindow#createProfileCombo(49f6e7a06ebc5aa8).(); // update the profile combobox with all existing profiles |
| 714 | savedProfilecxx . . $ luckyBackupWindow#savedProfile. = true; //change profile status to "saved" |
| 715 | uicxx . . $ luckyBackupWindow#ui..actionSavecxx . . $ Ui_luckyBackupWindow#actionSave. -> setEnabledcxx . . $ QAction#setEnabled(b45ddcbc8423892c).(false); |
| 716 | return 1; // Profile created successfully |
| 717 | } |
| 718 | return 0; // profile already exists, just proceed |
| 719 | } |
| 720 | |
| 721 | // isProfileSaved ==================================================================================================================================== |
| 722 | //function to check if the current profile is saved and proceed or not |
| 723 | int luckyBackupWindowcxx . . $ luckyBackupWindow#::isProfileSavedcxx . . $ luckyBackupWindow#isProfileSaved(b126dc7c1de90089).() |
| 724 | { |
| 725 | if (!savedProfilecxx . . $ luckyBackupWindow#savedProfile.) //if the current profile is not saved, ask the user if he/she wants to, before proceeding |
| 726 | { |
| 727 | textDialogcxx . . $ textDialog# textdialogQcxx . . $ textDialog#textDialog(9c8c077708043c75). ("QtQuestion"cxx . . $ QString#QString(85c52e162fed56f9)., |
| 728 | trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("Profile","Question dialog message. Full phrase: 'profile <PROFILENAME> is modified'")+cxx . . $ operator+(3d22f08efddf8107)." <b>" +cxx . . $ operator+(fab9b4f80031f353). profileNamecxx . . $ Global/profileName. +cxx . . $ operator+(3d22f08efddf8107). "</b> " +cxx . . $ operator+(fab9b4f80031f353). |
| 729 | trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("is modified","Question dialog message. Full phrase: 'profile <PROFILENAME> is modified'")+cxx . . $ operator+(3d22f08efddf8107). ".<br><br>" +cxx . . $ operator+(fab9b4f80031f353). |
| 730 | trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("Would you like to save it before proceeding ?"), this); |
| 731 | textdialogQ.execcxx . . $ QDialog#exec(b126dc7c1de90089).(); |
| 732 | |
| 733 | if (textdialogQ.getGoOncxx . . $ textDialog#getGoOn(b126dc7c1de90089).() > 0) //if user answers yes |
| 734 | { |
| 735 | if (!saveCurrentProfilecxx . . $ luckyBackupWindow#saveCurrentProfile(c9857a73d68e59ba).()) // if it cannot be saved for any reason pop up a yes/no message box to go on or not |
| 736 | { |
| 737 | textDialogcxx . . $ textDialog# textdialogQ2cxx . . $ textDialog#textDialog(9c8c077708043c75). ("QtQuestion"cxx . . $ QString#QString(85c52e162fed56f9)., |
| 738 | trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("Profile","Question dialog message. Full phrase: 'profile <PROFILENAME> could not be saved'")+cxx . . $ operator+(3d22f08efddf8107)." <b>" +cxx . . $ operator+(fab9b4f80031f353). profileNamecxx . . $ Global/profileName. +cxx . . $ operator+(3d22f08efddf8107). "</b> " +cxx . . $ operator+(fab9b4f80031f353).trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("could not be saved","Question dialog message. Full phrase: 'profile <PROFILENAME> could not be saved'") |
| 739 | +cxx . . $ operator+(3d22f08efddf8107)."<br><font color=red>"+cxx . . $ operator+(fab9b4f80031f353). profilecxx . . $ Global/profile..errorStringcxx . . $ QIODevice#errorString(6ef7b6c27b00b43d).() |
| 740 | +cxx . . $ operator+(3d22f08efddf8107). "</font><br><br>" +cxx . . $ operator+(fab9b4f80031f353). trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("Would you like to proceed anyway?"), this); |
| 741 | textdialogQ2.execcxx . . $ QDialog#exec(b126dc7c1de90089).(); |
| 742 | if (textdialogQ2.getGoOncxx . . $ textDialog#getGoOn(b126dc7c1de90089).() == 0) //if user answers no |
| 743 | { |
| 744 | int previousIndex = uicxx . . $ luckyBackupWindow#ui..comboBox_profilecxx . . $ Ui_luckyBackupWindow#comboBox_profile. -> findTextcxx . . $ QComboBox#findText(c6a792a10ea0b85). (profileNamecxx . . $ Global/profileName., Qtcxx . . $ QFlags#QFlags(93d577a3e9528307).::MatchExactlycxx . . $ Qt/MatchExactly.); |
| 745 | GoBackcxx . . $ luckyBackupWindow#GoBack. = true; // the next line will execute function profileComboChanged again. set true to avoid that |
| 746 | uicxx . . $ luckyBackupWindow#ui..comboBox_profilecxx . . $ Ui_luckyBackupWindow#comboBox_profile. -> setCurrentIndexcxx . . $ QComboBox#setCurrentIndex(d4f767463ce0a6b3).(previousIndex); |
| 747 | return 0; //profile could not be saved, user says DO NOT proceed |
| 748 | } |
| 749 | else |
| 750 | return 4; //profile could not be saved, user wants to proceed |
| 751 | } |
| 752 | else |
| 753 | return 2; //profile save successfully, proceed |
| 754 | } |
| 755 | else |
| 756 | return 3; //user does not want to save profile, proceed |
| 757 | } |
| 758 | return 1; // profile is already saved, just proceed |
| 759 | } |
| 760 | |
| 761 | //saveSettings =================================================================================================================================== |
| 762 | //Saves various luckybackup settings such as the default profile (text mode after version 0.4.7) |
| 763 | bool luckyBackupWindowcxx . . $ luckyBackupWindow#::saveSettingscxx . . $ luckyBackupWindow#saveSettings(c9857a73d68e59ba).() |
| 764 | { |
| 765 | QFilecxx . . $ QFile# settingsfilecxx . . $ QFile#QFile(3520e46b33348bf6).(settingsFilecxx . . $ Global/settingsFile.); |
| 766 | if (!settingsfile.opencxx . . $ QFile#open(dca164408be960c8).(QIODevicecxx . . $ QFlags#QFlags(93d577a3e9528307).::WriteOnlycxx . . $ QIODevice#WriteOnly.)) // if the settings file cannot be saved (or fails to create) |
| 767 | { |
| 768 | settingsfile.closecxx . . $ QFileDevice#close(49f6e7a06ebc5aa8).(); |
| 769 | return false; |
| 770 | } |
| 771 | |
| 772 | showOnlyErrorscxx . . $ luckyBackupWindow#showOnlyErrors. = uicxx . . $ luckyBackupWindow#ui..checkBox_onlyShowErrorscxx . . $ Ui_luckyBackupWindow#checkBox_onlyShowErrors. -> isCheckedcxx . . $ QAbstractButton#isChecked(50ce9a9e25b4a850).(); |
| 773 | //write arrays to settings file |
| 774 | QTextStreamcxx . . $ QTextStream# outcxx . . $ QTextStream#QTextStream(bebe8f2dee7f9e86).(&settingsfile); |
| 775 | |
| 776 | out <<cxx . . $ QTextStream#`operator<<`(a8e98279dde0dccf). "***************************** WARNING *****************************\n"; |
| 777 | out <<cxx . . $ QTextStream#`operator<<`(a8e98279dde0dccf). "Do NOT edit this file directly, unless you REALLY know what you are doing !!\n\n\n"; |
| 778 | |
| 779 | out <<cxx . . $ QTextStream#`operator<<`(a8e98279dde0dccf). "[app_global]\n"; |
| 780 | out <<cxx . . $ QTextStream#`operator<<`(a8e98279dde0dccf). "appName=" <<cxx . . $ QTextStream#`operator<<`(f61e69e0d177108f). appNamecxx . . $ Global/appName. <<cxx . . $ QTextStream#`operator<<`(a8e98279dde0dccf). "\n"; //output the application name |
| 781 | out <<cxx . . $ QTextStream#`operator<<`(a8e98279dde0dccf). "appVersion=" <<cxx . . $ QTextStream#`operator<<`(51d1d7ce4274ad92). appVersioncxx . . $ Global/appVersion. <<cxx . . $ QTextStream#`operator<<`(a8e98279dde0dccf). "\n"; //output the application version |
| 782 | out <<cxx . . $ QTextStream#`operator<<`(a8e98279dde0dccf). "File_Type=" <<cxx . . $ QTextStream#`operator<<`(a8e98279dde0dccf). "luckybackup_settings_file" <<cxx . . $ QTextStream#`operator<<`(a8e98279dde0dccf). "\n"; //output the application file type (?) |
| 783 | |
| 784 | out <<cxx . . $ QTextStream#`operator<<`(a8e98279dde0dccf). "\n[settings_global]\n"; |
| 785 | out <<cxx . . $ QTextStream#`operator<<`(a8e98279dde0dccf). "Main_window_width=" <<cxx . . $ QTextStream#`operator<<`(b419665206d30821). mainWindowWidthcxx . . $ luckyBackupWindow#mainWindowWidth. <<cxx . . $ QTextStream#`operator<<`(a8e98279dde0dccf). "\n"; //output the application main window width in pixels |
| 786 | out <<cxx . . $ QTextStream#`operator<<`(a8e98279dde0dccf). "Main_window_height=" <<cxx . . $ QTextStream#`operator<<`(b419665206d30821). mainWindowHeightcxx . . $ luckyBackupWindow#mainWindowHeight. <<cxx . . $ QTextStream#`operator<<`(a8e98279dde0dccf). "\n"; //output the application main window height in pixels |
| 787 | out <<cxx . . $ QTextStream#`operator<<`(a8e98279dde0dccf). "Are_toolbars_locked=" <<cxx . . $ QTextStream#`operator<<`(b419665206d30821). AreToolbarsLockedcxx . . $ luckyBackupWindow#AreToolbarsLocked. <<cxx . . $ QTextStream#`operator<<`(a8e98279dde0dccf). "\n"; //output the lock state of toolbars |
| 788 | out <<cxx . . $ QTextStream#`operator<<`(a8e98279dde0dccf). "Is_combo_toolbar_visible=" <<cxx . . $ QTextStream#`operator<<`(b419665206d30821). IsVisibleProfileComboToolbarcxx . . $ luckyBackupWindow#IsVisibleProfileComboToolbar. <<cxx . . $ QTextStream#`operator<<`(a8e98279dde0dccf). "\n";//output the visible state of the combo toolbar |
| 789 | out <<cxx . . $ QTextStream#`operator<<`(a8e98279dde0dccf). "Is_profile_toolbar_visible=" <<cxx . . $ QTextStream#`operator<<`(b419665206d30821). IsVisibleProfileToolbarcxx . . $ luckyBackupWindow#IsVisibleProfileToolbar. <<cxx . . $ QTextStream#`operator<<`(a8e98279dde0dccf). "\n"; //output the visible state of the profile toolbar |
| 790 | out <<cxx . . $ QTextStream#`operator<<`(a8e98279dde0dccf). "Is_toolbarText_visible=" <<cxx . . $ QTextStream#`operator<<`(b419665206d30821). IsVisibleToolbarTextcxx . . $ luckyBackupWindow#IsVisibleToolbarText. <<cxx . . $ QTextStream#`operator<<`(a8e98279dde0dccf). "\n"; //output the visible state of toolbar text |
| 791 | out <<cxx . . $ QTextStream#`operator<<`(a8e98279dde0dccf). "Default_Profile=" <<cxx . . $ QTextStream#`operator<<`(f61e69e0d177108f). defaultProfilecxx . . $ Global/defaultProfile. <<cxx . . $ QTextStream#`operator<<`(a8e98279dde0dccf). "\n"; //output the default profile full path |
| 792 | out <<cxx . . $ QTextStream#`operator<<`(a8e98279dde0dccf). "Default_Language=" <<cxx . . $ QTextStream#`operator<<`(f61e69e0d177108f). defaultLanguagecxx . . $ luckyBackupWindow#defaultLanguage. <<cxx . . $ QTextStream#`operator<<`(a8e98279dde0dccf). "\n"; //output the default language |
| 793 | out <<cxx . . $ QTextStream#`operator<<`(a8e98279dde0dccf). "Visible_info_window=" <<cxx . . $ QTextStream#`operator<<`(b419665206d30821). IsVisibleInfoWindowcxx . . $ luckyBackupWindow#IsVisibleInfoWindow. <<cxx . . $ QTextStream#`operator<<`(a8e98279dde0dccf). "\n"; //output the visibility state of the info window |
| 794 | out <<cxx . . $ QTextStream#`operator<<`(a8e98279dde0dccf). "Quite_mode_output=" <<cxx . . $ QTextStream#`operator<<`(b419665206d30821). showOnlyErrorscxx . . $ luckyBackupWindow#showOnlyErrors. <<cxx . . $ QTextStream#`operator<<`(a8e98279dde0dccf). "\n"; //output the quite mode state of the commands output window |
| 795 | |
| 796 | if (WINrunningcxx . . $ Global/WINrunning.) |
| 797 | { |
| 798 | out <<cxx . . $ QTextStream#`operator<<`(a8e98279dde0dccf). "\n[settings_non_*nix]\n"; |
| 799 | out <<cxx . . $ QTextStream#`operator<<`(a8e98279dde0dccf). "win_rsync_path=" <<cxx . . $ QTextStream#`operator<<`(f61e69e0d177108f). rsyncCommandPathcxx . . $ Global/rsyncCommandPath. <<cxx . . $ QTextStream#`operator<<`(a8e98279dde0dccf). "\n"; //output the rsync path for windows or OS2 |
| 800 | out <<cxx . . $ QTextStream#`operator<<`(a8e98279dde0dccf). "win_ssh_path=" <<cxx . . $ QTextStream#`operator<<`(f61e69e0d177108f). sshCommandPathcxx . . $ Global/sshCommandPath. <<cxx . . $ QTextStream#`operator<<`(a8e98279dde0dccf). "\n"; //output the ssh path for windows or OS2 |
| 801 | out <<cxx . . $ QTextStream#`operator<<`(a8e98279dde0dccf). "cygpath_path=" <<cxx . . $ QTextStream#`operator<<`(f61e69e0d177108f). cygpathCommandcxx . . $ Global/cygpathCommand. <<cxx . . $ QTextStream#`operator<<`(a8e98279dde0dccf). "\n"; |
| 802 | out <<cxx . . $ QTextStream#`operator<<`(a8e98279dde0dccf). "dosdev_path=" <<cxx . . $ QTextStream#`operator<<`(f61e69e0d177108f). dosdevCommandcxx . . $ Global/dosdevCommand. <<cxx . . $ QTextStream#`operator<<`(a8e98279dde0dccf). "\n"; |
| 803 | out <<cxx . . $ QTextStream#`operator<<`(a8e98279dde0dccf). "vshadowdir_path=" <<cxx . . $ QTextStream#`operator<<`(f61e69e0d177108f). vshadowDircxx . . $ Global/vshadowDir. <<cxx . . $ QTextStream#`operator<<`(a8e98279dde0dccf). "\n"; |
| 804 | out <<cxx . . $ QTextStream#`operator<<`(a8e98279dde0dccf). "tempdir_path=" <<cxx . . $ QTextStream#`operator<<`(f61e69e0d177108f). tempDirPathcxx . . $ Global/tempDirPath. <<cxx . . $ QTextStream#`operator<<`(a8e98279dde0dccf). "\n"; |
| 805 | } |
| 806 | |
| 807 | out <<cxx . . $ QTextStream#`operator<<`(a8e98279dde0dccf). "\n[Settings_file_end]" <<cxx . . $ QTextStream#`operator<<`(a8e98279dde0dccf). "\n"; |
| 808 | |
| 809 | settingsfile.closecxx . . $ QFileDevice#close(49f6e7a06ebc5aa8).(); |
| 810 | return true; |
| 811 | } |
| 812 | |
| 813 | //loadSettings =================================================================================================================================== |
| 814 | //loads various luckybackup settings such as the default profile (text mode after version 0.4.7) |
| 815 | bool luckyBackupWindowcxx . . $ luckyBackupWindow#::loadSettingscxx . . $ luckyBackupWindow#loadSettings(c9857a73d68e59ba).() |
| 816 | { |
| 817 | QFilecxx . . $ QFile# settingsfilecxx . . $ QFile#QFile(3520e46b33348bf6).(settingsFilecxx . . $ Global/settingsFile.); |
| 818 | if (!settingsfile.opencxx . . $ QFile#open(dca164408be960c8).(QIODevicecxx . . $ QFlags#QFlags(93d577a3e9528307).::ReadOnlycxx . . $ QIODevice#ReadOnly.)) //if the settings file cannot be opened |
| 819 | { |
| 820 | settingsfile.closecxx . . $ QFileDevice#close(49f6e7a06ebc5aa8).(); |
| 821 | return false; |
| 822 | } |
| 823 | |
| 824 | QTextStreamcxx . . $ QTextStream# incxx . . $ QTextStream#QTextStream(bebe8f2dee7f9e86).(&settingsfile); |
| 825 | |
| 826 | QStringcxx . . $ QString# SettingsLine=""cxx . . $ QString#QString(85c52e162fed56f9).; //temp variable to import the settings line by line |
| 827 | SettingsLine =cxx . . $ QString#`operator=`(4f35bf974e7f8568). in.readLinecxx . . $ QTextStream#readLine(20e0a2766677f583).(); |
| 828 | |
| 829 | // First check if the settings file is a text or data stream |
| 830 | // if data, call loadSettingsQV |
| 831 | if (SettingsLine !=cxx . . $ QString#`operator!=`(7d4bdb1abc417636)."***************************** WARNING *****************************") |
| 832 | { |
| 833 | settingsfile.closecxx . . $ QFileDevice#close(49f6e7a06ebc5aa8).(); |
| 834 | return loadSettingsQVcxx . . $ luckyBackupWindow#loadSettingsQV(c9857a73d68e59ba).(); |
| 835 | } |
| 836 | |
| 837 | QStringcxx . . $ QString# tempAppName = "asxeto"cxx . . $ QString#QString(85c52e162fed56f9).; |
| 838 | QStringcxx . . $ QString# tempFileType = "asxeto"cxx . . $ QString#QString(85c52e162fed56f9).; |
| 839 | double tempAppVersion=0; |
| 840 | bool IntOk; |
| 841 | |
| 842 | // Read all lines until the [settings_global] tag or end of file if invalid |
| 843 | while ( !(SettingsLine.startsWithcxx . . $ QString#startsWith(8cce4688c16f48f3).("[settings_global]"cxx . . $ QString#QString(85c52e162fed56f9).)) && (!in.atEndcxx . . $ QTextStream#atEnd(50ce9a9e25b4a850).()) ) |
| 844 | { |
| 845 | SettingsLine =cxx . . $ QString#`operator=`(4f35bf974e7f8568). in.readLinecxx . . $ QTextStream#readLine(20e0a2766677f583).(); |
| 846 | |
| 847 | //input the application name, version & file type -------------------------- |
| 848 | if (SettingsLine.startsWithcxx . . $ QString#startsWith(8cce4688c16f48f3).("appName="cxx . . $ QString#QString(85c52e162fed56f9).)) tempAppName =cxx . . $ QString#`operator=`(b79fde0b0ce9b948). SettingsLine.removecxx . . $ QString#remove(d7c3fdecc68f03c6).("appName="cxx . . $ QString#QString(85c52e162fed56f9).); |
| 849 | if (SettingsLine.startsWithcxx . . $ QString#startsWith(8cce4688c16f48f3).("appVersion="cxx . . $ QString#QString(85c52e162fed56f9).)) tempAppVersion = (SettingsLine.removecxx . . $ QString#remove(d7c3fdecc68f03c6).("appVersion="cxx . . $ QString#QString(85c52e162fed56f9).)).toDoublecxx . . $ QString#toDouble(1bd8e57dd4a29c14).(&IntOk); |
| 850 | if (SettingsLine.startsWithcxx . . $ QString#startsWith(8cce4688c16f48f3).("File_Type="cxx . . $ QString#QString(85c52e162fed56f9).)) tempFileType =cxx . . $ QString#`operator=`(b79fde0b0ce9b948). SettingsLine.removecxx . . $ QString#remove(d7c3fdecc68f03c6).("File_Type="cxx . . $ QString#QString(85c52e162fed56f9).); |
| 851 | } |
| 852 | |
| 853 | //check if the file is a valid luckybackup settings file |
| 854 | if ( (tempAppName !=cxx . . $ `operator!=`(5bc2975d2d751687). appNamecxx . . $ Global/appName.) || (tempAppVersion < validSettingsVersioncxx . . $ Global/validSettingsVersion.) || (tempFileType !=cxx . . $ QString#`operator!=`(7d4bdb1abc417636). "luckybackup_settings_file") ) |
| 855 | { |
| 856 | settingsfile.closecxx . . $ QFileDevice#close(49f6e7a06ebc5aa8).(); |
| 857 | return false; |
| 858 | } |
| 859 | |
| 860 | // Read all lines until the [Settings_file_end] tag or end of file if invalid |
| 861 | while ( !(SettingsLine.startsWithcxx . . $ QString#startsWith(8cce4688c16f48f3).("[Settings_file_end]"cxx . . $ QString#QString(85c52e162fed56f9).)) && (!in.atEndcxx . . $ QTextStream#atEnd(50ce9a9e25b4a850).()) ) |
| 862 | { |
| 863 | SettingsLine =cxx . . $ QString#`operator=`(4f35bf974e7f8568). in.readLinecxx . . $ QTextStream#readLine(20e0a2766677f583).(); |
| 864 | |
| 865 | if (SettingsLine.startsWithcxx . . $ QString#startsWith(8cce4688c16f48f3).("Main_window_width="cxx . . $ QString#QString(85c52e162fed56f9).)) mainWindowWidthcxx . . $ luckyBackupWindow#mainWindowWidth. = (SettingsLine.removecxx . . $ QString#remove(d7c3fdecc68f03c6).("Main_window_width="cxx . . $ QString#QString(85c52e162fed56f9).)).toIntcxx . . $ QString#toInt(d7972accae11ee1f).(&IntOk,10); |
| 866 | if (SettingsLine.startsWithcxx . . $ QString#startsWith(8cce4688c16f48f3).("Main_window_height="cxx . . $ QString#QString(85c52e162fed56f9).)) mainWindowHeightcxx . . $ luckyBackupWindow#mainWindowHeight. = (SettingsLine.removecxx . . $ QString#remove(d7c3fdecc68f03c6).("Main_window_height="cxx . . $ QString#QString(85c52e162fed56f9).)).toIntcxx . . $ QString#toInt(d7972accae11ee1f).(&IntOk,10); |
| 867 | if (SettingsLine.startsWithcxx . . $ QString#startsWith(8cce4688c16f48f3).("Are_toolbars_locked="cxx . . $ QString#QString(85c52e162fed56f9).)) AreToolbarsLockedcxx . . $ luckyBackupWindow#AreToolbarsLocked. = (SettingsLine.removecxx . . $ QString#remove(d7c3fdecc68f03c6).("Are_toolbars_locked="cxx . . $ QString#QString(85c52e162fed56f9).)).toIntcxx . . $ QString#toInt(d7972accae11ee1f).(&IntOk,10); |
| 868 | if (SettingsLine.startsWithcxx . . $ QString#startsWith(8cce4688c16f48f3).("Is_combo_toolbar_visible="cxx . . $ QString#QString(85c52e162fed56f9).)) IsVisibleProfileComboToolbarcxx . . $ luckyBackupWindow#IsVisibleProfileComboToolbar. = (SettingsLine.removecxx . . $ QString#remove(d7c3fdecc68f03c6).("Is_combo_toolbar_visible="cxx . . $ QString#QString(85c52e162fed56f9).)).toIntcxx . . $ QString#toInt(d7972accae11ee1f).(&IntOk,10); |
| 869 | if (SettingsLine.startsWithcxx . . $ QString#startsWith(8cce4688c16f48f3).("Is_profile_toolbar_visible="cxx . . $ QString#QString(85c52e162fed56f9).)) IsVisibleProfileToolbarcxx . . $ luckyBackupWindow#IsVisibleProfileToolbar. = (SettingsLine.removecxx . . $ QString#remove(d7c3fdecc68f03c6).("Is_profile_toolbar_visible="cxx . . $ QString#QString(85c52e162fed56f9).)).toIntcxx . . $ QString#toInt(d7972accae11ee1f).(&IntOk,10); |
| 870 | if (SettingsLine.startsWithcxx . . $ QString#startsWith(8cce4688c16f48f3).("Is_toolbarText_visible="cxx . . $ QString#QString(85c52e162fed56f9).)) IsVisibleToolbarTextcxx . . $ luckyBackupWindow#IsVisibleToolbarText. = (SettingsLine.removecxx . . $ QString#remove(d7c3fdecc68f03c6).("Is_toolbarText_visible="cxx . . $ QString#QString(85c52e162fed56f9).)).toIntcxx . . $ QString#toInt(d7972accae11ee1f).(&IntOk,10); |
| 871 | if (SettingsLine.startsWithcxx . . $ QString#startsWith(8cce4688c16f48f3).("Default_Profile="cxx . . $ QString#QString(85c52e162fed56f9).)) defaultProfilecxx . . $ Global/defaultProfile. =cxx . . $ QString#`operator=`(b79fde0b0ce9b948). SettingsLine.removecxx . . $ QString#remove(d7c3fdecc68f03c6).("Default_Profile="cxx . . $ QString#QString(85c52e162fed56f9).); |
| 872 | if (SettingsLine.startsWithcxx . . $ QString#startsWith(8cce4688c16f48f3).("Default_Language="cxx . . $ QString#QString(85c52e162fed56f9).)) defaultLanguagecxx . . $ luckyBackupWindow#defaultLanguage. =cxx . . $ QString#`operator=`(b79fde0b0ce9b948). SettingsLine.removecxx . . $ QString#remove(d7c3fdecc68f03c6).("Default_Language="cxx . . $ QString#QString(85c52e162fed56f9).); |
| 873 | if (SettingsLine.startsWithcxx . . $ QString#startsWith(8cce4688c16f48f3).("Visible_info_window="cxx . . $ QString#QString(85c52e162fed56f9).)) IsVisibleInfoWindowcxx . . $ luckyBackupWindow#IsVisibleInfoWindow. = (SettingsLine.removecxx . . $ QString#remove(d7c3fdecc68f03c6).("Visible_info_window="cxx . . $ QString#QString(85c52e162fed56f9).)).toIntcxx . . $ QString#toInt(d7972accae11ee1f).(&IntOk,10); |
| 874 | if (SettingsLine.startsWithcxx . . $ QString#startsWith(8cce4688c16f48f3).("Quite_mode_output="cxx . . $ QString#QString(85c52e162fed56f9).)) showOnlyErrorscxx . . $ luckyBackupWindow#showOnlyErrors. = (SettingsLine.removecxx . . $ QString#remove(d7c3fdecc68f03c6).("Quite_mode_output="cxx . . $ QString#QString(85c52e162fed56f9).)).toIntcxx . . $ QString#toInt(d7972accae11ee1f).(&IntOk,10); |
| 875 | |
| 876 | if (SettingsLine.startsWithcxx . . $ QString#startsWith(8cce4688c16f48f3).("win_rsync_path="cxx . . $ QString#QString(85c52e162fed56f9).)) rsyncCommandPathcxx . . $ Global/rsyncCommandPath. =cxx . . $ QString#`operator=`(b79fde0b0ce9b948). SettingsLine.removecxx . . $ QString#remove(d7c3fdecc68f03c6).("win_rsync_path="cxx . . $ QString#QString(85c52e162fed56f9).); |
| 877 | if (SettingsLine.startsWithcxx . . $ QString#startsWith(8cce4688c16f48f3).("win_ssh_path="cxx . . $ QString#QString(85c52e162fed56f9).)) sshCommandPathcxx . . $ Global/sshCommandPath. =cxx . . $ QString#`operator=`(b79fde0b0ce9b948). SettingsLine.removecxx . . $ QString#remove(d7c3fdecc68f03c6).("win_ssh_path="cxx . . $ QString#QString(85c52e162fed56f9).); |
| 878 | if (SettingsLine.startsWithcxx . . $ QString#startsWith(8cce4688c16f48f3).("cygpath_path="cxx . . $ QString#QString(85c52e162fed56f9).)) cygpathCommandcxx . . $ Global/cygpathCommand. =cxx . . $ QString#`operator=`(b79fde0b0ce9b948). SettingsLine.removecxx . . $ QString#remove(d7c3fdecc68f03c6).("cygpath_path="cxx . . $ QString#QString(85c52e162fed56f9).); |
| 879 | if (SettingsLine.startsWithcxx . . $ QString#startsWith(8cce4688c16f48f3).("dosdev_path="cxx . . $ QString#QString(85c52e162fed56f9).)) dosdevCommandcxx . . $ Global/dosdevCommand. =cxx . . $ QString#`operator=`(b79fde0b0ce9b948). SettingsLine.removecxx . . $ QString#remove(d7c3fdecc68f03c6).("dosdev_path="cxx . . $ QString#QString(85c52e162fed56f9).); |
| 880 | if (SettingsLine.startsWithcxx . . $ QString#startsWith(8cce4688c16f48f3).("vshadowdir_path="cxx . . $ QString#QString(85c52e162fed56f9).)) vshadowDircxx . . $ Global/vshadowDir. =cxx . . $ QString#`operator=`(b79fde0b0ce9b948). SettingsLine.removecxx . . $ QString#remove(d7c3fdecc68f03c6).("vshadowdir_path="cxx . . $ QString#QString(85c52e162fed56f9).); |
| 881 | if (SettingsLine.startsWithcxx . . $ QString#startsWith(8cce4688c16f48f3).("tempdir_path="cxx . . $ QString#QString(85c52e162fed56f9).) && !isTempDirPathcxx . . $ Global/isTempDirPath.) tempDirPathcxx . . $ Global/tempDirPath. =cxx . . $ QString#`operator=`(b79fde0b0ce9b948). SettingsLine.removecxx . . $ QString#remove(d7c3fdecc68f03c6).("tempdir_path="cxx . . $ QString#QString(85c52e162fed56f9).); |
| 882 | } |
| 883 | |
| 884 | settingsfile.closecxx . . $ QFileDevice#close(49f6e7a06ebc5aa8).(); |
| 885 | uicxx . . $ luckyBackupWindow#ui..checkBox_onlyShowErrorscxx . . $ Ui_luckyBackupWindow#checkBox_onlyShowErrors. -> setCheckedcxx . . $ QAbstractButton#setChecked(b45ddcbc8423892c).(showOnlyErrorscxx . . $ luckyBackupWindow#showOnlyErrors.); |
| 886 | return true; |
| 887 | } |
| 888 | |
| 889 | //loadSettingsQV =================================================================================================================================== |
| 890 | //loads various luckybackup settings such as the default profile - data mode |
| 891 | bool luckyBackupWindowcxx . . $ luckyBackupWindow#::loadSettingsQVcxx . . $ luckyBackupWindow#loadSettingsQV(c9857a73d68e59ba).() |
| 892 | { |
| 893 | QFilecxx . . $ QFile# settingsfilecxx . . $ QFile#QFile(3520e46b33348bf6).(settingsFilecxx . . $ Global/settingsFile.); |
| 894 | if (!settingsfile.opencxx . . $ QFile#open(dca164408be960c8).(QIODevicecxx . . $ QFlags#QFlags(93d577a3e9528307).::ReadOnlycxx . . $ QIODevice#ReadOnly.)) //if the settings file cannot be opened |
| 895 | { |
| 896 | settingsfile.closecxx . . $ QFileDevice#close(49f6e7a06ebc5aa8).(); |
| 897 | return false; |
| 898 | } |
| 899 | |
| 900 | QDataStreamcxx . . $ QDataStream# incxx . . $ QDataStream#QDataStream(bebe8f2dee7f9e86).(&settingsfile); |
| 901 | in.setVersioncxx . . $ QDataStream#setVersion(d4f767463ce0a6b3).(QDataStreamcxx . . $ QDataStream#::Qt_4_3cxx . . $ QDataStream#Qt_4_3.); |
| 902 | |
| 903 | QVariantcxx . . $ QVariant# vcxx . . $ QVariant#QVariant(ced63f7c635d850d).; //we will import everything as QVariant using this temp variable |
| 904 | QStringcxx . . $ QString# vStringcxx . . $ QString#QString(ced63f7c635d850d).; //temp variable to import "labels" of real data |
| 905 | QStringcxx . . $ QString# tempAppName = "asxeto"cxx . . $ QString#QString(85c52e162fed56f9).; |
| 906 | QStringcxx . . $ QString# tempFileType = "asxeto"cxx . . $ QString#QString(85c52e162fed56f9).; |
| 907 | double tempAppVersion=0; |
| 908 | in>>cxx . . $ `operator>>`(ff92eee7bfdd49b7).v; |
| 909 | if (v.toStringcxx . . $ QVariant#toString(6ef7b6c27b00b43d).()==cxx . . $ QString#`operator==`(7d4bdb1abc417636)."appName") |
| 910 | in >>cxx . . $ `operator>>`(ff92eee7bfdd49b7). v; |
| 911 | tempAppName =cxx . . $ QString#`operator=`(4f35bf974e7f8568). v.toStringcxx . . $ QVariant#toString(6ef7b6c27b00b43d).(); //input the application name & version |
| 912 | in>>cxx . . $ `operator>>`(ff92eee7bfdd49b7).v; |
| 913 | if (v.toStringcxx . . $ QVariant#toString(6ef7b6c27b00b43d).()==cxx . . $ QString#`operator==`(7d4bdb1abc417636)."appVersion") |
| 914 | in >>cxx . . $ `operator>>`(ff92eee7bfdd49b7). v; |
| 915 | tempAppVersion = v.toDoublecxx . . $ QVariant#toDouble(1bd8e57dd4a29c14).(); |
| 916 | in>>cxx . . $ `operator>>`(ff92eee7bfdd49b7).v; |
| 917 | if (v.toStringcxx . . $ QVariant#toString(6ef7b6c27b00b43d).()==cxx . . $ QString#`operator==`(7d4bdb1abc417636)."File_Type") |
| 918 | in >>cxx . . $ `operator>>`(ff92eee7bfdd49b7). v; |
| 919 | tempFileType =cxx . . $ QString#`operator=`(4f35bf974e7f8568). v.toStringcxx . . $ QVariant#toString(6ef7b6c27b00b43d).(); //input the file type |
| 920 | |
| 921 | //check if the file is a valid luckybackup settings file |
| 922 | if ( (tempAppName !=cxx . . $ `operator!=`(5bc2975d2d751687). appNamecxx . . $ Global/appName.) || (tempAppVersion < validSettingsVersioncxx . . $ Global/validSettingsVersion.) || (tempFileType !=cxx . . $ QString#`operator!=`(7d4bdb1abc417636). "luckybackup_settings_file") ) |
| 923 | { |
| 924 | settingsfile.closecxx . . $ QFileDevice#close(49f6e7a06ebc5aa8).(); |
| 925 | return false; |
| 926 | } |
| 927 | |
| 928 | in>>cxx . . $ `operator>>`(ff92eee7bfdd49b7).v; vString =cxx . . $ QString#`operator=`(4f35bf974e7f8568). v.toStringcxx . . $ QVariant#toString(6ef7b6c27b00b43d).(); in >>cxx . . $ `operator>>`(ff92eee7bfdd49b7). v; //input a label in vString and real data in v |
| 929 | while ( (vString !=cxx . . $ QString#`operator!=`(7d4bdb1abc417636). "Settings_file_end") && (!in.atEndcxx . . $ QDataStream#atEnd(50ce9a9e25b4a850).()) ) |
| 930 | { |
| 931 | if (vString ==cxx . . $ QString#`operator==`(7d4bdb1abc417636). "Main_window_width") mainWindowWidthcxx . . $ luckyBackupWindow#mainWindowWidth. = v.toIntcxx . . $ QVariant#toInt(5bd9a3493f6a7a21).(); |
| 932 | if (vString ==cxx . . $ QString#`operator==`(7d4bdb1abc417636). "Main_window_height") mainWindowHeightcxx . . $ luckyBackupWindow#mainWindowHeight. = v.toIntcxx . . $ QVariant#toInt(5bd9a3493f6a7a21).(); |
| 933 | if (vString ==cxx . . $ QString#`operator==`(7d4bdb1abc417636). "Are_toolbars_locked") AreToolbarsLockedcxx . . $ luckyBackupWindow#AreToolbarsLocked. = v.toBoolcxx . . $ QVariant#toBool(50ce9a9e25b4a850).(); |
| 934 | if (vString ==cxx . . $ QString#`operator==`(7d4bdb1abc417636). "Is_combo_toolbar_visible") IsVisibleProfileComboToolbarcxx . . $ luckyBackupWindow#IsVisibleProfileComboToolbar. = v.toBoolcxx . . $ QVariant#toBool(50ce9a9e25b4a850).(); |
| 935 | if (vString ==cxx . . $ QString#`operator==`(7d4bdb1abc417636). "Is_profile_toolbar_visible")IsVisibleProfileToolbarcxx . . $ luckyBackupWindow#IsVisibleProfileToolbar. = v.toBoolcxx . . $ QVariant#toBool(50ce9a9e25b4a850).(); |
| 936 | if (vString ==cxx . . $ QString#`operator==`(7d4bdb1abc417636). "Is_toolbarText_visible") IsVisibleToolbarTextcxx . . $ luckyBackupWindow#IsVisibleToolbarText. = v.toBoolcxx . . $ QVariant#toBool(50ce9a9e25b4a850).(); |
| 937 | if (vString ==cxx . . $ QString#`operator==`(7d4bdb1abc417636). "Default_Profile") defaultProfilecxx . . $ Global/defaultProfile. =cxx . . $ QString#`operator=`(4f35bf974e7f8568). v.toStringcxx . . $ QVariant#toString(6ef7b6c27b00b43d).(); |
| 938 | if (vString ==cxx . . $ QString#`operator==`(7d4bdb1abc417636). "Default_Language") defaultLanguagecxx . . $ luckyBackupWindow#defaultLanguage. =cxx . . $ QString#`operator=`(4f35bf974e7f8568). v.toStringcxx . . $ QVariant#toString(6ef7b6c27b00b43d).(); |
| 939 | if (vString ==cxx . . $ QString#`operator==`(7d4bdb1abc417636). "Visible_info_window") IsVisibleInfoWindowcxx . . $ luckyBackupWindow#IsVisibleInfoWindow. = v.toBoolcxx . . $ QVariant#toBool(50ce9a9e25b4a850).(); |
| 940 | |
| 941 | if (vString ==cxx . . $ QString#`operator==`(7d4bdb1abc417636). "win_rsync_path") rsyncCommandPathcxx . . $ Global/rsyncCommandPath. =cxx . . $ QString#`operator=`(4f35bf974e7f8568). v.toStringcxx . . $ QVariant#toString(6ef7b6c27b00b43d).(); |
| 942 | if (vString ==cxx . . $ QString#`operator==`(7d4bdb1abc417636). "win_ssh_path") sshCommandPathcxx . . $ Global/sshCommandPath. =cxx . . $ QString#`operator=`(4f35bf974e7f8568). v.toStringcxx . . $ QVariant#toString(6ef7b6c27b00b43d).(); |
| 943 | |
| 944 | in>>cxx . . $ `operator>>`(ff92eee7bfdd49b7).v; vString =cxx . . $ QString#`operator=`(4f35bf974e7f8568). v.toStringcxx . . $ QVariant#toString(6ef7b6c27b00b43d).(); |
| 945 | if (vString!=cxx . . $ QString#`operator!=`(7d4bdb1abc417636)."Settings_file_end") |
| 946 | in >>cxx . . $ `operator>>`(ff92eee7bfdd49b7). v; |
| 947 | } |
| 948 | settingsfile.closecxx . . $ QFileDevice#close(49f6e7a06ebc5aa8).(); |
| 949 | |
| 950 | saveSettingscxx . . $ luckyBackupWindow#saveSettings(c9857a73d68e59ba).(); //save the settings file to text format |
| 951 | |
| 952 | return true; |
| 953 | } |
| 954 | |
| 955 | //arrangeLogSnap =================================================================================================================================== |
| 956 | //Rename-delete-copy logs & snaps when the current profile/task is renamed, deleted,duplicated |
| 957 | // if a task is deleted, this function is called from saveCurrentProfile() |
| 958 | // Returns true if everything went ok |
| 959 | bool luckyBackupWindowcxx . . $ luckyBackupWindow#::arrangeLogSnapcxx . . $ luckyBackupWindow#arrangeLogSnap(5f0f93a7bce497de).(bool PorT,QStringcxx . . $ QString# ActionTaken,QStringcxx . . $ QString# NameToUse) |
| 960 | { |
| 961 | // PorT is "1" for profile and "0" for task |
| 962 | // ActionTaken can become "rename", "delete" ,"duplicate" |
| 963 | // NameToUse is the new name of the current profile if rename/duplicate or the file to be deleted or the old name of the task that was renamed/deleted |
| 964 | |
| 965 | bool whatToReturn1 = false, whatToReturn2 = false; |
| 966 | QStringListcxx . . $ QStringList# filtersSnapLogcxx . . $ QStringList#QStringList(ced63f7c635d850d)., snapListFilescxx . . $ QStringList#QStringList(ced63f7c635d850d)., logsListFilescxx . . $ QStringList#QStringList(ced63f7c635d850d).; |
| 967 | if (PorT) // we're talking about a profile |
| 968 | filtersSnapLog <<cxx . . $ QStringList#`operator<<`(85116071a693d053). profileNamecxx . . $ Global/profileName. +cxx . . $ operator+(3d22f08efddf8107). "-*"; // profileName is the old profile name |
| 969 | else // we're talking about a task |
| 970 | filtersSnapLog <<cxx . . $ QStringList#`operator<<`(85116071a693d053). profileNamecxx . . $ Global/profileName. +cxx . . $ operator+(3d22f08efddf8107). "-" +cxx . . $ operator+(fab9b4f80031f353). NameToUse +cxx . . $ operator+(3d22f08efddf8107). "-*"; // NameToUse is the name of the task that was deleted/renamed (before it was renamed) |
| 971 | |
| 972 | // QSTringLists with all files to be manipulated |
| 973 | QDircxx . . $ QDir# snapTempDircxx . . $ QDir#QDir(3520e46b33348bf6).(snapChangesDircxx . . $ Global/snapChangesDir.), logTempDircxx . . $ QDir#QDir(3520e46b33348bf6).(logDircxx . . $ Global/logDir.); |
| 974 | snapListFiles =cxx . . $ QStringList#`operator=`(335bb966c1744308). snapTempDir.entryListcxx . . $ QDir#entryList(4575c08c50802968).(filtersSnapLog,QDircxx . . $ QDir#::AllEntriescxx . . $ QDir#AllEntries. |cxx . . $ `operator|`(153b300229e4e3d0). QDircxx . . $ QDir#::Hiddencxx . . $ QDir#Hidden. |cxx . . $ QFlags#`operator|`(2cc1994e0be6f18e). QDircxx . . $ QDir#::NoDotAndDotDotcxx . . $ QDir#NoDotAndDotDot.,QDircxx . . $ QFlags#QFlags(93d577a3e9528307).::Namecxx . . $ QDir#Name.); |
| 975 | logsListFiles =cxx . . $ QStringList#`operator=`(335bb966c1744308). logTempDir.entryListcxx . . $ QDir#entryList(4575c08c50802968).(filtersSnapLog,QDircxx . . $ QDir#::AllEntriescxx . . $ QDir#AllEntries. |cxx . . $ `operator|`(153b300229e4e3d0). QDircxx . . $ QDir#::Hiddencxx . . $ QDir#Hidden. |cxx . . $ QFlags#`operator|`(2cc1994e0be6f18e). QDircxx . . $ QDir#::NoDotAndDotDotcxx . . $ QDir#NoDotAndDotDot.,QDircxx . . $ QFlags#QFlags(93d577a3e9528307).::Namecxx . . $ QDir#Name.); |
| 976 | |
| 977 | // actions for snap .changes files |
| 978 | for (int count = 0; count < snapListFiles.sizecxx . . $ QList#size(ea6fe5115c70a13f).(); ++count) |
| 979 | { |
| 980 | snapfilecxx . . $ Global/snapfile..setFileNamecxx . . $ QFile#setFileName(3520e46b33348bf6).(snapChangesDircxx . . $ Global/snapChangesDir. +cxx . . $ operator+(fab9b4f80031f353). snapListFiles.atcxx . . $ QList#at(e2681f9bb6b2f357).(count)); // QFile |
| 981 | snapchangesfilenamecxx . . $ Global/snapchangesfilename. =cxx . . $ QString#`operator=`(4f35bf974e7f8568). snapfilecxx . . $ Global/snapfile..fileNamecxx . . $ QFile#fileName(6ef7b6c27b00b43d).(); // QString - old filename |
| 982 | |
| 983 | // the new snap .changes filename (QString) - replace either profilename or task name |
| 984 | if (PorT) |
| 985 | snapchangesfilenamecxx . . $ Global/snapchangesfilename..replacecxx . . $ QString#replace(192e628656427d1c).(SLASHcxx . . $ Global/SLASH. +cxx . . $ operator+(fab9b4f80031f353). profileNamecxx . . $ Global/profileName. +cxx . . $ operator+(3d22f08efddf8107). "-" , |
| 986 | SLASHcxx . . $ Global/SLASH. +cxx . . $ operator+(fab9b4f80031f353). NameToUse +cxx . . $ operator+(3d22f08efddf8107). "-" ,Qtcxx . . $ Qt/::CaseSensitivecxx . . $ Qt/CaseSensitive.); // QString - new filename (profile) |
| 987 | else |
| 988 | snapchangesfilenamecxx . . $ Global/snapchangesfilename..replacecxx . . $ QString#replace(192e628656427d1c).(SLASHcxx . . $ Global/SLASH. +cxx . . $ operator+(fab9b4f80031f353). profileNamecxx . . $ Global/profileName. +cxx . . $ operator+(3d22f08efddf8107). "-" +cxx . . $ operator+(fab9b4f80031f353). NameToUse +cxx . . $ operator+(3d22f08efddf8107). "-", |
| 989 | SLASHcxx . . $ Global/SLASH. +cxx . . $ operator+(fab9b4f80031f353). profileNamecxx . . $ Global/profileName. +cxx . . $ operator+(3d22f08efddf8107). "-" +cxx . . $ operator+(fab9b4f80031f353). Operationcxx . . $ Global/Operation.[currentOperationcxx . . $ Global/currentOperation.] -> GetNamecxx . . $ operation#GetName(6ef7b6c27b00b43d).() +cxx . . $ operator+(3d22f08efddf8107). "-",Qtcxx . . $ Qt/::CaseSensitivecxx . . $ Qt/CaseSensitive.); // QString - new filename (task) |
| 990 | |
| 991 | // and take some action |
| 992 | if (ActionTaken ==cxx . . $ QString#`operator==`(7d4bdb1abc417636). "delete") |
| 993 | whatToReturn1 = snapfilecxx . . $ Global/snapfile..removecxx . . $ QFile#remove(c9857a73d68e59ba).(); |
| 994 | if (ActionTaken ==cxx . . $ QString#`operator==`(7d4bdb1abc417636). "rename") |
| 995 | whatToReturn1 = snapfilecxx . . $ Global/snapfile..renamecxx . . $ QFile#rename(e1defb592416720d).(snapchangesfilenamecxx . . $ Global/snapchangesfilename.); |
| 996 | if (ActionTaken ==cxx . . $ QString#`operator==`(7d4bdb1abc417636). "duplicate") //only for profile. If a task is duplicated logs & snaps are reset |
| 997 | whatToReturn1 = snapfilecxx . . $ Global/snapfile..copycxx . . $ QFile#copy(e1defb592416720d).(snapchangesfilenamecxx . . $ Global/snapchangesfilename.); |
| 998 | } |
| 999 | |
| 1000 | // actions for snap log files |
| 1001 | for (int count = 0; count < logsListFiles.sizecxx . . $ QList#size(ea6fe5115c70a13f).(); ++count) |
| 1002 | { |
| 1003 | logfilecxx . . $ Global/logfile..setFileNamecxx . . $ QFile#setFileName(3520e46b33348bf6).(logDircxx . . $ Global/logDir. +cxx . . $ operator+(fab9b4f80031f353). logsListFiles.atcxx . . $ QList#at(e2681f9bb6b2f357).(count)); // QFile |
| 1004 | logfilenamecxx . . $ Global/logfilename. =cxx . . $ QString#`operator=`(4f35bf974e7f8568). logfilecxx . . $ Global/logfile..fileNamecxx . . $ QFile#fileName(6ef7b6c27b00b43d).(); // QString - old filename |
| 1005 | |
| 1006 | // the new log filename (QString) - replace either profilename or task name |
| 1007 | if (PorT) |
| 1008 | logfilenamecxx . . $ Global/logfilename..replacecxx . . $ QString#replace(192e628656427d1c).(SLASHcxx . . $ Global/SLASH. +cxx . . $ operator+(fab9b4f80031f353). profileNamecxx . . $ Global/profileName. +cxx . . $ operator+(3d22f08efddf8107). "-", |
| 1009 | SLASHcxx . . $ Global/SLASH. +cxx . . $ operator+(fab9b4f80031f353). NameToUse +cxx . . $ operator+(3d22f08efddf8107). "-",Qtcxx . . $ Qt/::CaseSensitivecxx . . $ Qt/CaseSensitive.); // QString - new filename (profile) |
| 1010 | else |
| 1011 | logfilenamecxx . . $ Global/logfilename..replacecxx . . $ QString#replace(192e628656427d1c).("-" +cxx . . $ operator+(c75c3ae4eb9af1a8). NameToUse +cxx . . $ operator+(3d22f08efddf8107)."-", |
| 1012 | "-" +cxx . . $ operator+(c75c3ae4eb9af1a8). Operationcxx . . $ Global/Operation.[currentOperationcxx . . $ Global/currentOperation.] -> GetNamecxx . . $ operation#GetName(6ef7b6c27b00b43d).() +cxx . . $ operator+(3d22f08efddf8107)."-",Qtcxx . . $ Qt/::CaseSensitivecxx . . $ Qt/CaseSensitive.); // QString - new filename (task) |
| 1013 | |
| 1014 | // and take some action |
| 1015 | if (ActionTaken ==cxx . . $ QString#`operator==`(7d4bdb1abc417636). "delete") |
| 1016 | whatToReturn2 = logfilecxx . . $ Global/logfile..removecxx . . $ QFile#remove(c9857a73d68e59ba).(); |
| 1017 | if (ActionTaken ==cxx . . $ QString#`operator==`(7d4bdb1abc417636). "rename") |
| 1018 | whatToReturn2 = logfilecxx . . $ Global/logfile..renamecxx . . $ QFile#rename(e1defb592416720d).(logfilenamecxx . . $ Global/logfilename.); |
| 1019 | if (ActionTaken ==cxx . . $ QString#`operator==`(7d4bdb1abc417636). "duplicate") //only for profile. If a task is duplicated logs & snaps are reset |
| 1020 | whatToReturn2 = logfilecxx . . $ Global/logfile..copycxx . . $ QFile#copy(e1defb592416720d).(logfilenamecxx . . $ Global/logfilename.); |
| 1021 | } |
| 1022 | |
| 1023 | bool whatToReturn = whatToReturn1 && whatToReturn2; // return true if both snaps & log actions finished successfully |
| 1024 | return whatToReturn; |
| 1025 | } |
| 1026 | |
| 1027 | // end of functions.cpp --------------------------------------------------------------------------- |
| 1028 |