| 1 | /* --------------------------luckybackupwindow.cpp ----------------------------------------------------------------------------- |
| 2 | cpp file that does all stuff needed when a signal is transmitted (eg button pressed) from the main app window |
| 3 | |
| 4 | =============================================================================================================================== |
| 5 | =============================================================================================================================== |
| 6 | This file is part of "luckyBackup" project |
| 7 | Copyright, Loukas Avgeriou |
| 8 | luckyBackup is distributed under the terms of the GNU General Public License |
| 9 | luckyBackup is free software: you can redistribute it and/or modify |
| 10 | it under the terms of the GNU General Public License as published by |
| 11 | the Free Software Foundation, either version 3 of the License, or |
| 12 | (at your option) any later version. |
| 13 | |
| 14 | luckyBackup is distributed in the hope that it will be useful, |
| 15 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 17 | GNU General Public License for more details. |
| 18 | |
| 19 | You should have received a copy of the GNU General Public License |
| 20 | along with luckyBackup. If not, see <http://www.gnu.org/licenses/>. |
| 21 | |
| 22 | |
| 23 | project version : Please see "main.cpp" for project version |
| 24 | |
| 25 | developer : luckyb |
| 26 | last modified : 19 Jun 2016 |
| 27 | =============================================================================================================================== |
| 28 | =============================================================================================================================== |
| 29 | */ |
| 30 | |
| 31 | //inluded headers --------------------------------------------------------------- |
| 32 | #include "luckybackupwindow.h"cxx . . $ `<file>/src/luckybackupwindow.h`/ |
| 33 | |
| 34 | #include <QProcess> |
| 35 | #include <QToolBar> |
| 36 | #include <QCloseEvent> |
| 37 | #include <QFileDialog> |
| 38 | |
| 39 | #include "helpBrowser.h"cxx . . $ `<file>/src/helpBrowser.h`/ |
| 40 | #include "global.h"cxx . . $ `<file>/src/global.h`/ |
| 41 | #include "winDialog.h"cxx . . $ `<file>/src/winDialog.h`/ |
| 42 | #include "textDialog.h"cxx . . $ `<file>/src/textDialog.h`/ |
| 43 | #include "about.h"cxx . . $ `<file>/src/about.h`/ |
| 44 | #include "modifyDialog.h"cxx . . $ `<file>/src/modifyDialog.h`/ |
| 45 | #include "manage.h"cxx . . $ `<file>/src/manage.h`/ |
| 46 | #include "scheduleDialog.h"cxx . . $ `<file>/src/scheduleDialog.h`/ |
| 47 | #include "emailDialog.h"cxx . . $ `<file>/src/emailDialog.h`/ |
| 48 | |
| 49 | helpBrowsercxx . . $ helpBrowser# *helpbrowsercxx . . $ helpbrowser.; |
| 50 | |
| 51 | //class luckyBackupWindow constructor============================================================================================= |
| 52 | luckyBackupWindowcxx . . $ luckyBackupWindow#::luckyBackupWindowcxx . . $ luckyBackupWindow#luckyBackupWindow(f2c32f691ede4a4e).(QMainWindowcxx . . $ QMainWindow# *parent) : QMainWindowcxx . . $ QMainWindow#(parent) |
| 53 | { |
| 54 | uicxx . . $ luckyBackupWindow#ui..setupUicxx . . $ Ui_luckyBackupWindow#setupUi(f2c32f691ede4a4e).(this); |
| 55 | |
| 56 | InitializeVariablescxx . . $ luckyBackupWindow#InitializeVariables(49f6e7a06ebc5aa8).(); |
| 57 | |
| 58 | //create directory ~/.luckyBackup including folders "logs", "profiles", "schedule", snaps if they do not exist for the current user |
| 59 | QDircxx . . $ QDir# profiledircxx . . $ QDir#QDir(3520e46b33348bf6).(profileDircxx . . $ Global/profileDir.), logdircxx . . $ QDir#QDir(3520e46b33348bf6).(logDircxx . . $ Global/logDir.), scheduledircxx . . $ QDir#QDir(3520e46b33348bf6).(scheduleDircxx . . $ Global/scheduleDir.), snapdircxx . . $ QDir#QDir(3520e46b33348bf6).(snapChangesDircxx . . $ Global/snapChangesDir.), emptydircxx . . $ QDir#QDir(3520e46b33348bf6).(snapEmptyDircxx . . $ Global/snapEmptyDir.); |
| 60 | if (!profiledir.existscxx . . $ QDir#exists(50ce9a9e25b4a850).()) |
| 61 | profiledir.mkpathcxx . . $ QDir#mkpath(f3b39adf77d9c36c).(profileDircxx . . $ Global/profileDir.); |
| 62 | if (!logdir.existscxx . . $ QDir#exists(50ce9a9e25b4a850).()) |
| 63 | logdir.mkpathcxx . . $ QDir#mkpath(f3b39adf77d9c36c).(logDircxx . . $ Global/logDir.); |
| 64 | if (!scheduledir.existscxx . . $ QDir#exists(50ce9a9e25b4a850).()) |
| 65 | scheduledir.mkpathcxx . . $ QDir#mkpath(f3b39adf77d9c36c).(scheduleDircxx . . $ Global/scheduleDir.); |
| 66 | if (!snapdir.existscxx . . $ QDir#exists(50ce9a9e25b4a850).()) |
| 67 | snapdir.mkpathcxx . . $ QDir#mkpath(f3b39adf77d9c36c).(snapChangesDircxx . . $ Global/snapChangesDir.); |
| 68 | if (!emptydir.existscxx . . $ QDir#exists(50ce9a9e25b4a850).()) |
| 69 | emptydir.mkpathcxx . . $ QDir#mkpath(f3b39adf77d9c36c).(snapEmptyDircxx . . $ Global/snapEmptyDir.); |
| 70 | //check if the EMPTY dir is empty |
| 71 | QStringListcxx . . $ QStringList# emptyList = emptydir.entryListcxx . . $ QDir#entryList(648720ae7e049ebe).(QDircxx . . $ QDir#::AllEntriescxx . . $ QDir#AllEntries. |cxx . . $ `operator|`(153b300229e4e3d0). QDircxx . . $ QDir#::Hiddencxx . . $ QDir#Hidden. |cxx . . $ QFlags#`operator|`(2cc1994e0be6f18e). QDircxx . . $ QDir#::NoDotAndDotDotcxx . . $ QDir#NoDotAndDotDot.); |
| 72 | if (emptyList.sizecxx . . $ QList#size(ea6fe5115c70a13f).() > 0) |
| 73 | { |
| 74 | QProcesscxx . . $ QProcess# *rmProcess; |
| 75 | rmProcess = new QProcesscxx . . $ QProcess#(this); |
| 76 | QStringListcxx . . $ QStringList# rmArgscxx . . $ QStringList#QStringList(ced63f7c635d850d).; |
| 77 | rmArgs <<cxx . . $ QStringList#`operator<<`(85116071a693d053). "-rvf"cxx . . $ QString#QString(85c52e162fed56f9). <<cxx . . $ QStringList#`operator<<`(85116071a693d053). snapEmptyDircxx . . $ Global/snapEmptyDir.; |
| 78 | rmProcess -> startcxx . . $ QProcess#start(5e315ba9c811784d). ("rm"cxx . . $ QString#QString(85c52e162fed56f9).,rmArgs); |
| 79 | rmProcess -> waitForFinishedcxx . . $ QProcess#waitForFinished(83c267b20bac841a).(); |
| 80 | emptydir.mkpathcxx . . $ QDir#mkpath(f3b39adf77d9c36c).(snapEmptyDircxx . . $ Global/snapEmptyDir.); |
| 81 | } |
| 82 | |
| 83 | currentUsercxx . . $ Global/currentUser. =cxx . . $ QString#`operator=`(b79fde0b0ce9b948). myHomecxx . . $ Global/myHome.; |
| 84 | if (currentUsercxx . . $ Global/currentUser. ==cxx . . $ QString#`operator==`(7d4bdb1abc417636). "/root") |
| 85 | { |
| 86 | currentUsercxx . . $ Global/currentUser. =cxx . . $ QString#`operator=`(4f35bf974e7f8568). trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("super user","super user is the root user"); |
| 87 | this -> setWindowTitlecxx . . $ QWidget#setWindowTitle(3520e46b33348bf6).(appNamecxx . . $ Global/appName. +cxx . . $ operator+(3d22f08efddf8107). " - " +cxx . . $ operator+(fab9b4f80031f353). trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("super user mode")); |
| 88 | } |
| 89 | else |
| 90 | { |
| 91 | currentUsercxx . . $ Global/currentUser..removecxx . . $ QString#remove(d7c3fdecc68f03c6).("/home/"cxx . . $ QString#QString(85c52e162fed56f9).); |
| 92 | this -> setWindowTitlecxx . . $ QWidget#setWindowTitle(3520e46b33348bf6).(appNamecxx . . $ Global/appName.); |
| 93 | } |
| 94 | |
| 95 | // load the user settings file. If it does not exist create it |
| 96 | QFilecxx . . $ QFile# settingsfilecxx . . $ QFile#QFile(3520e46b33348bf6).(settingsFilecxx . . $ Global/settingsFile.); |
| 97 | if (settingsfile.existscxx . . $ QFile#exists(50ce9a9e25b4a850).()) |
| 98 | loadSettingscxx . . $ luckyBackupWindow#loadSettings(c9857a73d68e59ba).(); |
| 99 | else |
| 100 | saveSettingscxx . . $ luckyBackupWindow#saveSettings(c9857a73d68e59ba).(); |
| 101 | |
| 102 | createActionscxx . . $ luckyBackupWindow#createActions(49f6e7a06ebc5aa8).(); //create all actions needed |
| 103 | createToolbarcxx . . $ luckyBackupWindow#createToolbar(49f6e7a06ebc5aa8).(); // create tool bar |
| 104 | createMenuscxx . . $ luckyBackupWindow#createMenus(49f6e7a06ebc5aa8).(); //create the top menu |
| 105 | |
| 106 | retranslateUicxx . . $ luckyBackupWindow#retranslateUi(49f6e7a06ebc5aa8).(); |
| 107 | |
| 108 | //change gui to normal mode and resize it!! |
| 109 | this -> resizecxx . . $ QWidget#resize(3e454b8ccf442868).(mainWindowWidthcxx . . $ luckyBackupWindow#mainWindowWidth., mainWindowHeightcxx . . $ luckyBackupWindow#mainWindowHeight.); |
| 110 | swapGUIcxx . . $ luckyBackupWindow#swapGUI(7df51288a9ebd664).("normal"cxx . . $ QString#QString(85c52e162fed56f9).); |
| 111 | |
| 112 | // Connections ---------------------------------------------------------------------------------------------------------- |
| 113 | connectcxx . . $ QObject#connect(158df1d9a01a3410). ( uicxx . . $ luckyBackupWindow#ui..pushButton_exitcxx . . $ Ui_luckyBackupWindow#pushButton_exit., SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`!( clicked() ), this, SLOTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:270:10`!( exitApp() ) ); //pushbutton exit |
| 114 | connectcxx . . $ QObject#connect(158df1d9a01a3410). ( uicxx . . $ luckyBackupWindow#ui..actionQuitcxx . . $ Ui_luckyBackupWindow#actionQuit., SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`!(triggered()), this, SLOTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:270:10`!(exitApp())); //menu action quit |
| 115 | |
| 116 | connectcxx . . $ QObject#connect(158df1d9a01a3410). ( uicxx . . $ luckyBackupWindow#ui..comboBox_profilecxx . . $ Ui_luckyBackupWindow#comboBox_profile., SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`!(currentIndexChanged (const int) ), this, SLOTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:270:10`!(profileComboChanged())); |
| 117 | |
| 118 | connectcxx . . $ QObject#connect(158df1d9a01a3410). ( uicxx . . $ luckyBackupWindow#ui..actionNewcxx . . $ Ui_luckyBackupWindow#actionNew., SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`!(triggered()), this, SLOTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:270:10`!(NewProfile())); //menu action newProfile |
| 119 | connectcxx . . $ QObject#connect(158df1d9a01a3410). ( uicxx . . $ luckyBackupWindow#ui..actionRenamecxx . . $ Ui_luckyBackupWindow#actionRename., SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`!(triggered()), this, SLOTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:270:10`!(renameCurrentProfile())); //menu action renameProfile |
| 120 | connectcxx . . $ QObject#connect(158df1d9a01a3410). ( uicxx . . $ luckyBackupWindow#ui..actionSavecxx . . $ Ui_luckyBackupWindow#actionSave., SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`!(triggered()), this, SLOTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:270:10`!(savePressed())); //menu action saveProfile |
| 121 | connectcxx . . $ QObject#connect(158df1d9a01a3410). ( uicxx . . $ luckyBackupWindow#ui..actionSchedulecxx . . $ Ui_luckyBackupWindow#actionSchedule., SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`!( triggered() ), this, SLOTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:270:10`!( schedule() ) ); //action schedule |
| 122 | connectcxx . . $ QObject#connect(158df1d9a01a3410). ( uicxx . . $ luckyBackupWindow#ui..actionEmailcxx . . $ Ui_luckyBackupWindow#actionEmail., SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`!( triggered() ), this, SLOTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:270:10`!( email() ) ); //action email |
| 123 | connectcxx . . $ QObject#connect(158df1d9a01a3410). ( uicxx . . $ luckyBackupWindow#ui..actionRefreshcxx . . $ Ui_luckyBackupWindow#actionRefresh., SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`!( triggered() ), this, SLOTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:270:10`!( refreshList() ) ); //action refresh (task list) |
| 124 | connectcxx . . $ QObject#connect(158df1d9a01a3410). ( uicxx . . $ luckyBackupWindow#ui..actionDeletecxx . . $ Ui_luckyBackupWindow#actionDelete., SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`!( triggered() ), this, SLOTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:270:10`!( deleteCurrentProfile() ) ); //action delete (currentProfile) |
| 125 | connectcxx . . $ QObject#connect(158df1d9a01a3410). ( uicxx . . $ luckyBackupWindow#ui..actionDefaultcxx . . $ Ui_luckyBackupWindow#actionDefault., SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`!( triggered() ), this, SLOTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:270:10`!( setDefaultProfile() ) ); //action default (set currentProfile as default) |
| 126 | connectcxx . . $ QObject#connect(158df1d9a01a3410). ( uicxx . . $ luckyBackupWindow#ui..actionImportcxx . . $ Ui_luckyBackupWindow#actionImport., SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`!( triggered() ), this, SLOTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:270:10`!( importProfile() ) ); //action import profile |
| 127 | connectcxx . . $ QObject#connect(158df1d9a01a3410). ( uicxx . . $ luckyBackupWindow#ui..actionExportcxx . . $ Ui_luckyBackupWindow#actionExport., SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`!( triggered() ), this, SLOTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:270:10`!( exportProfile() ) ); //action export profile |
| 128 | connectcxx . . $ QObject#connect(158df1d9a01a3410). ( uicxx . . $ luckyBackupWindow#ui..actionDuplicate_Profilecxx . . $ Ui_luckyBackupWindow#actionDuplicate_Profile., SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`!( triggered() ), this, SLOTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:270:10`!( duplicateProfile() ) ); //action duplicate profile |
| 129 | connectcxx . . $ QObject#connect(158df1d9a01a3410). ( uicxx . . $ luckyBackupWindow#ui..actionDescriptioncxx . . $ Ui_luckyBackupWindow#actionDescription., SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`!(triggered()), this, SLOTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:270:10`!(changeProfileDescription())); //menu action changeProfileDescription |
| 130 | |
| 131 | connectcxx . . $ QObject#connect(158df1d9a01a3410). ( uicxx . . $ luckyBackupWindow#ui..action_TaskAddcxx . . $ Ui_luckyBackupWindow#action_TaskAdd., SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`!( triggered() ), this, SLOTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:270:10`!( add() ) ); //action add task |
| 132 | connectcxx . . $ QObject#connect(158df1d9a01a3410). ( uicxx . . $ luckyBackupWindow#ui..action_TaskModifycxx . . $ Ui_luckyBackupWindow#action_TaskModify., SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`!( triggered() ), this, SLOTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:270:10`!( modify() ) ); //action modify task |
| 133 | connectcxx . . $ QObject#connect(158df1d9a01a3410). ( uicxx . . $ luckyBackupWindow#ui..action_TaskRemovecxx . . $ Ui_luckyBackupWindow#action_TaskRemove., SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`!( triggered() ), this, SLOTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:270:10`!( remove() ) ); //action remove task |
| 134 | connectcxx . . $ QObject#connect(158df1d9a01a3410). ( uicxx . . $ luckyBackupWindow#ui..action_TaskDuplicatecxx . . $ Ui_luckyBackupWindow#action_TaskDuplicate., SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`!( triggered() ), this, SLOTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:270:10`!( duplicateTask() ) ); //action create duplicate |
| 135 | connectcxx . . $ QObject#connect(158df1d9a01a3410). ( uicxx . . $ luckyBackupWindow#ui..action_TaskCreateRestorecxx . . $ Ui_luckyBackupWindow#action_TaskCreateRestore., SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`!( triggered() ), this, SLOTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:270:10`!( AlsoCreateRestore() ) ); //action create restore |
| 136 | connectcxx . . $ QObject#connect(158df1d9a01a3410). ( uicxx . . $ luckyBackupWindow#ui..action_TaskManageBackupcxx . . $ Ui_luckyBackupWindow#action_TaskManageBackup., SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`!( triggered() ), this, SLOTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:270:10`!( manage() ) ); //action manage backup |
| 137 | |
| 138 | connectcxx . . $ QObject#connect(158df1d9a01a3410). ( uicxx . . $ luckyBackupWindow#ui..pushButton_addcxx . . $ Ui_luckyBackupWindow#pushButton_add., SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`! (clicked() ), this, SLOTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:270:10`!(add())); //pushbutton create (task) |
| 139 | connectcxx . . $ QObject#connect(158df1d9a01a3410). ( uicxx . . $ luckyBackupWindow#ui..pushButton_editcxx . . $ Ui_luckyBackupWindow#pushButton_edit., SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`! (clicked() ), this, SLOTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:270:10`!(modify())); //pushbutton modify (task) |
| 140 | connectcxx . . $ QObject#connect(158df1d9a01a3410). ( uicxx . . $ luckyBackupWindow#ui..pushButton_removecxx . . $ Ui_luckyBackupWindow#pushButton_remove., SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`!( clicked() ), this, SLOTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:270:10`!( remove() ) ); //pushbutton remove (task) |
| 141 | connectcxx . . $ QObject#connect(158df1d9a01a3410). ( uicxx . . $ luckyBackupWindow#ui..pushButton_upcxx . . $ Ui_luckyBackupWindow#pushButton_up., SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`!( clicked() ), this, SLOTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:270:10`!( moveUp() ) ); //pushbutton up |
| 142 | connectcxx . . $ QObject#connect(158df1d9a01a3410). ( uicxx . . $ luckyBackupWindow#ui..pushButton_downcxx . . $ Ui_luckyBackupWindow#pushButton_down., SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`!( clicked() ), this, SLOTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:270:10`!( moveDown() ) ); //pushbutton down |
| 143 | connectcxx . . $ QObject#connect(158df1d9a01a3410). ( uicxx . . $ luckyBackupWindow#ui..pushButton_startcxx . . $ Ui_luckyBackupWindow#pushButton_start., SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`!( clicked() ), this, SLOTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:270:10`!( start() ) ); //pushbutton start |
| 144 | //find a way to emit a signal when spacebar is used to change the state of an item. itemChanged does not seem to work !! |
| 145 | connectcxx . . $ QObject#connect(158df1d9a01a3410). ( uicxx . . $ luckyBackupWindow#ui..listWidget_operationscxx . . $ Ui_luckyBackupWindow#listWidget_operations., SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`!( itemClicked ( QListWidgetItem*) ), this, SLOTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:270:10`!( checkCurrentItem(QListWidgetItem *) ) ); |
| 146 | connectcxx . . $ QObject#connect(158df1d9a01a3410). ( uicxx . . $ luckyBackupWindow#ui..listWidget_operationscxx . . $ Ui_luckyBackupWindow#listWidget_operations., SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`!( itemChanged ( QListWidgetItem*) ), this, SLOTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:270:10`!( taskStateChanged() ) ); |
| 147 | |
| 148 | connectcxx . . $ QObject#connect(158df1d9a01a3410). (uicxx . . $ luckyBackupWindow#ui..pushButton_minimizeToTraycxx . . $ Ui_luckyBackupWindow#pushButton_minimizeToTray., SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`! (clicked() ), this, SLOTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:270:10`!(minimizeTray()));//pushbutton minimize to tray |
| 149 | connectcxx . . $ QObject#connect(158df1d9a01a3410). (uicxx . . $ luckyBackupWindow#ui..pushButton_previousErrorcxx . . $ Ui_luckyBackupWindow#pushButton_previousError., SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`! (clicked() ), this, SLOTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:270:10`!(previousErrorJump()));//pushbutton jump to prev error |
| 150 | connectcxx . . $ QObject#connect(158df1d9a01a3410). (uicxx . . $ luckyBackupWindow#ui..pushButton_nextErrorcxx . . $ Ui_luckyBackupWindow#pushButton_nextError., SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`! (clicked() ), this, SLOTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:270:10`!(nextErrorJump()));//pushbutton jump to next error |
| 151 | |
| 152 | connectcxx . . $ QObject#connect(158df1d9a01a3410). (uicxx . . $ luckyBackupWindow#ui..pushButton_InfoCollapsecxx . . $ Ui_luckyBackupWindow#pushButton_InfoCollapse., SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`! (clicked() ), this, SLOTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:270:10`!(hideShowInfoWindow()));//pushbutton hide/show info window |
| 153 | |
| 154 | // Load the default profile as soon as the app starts or the one given as a command line argument |
| 155 | if (!runImmediatelycxx . . $ Global/runImmediately.) |
| 156 | setCurrentProfilecxx . . $ luckyBackupWindow#setCurrentProfile(7df51288a9ebd664).(defaultProfilecxx . . $ QString#QString(132dd6869045752b).); // set the defaultProfile as current |
| 157 | |
| 158 | int create = createCurrentProfilecxx . . $ luckyBackupWindow#createCurrentProfile(b126dc7c1de90089).(); // if it does not exist create it |
| 159 | |
| 160 | loadCurrentProfilecxx . . $ luckyBackupWindow#loadCurrentProfile(c9857a73d68e59ba).(); // load the current (default or not ) profile - this is inside functions.cpp |
| 161 | |
| 162 | // *********************TESTING purposes message boxs **************************************************************************** |
| 163 | /*QMessageBox::information(this, "LB","CurrentProfile=" + currentProfile + "\ntotal tasks: " + countStr.setNum(TotalOperations)); |
| 164 | QString preRelease="8"; QString preDate="09 Feb 2012"; |
| 165 | QString tempOSrunning="";if (OS2running) tempOSrunning="OS2";if (WINrunning) tempOSrunning="windows";if (!notXnixRunning) tempOSrunning="*nix"; |
| 166 | QMessageBox::warning(this, "luckybackup", "This is a testing version of <b>luckyBackup</b><br>" |
| 167 | "NOT to be used as an official release and NOT to be trusted for actual backups<br><br>" |
| 168 | "pre-release: <b>" + preRelease +"</b><br>version: <b>" + appVersionString + "</b><br>date: <b>"+preDate+ |
| 169 | |
| 170 | "</b><br>Operating system in use: <b>"+tempOSrunning +"</b><br><br> Loukas :)");*/ |
| 171 | // ********************* END of TESTING ****************************************************************************************** |
| 172 | |
| 173 | checkCurrentItemcxx . . $ luckyBackupWindow#checkCurrentItem(13c1c8ad030616f4).(uicxx . . $ luckyBackupWindow#ui..listWidget_operationscxx . . $ Ui_luckyBackupWindow#listWidget_operations. -> currentItemcxx . . $ QListWidget#currentItem(a843e491ce3ee2b1).()); //refresh the selected (last) task as well as the menu items that depend on its type (sync/backup) |
| 174 | |
| 175 | createProfileCombocxx . . $ luckyBackupWindow#createProfileCombo(49f6e7a06ebc5aa8).(); // update the profile combobox with all existing profiles and set index to currentProfile |
| 176 | InfoDatacxx . . $ luckyBackupWindow#InfoData..appendcxx . . $ QString#append(6a89d0b7f4d2681c).("<p align=\"center\"><font color=magenta><b>" +cxx . . $ operator+(c75c3ae4eb9af1a8). trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("Welcome to","full phrase: 'Welcome to luckyBackup'") +cxx . . $ operator+(3d22f08efddf8107)." " |
| 177 | +cxx . . $ operator+(fab9b4f80031f353). appNamecxx . . $ Global/appName.); |
| 178 | if (notXnixRunningcxx . . $ Global/notXnixRunning.) |
| 179 | InfoDatacxx . . $ luckyBackupWindow#InfoData..appendcxx . . $ QString#append(d02845eef0c33901).(" :-)</font></b></p>"); |
| 180 | else |
| 181 | InfoDatacxx . . $ luckyBackupWindow#InfoData..appendcxx . . $ QString#append(6a89d0b7f4d2681c).(", " +cxx . . $ operator+(c75c3ae4eb9af1a8). currentUsercxx . . $ Global/currentUser. +cxx . . $ operator+(3d22f08efddf8107). " :-)</font></b></p>"); |
| 182 | |
| 183 | if (create == 0) |
| 184 | InfoDatacxx . . $ luckyBackupWindow#InfoData..appendcxx . . $ QString#append(6a89d0b7f4d2681c).(loadDatacxx . . $ luckyBackupWindow#loadData.); |
| 185 | else |
| 186 | InfoDatacxx . . $ luckyBackupWindow#InfoData..appendcxx . . $ QString#append(6a89d0b7f4d2681c).(createDatacxx . . $ luckyBackupWindow#createData.); |
| 187 | uicxx . . $ luckyBackupWindow#ui..textBrowser_infocxx . . $ Ui_luckyBackupWindow#textBrowser_info. -> setTextcxx . . $ QTextEdit#setText(3520e46b33348bf6).(InfoDatacxx . . $ luckyBackupWindow#InfoData.); //update the info window |
| 188 | |
| 189 | if (DryRuncxx . . $ Global/DryRun.) // if --dry-run was given as an argument, check the relevant box |
| 190 | uicxx . . $ luckyBackupWindow#ui..checkBox_DryRuncxx . . $ Ui_luckyBackupWindow#checkBox_DryRun. -> setCheckedcxx . . $ QAbstractButton#setChecked(b45ddcbc8423892c).(true); |
| 191 | |
| 192 | if (runImmediatelycxx . . $ Global/runImmediately.) |
| 193 | startcxx . . $ luckyBackupWindow#start(49f6e7a06ebc5aa8).(); |
| 194 | |
| 195 | //variable that helps with translations |
| 196 | QStringcxx . . $ QString# currentLanguageIs = trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("English","Do not translate this. Enter here the language of the translation in native characters instead. This is how your translation will appear under the 'language' menu."); |
| 197 | |
| 198 | } |
| 199 | |
| 200 | //=================================================================================================================================================== |
| 201 | //------------ SLOTS -------------------------------------------------------------------------------------------------------------------------------- |
| 202 | //=================================================================================================================================================== |
| 203 | |
| 204 | // exit ============================================================================================================================================= |
| 205 | // Exits luckybackup. Warn if the profile used is not saved |
| 206 | void luckyBackupWindowcxx . . $ luckyBackupWindow#::exitAppcxx . . $ luckyBackupWindow#exitApp(49f6e7a06ebc5aa8).() |
| 207 | { |
| 208 | if (NOWexecutingcxx . . $ luckyBackupWindow#NOWexecuting.) //if a profile execution is in progress just minimize to tray |
| 209 | { |
| 210 | if (QSystemTrayIconcxx . . $ QSystemTrayIcon#::isSystemTrayAvailablecxx . . $ QSystemTrayIcon#isSystemTrayAvailable(c9857a73d68e59ba). ()) |
| 211 | minimizeTraycxx . . $ luckyBackupWindow#minimizeTray(49f6e7a06ebc5aa8).(); |
| 212 | return; |
| 213 | } |
| 214 | if (isProfileSavedcxx . . $ luckyBackupWindow#isProfileSaved(b126dc7c1de90089).() == 0) //if the current profile is not saved, ask the user if he/she wants to |
| 215 | return; |
| 216 | mainWindowWidthcxx . . $ luckyBackupWindow#mainWindowWidth. = this -> widthcxx . . $ QWidget#width(455f465bc33b4cdf).(); |
| 217 | mainWindowHeightcxx . . $ luckyBackupWindow#mainWindowHeight. = this -> heightcxx . . $ QWidget#height(455f465bc33b4cdf).(); |
| 218 | IsVisibleProfileComboToolbarcxx . . $ luckyBackupWindow#IsVisibleProfileComboToolbar. = profileComboToolbarcxx . . $ luckyBackupWindow#profileComboToolbar. -> isVisiblecxx . . $ QWidget#isVisible(50ce9a9e25b4a850).(); |
| 219 | IsVisibleProfileToolbarcxx . . $ luckyBackupWindow#IsVisibleProfileToolbar. = profileToolbarcxx . . $ luckyBackupWindow#profileToolbar. -> isVisiblecxx . . $ QWidget#isVisible(50ce9a9e25b4a850).(); |
| 220 | IsVisibleProfileStartToolbarcxx . . $ luckyBackupWindow#IsVisibleProfileStartToolbar. = profileStartToolbarcxx . . $ luckyBackupWindow#profileStartToolbar. -> isVisiblecxx . . $ QWidget#isVisible(50ce9a9e25b4a850).(); |
| 221 | saveSettingscxx . . $ luckyBackupWindow#saveSettings(c9857a73d68e59ba).(); |
| 222 | QCoreApplicationcxx . . $ QCoreApplication#::exitcxx . . $ QCoreApplication#exit(d4f767463ce0a6b3).(0); //quit |
| 223 | } |
| 224 | |
| 225 | //do the same if the main window close button (or alt+F4) is pressed |
| 226 | void luckyBackupWindowcxx . . $ luckyBackupWindow#::closeEventcxx . . $ luckyBackupWindow#closeEvent(642e80679aeb34f8).(QCloseEventcxx . . $ QCloseEvent# *event) |
| 227 | { |
| 228 | exitAppcxx . . $ luckyBackupWindow#exitApp(49f6e7a06ebc5aa8).(); |
| 229 | event->ignorecxx . . $ QEvent#ignore(49f6e7a06ebc5aa8).(); |
| 230 | } |
| 231 | |
| 232 | // profileComboChanged ================================================================================================================================ |
| 233 | // SLOT to be executed when the profileCombo index changes |
| 234 | void luckyBackupWindowcxx . . $ luckyBackupWindow#::profileComboChangedcxx . . $ luckyBackupWindow#profileComboChanged(49f6e7a06ebc5aa8).() |
| 235 | { |
| 236 | if (GoBackcxx . . $ luckyBackupWindow#GoBack.) //if this function is called but shouldn't be executed. |
| 237 | { |
| 238 | GoBackcxx . . $ luckyBackupWindow#GoBack. = false; |
| 239 | return; |
| 240 | } |
| 241 | InfoDatacxx . . $ luckyBackupWindow#InfoData. =cxx . . $ QString#`operator=`(d02845eef0c33901). ""; |
| 242 | |
| 243 | if (isProfileSavedcxx . . $ luckyBackupWindow#isProfileSaved(b126dc7c1de90089).() == 0) //if the current profile is not saved, ask the user if he/she wants to |
| 244 | return; |
| 245 | |
| 246 | //set the current profile according to the combobox reading |
| 247 | QStringcxx . . $ QString# ComboReadFullPath = profileDircxx . . $ Global/profileDir. +cxx . . $ operator+(fab9b4f80031f353). (uicxx . . $ luckyBackupWindow#ui..comboBox_profilecxx . . $ Ui_luckyBackupWindow#comboBox_profile. -> currentTextcxx . . $ QComboBox#currentText(6ef7b6c27b00b43d).()) +cxx . . $ operator+(3d22f08efddf8107). ".profile"; |
| 248 | setCurrentProfilecxx . . $ luckyBackupWindow#setCurrentProfile(7df51288a9ebd664).(ComboReadFullPathcxx . . $ QString#QString(132dd6869045752b).); |
| 249 | loadCurrentProfilecxx . . $ luckyBackupWindow#loadCurrentProfile(c9857a73d68e59ba).(); // load the current profile |
| 250 | InfoDatacxx . . $ luckyBackupWindow#InfoData..appendcxx . . $ QString#append(6a89d0b7f4d2681c).(saveDatacxx . . $ luckyBackupWindow#saveData. +cxx . . $ operator+(3d22f08efddf8107). "<br>"); |
| 251 | InfoDatacxx . . $ luckyBackupWindow#InfoData..appendcxx . . $ QString#append(6a89d0b7f4d2681c).(loadDatacxx . . $ luckyBackupWindow#loadData.); |
| 252 | uicxx . . $ luckyBackupWindow#ui..textBrowser_infocxx . . $ Ui_luckyBackupWindow#textBrowser_info. -> setTextcxx . . $ QTextEdit#setText(3520e46b33348bf6).(InfoDatacxx . . $ luckyBackupWindow#InfoData.); //update the info window |
| 253 | loadDatacxx . . $ luckyBackupWindow#loadData.=cxx . . $ QString#`operator=`(d02845eef0c33901).""; saveDatacxx . . $ luckyBackupWindow#saveData.=cxx . . $ QString#`operator=`(d02845eef0c33901).""; createDatacxx . . $ luckyBackupWindow#createData.=cxx . . $ QString#`operator=`(d02845eef0c33901).""; |
| 254 | } |
| 255 | |
| 256 | // lockToolbars ================================================================================================================================ |
| 257 | // SLOT to lock the toolbars in their position |
| 258 | void luckyBackupWindowcxx . . $ luckyBackupWindow#::setToolbarAttrscxx . . $ luckyBackupWindow#setToolbarAttrs(49f6e7a06ebc5aa8).() |
| 259 | { |
| 260 | AreToolbarsLockedcxx . . $ luckyBackupWindow#AreToolbarsLocked. = actionLockToolbarscxx . . $ luckyBackupWindow#actionLockToolbars.->isCheckedcxx . . $ QAction#isChecked(50ce9a9e25b4a850).(); |
| 261 | |
| 262 | profileComboToolbarcxx . . $ luckyBackupWindow#profileComboToolbar. -> setFloatablecxx . . $ QToolBar#setFloatable(b45ddcbc8423892c).(!AreToolbarsLockedcxx . . $ luckyBackupWindow#AreToolbarsLocked.); |
| 263 | profileComboToolbarcxx . . $ luckyBackupWindow#profileComboToolbar. -> setMovablecxx . . $ QToolBar#setMovable(b45ddcbc8423892c).(!AreToolbarsLockedcxx . . $ luckyBackupWindow#AreToolbarsLocked.); |
| 264 | profileStartToolbarcxx . . $ luckyBackupWindow#profileStartToolbar. -> setFloatablecxx . . $ QToolBar#setFloatable(b45ddcbc8423892c).(!AreToolbarsLockedcxx . . $ luckyBackupWindow#AreToolbarsLocked.); |
| 265 | profileStartToolbarcxx . . $ luckyBackupWindow#profileStartToolbar. -> setMovablecxx . . $ QToolBar#setMovable(b45ddcbc8423892c).(!AreToolbarsLockedcxx . . $ luckyBackupWindow#AreToolbarsLocked.); |
| 266 | profileToolbarcxx . . $ luckyBackupWindow#profileToolbar. -> setFloatablecxx . . $ QToolBar#setFloatable(b45ddcbc8423892c).(!AreToolbarsLockedcxx . . $ luckyBackupWindow#AreToolbarsLocked.); |
| 267 | profileToolbarcxx . . $ luckyBackupWindow#profileToolbar. -> setMovablecxx . . $ QToolBar#setMovable(b45ddcbc8423892c).(!AreToolbarsLockedcxx . . $ luckyBackupWindow#AreToolbarsLocked.); |
| 268 | |
| 269 | shutdownToolbarcxx . . $ luckyBackupWindow#shutdownToolbar. -> setVisiblecxx . . $ QWidget#setVisible(b45ddcbc8423892c). (false); |
| 270 | shutdownToolbarcxx . . $ luckyBackupWindow#shutdownToolbar. -> setFloatablecxx . . $ QToolBar#setFloatable(b45ddcbc8423892c).(!AreToolbarsLockedcxx . . $ luckyBackupWindow#AreToolbarsLocked.); |
| 271 | shutdownToolbarcxx . . $ luckyBackupWindow#shutdownToolbar. -> setMovablecxx . . $ QToolBar#setMovable(b45ddcbc8423892c).(!AreToolbarsLockedcxx . . $ luckyBackupWindow#AreToolbarsLocked.); |
| 272 | |
| 273 | errorsToolbarcxx . . $ luckyBackupWindow#errorsToolbar. -> setVisiblecxx . . $ QWidget#setVisible(b45ddcbc8423892c). (false); |
| 274 | errorsToolbarcxx . . $ luckyBackupWindow#errorsToolbar. -> setFloatablecxx . . $ QToolBar#setFloatable(b45ddcbc8423892c).(!AreToolbarsLockedcxx . . $ luckyBackupWindow#AreToolbarsLocked.); |
| 275 | errorsToolbarcxx . . $ luckyBackupWindow#errorsToolbar. -> setMovablecxx . . $ QToolBar#setMovable(b45ddcbc8423892c).(!AreToolbarsLockedcxx . . $ luckyBackupWindow#AreToolbarsLocked.); |
| 276 | |
| 277 | IsVisibleToolbarTextcxx . . $ luckyBackupWindow#IsVisibleToolbarText. = actionVisibleToolbarTextcxx . . $ luckyBackupWindow#actionVisibleToolbarText. -> isCheckedcxx . . $ QAction#isChecked(50ce9a9e25b4a850).(); |
| 278 | if (IsVisibleToolbarTextcxx . . $ luckyBackupWindow#IsVisibleToolbarText.) |
| 279 | profileToolbarcxx . . $ luckyBackupWindow#profileToolbar. -> setToolButtonStylecxx . . $ QToolBar#setToolButtonStyle(8088b2ce57f6b5f3).(Qtcxx . . $ Qt/::ToolButtonTextUnderIconcxx . . $ Qt/ToolButtonTextUnderIcon.); |
| 280 | else |
| 281 | profileToolbarcxx . . $ luckyBackupWindow#profileToolbar. -> setToolButtonStylecxx . . $ QToolBar#setToolButtonStyle(8088b2ce57f6b5f3).(Qtcxx . . $ Qt/::ToolButtonIconOnlycxx . . $ Qt/ToolButtonIconOnly.); |
| 282 | } |
| 283 | |
| 284 | // setWinPaths ================================================================================================================================ |
| 285 | // SLOT to set rsync and ssh paths for windows |
| 286 | void luckyBackupWindowcxx . . $ luckyBackupWindow#::setWinPathscxx . . $ luckyBackupWindow#setWinPaths(49f6e7a06ebc5aa8).() |
| 287 | { |
| 288 | winDialogcxx . . $ winDialog# windialogcxx . . $ winDialog#winDialog(108f35f7aa7f3cf9). (this); |
| 289 | windialog.execcxx . . $ QDialog#exec(b126dc7c1de90089).(); |
| 290 | } |
| 291 | |
| 292 | // savePressed =============================================================================================================================== |
| 293 | // function to execute when save pressed |
| 294 | void luckyBackupWindowcxx . . $ luckyBackupWindow#::savePressedcxx . . $ luckyBackupWindow#savePressed(49f6e7a06ebc5aa8).() |
| 295 | { |
| 296 | InfoDatacxx . . $ luckyBackupWindow#InfoData. =cxx . . $ QString#`operator=`(d02845eef0c33901). ""; |
| 297 | saveCurrentProfilecxx . . $ luckyBackupWindow#saveCurrentProfile(c9857a73d68e59ba).(); |
| 298 | InfoDatacxx . . $ luckyBackupWindow#InfoData..appendcxx . . $ QString#append(6a89d0b7f4d2681c).(saveDatacxx . . $ luckyBackupWindow#saveData.); |
| 299 | uicxx . . $ luckyBackupWindow#ui..textBrowser_infocxx . . $ Ui_luckyBackupWindow#textBrowser_info. -> setTextcxx . . $ QTextEdit#setText(3520e46b33348bf6).(InfoDatacxx . . $ luckyBackupWindow#InfoData.); //update the info window |
| 300 | saveDatacxx . . $ luckyBackupWindow#saveData.=cxx . . $ QString#`operator=`(d02845eef0c33901).""; |
| 301 | } |
| 302 | |
| 303 | // NewProfile ===================================================================================================================================== |
| 304 | // Create an new, blank profile |
| 305 | void luckyBackupWindowcxx . . $ luckyBackupWindow#::NewProfilecxx . . $ luckyBackupWindow#NewProfile(49f6e7a06ebc5aa8).() |
| 306 | { |
| 307 | InfoDatacxx . . $ luckyBackupWindow#InfoData. =cxx . . $ QString#`operator=`(d02845eef0c33901). ""; |
| 308 | if (isProfileSavedcxx . . $ luckyBackupWindow#isProfileSaved(b126dc7c1de90089).() == 0) //if the current profile is not saved, ask the user if he/she wants to |
| 309 | return; |
| 310 | |
| 311 | textDialogcxx . . $ textDialog# textdialogcxx . . $ textDialog#textDialog(9c8c077708043c75). ("NewProfile"cxx . . $ QString#QString(85c52e162fed56f9)., ""cxx . . $ QString#QString(85c52e162fed56f9)., this); |
| 312 | textdialog.execcxx . . $ QDialog#exec(b126dc7c1de90089).(); |
| 313 | if (textdialog.getGoOncxx . . $ textDialog#getGoOn(b126dc7c1de90089).() == 0) |
| 314 | return; |
| 315 | if (textdialog.getGoOncxx . . $ textDialog#getGoOn(b126dc7c1de90089).() == 2) |
| 316 | { |
| 317 | InfoDatacxx . . $ luckyBackupWindow#InfoData. =cxx . . $ QString#`operator=`(b79fde0b0ce9b948). trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("Failed to create new profile","full phrase: 'Failed to create new profile <PROFILENAME>'")+cxx . . $ operator+(3d22f08efddf8107)." <b>" +cxx . . $ operator+(fab9b4f80031f353). |
| 318 | profileNamecxx . . $ Global/profileName. +cxx . . $ operator+(3d22f08efddf8107). "</b><br><font color=red>" |
| 319 | +cxx . . $ operator+(fab9b4f80031f353). trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("The name you have entered contains only invalid characters") +cxx . . $ operator+(3d22f08efddf8107)."</font>"; |
| 320 | uicxx . . $ luckyBackupWindow#ui..textBrowser_infocxx . . $ Ui_luckyBackupWindow#textBrowser_info. -> setTextcxx . . $ QTextEdit#setText(3520e46b33348bf6).(InfoDatacxx . . $ luckyBackupWindow#InfoData.); //update the info window |
| 321 | return; |
| 322 | } |
| 323 | |
| 324 | QStringcxx . . $ QString# newProfileName = textdialog.getUserInputcxx . . $ textDialog#getUserInput(4365c3963150523e).(); |
| 325 | QStringcxx . . $ QString# newProfile = profileDircxx . . $ Global/profileDir. +cxx . . $ operator+(fab9b4f80031f353). newProfileName +cxx . . $ operator+(3d22f08efddf8107). ".profile"; |
| 326 | |
| 327 | //check if it exists and ask to replace |
| 328 | QFilecxx . . $ QFile# newprofilecxx . . $ QFile#QFile(49f6e7a06ebc5aa8).; |
| 329 | newprofile.setFileNamecxx . . $ QFile#setFileName(3520e46b33348bf6).(newProfile); |
| 330 | |
| 331 | if (newprofile.existscxx . . $ QFile#exists(50ce9a9e25b4a850).()) //if the newprofile already exists ask to replace |
| 332 | { |
| 333 | messagecxx . . $ Global/message. =cxx . . $ QString#`operator=`(b79fde0b0ce9b948). trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("Profile","full phrase: 'Profile <PROFILENAME> already exists'")+cxx . . $ operator+(3d22f08efddf8107)." <b>" +cxx . . $ operator+(fab9b4f80031f353). newProfileName +cxx . . $ operator+(3d22f08efddf8107). "</b> " +cxx . . $ operator+(fab9b4f80031f353). |
| 334 | trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("already exists","full phrase: 'Profile <PROFILENAME> already exists'") +cxx . . $ operator+(3d22f08efddf8107). "<br>" +cxx . . $ operator+(fab9b4f80031f353). |
| 335 | trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("Would you like to replace it ?"); |
| 336 | |
| 337 | textDialogcxx . . $ textDialog# textdialogQcxx . . $ textDialog#textDialog(9c8c077708043c75). ("QtQuestion"cxx . . $ QString#QString(85c52e162fed56f9)., messagecxx . . $ QString#QString(132dd6869045752b)., this); |
| 338 | textdialogQ.execcxx . . $ QDialog#exec(b126dc7c1de90089).(); |
| 339 | |
| 340 | if (textdialogQ.getGoOncxx . . $ textDialog#getGoOn(b126dc7c1de90089).() > 0) //if user answers yes |
| 341 | { |
| 342 | if (!newprofile.removecxx . . $ QFile#remove(c9857a73d68e59ba).()) // delete the old profile or display a message if you can't |
| 343 | { |
| 344 | InfoDatacxx . . $ luckyBackupWindow#InfoData. =cxx . . $ QString#`operator=`(b79fde0b0ce9b948). "<font color=red><b>" +cxx . . $ operator+(c75c3ae4eb9af1a8). trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("ERROR") +cxx . . $ operator+(3d22f08efddf8107). "</font></b><br>" +cxx . . $ operator+(fab9b4f80031f353). |
| 345 | trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("Failed to replace profile","full phrase: 'Failed to replace profile <PROFILENAME>'")+cxx . . $ operator+(3d22f08efddf8107). |
| 346 | " <b>" +cxx . . $ operator+(fab9b4f80031f353). newProfileName +cxx . . $ operator+(3d22f08efddf8107). "</b><br><font color=red>" |
| 347 | +cxx . . $ operator+(fab9b4f80031f353). profilecxx . . $ Global/profile..errorStringcxx . . $ QIODevice#errorString(6ef7b6c27b00b43d).() +cxx . . $ operator+(3d22f08efddf8107)."</font>"; |
| 348 | uicxx . . $ luckyBackupWindow#ui..textBrowser_infocxx . . $ Ui_luckyBackupWindow#textBrowser_info. -> setTextcxx . . $ QTextEdit#setText(3520e46b33348bf6).(InfoDatacxx . . $ luckyBackupWindow#InfoData.); //update the info window |
| 349 | return; |
| 350 | } |
| 351 | } |
| 352 | else |
| 353 | return; |
| 354 | } |
| 355 | |
| 356 | setCurrentProfilecxx . . $ luckyBackupWindow#setCurrentProfile(7df51288a9ebd664).(newProfilecxx . . $ QString#QString(132dd6869045752b).); |
| 357 | createCurrentProfilecxx . . $ luckyBackupWindow#createCurrentProfile(b126dc7c1de90089).(); // try to create it (also calls createProfileCombo) |
| 358 | loadCurrentProfilecxx . . $ luckyBackupWindow#loadCurrentProfile(c9857a73d68e59ba).(); // load the current profile |
| 359 | InfoDatacxx . . $ luckyBackupWindow#InfoData..appendcxx . . $ QString#append(6a89d0b7f4d2681c).(createDatacxx . . $ luckyBackupWindow#createData.); |
| 360 | uicxx . . $ luckyBackupWindow#ui..textBrowser_infocxx . . $ Ui_luckyBackupWindow#textBrowser_info. -> setTextcxx . . $ QTextEdit#setText(3520e46b33348bf6).(InfoDatacxx . . $ luckyBackupWindow#InfoData.); //update the info window |
| 361 | loadDatacxx . . $ luckyBackupWindow#loadData.=cxx . . $ QString#`operator=`(d02845eef0c33901).""; saveDatacxx . . $ luckyBackupWindow#saveData.=cxx . . $ QString#`operator=`(d02845eef0c33901).""; createDatacxx . . $ luckyBackupWindow#createData.=cxx . . $ QString#`operator=`(d02845eef0c33901).""; |
| 362 | } |
| 363 | |
| 364 | // renameCurrentProfile ============================================================================================================================= |
| 365 | // rename the current profile |
| 366 | void luckyBackupWindowcxx . . $ luckyBackupWindow#::renameCurrentProfilecxx . . $ luckyBackupWindow#renameCurrentProfile(49f6e7a06ebc5aa8).() |
| 367 | { |
| 368 | InfoDatacxx . . $ luckyBackupWindow#InfoData.=cxx . . $ QString#`operator=`(d02845eef0c33901).""; |
| 369 | |
| 370 | textDialogcxx . . $ textDialog# textdialogcxx . . $ textDialog#textDialog(9c8c077708043c75). ("RenameProfile"cxx . . $ QString#QString(85c52e162fed56f9)., profileNamecxx . . $ QString#QString(132dd6869045752b)., this); |
| 371 | textdialog.execcxx . . $ QDialog#exec(b126dc7c1de90089).(); |
| 372 | if (textdialog.getGoOncxx . . $ textDialog#getGoOn(b126dc7c1de90089).() == 0) |
| 373 | return; |
| 374 | |
| 375 | if (textdialog.getGoOncxx . . $ textDialog#getGoOn(b126dc7c1de90089).() == 2) |
| 376 | { |
| 377 | InfoDatacxx . . $ luckyBackupWindow#InfoData. =cxx . . $ QString#`operator=`(b79fde0b0ce9b948). trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("Failed to rename profile","full phrase: 'Failed to rename profile <PROFILENAME>'")+cxx . . $ operator+(3d22f08efddf8107). |
| 378 | " <b>" +cxx . . $ operator+(fab9b4f80031f353). profileNamecxx . . $ Global/profileName. +cxx . . $ operator+(3d22f08efddf8107). "</b><br><font color=red>" |
| 379 | +cxx . . $ operator+(3d22f08efddf8107). "The name you have entered contains only invalid characters" +cxx . . $ operator+(3d22f08efddf8107)."</font>"; |
| 380 | uicxx . . $ luckyBackupWindow#ui..textBrowser_infocxx . . $ Ui_luckyBackupWindow#textBrowser_info. -> setTextcxx . . $ QTextEdit#setText(3520e46b33348bf6).(InfoDatacxx . . $ luckyBackupWindow#InfoData.); //update the info window |
| 381 | return; |
| 382 | } |
| 383 | |
| 384 | if (textdialog.getGoOncxx . . $ textDialog#getGoOn(b126dc7c1de90089).() == 3) //if the new profile name is the same with the old one do nothing |
| 385 | { |
| 386 | InfoDatacxx . . $ luckyBackupWindow#InfoData..appendcxx . . $ QString#append(6a89d0b7f4d2681c).(trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("profile","full phrase: 'profile <PROFILENAME> renamed successfully to <NEWPROFILENAME>'") |
| 387 | +cxx . . $ operator+(3d22f08efddf8107). " <b>" +cxx . . $ operator+(fab9b4f80031f353). profileNamecxx . . $ Global/profileName. +cxx . . $ operator+(3d22f08efddf8107). "</b><br>...<font color=green>" |
| 388 | +cxx . . $ operator+(fab9b4f80031f353). trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("renamed successfully to","full phrase: 'profile <PROFILENAME> renamed successfully to <NEWPROFILENAME>'") +cxx . . $ operator+(3d22f08efddf8107). |
| 389 | "</font> <b>" +cxx . . $ operator+(fab9b4f80031f353). profileNamecxx . . $ Global/profileName. +cxx . . $ operator+(3d22f08efddf8107)."</b>"); |
| 390 | uicxx . . $ luckyBackupWindow#ui..textBrowser_infocxx . . $ Ui_luckyBackupWindow#textBrowser_info. -> setTextcxx . . $ QTextEdit#setText(3520e46b33348bf6).(InfoDatacxx . . $ luckyBackupWindow#InfoData.); //update the info window |
| 391 | return; |
| 392 | } |
| 393 | |
| 394 | QStringcxx . . $ QString# newProfileName = textdialog.getUserInputcxx . . $ textDialog#getUserInput(4365c3963150523e).(); |
| 395 | QStringcxx . . $ QString# newProfile = profileDircxx . . $ Global/profileDir. +cxx . . $ operator+(fab9b4f80031f353). newProfileName +cxx . . $ operator+(3d22f08efddf8107). ".profile"; |
| 396 | |
| 397 | //check if it exists and ask to replace |
| 398 | QFilecxx . . $ QFile# newprofilecxx . . $ QFile#QFile(49f6e7a06ebc5aa8).; |
| 399 | newprofile.setFileNamecxx . . $ QFile#setFileName(3520e46b33348bf6).(newProfile); |
| 400 | |
| 401 | if (newprofile.existscxx . . $ QFile#exists(50ce9a9e25b4a850).()) //if the newprofile already exists ask to replace |
| 402 | { |
| 403 | messagecxx . . $ Global/message. =cxx . . $ QString#`operator=`(b79fde0b0ce9b948). trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("Profile","full phrase: 'Profile <PROFILENAME> already exists'")+cxx . . $ operator+(3d22f08efddf8107)." <b>" +cxx . . $ operator+(fab9b4f80031f353). newProfileName +cxx . . $ operator+(3d22f08efddf8107). "</b> " +cxx . . $ operator+(fab9b4f80031f353). |
| 404 | trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("already exists","full phrase: 'Profile <PROFILENAME> already exists'") +cxx . . $ operator+(3d22f08efddf8107). "<br>" +cxx . . $ operator+(fab9b4f80031f353). |
| 405 | trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("Would you like to replace it ?"); |
| 406 | |
| 407 | textDialogcxx . . $ textDialog# textdialogQcxx . . $ textDialog#textDialog(9c8c077708043c75). ("QtQuestion"cxx . . $ QString#QString(85c52e162fed56f9)., messagecxx . . $ QString#QString(132dd6869045752b)., this); |
| 408 | textdialogQ.execcxx . . $ QDialog#exec(b126dc7c1de90089).(); |
| 409 | |
| 410 | if (textdialogQ.getGoOncxx . . $ textDialog#getGoOn(b126dc7c1de90089).() > 0) //if user answers yes |
| 411 | { |
| 412 | if (!newprofile.removecxx . . $ QFile#remove(c9857a73d68e59ba).()) // delete the old profile or display a message if you can't |
| 413 | { |
| 414 | InfoDatacxx . . $ luckyBackupWindow#InfoData. =cxx . . $ QString#`operator=`(b79fde0b0ce9b948). "<font color=red><b>" +cxx . . $ operator+(c75c3ae4eb9af1a8). trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("ERROR") +cxx . . $ operator+(3d22f08efddf8107). "</font></b><br>" +cxx . . $ operator+(fab9b4f80031f353). |
| 415 | trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("Failed to replace profile", |
| 416 | "full phrase: 'Failed to replace profile <PROFILENAME>'")+cxx . . $ operator+(3d22f08efddf8107)." <b>" +cxx . . $ operator+(fab9b4f80031f353). newProfileName +cxx . . $ operator+(3d22f08efddf8107). "</b><br><font color=red>" |
| 417 | +cxx . . $ operator+(fab9b4f80031f353). newprofile.errorStringcxx . . $ QIODevice#errorString(6ef7b6c27b00b43d).() +cxx . . $ operator+(3d22f08efddf8107)."</font>"; |
| 418 | uicxx . . $ luckyBackupWindow#ui..textBrowser_infocxx . . $ Ui_luckyBackupWindow#textBrowser_info. -> setTextcxx . . $ QTextEdit#setText(3520e46b33348bf6).(InfoDatacxx . . $ luckyBackupWindow#InfoData.); //update the info window |
| 419 | return; |
| 420 | } |
| 421 | } |
| 422 | else |
| 423 | return; |
| 424 | } |
| 425 | |
| 426 | if (!profilecxx . . $ Global/profile..renamecxx . . $ QFile#rename(e1defb592416720d).(newProfile)) //try to rename the current profile |
| 427 | { |
| 428 | InfoDatacxx . . $ luckyBackupWindow#InfoData. =cxx . . $ QString#`operator=`(b79fde0b0ce9b948). "<font color=red><b>" +cxx . . $ operator+(c75c3ae4eb9af1a8). trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("ERROR") +cxx . . $ operator+(3d22f08efddf8107). "</font></b><br>" +cxx . . $ operator+(fab9b4f80031f353). |
| 429 | trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("Failed to rename profile", |
| 430 | "full phrase: 'Failed to rename profile <PROFILENAME>'")+cxx . . $ operator+(3d22f08efddf8107)." <b>" +cxx . . $ operator+(fab9b4f80031f353). profileNamecxx . . $ Global/profileName. +cxx . . $ operator+(3d22f08efddf8107). "</b><br><font color=red>" |
| 431 | +cxx . . $ operator+(fab9b4f80031f353). profilecxx . . $ Global/profile..errorStringcxx . . $ QIODevice#errorString(6ef7b6c27b00b43d).() +cxx . . $ operator+(3d22f08efddf8107)."</font>"; |
| 432 | uicxx . . $ luckyBackupWindow#ui..textBrowser_infocxx . . $ Ui_luckyBackupWindow#textBrowser_info. -> setTextcxx . . $ QTextEdit#setText(3520e46b33348bf6).(InfoDatacxx . . $ luckyBackupWindow#InfoData.); //update the info window |
| 433 | return; |
| 434 | } |
| 435 | if (currentProfilecxx . . $ Global/currentProfile. ==cxx . . $ `operator==`(5bc2975d2d751687). defaultProfilecxx . . $ Global/defaultProfile.) |
| 436 | { |
| 437 | InfoDatacxx . . $ luckyBackupWindow#InfoData..appendcxx . . $ QString#append(6a89d0b7f4d2681c).(trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("default profile","full phrase: 'default profile <PROFILENAME> renamed successfully to <NEWPROFILENAME>'.")); |
| 438 | defaultProfilecxx . . $ Global/defaultProfile. =cxx . . $ QString#`operator=`(b79fde0b0ce9b948). newProfile; |
| 439 | saveSettingscxx . . $ luckyBackupWindow#saveSettings(c9857a73d68e59ba).(); |
| 440 | } |
| 441 | else |
| 442 | InfoDatacxx . . $ luckyBackupWindow#InfoData..appendcxx . . $ QString#append(6a89d0b7f4d2681c).(trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("profile", "full phrase: 'profile <PROFILENAME> renamed successfully to <NEWPROFILENAME>'")); |
| 443 | |
| 444 | InfoDatacxx . . $ luckyBackupWindow#InfoData..appendcxx . . $ QString#append(6a89d0b7f4d2681c).(" <b>" +cxx . . $ operator+(c75c3ae4eb9af1a8). profileNamecxx . . $ Global/profileName. +cxx . . $ operator+(3d22f08efddf8107). "</b><br>...<font color=green>" +cxx . . $ operator+(fab9b4f80031f353). trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("renamed successfully to", |
| 445 | "full phrase: '(default) profile <PROFILENAME> renamed successfully to <NEWPROFILENAME>'") +cxx . . $ operator+(3d22f08efddf8107). "</font> <b>" +cxx . . $ operator+(fab9b4f80031f353). newProfileName +cxx . . $ operator+(3d22f08efddf8107)."</b>"); |
| 446 | |
| 447 | // update all relevant snap .changes as well as log files |
| 448 | if (arrangeLogSnapcxx . . $ luckyBackupWindow#arrangeLogSnap(5f0f93a7bce497de).(1,"rename"cxx . . $ QString#QString(85c52e162fed56f9).,newProfileNamecxx . . $ QString#QString(132dd6869045752b).)) |
| 449 | InfoDatacxx . . $ luckyBackupWindow#InfoData..appendcxx . . $ QString#append(6a89d0b7f4d2681c).("<br><br>" +cxx . . $ operator+(c75c3ae4eb9af1a8). trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("All relevant files (logs etc) have also been updated")); |
| 450 | else |
| 451 | InfoDatacxx . . $ luckyBackupWindow#InfoData..appendcxx . . $ QString#append(6a89d0b7f4d2681c).("<br><br>" +cxx . . $ operator+(c75c3ae4eb9af1a8). trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("Failed to update all relevant files (logs etc)")); |
| 452 | |
| 453 | setCurrentProfilecxx . . $ luckyBackupWindow#setCurrentProfile(7df51288a9ebd664).(newProfilecxx . . $ QString#QString(132dd6869045752b).); |
| 454 | createProfileCombocxx . . $ luckyBackupWindow#createProfileCombo(49f6e7a06ebc5aa8).(); // update the profile combobox with all existing profiles and set index to currentProfile |
| 455 | loadCurrentProfilecxx . . $ luckyBackupWindow#loadCurrentProfile(c9857a73d68e59ba).(); // load the current profile |
| 456 | uicxx . . $ luckyBackupWindow#ui..textBrowser_infocxx . . $ Ui_luckyBackupWindow#textBrowser_info. -> setTextcxx . . $ QTextEdit#setText(3520e46b33348bf6).(InfoDatacxx . . $ luckyBackupWindow#InfoData.); //update the info window |
| 457 | loadDatacxx . . $ luckyBackupWindow#loadData.=cxx . . $ QString#`operator=`(d02845eef0c33901).""; saveDatacxx . . $ luckyBackupWindow#saveData.=cxx . . $ QString#`operator=`(d02845eef0c33901).""; createDatacxx . . $ luckyBackupWindow#createData.=cxx . . $ QString#`operator=`(d02845eef0c33901).""; |
| 458 | |
| 459 | } |
| 460 | // deleteProfile ====================================================================================================================================== |
| 461 | // deletes the current profile |
| 462 | void luckyBackupWindowcxx . . $ luckyBackupWindow#::deleteCurrentProfilecxx . . $ luckyBackupWindow#deleteCurrentProfile(49f6e7a06ebc5aa8).() |
| 463 | { |
| 464 | InfoDatacxx . . $ luckyBackupWindow#InfoData.=cxx . . $ QString#`operator=`(d02845eef0c33901).""; |
| 465 | if (currentProfilecxx . . $ Global/currentProfile. ==cxx . . $ `operator==`(5bc2975d2d751687). defaultProfilecxx . . $ Global/defaultProfile.) |
| 466 | messagecxx . . $ Global/message. =cxx . . $ QString#`operator=`(b79fde0b0ce9b948). trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("Are you sure you want to delete the default profile", |
| 467 | "full phrase: 'Are you sure you want to delete the default profile: <PROFILENAME> ? (a new blank one, with the same name, will be created)'")+cxx . . $ operator+(3d22f08efddf8107). |
| 468 | ": <b>" +cxx . . $ operator+(fab9b4f80031f353). profileNamecxx . . $ Global/profileName. +cxx . . $ operator+(3d22f08efddf8107). "</b> ?<br>(" +cxx . . $ operator+(fab9b4f80031f353). |
| 469 | trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("a new blank one, with the same name, will be created", |
| 470 | "full phrase: 'Are you sure you want to delete the default profile: <PROFILENAME> ? (a new blank one, with the same name, will be created)'") +cxx . . $ operator+(3d22f08efddf8107).")"; |
| 471 | else |
| 472 | messagecxx . . $ Global/message. =cxx . . $ QString#`operator=`(b79fde0b0ce9b948). trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("Are you sure you want to delete profile", |
| 473 | "full phrase: 'Are you sure you want to delete profile: <PROFILENAME> ?'")+cxx . . $ operator+(3d22f08efddf8107).": <b>" +cxx . . $ operator+(fab9b4f80031f353). profileNamecxx . . $ Global/profileName. +cxx . . $ operator+(3d22f08efddf8107). "</b> ?"; |
| 474 | |
| 475 | textDialogcxx . . $ textDialog# textdialogQcxx . . $ textDialog#textDialog(9c8c077708043c75). ("QtQuestion"cxx . . $ QString#QString(85c52e162fed56f9)., messagecxx . . $ QString#QString(132dd6869045752b)., this); |
| 476 | textdialogQ.execcxx . . $ QDialog#exec(b126dc7c1de90089).(); |
| 477 | |
| 478 | if (textdialogQ.getGoOncxx . . $ textDialog#getGoOn(b126dc7c1de90089).() > 0) //if user answers yes |
| 479 | { |
| 480 | savedProfilecxx . . $ luckyBackupWindow#savedProfile. = true; //assume the profile is saved |
| 481 | //try to delete the profile |
| 482 | if (!profilecxx . . $ Global/profile..removecxx . . $ QFile#remove(c9857a73d68e59ba).()) |
| 483 | { |
| 484 | InfoDatacxx . . $ luckyBackupWindow#InfoData..appendcxx . . $ QString#append(6a89d0b7f4d2681c).("<font color=red><b>" +cxx . . $ operator+(c75c3ae4eb9af1a8). trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("ERROR") +cxx . . $ operator+(3d22f08efddf8107). "</font></b><br>" +cxx . . $ operator+(fab9b4f80031f353). |
| 485 | trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("Failed to delete profile", |
| 486 | "full phrase: 'Failed to delete profile <PROFILENAME>'")+cxx . . $ operator+(3d22f08efddf8107).": <b>" +cxx . . $ operator+(fab9b4f80031f353). profileNamecxx . . $ Global/profileName. +cxx . . $ operator+(3d22f08efddf8107). "</b><br><font color=red>" |
| 487 | +cxx . . $ operator+(fab9b4f80031f353). profilecxx . . $ Global/profile..errorStringcxx . . $ QIODevice#errorString(6ef7b6c27b00b43d).() +cxx . . $ operator+(3d22f08efddf8107)."</font><br>"); |
| 488 | uicxx . . $ luckyBackupWindow#ui..textBrowser_infocxx . . $ Ui_luckyBackupWindow#textBrowser_info. -> setTextcxx . . $ QTextEdit#setText(3520e46b33348bf6).(InfoDatacxx . . $ luckyBackupWindow#InfoData.); //update the info window |
| 489 | return; |
| 490 | } |
| 491 | |
| 492 | InfoDatacxx . . $ luckyBackupWindow#InfoData..appendcxx . . $ QString#append(6a89d0b7f4d2681c).(trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("Profile","full phrase: 'Profile <PROFILENAME> deleted successfully'") +cxx . . $ operator+(3d22f08efddf8107). |
| 493 | ": <b>" +cxx . . $ operator+(fab9b4f80031f353). profileNamecxx . . $ Global/profileName. +cxx . . $ operator+(3d22f08efddf8107). "</b><br>...<font color=green>" +cxx . . $ operator+(fab9b4f80031f353). |
| 494 | trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("deleted successfully","full phrase: 'Profile <PROFILENAME> deleted successfully'") +cxx . . $ operator+(3d22f08efddf8107). " !!</font><br>"); |
| 495 | |
| 496 | // delete all relevant snap .changes as well as log files |
| 497 | if (arrangeLogSnapcxx . . $ luckyBackupWindow#arrangeLogSnap(5f0f93a7bce497de).(1,"delete"cxx . . $ QString#QString(85c52e162fed56f9).,profileNamecxx . . $ QString#QString(132dd6869045752b).)) |
| 498 | InfoDatacxx . . $ luckyBackupWindow#InfoData..appendcxx . . $ QString#append(6a89d0b7f4d2681c).("<br>" +cxx . . $ operator+(c75c3ae4eb9af1a8). trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("All relevant files (logs etc) have also been deleted") +cxx . . $ operator+(3d22f08efddf8107). "<br>"); |
| 499 | else |
| 500 | InfoDatacxx . . $ luckyBackupWindow#InfoData..appendcxx . . $ QString#append(6a89d0b7f4d2681c).("<br>" +cxx . . $ operator+(c75c3ae4eb9af1a8). trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("Failed to delete all relevant files (logs etc)") +cxx . . $ operator+(3d22f08efddf8107). "<br>"); |
| 501 | |
| 502 | // Load the default profile |
| 503 | setCurrentProfilecxx . . $ luckyBackupWindow#setCurrentProfile(7df51288a9ebd664).(defaultProfilecxx . . $ QString#QString(132dd6869045752b).); // set the defaultProfile as current |
| 504 | int create = createCurrentProfilecxx . . $ luckyBackupWindow#createCurrentProfile(b126dc7c1de90089).(); // if it does not exist create it |
| 505 | loadCurrentProfilecxx . . $ luckyBackupWindow#loadCurrentProfile(c9857a73d68e59ba).(); // load the current (default) profile |
| 506 | createProfileCombocxx . . $ luckyBackupWindow#createProfileCombo(49f6e7a06ebc5aa8).(); // update the profile combobox with all existing profiles and set index to currentProfile |
| 507 | |
| 508 | if (create == 0) |
| 509 | InfoDatacxx . . $ luckyBackupWindow#InfoData..appendcxx . . $ QString#append(6a89d0b7f4d2681c).(loadDatacxx . . $ luckyBackupWindow#loadData.); |
| 510 | else |
| 511 | InfoDatacxx . . $ luckyBackupWindow#InfoData..appendcxx . . $ QString#append(6a89d0b7f4d2681c).(createDatacxx . . $ luckyBackupWindow#createData.); |
| 512 | uicxx . . $ luckyBackupWindow#ui..textBrowser_infocxx . . $ Ui_luckyBackupWindow#textBrowser_info. -> setTextcxx . . $ QTextEdit#setText(3520e46b33348bf6).(InfoDatacxx . . $ luckyBackupWindow#InfoData.); //update the info window |
| 513 | loadDatacxx . . $ luckyBackupWindow#loadData.=cxx . . $ QString#`operator=`(d02845eef0c33901).""; saveDatacxx . . $ luckyBackupWindow#saveData.=cxx . . $ QString#`operator=`(d02845eef0c33901).""; createDatacxx . . $ luckyBackupWindow#createData.=cxx . . $ QString#`operator=`(d02845eef0c33901).""; |
| 514 | } |
| 515 | } |
| 516 | |
| 517 | |
| 518 | // setDefaultProfile ================================================================================================================================ |
| 519 | // sets the current profile as default |
| 520 | void luckyBackupWindowcxx . . $ luckyBackupWindow#::setDefaultProfilecxx . . $ luckyBackupWindow#setDefaultProfile(49f6e7a06ebc5aa8).() |
| 521 | { |
| 522 | InfoDatacxx . . $ luckyBackupWindow#InfoData. =cxx . . $ QString#`operator=`(d02845eef0c33901). ""; |
| 523 | |
| 524 | defaultProfilecxx . . $ Global/defaultProfile. =cxx . . $ QString#`operator=`(b79fde0b0ce9b948). currentProfilecxx . . $ Global/currentProfile.; |
| 525 | saveSettingscxx . . $ luckyBackupWindow#saveSettings(c9857a73d68e59ba).(); |
| 526 | InfoDatacxx . . $ luckyBackupWindow#InfoData..appendcxx . . $ QString#append(6a89d0b7f4d2681c).(trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("Profile","full phrase: 'Profile <PROFILENAME> set as default'") +cxx . . $ operator+(3d22f08efddf8107). ": <b>" +cxx . . $ operator+(fab9b4f80031f353). profileNamecxx . . $ Global/profileName. +cxx . . $ operator+(3d22f08efddf8107). "</b><br>...<font color=green>" +cxx . . $ operator+(fab9b4f80031f353). trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("set as default","full phrase: 'Profile <PROFILENAME> set as default'") +cxx . . $ operator+(3d22f08efddf8107). " !!</font><br>"); |
| 527 | uicxx . . $ luckyBackupWindow#ui..textBrowser_infocxx . . $ Ui_luckyBackupWindow#textBrowser_info. -> setTextcxx . . $ QTextEdit#setText(3520e46b33348bf6).(InfoDatacxx . . $ luckyBackupWindow#InfoData.); //update the info window |
| 528 | } |
| 529 | |
| 530 | // duplicateProfile ================================================================================================================================ |
| 531 | // duplicates the current profile |
| 532 | void luckyBackupWindowcxx . . $ luckyBackupWindow#::duplicateProfilecxx . . $ luckyBackupWindow#duplicateProfile(49f6e7a06ebc5aa8).() |
| 533 | { |
| 534 | InfoDatacxx . . $ luckyBackupWindow#InfoData.=cxx . . $ QString#`operator=`(d02845eef0c33901).""; |
| 535 | |
| 536 | textDialogcxx . . $ textDialog# textdialogcxx . . $ textDialog#textDialog(9c8c077708043c75). ("RenameProfile"cxx . . $ QString#QString(85c52e162fed56f9)., profileNamecxx . . $ QString#QString(132dd6869045752b)., this); |
| 537 | textdialog.execcxx . . $ QDialog#exec(b126dc7c1de90089).(); |
| 538 | if (textdialog.getGoOncxx . . $ textDialog#getGoOn(b126dc7c1de90089).() == 0) |
| 539 | return; |
| 540 | |
| 541 | if (textdialog.getGoOncxx . . $ textDialog#getGoOn(b126dc7c1de90089).() == 2) |
| 542 | { |
| 543 | InfoDatacxx . . $ luckyBackupWindow#InfoData. =cxx . . $ QString#`operator=`(b79fde0b0ce9b948). trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("Failed to duplicate profile","full phrase: 'Failed to duplicate profile <PROFILENAME>'")+cxx . . $ operator+(3d22f08efddf8107). |
| 544 | " <b>" +cxx . . $ operator+(fab9b4f80031f353). profileNamecxx . . $ Global/profileName. +cxx . . $ operator+(3d22f08efddf8107). "</b><br><font color=red>" |
| 545 | +cxx . . $ operator+(3d22f08efddf8107). "The name you have entered contains only invalid characters" +cxx . . $ operator+(3d22f08efddf8107)."</font>"; |
| 546 | uicxx . . $ luckyBackupWindow#ui..textBrowser_infocxx . . $ Ui_luckyBackupWindow#textBrowser_info. -> setTextcxx . . $ QTextEdit#setText(3520e46b33348bf6).(InfoDatacxx . . $ luckyBackupWindow#InfoData.); //update the info window |
| 547 | return; |
| 548 | } |
| 549 | |
| 550 | QStringcxx . . $ QString# duplicateProfileName = textdialog.getUserInputcxx . . $ textDialog#getUserInput(4365c3963150523e).(); |
| 551 | QStringcxx . . $ QString# duplicateProfile = profileDircxx . . $ Global/profileDir. +cxx . . $ operator+(fab9b4f80031f353). duplicateProfileName +cxx . . $ operator+(3d22f08efddf8107). ".profile"; |
| 552 | |
| 553 | //check if it exists and ask to replace |
| 554 | QFilecxx . . $ QFile# duplicateprofilecxx . . $ QFile#QFile(49f6e7a06ebc5aa8).; |
| 555 | duplicateprofile.setFileNamecxx . . $ QFile#setFileName(3520e46b33348bf6).(duplicateProfile); |
| 556 | |
| 557 | if (duplicateprofile.existscxx . . $ QFile#exists(50ce9a9e25b4a850).()) //if the duplicateprofile already exists ask to replace |
| 558 | { |
| 559 | messagecxx . . $ Global/message. =cxx . . $ QString#`operator=`(b79fde0b0ce9b948). trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("Profile","full phrase: 'Profile <PROFILENAME> already exists'")+cxx . . $ operator+(3d22f08efddf8107)." <b>" +cxx . . $ operator+(fab9b4f80031f353). duplicateProfileName +cxx . . $ operator+(3d22f08efddf8107). "</b> " +cxx . . $ operator+(fab9b4f80031f353). |
| 560 | trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("already exists","full phrase: 'Profile <PROFILENAME> already exists'") +cxx . . $ operator+(3d22f08efddf8107). "<br>" +cxx . . $ operator+(fab9b4f80031f353). |
| 561 | trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("Would you like to replace it ?"); |
| 562 | textDialogcxx . . $ textDialog# textdialogQcxx . . $ textDialog#textDialog(9c8c077708043c75). ("QtQuestion"cxx . . $ QString#QString(85c52e162fed56f9)., messagecxx . . $ QString#QString(132dd6869045752b)., this); |
| 563 | textdialogQ.execcxx . . $ QDialog#exec(b126dc7c1de90089).(); |
| 564 | |
| 565 | if (textdialogQ.getGoOncxx . . $ textDialog#getGoOn(b126dc7c1de90089).() > 0) //if user answers yes |
| 566 | { |
| 567 | if (!duplicateprofile.removecxx . . $ QFile#remove(c9857a73d68e59ba).()) // delete the old profile or display a message if you can't |
| 568 | { |
| 569 | InfoDatacxx . . $ luckyBackupWindow#InfoData. =cxx . . $ QString#`operator=`(b79fde0b0ce9b948). "<font color=red><b>" +cxx . . $ operator+(c75c3ae4eb9af1a8). trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("ERROR") +cxx . . $ operator+(3d22f08efddf8107). "</font></b><br>" +cxx . . $ operator+(fab9b4f80031f353). |
| 570 | trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("Failed to replace profile", |
| 571 | "full phrase: 'Failed to replace profile <PROFILENAME>'")+cxx . . $ operator+(3d22f08efddf8107)." <b>" +cxx . . $ operator+(fab9b4f80031f353). duplicateProfileName +cxx . . $ operator+(3d22f08efddf8107). "</b><br><font color=red>" |
| 572 | +cxx . . $ operator+(fab9b4f80031f353). duplicateprofile.errorStringcxx . . $ QIODevice#errorString(6ef7b6c27b00b43d).() +cxx . . $ operator+(3d22f08efddf8107)."</font>"; |
| 573 | uicxx . . $ luckyBackupWindow#ui..textBrowser_infocxx . . $ Ui_luckyBackupWindow#textBrowser_info. -> setTextcxx . . $ QTextEdit#setText(3520e46b33348bf6).(InfoDatacxx . . $ luckyBackupWindow#InfoData.); //update the info window |
| 574 | return; |
| 575 | } |
| 576 | } |
| 577 | else |
| 578 | return; |
| 579 | } |
| 580 | |
| 581 | if (!saveProfilecxx . . $ Global/saveProfile(7dc6c9a0b6a7270f).(duplicateProfilecxx . . $ QString#QString(132dd6869045752b).)) //try to save the new (duplicate) profile |
| 582 | { |
| 583 | InfoDatacxx . . $ luckyBackupWindow#InfoData. =cxx . . $ QString#`operator=`(b79fde0b0ce9b948). "<font color=red><b>" +cxx . . $ operator+(c75c3ae4eb9af1a8). trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("ERROR") +cxx . . $ operator+(3d22f08efddf8107). "</font></b><br>" +cxx . . $ operator+(fab9b4f80031f353). |
| 584 | trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("Failed to duplicate profile","full phrase: 'Failed to duplicate profile <PROFILENAME> as <FILENAME>'")+cxx . . $ operator+(3d22f08efddf8107). |
| 585 | " <b>" +cxx . . $ operator+(fab9b4f80031f353). profileNamecxx . . $ Global/profileName. +cxx . . $ operator+(3d22f08efddf8107). "</b><br>" |
| 586 | +cxx . . $ operator+(fab9b4f80031f353).trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("as","full phrase: 'Failed to duplicate profile <PROFILENAME> as <FILENAME>'")+cxx . . $ operator+(3d22f08efddf8107). |
| 587 | " <b>" +cxx . . $ operator+(fab9b4f80031f353). duplicateProfileName +cxx . . $ operator+(3d22f08efddf8107)."</b><br><font color=red>" |
| 588 | +cxx . . $ operator+(fab9b4f80031f353). profilecxx . . $ Global/profile..errorStringcxx . . $ QIODevice#errorString(6ef7b6c27b00b43d).() +cxx . . $ operator+(3d22f08efddf8107)."</font>"; |
| 589 | uicxx . . $ luckyBackupWindow#ui..textBrowser_infocxx . . $ Ui_luckyBackupWindow#textBrowser_info. -> setTextcxx . . $ QTextEdit#setText(3520e46b33348bf6).(InfoDatacxx . . $ luckyBackupWindow#InfoData.); //update the info window |
| 590 | setCurrentProfilecxx . . $ luckyBackupWindow#setCurrentProfile(7df51288a9ebd664).(currentProfilecxx . . $ QString#QString(132dd6869045752b).); //reset all currentProfile variables |
| 591 | return; |
| 592 | } |
| 593 | |
| 594 | InfoDatacxx . . $ luckyBackupWindow#InfoData..appendcxx . . $ QString#append(6a89d0b7f4d2681c).(trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("Profile","full phrase: 'Profile <PROFILENAME> duplicated successfully as <FILENAME>'") +cxx . . $ operator+(3d22f08efddf8107). ": <b>" +cxx . . $ operator+(fab9b4f80031f353). |
| 595 | profileNamecxx . . $ Global/profileName. +cxx . . $ operator+(3d22f08efddf8107). "</b><br>...<font color=green>" |
| 596 | +cxx . . $ operator+(fab9b4f80031f353). trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("duplicated successfully as","full phrase: 'Profile <PROFILENAME> duplicated successfully as <FILENAME>'") +cxx . . $ operator+(3d22f08efddf8107). |
| 597 | "</font> <b>" +cxx . . $ operator+(fab9b4f80031f353). duplicateProfileName +cxx . . $ operator+(3d22f08efddf8107)."</b>"); |
| 598 | |
| 599 | // duplicate all relevant snap .changes as well as log files |
| 600 | if (arrangeLogSnapcxx . . $ luckyBackupWindow#arrangeLogSnap(5f0f93a7bce497de).(1,"duplicate"cxx . . $ QString#QString(85c52e162fed56f9).,duplicateProfileNamecxx . . $ QString#QString(132dd6869045752b).)) |
| 601 | InfoDatacxx . . $ luckyBackupWindow#InfoData..appendcxx . . $ QString#append(6a89d0b7f4d2681c).("<br><br>" +cxx . . $ operator+(c75c3ae4eb9af1a8). trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("All relevant files (logs etc) have also been duplicated")); |
| 602 | else |
| 603 | InfoDatacxx . . $ luckyBackupWindow#InfoData..appendcxx . . $ QString#append(6a89d0b7f4d2681c).("<br><br>" +cxx . . $ operator+(c75c3ae4eb9af1a8). trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("Failed to duplicate all relevant files (logs etc)")); |
| 604 | |
| 605 | setCurrentProfilecxx . . $ luckyBackupWindow#setCurrentProfile(7df51288a9ebd664).(currentProfilecxx . . $ QString#QString(132dd6869045752b).); //reset all currentProfile variables |
| 606 | createProfileCombocxx . . $ luckyBackupWindow#createProfileCombo(49f6e7a06ebc5aa8).(); // update the profile combobox with all existing profiles and set index to currentProfile |
| 607 | uicxx . . $ luckyBackupWindow#ui..textBrowser_infocxx . . $ Ui_luckyBackupWindow#textBrowser_info. -> setTextcxx . . $ QTextEdit#setText(3520e46b33348bf6).(InfoDatacxx . . $ luckyBackupWindow#InfoData.); //update the info window |
| 608 | loadDatacxx . . $ luckyBackupWindow#loadData.=cxx . . $ QString#`operator=`(d02845eef0c33901).""; saveDatacxx . . $ luckyBackupWindow#saveData.=cxx . . $ QString#`operator=`(d02845eef0c33901).""; createDatacxx . . $ luckyBackupWindow#createData.=cxx . . $ QString#`operator=`(d02845eef0c33901).""; |
| 609 | } |
| 610 | |
| 611 | // changeProfileDescription ================================================================================================================================ |
| 612 | // Changes the profile description |
| 613 | void luckyBackupWindowcxx . . $ luckyBackupWindow#::changeProfileDescriptioncxx . . $ luckyBackupWindow#changeProfileDescription(49f6e7a06ebc5aa8).() |
| 614 | { |
| 615 | InfoDatacxx . . $ luckyBackupWindow#InfoData.=cxx . . $ QString#`operator=`(d02845eef0c33901).""; |
| 616 | |
| 617 | textDialogcxx . . $ textDialog# textdialogcxx . . $ textDialog#textDialog(9c8c077708043c75). ("ProfileDescription"cxx . . $ QString#QString(85c52e162fed56f9)., profileDescriptioncxx . . $ QString#QString(132dd6869045752b)., this); |
| 618 | textdialog.execcxx . . $ QDialog#exec(b126dc7c1de90089).(); |
| 619 | |
| 620 | if (textdialog.getGoOncxx . . $ textDialog#getGoOn(b126dc7c1de90089).() == 0) |
| 621 | return; |
| 622 | |
| 623 | profileDescriptioncxx . . $ Global/profileDescription. =cxx . . $ QString#`operator=`(4f35bf974e7f8568). textdialog.getUserInputcxx . . $ textDialog#getUserInput(4365c3963150523e).(); |
| 624 | |
| 625 | QStringcxx . . $ QString# profileDescriptionDisplay = profileDescriptioncxx . . $ QString#QString(132dd6869045752b).; |
| 626 | profileDescriptionDisplay.replacecxx . . $ QString#replace(192e628656427d1c).("\n"cxx . . $ QString#QString(85c52e162fed56f9).,"<br>"cxx . . $ QString#QString(85c52e162fed56f9).); |
| 627 | |
| 628 | |
| 629 | InfoDatacxx . . $ luckyBackupWindow#InfoData..appendcxx . . $ QString#append(6a89d0b7f4d2681c).(trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("The description of profile","full phrase: 'The description of profile <PROFILENAME> set to: <DESCRIPTION>'") +cxx . . $ operator+(3d22f08efddf8107). " <b>" +cxx . . $ operator+(fab9b4f80031f353). profileNamecxx . . $ Global/profileName. +cxx . . $ operator+(3d22f08efddf8107). "</b> " +cxx . . $ operator+(fab9b4f80031f353). trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("set to","full phrase: 'The description of profile <PROFILENAME> set to: <DESCRIPTION>'") +cxx . . $ operator+(3d22f08efddf8107). |
| 630 | ":<br>" +cxx . . $ operator+(fab9b4f80031f353). profileDescriptionDisplay); |
| 631 | |
| 632 | uicxx . . $ luckyBackupWindow#ui..textBrowser_infocxx . . $ Ui_luckyBackupWindow#textBrowser_info. -> setTextcxx . . $ QTextEdit#setText(3520e46b33348bf6).(InfoDatacxx . . $ luckyBackupWindow#InfoData.); //update the info window |
| 633 | savedProfilecxx . . $ luckyBackupWindow#savedProfile. = false; //change profile status to "unsaved" |
| 634 | uicxx . . $ luckyBackupWindow#ui..actionSavecxx . . $ Ui_luckyBackupWindow#actionSave. -> setEnabledcxx . . $ QAction#setEnabled(b45ddcbc8423892c).(true); |
| 635 | } |
| 636 | |
| 637 | // duplicateTask ================================================================================================================================ |
| 638 | // duplicates the current task (creates a new task - same as selected - and opens modify dialog) |
| 639 | void luckyBackupWindowcxx . . $ luckyBackupWindow#::duplicateTaskcxx . . $ luckyBackupWindow#duplicateTask(49f6e7a06ebc5aa8).() |
| 640 | { |
| 641 | modifyOKcxx . . $ Global/modifyOK. = false; |
| 642 | modifyConnectedcxx . . $ Global/modifyConnected. = false; |
| 643 | newTaskThisIscxx . . $ Global/newTaskThisIs. = true; |
| 644 | |
| 645 | currentOperationcxx . . $ Global/currentOperation. = uicxx . . $ luckyBackupWindow#ui..listWidget_operationscxx . . $ Ui_luckyBackupWindow#listWidget_operations. -> currentRowcxx . . $ QListWidget#currentRow(455f465bc33b4cdf).(); //current task list row number |
| 646 | if (currentOperationcxx . . $ Global/currentOperation. < 0) //if nothing is selected do nothing |
| 647 | { |
| 648 | InfoDatacxx . . $ luckyBackupWindow#InfoData. =cxx . . $ QString#`operator=`(b79fde0b0ce9b948). trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("Please select a task to duplicate first") +cxx . . $ operator+(3d22f08efddf8107). " !!"; |
| 649 | uicxx . . $ luckyBackupWindow#ui..textBrowser_infocxx . . $ Ui_luckyBackupWindow#textBrowser_info. -> setTextcxx . . $ QTextEdit#setText(3520e46b33348bf6).(InfoDatacxx . . $ luckyBackupWindow#InfoData.); |
| 650 | return; |
| 651 | } |
| 652 | int oldCurrentOperation = currentOperationcxx . . $ Global/currentOperation.; |
| 653 | |
| 654 | TotalOperationscxx . . $ Global/TotalOperations. = uicxx . . $ luckyBackupWindow#ui..listWidget_operationscxx . . $ Ui_luckyBackupWindow#listWidget_operations. -> countcxx . . $ QListWidget#count(455f465bc33b4cdf).(); //Get the Operations list size |
| 655 | if ( (TotalOperationscxx . . $ Global/TotalOperations.) >= (maxOperationscxx . . $ Global/maxOperations.-1) ) //if the maxOperations limit-1 is reached |
| 656 | { |
| 657 | textDialogcxx . . $ textDialog# textdialogWcxx . . $ textDialog#textDialog(9c8c077708043c75). ("QtWarning"cxx . . $ QString#QString(85c52e162fed56f9)., |
| 658 | trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("You have reached the maximum limit of supported tasks")+cxx . . $ operator+(3d22f08efddf8107)." <br><br>" +cxx . . $ operator+(fab9b4f80031f353). |
| 659 | trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("You have to remove a task if you wish to add another !!"), this); |
| 660 | textdialogW.execcxx . . $ QDialog#exec(b126dc7c1de90089).(); |
| 661 | return; |
| 662 | } |
| 663 | |
| 664 | currentOperationcxx . . $ Global/currentOperation. = TotalOperationscxx . . $ Global/TotalOperations.; |
| 665 | |
| 666 | //Create a new array item identical to the one just created |
| 667 | operationcxx . . $ operation# *tempOp = new operationcxx . . $ operation#operation(49f6e7a06ebc5aa8).; |
| 668 | *tempOp =cxx . . $ operation#`operator=`(4c91bb2aa5da5e06). *Operationcxx . . $ Global/Operation.[oldCurrentOperation]; |
| 669 | Operationcxx . . $ Global/Operation.[currentOperationcxx . . $ Global/currentOperation.] = tempOp; |
| 670 | |
| 671 | // Reset the last execution time/errors & clear its snapshots list |
| 672 | QDateTimecxx . . $ QDateTime# newTimecxx . . $ QDateTime#QDateTime(ced63f7c635d850d).; // empty time variable |
| 673 | Operationcxx . . $ Global/Operation.[currentOperationcxx . . $ Global/currentOperation.] -> SetLastExecutionTimecxx . . $ operation#SetLastExecutionTime(738e092a5192a79). (newTimecxx . . $ QDateTime#QDateTime(5da15eb5af6b9895).); |
| 674 | Operationcxx . . $ Global/Operation.[currentOperationcxx . . $ Global/currentOperation.] -> SetLastExecutionErrorscxx . . $ operation#SetLastExecutionErrors(d4f767463ce0a6b3). (-1); |
| 675 | Operationcxx . . $ Global/Operation.[currentOperationcxx . . $ Global/currentOperation.] -> ClearSnapshotsListcxx . . $ operation#ClearSnapshotsList(49f6e7a06ebc5aa8).(); |
| 676 | |
| 677 | //Change the task name and remove any RESTORE connections |
| 678 | Operationcxx . . $ Global/Operation.[currentOperationcxx . . $ Global/currentOperation.] -> SetNamecxx . . $ operation#SetName(7df51288a9ebd664). ((Operationcxx . . $ Global/Operation.[currentOperationcxx . . $ Global/currentOperation.] -> GetNamecxx . . $ operation#GetName(6ef7b6c27b00b43d).()) +cxx . . $ operator+(3d22f08efddf8107). " DUPLICATE"); |
| 679 | Operationcxx . . $ Global/Operation.[currentOperationcxx . . $ Global/currentOperation.] -> SetConnectRestorecxx . . $ operation#SetConnectRestore(7df51288a9ebd664).(""cxx . . $ QString#QString(85c52e162fed56f9).); |
| 680 | |
| 681 | //add a new item in the operations list |
| 682 | uicxx . . $ luckyBackupWindow#ui..listWidget_operationscxx . . $ Ui_luckyBackupWindow#listWidget_operations. -> addItemcxx . . $ QListWidget#addItem(3520e46b33348bf6).( Operationcxx . . $ Global/Operation.[currentOperationcxx . . $ Global/currentOperation.] -> GetNamecxx . . $ operation#GetName(6ef7b6c27b00b43d).() ); |
| 683 | uicxx . . $ luckyBackupWindow#ui..listWidget_operationscxx . . $ Ui_luckyBackupWindow#listWidget_operations. -> setCurrentRowcxx . . $ QListWidget#setCurrentRow(d4f767463ce0a6b3).(currentOperationcxx . . $ Global/currentOperation.); |
| 684 | uicxx . . $ luckyBackupWindow#ui..listWidget_operationscxx . . $ Ui_luckyBackupWindow#listWidget_operations. -> currentItemcxx . . $ QListWidget#currentItem(a843e491ce3ee2b1).() -> setCheckStatecxx . . $ QListWidgetItem#setCheckState(537692883700039).(Qtcxx . . $ Qt/::Uncheckedcxx . . $ Qt/Unchecked.); |
| 685 | TotalOperationscxx . . $ Global/TotalOperations. = uicxx . . $ luckyBackupWindow#ui..listWidget_operationscxx . . $ Ui_luckyBackupWindow#listWidget_operations. -> countcxx . . $ QListWidget#count(455f465bc33b4cdf).(); //set the TotalOperations to what it is now |
| 686 | |
| 687 | saveOrNotcxx . . $ luckyBackupWindow#saveOrNot.=false; |
| 688 | modifycxx . . $ luckyBackupWindow#modify(49f6e7a06ebc5aa8).(); //open the modify dialog for the new task, false == do not save the result |
| 689 | saveOrNotcxx . . $ luckyBackupWindow#saveOrNot. = true; |
| 690 | |
| 691 | if (modifyOKcxx . . $ Global/modifyOK.) |
| 692 | { |
| 693 | savedProfilecxx . . $ luckyBackupWindow#savedProfile. = false; //change profile status to "unsaved" |
| 694 | uicxx . . $ luckyBackupWindow#ui..actionSavecxx . . $ Ui_luckyBackupWindow#actionSave. -> setEnabledcxx . . $ QAction#setEnabled(b45ddcbc8423892c).(true); |
| 695 | } |
| 696 | else |
| 697 | { |
| 698 | //remove already created DUPLICATE TASK from operations list |
| 699 | uicxx . . $ luckyBackupWindow#ui..listWidget_operationscxx . . $ Ui_luckyBackupWindow#listWidget_operations. -> takeItemcxx . . $ QListWidget#takeItem(ffbac97cfc278ea8).(currentOperationcxx . . $ Global/currentOperation.); //take out the selected item from the list |
| 700 | TotalOperationscxx . . $ Global/TotalOperations. = uicxx . . $ luckyBackupWindow#ui..listWidget_operationscxx . . $ Ui_luckyBackupWindow#listWidget_operations. -> countcxx . . $ QListWidget#count(455f465bc33b4cdf).(); //TotalOperations takes the new value (old - 1) |
| 701 | } |
| 702 | } |
| 703 | |
| 704 | // AlsoCreateRestore ================================================================================================================================ |
| 705 | //create another operation for RESTORE |
| 706 | void luckyBackupWindowcxx . . $ luckyBackupWindow#::AlsoCreateRestorecxx . . $ luckyBackupWindow#AlsoCreateRestore(49f6e7a06ebc5aa8).() |
| 707 | { |
| 708 | newTaskThisIscxx . . $ Global/newTaskThisIs. = true; |
| 709 | int oldCurrentOperation = uicxx . . $ luckyBackupWindow#ui..listWidget_operationscxx . . $ Ui_luckyBackupWindow#listWidget_operations. -> currentRowcxx . . $ QListWidget#currentRow(455f465bc33b4cdf).(); //current task list row number; |
| 710 | |
| 711 | if (oldCurrentOperation < 0) //if nothing is selected do nothing |
| 712 | { |
| 713 | InfoDatacxx . . $ luckyBackupWindow#InfoData. =cxx . . $ QString#`operator=`(b79fde0b0ce9b948). trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("Please select a task first") +cxx . . $ operator+(3d22f08efddf8107). " !!"; |
| 714 | uicxx . . $ luckyBackupWindow#ui..textBrowser_infocxx . . $ Ui_luckyBackupWindow#textBrowser_info. -> setTextcxx . . $ QTextEdit#setText(3520e46b33348bf6).(InfoDatacxx . . $ luckyBackupWindow#InfoData.); |
| 715 | return; |
| 716 | } |
| 717 | |
| 718 | TotalOperationscxx . . $ Global/TotalOperations. = uicxx . . $ luckyBackupWindow#ui..listWidget_operationscxx . . $ Ui_luckyBackupWindow#listWidget_operations. -> countcxx . . $ QListWidget#count(455f465bc33b4cdf).(); //Get the Operations list size |
| 719 | if ( (TotalOperationscxx . . $ Global/TotalOperations.) >= (maxOperationscxx . . $ Global/maxOperations.-1) ) //if the maxOperations limit-1 is reached |
| 720 | { |
| 721 | textDialogcxx . . $ textDialog# textdialogWcxx . . $ textDialog#textDialog(9c8c077708043c75). ("QtWarning"cxx . . $ QString#QString(85c52e162fed56f9)., |
| 722 | trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("You have reached the maximum limit of supported tasks")+cxx . . $ operator+(3d22f08efddf8107)." <br><br>" +cxx . . $ operator+(fab9b4f80031f353). |
| 723 | trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("You have to remove a task if you wish to add another !!"), this); |
| 724 | textdialogW.execcxx . . $ QDialog#exec(b126dc7c1de90089).(); |
| 725 | return; |
| 726 | } |
| 727 | |
| 728 | currentOperationcxx . . $ Global/currentOperation. = TotalOperationscxx . . $ Global/TotalOperations.; |
| 729 | |
| 730 | //Create a new array item identical to the one just created |
| 731 | operationcxx . . $ operation# *tempOp = new operationcxx . . $ operation#operation(49f6e7a06ebc5aa8).; |
| 732 | *tempOp =cxx . . $ operation#`operator=`(4c91bb2aa5da5e06). *Operationcxx . . $ Global/Operation.[oldCurrentOperation]; |
| 733 | Operationcxx . . $ Global/Operation.[currentOperationcxx . . $ Global/currentOperation.] = tempOp; |
| 734 | |
| 735 | // Reset the last execution time/errors & clear its snapshots list |
| 736 | QDateTimecxx . . $ QDateTime# newTimecxx . . $ QDateTime#QDateTime(ced63f7c635d850d).; // empty time variable |
| 737 | Operationcxx . . $ Global/Operation.[currentOperationcxx . . $ Global/currentOperation.] -> SetLastExecutionTimecxx . . $ operation#SetLastExecutionTime(738e092a5192a79). (newTimecxx . . $ QDateTime#QDateTime(5da15eb5af6b9895).); |
| 738 | Operationcxx . . $ Global/Operation.[currentOperationcxx . . $ Global/currentOperation.] -> SetLastExecutionErrorscxx . . $ operation#SetLastExecutionErrors(d4f767463ce0a6b3). (-1); |
| 739 | Operationcxx . . $ Global/Operation.[currentOperationcxx . . $ Global/currentOperation.] -> ClearSnapshotsListcxx . . $ operation#ClearSnapshotsList(49f6e7a06ebc5aa8).(); |
| 740 | |
| 741 | //Change its name, source, destination, update checkbox, Remote Host radiobuttons |
| 742 | Operationcxx . . $ Global/Operation.[currentOperationcxx . . $ Global/currentOperation.] -> SetNamecxx . . $ operation#SetName(7df51288a9ebd664). ("RESTORE - " +cxx . . $ operator+(c75c3ae4eb9af1a8). (Operationcxx . . $ Global/Operation.[currentOperationcxx . . $ Global/currentOperation.] -> GetNamecxx . . $ operation#GetName(6ef7b6c27b00b43d).())); |
| 743 | Operationcxx . . $ Global/Operation.[currentOperationcxx . . $ Global/currentOperation.] -> SetOptionsUpdatecxx . . $ operation#SetOptionsUpdate(b45ddcbc8423892c).(false); |
| 744 | Operationcxx . . $ Global/Operation.[currentOperationcxx . . $ Global/currentOperation.] -> SetOptionsDeletecxx . . $ operation#SetOptionsDelete(b45ddcbc8423892c).(false); |
| 745 | Operationcxx . . $ Global/Operation.[currentOperationcxx . . $ Global/currentOperation.] -> SetKeepSnapshotscxx . . $ operation#SetKeepSnapshots(d4f767463ce0a6b3).(1); |
| 746 | Operationcxx . . $ Global/Operation.[currentOperationcxx . . $ Global/currentOperation.] -> SetRemoteDestinationcxx . . $ operation#SetRemoteDestination(b45ddcbc8423892c).(Operationcxx . . $ Global/Operation.[oldCurrentOperation]-> GetRemoteSourcecxx . . $ operation#GetRemoteSource(50ce9a9e25b4a850).()); |
| 747 | Operationcxx . . $ Global/Operation.[currentOperationcxx . . $ Global/currentOperation.] -> SetRemoteSourcecxx . . $ operation#SetRemoteSource(b45ddcbc8423892c).(Operationcxx . . $ Global/Operation.[oldCurrentOperation]-> GetRemoteDestinationcxx . . $ operation#GetRemoteDestination(50ce9a9e25b4a850).()); |
| 748 | QStringcxx . . $ QString# sourceDir = Operationcxx . . $ Global/Operation.[oldCurrentOperation] -> GetDestinationcxx . . $ operation#GetDestination(6ef7b6c27b00b43d).(); |
| 749 | QStringcxx . . $ QString# destDir = Operationcxx . . $ Global/Operation.[oldCurrentOperation] -> GetSourcecxx . . $ operation#GetSource(6ef7b6c27b00b43d).(); |
| 750 | |
| 751 | if (Operationcxx . . $ Global/Operation.[currentOperationcxx . . $ Global/currentOperation.] -> GetTypeDirNamecxx . . $ operation#GetTypeDirName(50ce9a9e25b4a850).()) |
| 752 | { |
| 753 | if (WINrunningcxx . . $ Global/WINrunning. && Operationcxx . . $ Global/Operation.[currentOperationcxx . . $ Global/currentOperation.] -> GetRemotecxx . . $ operation#GetRemote(50ce9a9e25b4a850).()) |
| 754 | { |
| 755 | sourceDir.appendcxx . . $ QString#append(6a89d0b7f4d2681c).(destDir.rightcxx . . $ QString#right(3f3c3d0e9c0eb37f).(destDir.sizecxx . . $ QString#size(455f465bc33b4cdf).() - destDir.lastIndexOfcxx . . $ QString#lastIndexOf(a1e52806cd31c200).(XnixSLASHcxx . . $ Global/XnixSLASH.) - 1)); |
| 756 | destDir.chopcxx . . $ QString#chop(d4f767463ce0a6b3).(destDir.sizecxx . . $ QString#size(455f465bc33b4cdf).() - destDir.lastIndexOfcxx . . $ QString#lastIndexOf(a1e52806cd31c200).(XnixSLASHcxx . . $ Global/XnixSLASH.) - 1); |
| 757 | } |
| 758 | else |
| 759 | { |
| 760 | sourceDir.appendcxx . . $ QString#append(6a89d0b7f4d2681c).(destDir.rightcxx . . $ QString#right(3f3c3d0e9c0eb37f).(destDir.sizecxx . . $ QString#size(455f465bc33b4cdf).() - destDir.lastIndexOfcxx . . $ QString#lastIndexOf(a1e52806cd31c200).(SLASHcxx . . $ Global/SLASH.) - 1)); |
| 761 | destDir.chopcxx . . $ QString#chop(d4f767463ce0a6b3).(destDir.sizecxx . . $ QString#size(455f465bc33b4cdf).() - destDir.lastIndexOfcxx . . $ QString#lastIndexOf(a1e52806cd31c200).(SLASHcxx . . $ Global/SLASH.) - 1); |
| 762 | } |
| 763 | } |
| 764 | |
| 765 | Operationcxx . . $ Global/Operation.[currentOperationcxx . . $ Global/currentOperation.] -> SetSourcecxx . . $ operation#SetSource(7df51288a9ebd664). (sourceDircxx . . $ QString#QString(132dd6869045752b).); |
| 766 | Operationcxx . . $ Global/Operation.[currentOperationcxx . . $ Global/currentOperation.] -> SetDestinationcxx . . $ operation#SetDestination(7df51288a9ebd664). (destDircxx . . $ QString#QString(132dd6869045752b).); |
| 767 | |
| 768 | //add a new item in the operations list |
| 769 | uicxx . . $ luckyBackupWindow#ui..listWidget_operationscxx . . $ Ui_luckyBackupWindow#listWidget_operations. -> addItemcxx . . $ QListWidget#addItem(3520e46b33348bf6).( Operationcxx . . $ Global/Operation.[currentOperationcxx . . $ Global/currentOperation.] -> GetNamecxx . . $ operation#GetName(6ef7b6c27b00b43d).() ); |
| 770 | uicxx . . $ luckyBackupWindow#ui..listWidget_operationscxx . . $ Ui_luckyBackupWindow#listWidget_operations. -> setCurrentRowcxx . . $ QListWidget#setCurrentRow(d4f767463ce0a6b3).(currentOperationcxx . . $ Global/currentOperation.); |
| 771 | uicxx . . $ luckyBackupWindow#ui..listWidget_operationscxx . . $ Ui_luckyBackupWindow#listWidget_operations. -> currentItemcxx . . $ QListWidget#currentItem(a843e491ce3ee2b1).() -> setCheckStatecxx . . $ QListWidgetItem#setCheckState(537692883700039).(Qtcxx . . $ Qt/::Uncheckedcxx . . $ Qt/Unchecked.); |
| 772 | TotalOperationscxx . . $ Global/TotalOperations. = uicxx . . $ luckyBackupWindow#ui..listWidget_operationscxx . . $ Ui_luckyBackupWindow#listWidget_operations. -> countcxx . . $ QListWidget#count(455f465bc33b4cdf).(); //set the TotalOperations to what it is now |
| 773 | |
| 774 | textDialogcxx . . $ textDialog# textdialogWcxx . . $ textDialog#textDialog(9c8c077708043c75). ("QtWarning"cxx . . $ QString#QString(85c52e162fed56f9)., |
| 775 | trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("You have asked for a RESTORE task to be created","'create restore' message line 1/4")+cxx . . $ operator+(3d22f08efddf8107)."<br><br>"+cxx . . $ operator+(fab9b4f80031f353). |
| 776 | trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("Please have a good look at the following task properties dialog","'create restore' message line 2/4")+cxx . . $ operator+(3d22f08efddf8107)." <br>"+cxx . . $ operator+(fab9b4f80031f353). |
| 777 | trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("and change anything you wish before proceeding","'create restore' message line 3/4")+cxx . . $ operator+(3d22f08efddf8107)." <br><br>"+cxx . . $ operator+(fab9b4f80031f353). |
| 778 | trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("Please check 'Task name', 'source', 'destination' and especially the 'Delete files on the destination'' & 'skip newer destination files' check-boxes (advanced)","'create restore' message line 4/4")+cxx . . $ operator+(3d22f08efddf8107)."<br>", |
| 779 | this); |
| 780 | textdialogW.execcxx . . $ QDialog#exec(b126dc7c1de90089).(); |
| 781 | |
| 782 | modifyConnectedcxx . . $ Global/modifyConnected. = true; |
| 783 | saveOrNotcxx . . $ luckyBackupWindow#saveOrNot. = false; |
| 784 | modifycxx . . $ luckyBackupWindow#modify(49f6e7a06ebc5aa8).(); //open the modify dialog for the new operation to make sure everything is ok, false == do not save the result |
| 785 | saveOrNotcxx . . $ luckyBackupWindow#saveOrNot. = true; |
| 786 | |
| 787 | if (modifyOKcxx . . $ Global/modifyOK.) //connect the operation with its RESTORE duplicate |
| 788 | { |
| 789 | Operationcxx . . $ Global/Operation.[currentOperationcxx . . $ Global/currentOperation.] -> SetConnectRestorecxx . . $ operation#SetConnectRestore(7df51288a9ebd664).(Operationcxx . . $ Global/Operation.[oldCurrentOperation] -> GetNamecxx . . $ operation#GetName(6ef7b6c27b00b43d).()); |
| 790 | Operationcxx . . $ Global/Operation.[oldCurrentOperation] -> SetConnectRestorecxx . . $ operation#SetConnectRestore(7df51288a9ebd664).(Operationcxx . . $ Global/Operation.[currentOperationcxx . . $ Global/currentOperation.] -> GetNamecxx . . $ operation#GetName(6ef7b6c27b00b43d).()); |
| 791 | savedProfilecxx . . $ luckyBackupWindow#savedProfile. = false; //change profile status to "unsaved" |
| 792 | uicxx . . $ luckyBackupWindow#ui..actionSavecxx . . $ Ui_luckyBackupWindow#actionSave. -> setEnabledcxx . . $ QAction#setEnabled(b45ddcbc8423892c).(true); |
| 793 | } |
| 794 | else |
| 795 | { |
| 796 | //remove already created RESTORE operation from operations list |
| 797 | uicxx . . $ luckyBackupWindow#ui..listWidget_operationscxx . . $ Ui_luckyBackupWindow#listWidget_operations. -> takeItemcxx . . $ QListWidget#takeItem(ffbac97cfc278ea8).(currentOperationcxx . . $ Global/currentOperation.); //take out the selected item from the list |
| 798 | TotalOperationscxx . . $ Global/TotalOperations. = uicxx . . $ luckyBackupWindow#ui..listWidget_operationscxx . . $ Ui_luckyBackupWindow#listWidget_operations. -> countcxx . . $ QListWidget#count(455f465bc33b4cdf).(); //TotalOperations takes the new value (old - 1) |
| 799 | } |
| 800 | } |
| 801 | |
| 802 | // exportProfile ================================================================================================================================ |
| 803 | // exports the current profile to another location |
| 804 | void luckyBackupWindowcxx . . $ luckyBackupWindow#::exportProfilecxx . . $ luckyBackupWindow#exportProfile(49f6e7a06ebc5aa8).() |
| 805 | { |
| 806 | InfoDatacxx . . $ luckyBackupWindow#InfoData. =cxx . . $ QString#`operator=`(d02845eef0c33901). ""; |
| 807 | |
| 808 | // Display a save dialog for a directory to export the profile to |
| 809 | QStringcxx . . $ QString# exportProfileName = QFileDialogcxx . . $ QFileDialog#::getExistingDirectorycxx . . $ QFileDialog#getExistingDirectory(a1339ef2a1b3555a).(this, |
| 810 | appNamecxx . . $ Global/appName. +cxx . . $ operator+(3d22f08efddf8107). " - " +cxx . . $ operator+(fab9b4f80031f353). trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("Select export directory","this is a dialog title for selecting a directory to export a profile to"), SLASHcxx . . $ Global/SLASH., |
| 811 | QFileDialogcxx . . $ QFileDialog#::ShowDirsOnlycxx . . $ QFileDialog#ShowDirsOnly. |cxx . . $ `operator|`(11bb0297066bad47). QFileDialogcxx . . $ QFileDialog#::DontResolveSymlinkscxx . . $ QFileDialog#DontResolveSymlinks.) +cxx . . $ operator+(fab9b4f80031f353). SLASHcxx . . $ Global/SLASH. +cxx . . $ operator+(fab9b4f80031f353). profileNamecxx . . $ Global/profileName.; |
| 812 | |
| 813 | if ( exportProfileName ==cxx . . $ QString#`operator==`(7d4bdb1abc417636). "") //if cancel is pressed at the file dialog, do nothing |
| 814 | return; |
| 815 | |
| 816 | // put the ".profile" extension if its not there |
| 817 | if (!exportProfileName.endsWithcxx . . $ QString#endsWith(8cce4688c16f48f3).(".profile"cxx . . $ QString#QString(85c52e162fed56f9)., Qtcxx . . $ Qt/::CaseInsensitivecxx . . $ Qt/CaseInsensitive.)) |
| 818 | exportProfileName.appendcxx . . $ QString#append(6a89d0b7f4d2681c).(".profile" +cxx . . $ operator+(c75c3ae4eb9af1a8). SLASHcxx . . $ Global/SLASH.); |
| 819 | |
| 820 | |
| 821 | if (!exportFullProfilecxx . . $ Global/exportFullProfile(80825a4bb658cac2).(exportProfileNamecxx . . $ QString#QString(132dd6869045752b).,"ExportFullProfile"cxx . . $ QString#QString(85c52e162fed56f9).)) //try to save/export the new profile |
| 822 | { |
| 823 | InfoDatacxx . . $ luckyBackupWindow#InfoData. =cxx . . $ QString#`operator=`(b79fde0b0ce9b948). "<font color=red><b>" +cxx . . $ operator+(c75c3ae4eb9af1a8). trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("ERROR") +cxx . . $ operator+(3d22f08efddf8107). "</font></b><br>" +cxx . . $ operator+(fab9b4f80031f353). |
| 824 | trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("Failed to export profile","full phrase: 'Failed to export profile <PROFILENAME> to <DIRNAME>'")+cxx . . $ operator+(3d22f08efddf8107). |
| 825 | " <b>" +cxx . . $ operator+(fab9b4f80031f353). profileNamecxx . . $ Global/profileName. +cxx . . $ operator+(3d22f08efddf8107). "</b><br>" |
| 826 | +cxx . . $ operator+(fab9b4f80031f353).trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("to","full phrase: 'Failed to export profile <PROFILENAME> to <DIRNAME>'")+cxx . . $ operator+(3d22f08efddf8107). |
| 827 | " <b>" +cxx . . $ operator+(fab9b4f80031f353). exportProfileName +cxx . . $ operator+(3d22f08efddf8107)."</b>"; |
| 828 | uicxx . . $ luckyBackupWindow#ui..textBrowser_infocxx . . $ Ui_luckyBackupWindow#textBrowser_info. -> setTextcxx . . $ QTextEdit#setText(3520e46b33348bf6).(InfoDatacxx . . $ luckyBackupWindow#InfoData.); //update the info window |
| 829 | setCurrentProfilecxx . . $ luckyBackupWindow#setCurrentProfile(7df51288a9ebd664).(currentProfilecxx . . $ QString#QString(132dd6869045752b).); //reset all currentProfile variables |
| 830 | return; |
| 831 | } |
| 832 | |
| 833 | InfoDatacxx . . $ luckyBackupWindow#InfoData..appendcxx . . $ QString#append(6a89d0b7f4d2681c).(trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("Profile","full phrase: 'Profile <PROFILENAME> exported successfully to <DIRNAME>'") +cxx . . $ operator+(3d22f08efddf8107). ": <b>" +cxx . . $ operator+(fab9b4f80031f353). |
| 834 | profileNamecxx . . $ Global/profileName. +cxx . . $ operator+(3d22f08efddf8107). "</b><br>...<font color=green>" |
| 835 | +cxx . . $ operator+(fab9b4f80031f353). trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("exported successfully to","full phrase: 'Profile <PROFILENAME> exported successfully to <DIRNAME>'") +cxx . . $ operator+(3d22f08efddf8107). |
| 836 | "</font> <b>" +cxx . . $ operator+(fab9b4f80031f353). exportProfileName +cxx . . $ operator+(3d22f08efddf8107)."</b>"); |
| 837 | |
| 838 | uicxx . . $ luckyBackupWindow#ui..textBrowser_infocxx . . $ Ui_luckyBackupWindow#textBrowser_info. -> setTextcxx . . $ QTextEdit#setText(3520e46b33348bf6).(InfoDatacxx . . $ luckyBackupWindow#InfoData.); //update the info window |
| 839 | setCurrentProfilecxx . . $ luckyBackupWindow#setCurrentProfile(7df51288a9ebd664).(currentProfilecxx . . $ QString#QString(132dd6869045752b).); //reset all currentProfile variables |
| 840 | createProfileCombocxx . . $ luckyBackupWindow#createProfileCombo(49f6e7a06ebc5aa8).(); // update the profile combobox (in case profile was exported at ~/.luckyBackup/profiles) and set index to currentProfile |
| 841 | } |
| 842 | |
| 843 | // importProfile ================================================================================================================================ |
| 844 | // imports a profile (+logs +snaps) to the profile directory |
| 845 | void luckyBackupWindowcxx . . $ luckyBackupWindow#::importProfilecxx . . $ luckyBackupWindow#importProfile(49f6e7a06ebc5aa8).() |
| 846 | { |
| 847 | InfoDatacxx . . $ luckyBackupWindow#InfoData. =cxx . . $ QString#`operator=`(d02845eef0c33901). ""; |
| 848 | |
| 849 | // This holds the full path of the profile to get imported directory (eg /media/exported/default.profile) |
| 850 | QStringcxx . . $ QString# importProfilePath = QFileDialogcxx . . $ QFileDialog#::getExistingDirectorycxx . . $ QFileDialog#getExistingDirectory(a1339ef2a1b3555a).(this, |
| 851 | appNamecxx . . $ Global/appName. +cxx . . $ operator+(3d22f08efddf8107). " - " +cxx . . $ operator+(fab9b4f80031f353). trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("Import Profile","this is a dialog title"), SLASHcxx . . $ Global/SLASH., |
| 852 | QFileDialogcxx . . $ QFileDialog#::ShowDirsOnlycxx . . $ QFileDialog#ShowDirsOnly. |cxx . . $ `operator|`(11bb0297066bad47). QFileDialogcxx . . $ QFileDialog#::DontResolveSymlinkscxx . . $ QFileDialog#DontResolveSymlinks.); |
| 853 | |
| 854 | if ( importProfilePath ==cxx . . $ QString#`operator==`(7d4bdb1abc417636). "") //if cancel is pressed at the file dialog, do nothing |
| 855 | return; |
| 856 | |
| 857 | // check if the directory selected by the user contains valid profile data |
| 858 | QDircxx . . $ QDir# importprofilecxx . . $ QDir#QDir(3520e46b33348bf6).; |
| 859 | importprofile.setPathcxx . . $ QDir#setPath(3520e46b33348bf6).(importProfilePath); |
| 860 | QStringListcxx . . $ QStringList# dirsToFiltercxx . . $ QStringList#QStringList(ced63f7c635d850d).; dirsToFilter <<cxx . . $ QStringList#`operator<<`(85116071a693d053). "profiles"cxx . . $ QString#QString(85c52e162fed56f9). <<cxx . . $ QStringList#`operator<<`(85116071a693d053). "logs"cxx . . $ QString#QString(85c52e162fed56f9). <<cxx . . $ QStringList#`operator<<`(85116071a693d053)."snaps"cxx . . $ QString#QString(85c52e162fed56f9).; |
| 861 | QStringListcxx . . $ QStringList# importPprofileContents = importprofile.entryListcxx . . $ QDir#entryList(4575c08c50802968).(dirsToFilter,QDircxx . . $ QFlags#QFlags(93d577a3e9528307).::AllDirscxx . . $ QDir#AllDirs.,QDircxx . . $ QFlags#QFlags(93d577a3e9528307).::NoSortcxx . . $ QDir#NoSort.); |
| 862 | if (!importPprofileContents.containscxx . . $ QStringList#contains(8cce4688c16f48f3).("profiles"cxx . . $ QString#QString(85c52e162fed56f9).)) // check if there exists a "profile" dir |
| 863 | { |
| 864 | InfoDatacxx . . $ luckyBackupWindow#InfoData. =cxx . . $ QString#`operator=`(b79fde0b0ce9b948). trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("Failed to import profile","full phrase: 'Failed to import profile <PROFILENAME>'")+cxx . . $ operator+(3d22f08efddf8107). |
| 865 | " <b>" +cxx . . $ operator+(fab9b4f80031f353). importProfilePath +cxx . . $ operator+(3d22f08efddf8107). "</b><br><font color=red>" |
| 866 | +cxx . . $ operator+(fab9b4f80031f353). trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("The directory you have selected does not contain valid profile data") +cxx . . $ operator+(3d22f08efddf8107)."</font>"; |
| 867 | uicxx . . $ luckyBackupWindow#ui..textBrowser_infocxx . . $ Ui_luckyBackupWindow#textBrowser_info. -> setTextcxx . . $ QTextEdit#setText(3520e46b33348bf6).(InfoDatacxx . . $ luckyBackupWindow#InfoData.); //update the info window |
| 868 | return; |
| 869 | } |
| 870 | |
| 871 | // Check if the profile to import already exists |
| 872 | QStringcxx . . $ QString# newProfileName = importProfilePathcxx . . $ QString#QString(132dd6869045752b).; // newProfileName holds the final name of the profile that is going to get imported (eg "default2") |
| 873 | newProfileName =cxx . . $ QString#`operator=`(4f35bf974e7f8568). newProfileName.rightcxx . . $ QString#right(3f3c3d0e9c0eb37f).(newProfileName.sizecxx . . $ QString#size(455f465bc33b4cdf).() - newProfileName.lastIndexOfcxx . . $ QString#lastIndexOf(a1e52806cd31c200).(SLASHcxx . . $ Global/SLASH.) - 1); |
| 874 | if (newProfileName.endsWithcxx . . $ QString#endsWith(8cce4688c16f48f3).(".profile"cxx . . $ QString#QString(85c52e162fed56f9).)) |
| 875 | newProfileName.chopcxx . . $ QString#chop(d4f767463ce0a6b3).(8); |
| 876 | QStringcxx . . $ QString# importProfileName = newProfileNamecxx . . $ QString#QString(132dd6869045752b).; //This holds the name of the profile to import (eg "default") |
| 877 | |
| 878 | //newProfile holds the final full path of the .profile file (eg ~/.luckyBackup/profiles/default2.profile) |
| 879 | QStringcxx . . $ QString# newProfile = profileDircxx . . $ Global/profileDir. +cxx . . $ operator+(fab9b4f80031f353). newProfileName +cxx . . $ operator+(3d22f08efddf8107). ".profile"; |
| 880 | QFilecxx . . $ QFile# newprofilecxx . . $ QFile#QFile(49f6e7a06ebc5aa8).; |
| 881 | newprofile.setFileNamecxx . . $ QFile#setFileName(3520e46b33348bf6).(newProfile); |
| 882 | |
| 883 | while (newprofile.existscxx . . $ QFile#exists(50ce9a9e25b4a850).()) //if the newprofile already exists ask to rename or cancel |
| 884 | { |
| 885 | textDialogcxx . . $ textDialog# textdialogcxx . . $ textDialog#textDialog(9c8c077708043c75). ("ImportProfile"cxx . . $ QString#QString(85c52e162fed56f9)., newProfileNamecxx . . $ QString#QString(132dd6869045752b).,this); |
| 886 | textdialog.execcxx . . $ QDialog#exec(b126dc7c1de90089).(); |
| 887 | newProfileName =cxx . . $ QString#`operator=`(4f35bf974e7f8568). textdialog.getUserInputcxx . . $ textDialog#getUserInput(4365c3963150523e).(); |
| 888 | |
| 889 | if (textdialog.getGoOncxx . . $ textDialog#getGoOn(b126dc7c1de90089).() == 0) |
| 890 | return; |
| 891 | if (textdialog.getGoOncxx . . $ textDialog#getGoOn(b126dc7c1de90089).() == 2) |
| 892 | { |
| 893 | InfoDatacxx . . $ luckyBackupWindow#InfoData. =cxx . . $ QString#`operator=`(b79fde0b0ce9b948). trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("Failed to import profile","full phrase: 'Failed to import profile <PROFILENAME>'")+cxx . . $ operator+(3d22f08efddf8107). |
| 894 | " <b>" +cxx . . $ operator+(fab9b4f80031f353). importProfileName +cxx . . $ operator+(3d22f08efddf8107). "</b><br><font color=red>" |
| 895 | +cxx . . $ operator+(fab9b4f80031f353). trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("The name you have entered contains only invalid characters") +cxx . . $ operator+(3d22f08efddf8107)."</font>"; |
| 896 | uicxx . . $ luckyBackupWindow#ui..textBrowser_infocxx . . $ Ui_luckyBackupWindow#textBrowser_info. -> setTextcxx . . $ QTextEdit#setText(3520e46b33348bf6).(InfoDatacxx . . $ luckyBackupWindow#InfoData.); //update the info window |
| 897 | return; |
| 898 | } |
| 899 | newProfile =cxx . . $ QString#`operator=`(b79fde0b0ce9b948). profileDircxx . . $ Global/profileDir. +cxx . . $ operator+(fab9b4f80031f353). newProfileName +cxx . . $ operator+(3d22f08efddf8107). ".profile"; |
| 900 | newprofile.setFileNamecxx . . $ QFile#setFileName(3520e46b33348bf6).(newProfile); |
| 901 | } |
| 902 | |
| 903 | int ExitCodeImportProfile = importFullProfilecxx . . $ Global/importFullProfile(cf8c7f074bbf9512).(importProfilePathcxx . . $ QString#QString(132dd6869045752b).,newProfileNamecxx . . $ QString#QString(132dd6869045752b).); |
| 904 | //QMessageBox::information(this, "LB","Exit code=" + countStr.setNum(ExitCodeImportProfile)); // TESTING |
| 905 | // if ExitCodeImportProfile != 1 |
| 906 | if ( (ExitCodeImportProfile == 0) || (ExitCodeImportProfile == 30) || (ExitCodeImportProfile == 20) || (ExitCodeImportProfile == 10) ) |
| 907 | { |
| 908 | createProfileCombocxx . . $ luckyBackupWindow#createProfileCombo(49f6e7a06ebc5aa8).(); |
| 909 | InfoDatacxx . . $ luckyBackupWindow#InfoData..appendcxx . . $ QString#append(6a89d0b7f4d2681c).(trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("Profile", |
| 910 | "full phrase: 'Profile <PROFILENAME> imported successfully as <NEWPROFILENAME> and added at the profile list'") +cxx . . $ operator+(3d22f08efddf8107). |
| 911 | ": <b>" +cxx . . $ operator+(fab9b4f80031f353). importProfileName +cxx . . $ operator+(3d22f08efddf8107). "</b><br>...<font color=green>" |
| 912 | +cxx . . $ operator+(fab9b4f80031f353). trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("imported successfully", |
| 913 | "full phrase: 'Profile <PROFILENAME> imported successfully as <NEWPROFILENAME> and added at the profile list'") +cxx . . $ operator+(3d22f08efddf8107). |
| 914 | "</font> " +cxx . . $ operator+(fab9b4f80031f353). trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("as","full phrase: 'Profile <PROFILENAME> imported successfully as <NEWPROFILENAME> and added at the profile list'") |
| 915 | +cxx . . $ operator+(3d22f08efddf8107). " <b>" +cxx . . $ operator+(fab9b4f80031f353). newProfileName +cxx . . $ operator+(3d22f08efddf8107). "</b><br><font color=green>" |
| 916 | +cxx . . $ operator+(fab9b4f80031f353). trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("and added at the profile list", |
| 917 | "full phrase: 'Profile <PROFILENAME> imported successfully as <NEWPROFILENAME> and added at the profile list'") +cxx . . $ operator+(3d22f08efddf8107). "</font>"); |
| 918 | if (ExitCodeImportProfile == 30) |
| 919 | InfoDatacxx . . $ luckyBackupWindow#InfoData..appendcxx . . $ QString#append(6a89d0b7f4d2681c).("<br><font color=red>" +cxx . . $ operator+(c75c3ae4eb9af1a8). trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("Errors occurred during snapshots and logfiles transfer") +cxx . . $ operator+(3d22f08efddf8107)."</font>"); |
| 920 | if (ExitCodeImportProfile == 20) |
| 921 | InfoDatacxx . . $ luckyBackupWindow#InfoData..appendcxx . . $ QString#append(6a89d0b7f4d2681c).("<br><font color=red>" +cxx . . $ operator+(c75c3ae4eb9af1a8). trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("Errors occurred during snapshots transfer") +cxx . . $ operator+(3d22f08efddf8107)."</font>"); |
| 922 | if (ExitCodeImportProfile == 10) |
| 923 | InfoDatacxx . . $ luckyBackupWindow#InfoData..appendcxx . . $ QString#append(6a89d0b7f4d2681c).("<br><font color=red>" +cxx . . $ operator+(c75c3ae4eb9af1a8). trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("Errors occurred during logfiles transfer") +cxx . . $ operator+(3d22f08efddf8107)."</font>"); |
| 924 | } |
| 925 | else // ExitCodeImportProfile == 1 |
| 926 | InfoDatacxx . . $ luckyBackupWindow#InfoData. =cxx . . $ QString#`operator=`(b79fde0b0ce9b948). trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("Failed to import profile","full phrase: 'Failed to import profile <PROFILENAME>'")+cxx . . $ operator+(3d22f08efddf8107)." <b>" +cxx . . $ operator+(fab9b4f80031f353). importProfileName +cxx . . $ operator+(3d22f08efddf8107). |
| 927 | "</b><br><font color=red>" +cxx . . $ operator+(fab9b4f80031f353).trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("Errors occurred during the profile file transfer") +cxx . . $ operator+(3d22f08efddf8107)."</font>"; |
| 928 | uicxx . . $ luckyBackupWindow#ui..textBrowser_infocxx . . $ Ui_luckyBackupWindow#textBrowser_info. -> setTextcxx . . $ QTextEdit#setText(3520e46b33348bf6).(InfoDatacxx . . $ luckyBackupWindow#InfoData.); //update the info window |
| 929 | } |
| 930 | |
| 931 | // setLanguage ===================================================================================================================================== |
| 932 | // changes the language of the application |
| 933 | void luckyBackupWindowcxx . . $ luckyBackupWindow#::setLanguagecxx . . $ luckyBackupWindow#setLanguage(92b1e80c0a7f1406).(QActioncxx . . $ QAction# *action) |
| 934 | { |
| 935 | QStringcxx . . $ QString# currentLocale = action -> datacxx . . $ QAction#data(23280f95d1ccaa1f).().toStringcxx . . $ QVariant#toString(6ef7b6c27b00b43d).(); |
| 936 | transDircxx . . $ Global/transDir..setPathcxx . . $ QDir#setPath(3520e46b33348bf6).(relativeTransDircxx . . $ Global/relativeTransDir.); |
| 937 | 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 |
| 938 | if ( (transDircxx . . $ Global/transDir..existscxx . . $ QDir#exists(50ce9a9e25b4a850).()) && (!transContQm.isEmptycxx . . $ QList#isEmpty(3482b152b9333168).()) ) |
| 939 | appTranslatorcxx . . $ Global/appTranslator..loadcxx . . $ QTranslator#load(142924642d8b819d).(QStringcxx . . $ QString#QString(85c52e162fed56f9).("luckybackup_") +cxx . . $ operator+(fab9b4f80031f353). currentLocale, relativeTransDircxx . . $ Global/relativeTransDir.); |
| 940 | else |
| 941 | appTranslatorcxx . . $ Global/appTranslator..loadcxx . . $ QTranslator#load(142924642d8b819d).(QStringcxx . . $ QString#QString(85c52e162fed56f9).("luckybackup_") +cxx . . $ operator+(fab9b4f80031f353). currentLocale, systemTransDircxx . . $ Global/systemTransDir.); |
| 942 | |
| 943 | translator_qtcxx . . $ Global/translator_qt..loadcxx . . $ QTranslator#load(142924642d8b819d).(QStringcxx . . $ QString#QString(85c52e162fed56f9).("qt_") +cxx . . $ operator+(fab9b4f80031f353). currentLocale, QLibraryInfocxx . . $ QLibraryInfo#::locationcxx . . $ QLibraryInfo#location(dd7ac78f10b8a525).(QLibraryInfocxx . . $ QLibraryInfo#::TranslationsPathcxx . . $ QLibraryInfo#TranslationsPath.)); |
| 944 | |
| 945 | defaultLanguagecxx . . $ luckyBackupWindow#defaultLanguage. =cxx . . $ QString#`operator=`(b79fde0b0ce9b948). currentLocale; |
| 946 | retranslateUicxx . . $ luckyBackupWindow#retranslateUi(49f6e7a06ebc5aa8).(); |
| 947 | } |
| 948 | |
| 949 | // hideShowInfoWindow =============================================================================================================================== |
| 950 | // Shows / hides the information window |
| 951 | void luckyBackupWindowcxx . . $ luckyBackupWindow#::hideShowInfoWindowcxx . . $ luckyBackupWindow#hideShowInfoWindow(49f6e7a06ebc5aa8).() |
| 952 | { |
| 953 | IsVisibleInfoWindowcxx . . $ luckyBackupWindow#IsVisibleInfoWindow. = !(uicxx . . $ luckyBackupWindow#ui..pushButton_InfoCollapsecxx . . $ Ui_luckyBackupWindow#pushButton_InfoCollapse. -> isCheckedcxx . . $ QAbstractButton#isChecked(50ce9a9e25b4a850).()); |
| 954 | if (IsVisibleInfoWindowcxx . . $ luckyBackupWindow#IsVisibleInfoWindow.) |
| 955 | { |
| 956 | uicxx . . $ luckyBackupWindow#ui..pushButton_InfoCollapsecxx . . $ Ui_luckyBackupWindow#pushButton_InfoCollapse. -> setToolTipcxx . . $ QWidget#setToolTip(3520e46b33348bf6).(trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("Hide information window","hide/show information window button tooltip")); |
| 957 | uicxx . . $ luckyBackupWindow#ui..pushButton_InfoCollapsecxx . . $ Ui_luckyBackupWindow#pushButton_InfoCollapse. -> setIconcxx . . $ QAbstractButton#setIcon(71dcdac178620ed6).(QIconcxx . . $ QIcon#QIcon(3520e46b33348bf6).(":/luckyPrefix/collapse.png"cxx . . $ QString#QString(85c52e162fed56f9).)); |
| 958 | if (guiModeNormalcxx . . $ luckyBackupWindow#guiModeNormal.) |
| 959 | uicxx . . $ luckyBackupWindow#ui..textBrowser_infocxx . . $ Ui_luckyBackupWindow#textBrowser_info. -> setVisiblecxx . . $ QWidget#setVisible(b45ddcbc8423892c). (true); |
| 960 | else |
| 961 | uicxx . . $ luckyBackupWindow#ui..nowDoingcxx . . $ Ui_luckyBackupWindow#nowDoing. -> setVisiblecxx . . $ QWidget#setVisible(b45ddcbc8423892c). (true); |
| 962 | } |
| 963 | else |
| 964 | { |
| 965 | uicxx . . $ luckyBackupWindow#ui..pushButton_InfoCollapsecxx . . $ Ui_luckyBackupWindow#pushButton_InfoCollapse. -> setToolTipcxx . . $ QWidget#setToolTip(3520e46b33348bf6).(trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("Show information window","hide/show information window button tooltip")); |
| 966 | uicxx . . $ luckyBackupWindow#ui..pushButton_InfoCollapsecxx . . $ Ui_luckyBackupWindow#pushButton_InfoCollapse. -> setIconcxx . . $ QAbstractButton#setIcon(71dcdac178620ed6).(QIconcxx . . $ QIcon#QIcon(3520e46b33348bf6).(":/luckyPrefix/collapseUP.png"cxx . . $ QString#QString(85c52e162fed56f9).)); |
| 967 | if (guiModeNormalcxx . . $ luckyBackupWindow#guiModeNormal.) |
| 968 | uicxx . . $ luckyBackupWindow#ui..textBrowser_infocxx . . $ Ui_luckyBackupWindow#textBrowser_info. -> setVisiblecxx . . $ QWidget#setVisible(b45ddcbc8423892c). (false); |
| 969 | else |
| 970 | uicxx . . $ luckyBackupWindow#ui..nowDoingcxx . . $ Ui_luckyBackupWindow#nowDoing. -> setVisiblecxx . . $ QWidget#setVisible(b45ddcbc8423892c). (false); |
| 971 | } |
| 972 | } |
| 973 | |
| 974 | // help ============================================================================================================================================= |
| 975 | // Shows the "help" information window |
| 976 | // This is a modeless dialog so that users can interact with it together with the main app |
| 977 | void luckyBackupWindowcxx . . $ luckyBackupWindow#::helpcxx . . $ luckyBackupWindow#help(49f6e7a06ebc5aa8).() |
| 978 | { |
| 979 | if (helpURLcxx . . $ luckyBackupWindow#helpURL..toStringcxx . . $ QUrl#toString(632475ebea3355f1).() ==cxx . . $ QString#`operator==`(7d4bdb1abc417636). "Does_not_exist") |
| 980 | { |
| 981 | InfoDatacxx . . $ luckyBackupWindow#InfoData. =cxx . . $ QString#`operator=`(b79fde0b0ce9b948). "<font color=red><b>" +cxx . . $ operator+(c75c3ae4eb9af1a8). trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("ERROR") +cxx . . $ operator+(3d22f08efddf8107). "</font></b><br>" +cxx . . $ operator+(fab9b4f80031f353). |
| 982 | trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("Could not locate the file","full phrase: 'Could not locate the file <FILENAME>'")+cxx . . $ operator+(3d22f08efddf8107).": <b>" +cxx . . $ operator+(fab9b4f80031f353). relativeManualcxx . . $ Global/relativeManual. +cxx . . $ operator+(3d22f08efddf8107)."</b><br> :-("; |
| 983 | uicxx . . $ luckyBackupWindow#ui..textBrowser_infocxx . . $ Ui_luckyBackupWindow#textBrowser_info. -> setTextcxx . . $ QTextEdit#setText(3520e46b33348bf6).(InfoDatacxx . . $ luckyBackupWindow#InfoData.); //update the info window |
| 984 | return; |
| 985 | } |
| 986 | |
| 987 | if (!helpbrowsercxx . . $ helpbrowser.) |
| 988 | helpbrowsercxx . . $ helpbrowser. = new helpBrowsercxx . . $ helpBrowser# (helpURLcxx . . $ QUrl#QUrl(37355d2f77053a23).); |
| 989 | |
| 990 | if (helpbrowsercxx . . $ helpbrowser.->isHiddencxx . . $ QWidget#isHidden(50ce9a9e25b4a850).()) |
| 991 | helpbrowsercxx . . $ helpbrowser. -> showcxx . . $ QWidget#show(49f6e7a06ebc5aa8).(); |
| 992 | |
| 993 | helpbrowsercxx . . $ helpbrowser. -> scrollToChaptercxx . . $ helpBrowser#scrollToChapter(7df51288a9ebd664).(manualChaptercxx . . $ QString#QString(132dd6869045752b).); // The manualChapter variable will scroll to the relevant chapter |
| 994 | |
| 995 | helpbrowsercxx . . $ helpbrowser. -> raisecxx . . $ QWidget#raise(49f6e7a06ebc5aa8).(); |
| 996 | helpbrowsercxx . . $ helpbrowser. -> activateWindowcxx . . $ QWidget#activateWindow(49f6e7a06ebc5aa8).(); |
| 997 | } |
| 998 | |
| 999 | // about ============================================================================================================================================ |
| 1000 | // Shows the "about" information window |
| 1001 | void luckyBackupWindowcxx . . $ luckyBackupWindow#::aboutcxx . . $ luckyBackupWindow#about(49f6e7a06ebc5aa8).() |
| 1002 | { |
| 1003 | aboutDialogcxx . . $ aboutDialog# aboutdialogcxx . . $ aboutDialog#aboutDialog(6323635818650805).(licenseURLcxx . . $ QUrl#QUrl(37355d2f77053a23).); |
| 1004 | aboutdialog.execcxx . . $ QDialog#exec(b126dc7c1de90089).(); |
| 1005 | } |
| 1006 | |
| 1007 | // add ============================================================================================================================================= |
| 1008 | // Creates a new operation by calling the modifyDialog |
| 1009 | void luckyBackupWindowcxx . . $ luckyBackupWindow#::addcxx . . $ luckyBackupWindow#add(49f6e7a06ebc5aa8).() |
| 1010 | { |
| 1011 | modifyOKcxx . . $ Global/modifyOK. = false; |
| 1012 | modifyConnectedcxx . . $ Global/modifyConnected. = false; |
| 1013 | newTaskThisIscxx . . $ Global/newTaskThisIs. = true; |
| 1014 | TotalOperationscxx . . $ Global/TotalOperations. = uicxx . . $ luckyBackupWindow#ui..listWidget_operationscxx . . $ Ui_luckyBackupWindow#listWidget_operations. -> countcxx . . $ QListWidget#count(455f465bc33b4cdf).(); //Get the Operations list size |
| 1015 | currentOperationcxx . . $ Global/currentOperation. = TotalOperationscxx . . $ Global/TotalOperations.; |
| 1016 | |
| 1017 | if ( (TotalOperationscxx . . $ Global/TotalOperations.) >= (maxOperationscxx . . $ Global/maxOperations.-1) ) //if the maxOperations limit-1 is reached |
| 1018 | { |
| 1019 | textDialogcxx . . $ textDialog# textdialogWcxx . . $ textDialog#textDialog(9c8c077708043c75). ("QtWarning"cxx . . $ QString#QString(85c52e162fed56f9)., |
| 1020 | trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("You have reached the maximum limit of supported tasks")+cxx . . $ operator+(3d22f08efddf8107)." <br><br>" +cxx . . $ operator+(fab9b4f80031f353). |
| 1021 | trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("You have to remove a task if you wish to add another !!"), this); |
| 1022 | textdialogW.execcxx . . $ QDialog#exec(b126dc7c1de90089).(); |
| 1023 | return; |
| 1024 | } |
| 1025 | |
| 1026 | //open the modify dialog and create "Operation array" item at position currentOperation |
| 1027 | modifyDialogcxx . . $ modifyDialog# modifydialogcxx . . $ modifyDialog#modifyDialog(f8943853b7fb084f).(currentOperationcxx . . $ Global/currentOperation.); |
| 1028 | modifydialog.execcxx . . $ QDialog#exec(b126dc7c1de90089).(); |
| 1029 | |
| 1030 | if (modifyOKcxx . . $ Global/modifyOK.) //if all went ok - add new operation |
| 1031 | { |
| 1032 | //add a new item in the operations list |
| 1033 | uicxx . . $ luckyBackupWindow#ui..listWidget_operationscxx . . $ Ui_luckyBackupWindow#listWidget_operations. -> addItemcxx . . $ QListWidget#addItem(3520e46b33348bf6).( Operationcxx . . $ Global/Operation.[currentOperationcxx . . $ Global/currentOperation.] -> GetNamecxx . . $ operation#GetName(6ef7b6c27b00b43d).() ); |
| 1034 | uicxx . . $ luckyBackupWindow#ui..listWidget_operationscxx . . $ Ui_luckyBackupWindow#listWidget_operations. -> setCurrentRowcxx . . $ QListWidget#setCurrentRow(d4f767463ce0a6b3).(currentOperationcxx . . $ Global/currentOperation.); |
| 1035 | uicxx . . $ luckyBackupWindow#ui..listWidget_operationscxx . . $ Ui_luckyBackupWindow#listWidget_operations. -> currentItemcxx . . $ QListWidget#currentItem(a843e491ce3ee2b1).() -> setCheckStatecxx . . $ QListWidgetItem#setCheckState(537692883700039).(Qtcxx . . $ Qt/::Uncheckedcxx . . $ Qt/Unchecked.); |
| 1036 | checkCurrentItemcxx . . $ luckyBackupWindow#checkCurrentItem(13c1c8ad030616f4).(uicxx . . $ luckyBackupWindow#ui..listWidget_operationscxx . . $ Ui_luckyBackupWindow#listWidget_operations. -> currentItemcxx . . $ QListWidget#currentItem(a843e491ce3ee2b1).()); |
| 1037 | TotalOperationscxx . . $ Global/TotalOperations. = uicxx . . $ luckyBackupWindow#ui..listWidget_operationscxx . . $ Ui_luckyBackupWindow#listWidget_operations. -> countcxx . . $ QListWidget#count(455f465bc33b4cdf).(); //set the TotalOperations to what it is now |
| 1038 | savedProfilecxx . . $ luckyBackupWindow#savedProfile. = false; //change profile status to "unsaved" |
| 1039 | uicxx . . $ luckyBackupWindow#ui..actionSavecxx . . $ Ui_luckyBackupWindow#actionSave. -> setEnabledcxx . . $ QAction#setEnabled(b45ddcbc8423892c).(true); |
| 1040 | } |
| 1041 | } |
| 1042 | |
| 1043 | // modify ========================================================================================================================================== |
| 1044 | // Modifies an existing operation by calling the modifyDialog |
| 1045 | // Will also save the profile according to saveOrNot |
| 1046 | void luckyBackupWindowcxx . . $ luckyBackupWindow#::modifycxx . . $ luckyBackupWindow#modify(49f6e7a06ebc5aa8).() |
| 1047 | { |
| 1048 | modifyOKcxx . . $ Global/modifyOK. = false; |
| 1049 | newTaskThisIscxx . . $ Global/newTaskThisIs. = false; |
| 1050 | currentOperationcxx . . $ Global/currentOperation. = uicxx . . $ luckyBackupWindow#ui..listWidget_operationscxx . . $ Ui_luckyBackupWindow#listWidget_operations. -> currentRowcxx . . $ QListWidget#currentRow(455f465bc33b4cdf).(); //current operations list row number |
| 1051 | if (currentOperationcxx . . $ Global/currentOperation. < 0) //if nothing is selected do nothing |
| 1052 | { |
| 1053 | InfoDatacxx . . $ luckyBackupWindow#InfoData. =cxx . . $ QString#`operator=`(b79fde0b0ce9b948). trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("Please select a task to modify first") +cxx . . $ operator+(3d22f08efddf8107). " !!"; |
| 1054 | uicxx . . $ luckyBackupWindow#ui..textBrowser_infocxx . . $ Ui_luckyBackupWindow#textBrowser_info. -> setTextcxx . . $ QTextEdit#setText(3520e46b33348bf6).(InfoDatacxx . . $ luckyBackupWindow#InfoData.); |
| 1055 | return; |
| 1056 | } |
| 1057 | |
| 1058 | QStringcxx . . $ QString# tempConnect = Operationcxx . . $ Global/Operation.[currentOperationcxx . . $ Global/currentOperation.] -> GetConnectRestorecxx . . $ operation#GetConnectRestore(6ef7b6c27b00b43d).(); |
| 1059 | if ( (tempConnect !=cxx . . $ QString#`operator!=`(7d4bdb1abc417636). "") && (!modifyConnectedcxx . . $ Global/modifyConnected.) ) //the operations is connected and is a not new RESTORE operation |
| 1060 | modifyConnectedcxx . . $ Global/modifyConnected. = true; |
| 1061 | int connectPosition=0; |
| 1062 | if (tempConnect !=cxx . . $ QString#`operator!=`(7d4bdb1abc417636). "") //if this op is already connected with another op, (pop up a message & )hold the connection's position |
| 1063 | { |
| 1064 | countcxx . . $ luckyBackupWindow#count.=0; |
| 1065 | while (countcxx . . $ luckyBackupWindow#count.<TotalOperationscxx . . $ Global/TotalOperations.) |
| 1066 | { //get the connected operation position at connectPosition |
| 1067 | if (Operationcxx . . $ Global/Operation.[countcxx . . $ luckyBackupWindow#count.]->GetNamecxx . . $ operation#GetName(6ef7b6c27b00b43d).()==cxx . . $ `operator==`(5bc2975d2d751687).tempConnect) connectPosition=countcxx . . $ luckyBackupWindow#count.; |
| 1068 | countcxx . . $ luckyBackupWindow#count.++; |
| 1069 | } |
| 1070 | } |
| 1071 | |
| 1072 | QStringcxx . . $ QString# oldTaskName = Operationcxx . . $ Global/Operation.[currentOperationcxx . . $ Global/currentOperation.] -> GetNamecxx . . $ operation#GetName(6ef7b6c27b00b43d).(); // the original task name wil become handy in case it changes |
| 1073 | |
| 1074 | //open the modify dialog and modify "Operation array" item at position currentOperation |
| 1075 | modifyDialogcxx . . $ modifyDialog# modifydialogcxx . . $ modifyDialog#modifyDialog(f8943853b7fb084f).(currentOperationcxx . . $ Global/currentOperation.); |
| 1076 | modifydialog.execcxx . . $ QDialog#exec(b126dc7c1de90089).(); |
| 1077 | |
| 1078 | if (modifyOKcxx . . $ Global/modifyOK.) //if all went ok - modify existing operation |
| 1079 | { |
| 1080 | Qtcxx . . $ Qt/::CheckStatecxx . . $ Qt/CheckState# isIncluded = uicxx . . $ luckyBackupWindow#ui..listWidget_operationscxx . . $ Ui_luckyBackupWindow#listWidget_operations. -> currentItemcxx . . $ QListWidget#currentItem(a843e491ce3ee2b1).() -> checkStatecxx . . $ QListWidgetItem#checkState(94511a6609c7e4a7).(); //get the include checkbox state |
| 1081 | QStringcxx . . $ QString# newTaskName = Operationcxx . . $ Global/Operation.[currentOperationcxx . . $ Global/currentOperation.] -> GetNamecxx . . $ operation#GetName(6ef7b6c27b00b43d).(); // the new task name |
| 1082 | uicxx . . $ luckyBackupWindow#ui..listWidget_operationscxx . . $ Ui_luckyBackupWindow#listWidget_operations. -> takeItemcxx . . $ QListWidget#takeItem(ffbac97cfc278ea8).(currentOperationcxx . . $ Global/currentOperation.); //take out the selected item from the list |
| 1083 | //insert a new one at the same position with the new name |
| 1084 | uicxx . . $ luckyBackupWindow#ui..listWidget_operationscxx . . $ Ui_luckyBackupWindow#listWidget_operations. -> insertItemcxx . . $ QListWidget#insertItem(4b11a7293b4ed91c).(currentOperationcxx . . $ Global/currentOperation., newTaskName); |
| 1085 | uicxx . . $ luckyBackupWindow#ui..listWidget_operationscxx . . $ Ui_luckyBackupWindow#listWidget_operations. -> setCurrentRowcxx . . $ QListWidget#setCurrentRow(d4f767463ce0a6b3).(currentOperationcxx . . $ Global/currentOperation.); //highlight this row |
| 1086 | uicxx . . $ luckyBackupWindow#ui..listWidget_operationscxx . . $ Ui_luckyBackupWindow#listWidget_operations. -> currentItemcxx . . $ QListWidget#currentItem(a843e491ce3ee2b1).() -> setCheckStatecxx . . $ QListWidgetItem#setCheckState(537692883700039).(isIncluded); //set the include checkbox as it was |
| 1087 | Operationcxx . . $ Global/Operation.[currentOperationcxx . . $ Global/currentOperation.] -> SetConnectRestorecxx . . $ operation#SetConnectRestore(7df51288a9ebd664).(tempConnectcxx . . $ QString#QString(132dd6869045752b).); //set the connection to what it was |
| 1088 | if (tempConnect !=cxx . . $ QString#`operator!=`(7d4bdb1abc417636). "") |
| 1089 | Operationcxx . . $ Global/Operation.[connectPosition]->SetConnectRestorecxx . . $ operation#SetConnectRestore(7df51288a9ebd664).(newTaskNamecxx . . $ QString#QString(132dd6869045752b).); |
| 1090 | checkCurrentItemcxx . . $ luckyBackupWindow#checkCurrentItem(13c1c8ad030616f4).(uicxx . . $ luckyBackupWindow#ui..listWidget_operationscxx . . $ Ui_luckyBackupWindow#listWidget_operations. -> currentItemcxx . . $ QListWidget#currentItem(a843e491ce3ee2b1).()); |
| 1091 | |
| 1092 | // update all relevant snap .changes as well as log files if the task name changes |
| 1093 | if (newTaskName !=cxx . . $ `operator!=`(5bc2975d2d751687). oldTaskName) |
| 1094 | arrangeLogSnapcxx . . $ luckyBackupWindow#arrangeLogSnap(5f0f93a7bce497de).(0,"rename"cxx . . $ QString#QString(85c52e162fed56f9).,oldTaskNamecxx . . $ QString#QString(132dd6869045752b).); |
| 1095 | |
| 1096 | if (saveOrNotcxx . . $ luckyBackupWindow#saveOrNot.) // also save the current profile if saveOrNot is true |
| 1097 | saveCurrentProfilecxx . . $ luckyBackupWindow#saveCurrentProfile(c9857a73d68e59ba).(); |
| 1098 | } |
| 1099 | } |
| 1100 | |
| 1101 | // remove =========================================================================================================================================== |
| 1102 | // Removes highlighted operation from available list |
| 1103 | void luckyBackupWindowcxx . . $ luckyBackupWindow#::removecxx . . $ luckyBackupWindow#remove(49f6e7a06ebc5aa8).() |
| 1104 | { |
| 1105 | currentOperationcxx . . $ Global/currentOperation. = uicxx . . $ luckyBackupWindow#ui..listWidget_operationscxx . . $ Ui_luckyBackupWindow#listWidget_operations. -> currentRowcxx . . $ QListWidget#currentRow(455f465bc33b4cdf).(); //current Included list row number |
| 1106 | if (currentOperationcxx . . $ Global/currentOperation. < 0) //if nothing is selected do nothing |
| 1107 | { |
| 1108 | InfoDatacxx . . $ luckyBackupWindow#InfoData. =cxx . . $ QString#`operator=`(b79fde0b0ce9b948). trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("Please select a task to remove first") +cxx . . $ operator+(3d22f08efddf8107). " !!"; |
| 1109 | uicxx . . $ luckyBackupWindow#ui..textBrowser_infocxx . . $ Ui_luckyBackupWindow#textBrowser_info. -> setTextcxx . . $ QTextEdit#setText(3520e46b33348bf6).(InfoDatacxx . . $ luckyBackupWindow#InfoData.); |
| 1110 | return; |
| 1111 | } |
| 1112 | |
| 1113 | QStringcxx . . $ QString# tempConnect = Operationcxx . . $ Global/Operation.[currentOperationcxx . . $ Global/currentOperation.] -> GetConnectRestorecxx . . $ operation#GetConnectRestore(6ef7b6c27b00b43d).(); |
| 1114 | QStringcxx . . $ QString# oldTaskName = Operationcxx . . $ Global/Operation.[currentOperationcxx . . $ Global/currentOperation.] -> GetNamecxx . . $ operation#GetName(6ef7b6c27b00b43d).(); // the original task name wil become handy in case it changes |
| 1115 | |
| 1116 | textDialogcxx . . $ textDialog# textdialogQcxx . . $ textDialog#textDialog(9c8c077708043c75). ("QtQuestion"cxx . . $ QString#QString(85c52e162fed56f9)., trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("Are you sure you want to remove the following task ??")+cxx . . $ operator+(3d22f08efddf8107)." <br>" +cxx . . $ operator+(fab9b4f80031f353). |
| 1117 | (uicxx . . $ luckyBackupWindow#ui..listWidget_operationscxx . . $ Ui_luckyBackupWindow#listWidget_operations. -> currentItemcxx . . $ QListWidget#currentItem(a843e491ce3ee2b1).()) -> textcxx . . $ QListWidgetItem#text(6ef7b6c27b00b43d).(), this); |
| 1118 | textdialogQ.execcxx . . $ QDialog#exec(b126dc7c1de90089).(); |
| 1119 | |
| 1120 | if (textdialogQ.getGoOncxx . . $ textDialog#getGoOn(b126dc7c1de90089).() > 0) //if user answers yes |
| 1121 | { |
| 1122 | textDialogcxx . . $ textDialog# textdialogQ2cxx . . $ textDialog#textDialog(9c8c077708043c75). ("QtQuestion"cxx . . $ QString#QString(85c52e162fed56f9)., trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("Would you like to also remove:")+cxx . . $ operator+(3d22f08efddf8107)." <br>" +cxx . . $ operator+(fab9b4f80031f353). tempConnect+cxx . . $ operator+(3d22f08efddf8107)."<br>??", this); |
| 1123 | if (tempConnect !=cxx . . $ QString#`operator!=`(7d4bdb1abc417636). "") //if this op is already connected with another op ask to remove that too |
| 1124 | textdialogQ2.execcxx . . $ QDialog#exec(b126dc7c1de90089).(); |
| 1125 | |
| 1126 | //remove current operation |
| 1127 | uicxx . . $ luckyBackupWindow#ui..listWidget_operationscxx . . $ Ui_luckyBackupWindow#listWidget_operations. -> takeItemcxx . . $ QListWidget#takeItem(ffbac97cfc278ea8).(currentOperationcxx . . $ Global/currentOperation.); //take out the selected item from the list |
| 1128 | TotalOperationscxx . . $ Global/TotalOperations. = uicxx . . $ luckyBackupWindow#ui..listWidget_operationscxx . . $ Ui_luckyBackupWindow#listWidget_operations. -> countcxx . . $ QListWidget#count(455f465bc33b4cdf).(); //TotalOperations takes the new value (old - 1) |
| 1129 | while (currentOperationcxx . . $ Global/currentOperation. < TotalOperationscxx . . $ Global/TotalOperations.) //shift array "Operation" one position up starting at current row |
| 1130 | { |
| 1131 | Operationcxx . . $ Global/Operation.[currentOperationcxx . . $ Global/currentOperation.]=Operationcxx . . $ Global/Operation.[currentOperationcxx . . $ Global/currentOperation.+1]; //make the current array item the same with the next one |
| 1132 | currentOperationcxx . . $ Global/currentOperation. ++; |
| 1133 | } |
| 1134 | |
| 1135 | if (tempConnect !=cxx . . $ QString#`operator!=`(7d4bdb1abc417636). "") |
| 1136 | { |
| 1137 | currentOperationcxx . . $ Global/currentOperation.=0; |
| 1138 | while (currentOperationcxx . . $ Global/currentOperation. < TotalOperationscxx . . $ Global/TotalOperations.) |
| 1139 | { if (Operationcxx . . $ Global/Operation.[currentOperationcxx . . $ Global/currentOperation.]->GetNamecxx . . $ operation#GetName(6ef7b6c27b00b43d).()==cxx . . $ `operator==`(5bc2975d2d751687).tempConnect) |
| 1140 | { |
| 1141 | if (textdialogQ2.getGoOncxx . . $ textDialog#getGoOn(b126dc7c1de90089).() > 0) //remove current (conected) operation |
| 1142 | { |
| 1143 | uicxx . . $ luckyBackupWindow#ui..listWidget_operationscxx . . $ Ui_luckyBackupWindow#listWidget_operations. -> takeItemcxx . . $ QListWidget#takeItem(ffbac97cfc278ea8).(currentOperationcxx . . $ Global/currentOperation.); |
| 1144 | TotalOperationscxx . . $ Global/TotalOperations. = uicxx . . $ luckyBackupWindow#ui..listWidget_operationscxx . . $ Ui_luckyBackupWindow#listWidget_operations. -> countcxx . . $ QListWidget#count(455f465bc33b4cdf).(); |
| 1145 | while (currentOperationcxx . . $ Global/currentOperation. < TotalOperationscxx . . $ Global/TotalOperations.) |
| 1146 | { |
| 1147 | Operationcxx . . $ Global/Operation.[currentOperationcxx . . $ Global/currentOperation.]=Operationcxx . . $ Global/Operation.[currentOperationcxx . . $ Global/currentOperation.+1]; |
| 1148 | currentOperationcxx . . $ Global/currentOperation. ++; |
| 1149 | } |
| 1150 | } |
| 1151 | else //just remove the connection |
| 1152 | Operationcxx . . $ Global/Operation.[currentOperationcxx . . $ Global/currentOperation.]->SetConnectRestorecxx . . $ operation#SetConnectRestore(7df51288a9ebd664).(""cxx . . $ QString#QString(85c52e162fed56f9).); |
| 1153 | break; |
| 1154 | } |
| 1155 | currentOperationcxx . . $ Global/currentOperation. ++; |
| 1156 | } |
| 1157 | } |
| 1158 | savedProfilecxx . . $ luckyBackupWindow#savedProfile. = false; //change profile status to "unsaved" |
| 1159 | uicxx . . $ luckyBackupWindow#ui..actionSavecxx . . $ Ui_luckyBackupWindow#actionSave. -> setEnabledcxx . . $ QAction#setEnabled(b45ddcbc8423892c).(true); |
| 1160 | |
| 1161 | // add the deleted yask name to this list to be used when profile is saved |
| 1162 | deletedTaskNamescxx . . $ luckyBackupWindow#deletedTaskNames. <<cxx . . $ QStringList#`operator<<`(85116071a693d053). oldTaskName; |
| 1163 | } |
| 1164 | } |
| 1165 | |
| 1166 | // manage ========================================================================================================================================== |
| 1167 | // Manage existing backups of an existing operation by calling the manageDialog |
| 1168 | void luckyBackupWindowcxx . . $ luckyBackupWindow#::managecxx . . $ luckyBackupWindow#manage(49f6e7a06ebc5aa8).() |
| 1169 | { |
| 1170 | currentOperationcxx . . $ Global/currentOperation. = uicxx . . $ luckyBackupWindow#ui..listWidget_operationscxx . . $ Ui_luckyBackupWindow#listWidget_operations. -> currentRowcxx . . $ QListWidget#currentRow(455f465bc33b4cdf).(); //current Included list row number |
| 1171 | if (currentOperationcxx . . $ Global/currentOperation. < 0) //if nothing is selected do nothing |
| 1172 | { |
| 1173 | InfoDatacxx . . $ luckyBackupWindow#InfoData. =cxx . . $ QString#`operator=`(b79fde0b0ce9b948). trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("Please select a task to manage first") +cxx . . $ operator+(3d22f08efddf8107). " !!"; |
| 1174 | uicxx . . $ luckyBackupWindow#ui..textBrowser_infocxx . . $ Ui_luckyBackupWindow#textBrowser_info. -> setTextcxx . . $ QTextEdit#setText(3520e46b33348bf6).(InfoDatacxx . . $ luckyBackupWindow#InfoData.); |
| 1175 | return; |
| 1176 | } |
| 1177 | |
| 1178 | manageDialogcxx . . $ manageDialog# managedialogcxx . . $ manageDialog#manageDialog(d194de0c0f68c28b).; |
| 1179 | managedialog.execcxx . . $ QDialog#exec(b126dc7c1de90089).(); |
| 1180 | |
| 1181 | checkCurrentItemcxx . . $ luckyBackupWindow#checkCurrentItem(13c1c8ad030616f4).(uicxx . . $ luckyBackupWindow#ui..listWidget_operationscxx . . $ Ui_luckyBackupWindow#listWidget_operations. -> currentItemcxx . . $ QListWidget#currentItem(a843e491ce3ee2b1).()); //refresh the selected task |
| 1182 | saveCurrentProfilecxx . . $ luckyBackupWindow#saveCurrentProfile(c9857a73d68e59ba).(); // save the profile if any snapshots have been deleted |
| 1183 | // refreshList(); //refresh the listWidget_operations |
| 1184 | } |
| 1185 | |
| 1186 | // moveUp =========================================================================================================================================== |
| 1187 | // Moves highlighted operation one position up in the available list |
| 1188 | void luckyBackupWindowcxx . . $ luckyBackupWindow#::moveUpcxx . . $ luckyBackupWindow#moveUp(49f6e7a06ebc5aa8).() |
| 1189 | { |
| 1190 | currentOperationcxx . . $ Global/currentOperation. = uicxx . . $ luckyBackupWindow#ui..listWidget_operationscxx . . $ Ui_luckyBackupWindow#listWidget_operations. -> currentRowcxx . . $ QListWidget#currentRow(455f465bc33b4cdf).(); //current list row number |
| 1191 | TotalOperationscxx . . $ Global/TotalOperations. = uicxx . . $ luckyBackupWindow#ui..listWidget_operationscxx . . $ Ui_luckyBackupWindow#listWidget_operations. -> countcxx . . $ QListWidget#count(455f465bc33b4cdf).(); //total number of list items |
| 1192 | if ( currentOperationcxx . . $ Global/currentOperation. < 0 ) //if nothing is selected |
| 1193 | return; |
| 1194 | |
| 1195 | if ( currentOperationcxx . . $ Global/currentOperation. > 0 ) |
| 1196 | { |
| 1197 | operationcxx . . $ operation# *tempOp; //temp operation to use for swaping |
| 1198 | tempOp = Operationcxx . . $ Global/Operation.[currentOperationcxx . . $ Global/currentOperation.]; //swap array items |
| 1199 | Operationcxx . . $ Global/Operation.[currentOperationcxx . . $ Global/currentOperation.] = Operationcxx . . $ Global/Operation. [currentOperationcxx . . $ Global/currentOperation.-1]; |
| 1200 | Operationcxx . . $ Global/Operation.[currentOperationcxx . . $ Global/currentOperation.-1] = tempOp; |
| 1201 | |
| 1202 | QListWidgetItemcxx . . $ QListWidgetItem# * currentItem = uicxx . . $ luckyBackupWindow#ui..listWidget_operationscxx . . $ Ui_luckyBackupWindow#listWidget_operations. -> takeItemcxx . . $ QListWidget#takeItem(ffbac97cfc278ea8).(currentOperationcxx . . $ Global/currentOperation.); //swap list items |
| 1203 | uicxx . . $ luckyBackupWindow#ui..listWidget_operationscxx . . $ Ui_luckyBackupWindow#listWidget_operations. -> insertItemcxx . . $ QListWidget#insertItem(a4bbc2a5333b312d).(currentOperationcxx . . $ Global/currentOperation. - 1, currentItem); |
| 1204 | uicxx . . $ luckyBackupWindow#ui..listWidget_operationscxx . . $ Ui_luckyBackupWindow#listWidget_operations. -> setCurrentRowcxx . . $ QListWidget#setCurrentRow(d4f767463ce0a6b3).(currentOperationcxx . . $ Global/currentOperation. - 1); |
| 1205 | |
| 1206 | savedProfilecxx . . $ luckyBackupWindow#savedProfile. = false; //change profile status to "unsaved" |
| 1207 | uicxx . . $ luckyBackupWindow#ui..actionSavecxx . . $ Ui_luckyBackupWindow#actionSave. -> setEnabledcxx . . $ QAction#setEnabled(b45ddcbc8423892c).(true); |
| 1208 | } |
| 1209 | } |
| 1210 | |
| 1211 | // moveDown ========================================================================================================================================= |
| 1212 | // Moves highlighted operation one position down in the available list |
| 1213 | void luckyBackupWindowcxx . . $ luckyBackupWindow#::moveDowncxx . . $ luckyBackupWindow#moveDown(49f6e7a06ebc5aa8).() |
| 1214 | { |
| 1215 | currentOperationcxx . . $ Global/currentOperation. = uicxx . . $ luckyBackupWindow#ui..listWidget_operationscxx . . $ Ui_luckyBackupWindow#listWidget_operations. -> currentRowcxx . . $ QListWidget#currentRow(455f465bc33b4cdf).(); //current list row number |
| 1216 | TotalOperationscxx . . $ Global/TotalOperations. = uicxx . . $ luckyBackupWindow#ui..listWidget_operationscxx . . $ Ui_luckyBackupWindow#listWidget_operations. -> countcxx . . $ QListWidget#count(455f465bc33b4cdf).(); //total number of list items |
| 1217 | if ( currentOperationcxx . . $ Global/currentOperation. < 0 ) //if nothing is selected |
| 1218 | return; |
| 1219 | |
| 1220 | if (currentOperationcxx . . $ Global/currentOperation. < (TotalOperationscxx . . $ Global/TotalOperations.-1)) |
| 1221 | { |
| 1222 | operationcxx . . $ operation# *tempOp; //temp operation to use for swaping |
| 1223 | tempOp = Operationcxx . . $ Global/Operation.[currentOperationcxx . . $ Global/currentOperation.]; //swap array |
| 1224 | Operationcxx . . $ Global/Operation.[currentOperationcxx . . $ Global/currentOperation.] = Operationcxx . . $ Global/Operation. [currentOperationcxx . . $ Global/currentOperation.+1]; |
| 1225 | Operationcxx . . $ Global/Operation.[currentOperationcxx . . $ Global/currentOperation.+1] = tempOp; |
| 1226 | |
| 1227 | QListWidgetItemcxx . . $ QListWidgetItem# * currentItem = uicxx . . $ luckyBackupWindow#ui..listWidget_operationscxx . . $ Ui_luckyBackupWindow#listWidget_operations. -> takeItemcxx . . $ QListWidget#takeItem(ffbac97cfc278ea8).(currentOperationcxx . . $ Global/currentOperation.); //swap list items |
| 1228 | uicxx . . $ luckyBackupWindow#ui..listWidget_operationscxx . . $ Ui_luckyBackupWindow#listWidget_operations. -> insertItemcxx . . $ QListWidget#insertItem(a4bbc2a5333b312d).(currentOperationcxx . . $ Global/currentOperation. + 1, currentItem); |
| 1229 | uicxx . . $ luckyBackupWindow#ui..listWidget_operationscxx . . $ Ui_luckyBackupWindow#listWidget_operations. -> setCurrentRowcxx . . $ QListWidget#setCurrentRow(d4f767463ce0a6b3).(currentOperationcxx . . $ Global/currentOperation. + 1); |
| 1230 | |
| 1231 | savedProfilecxx . . $ luckyBackupWindow#savedProfile. = false; //change profile status to "unsaved" |
| 1232 | uicxx . . $ luckyBackupWindow#ui..actionSavecxx . . $ Ui_luckyBackupWindow#actionSave. -> setEnabledcxx . . $ QAction#setEnabled(b45ddcbc8423892c).(true); |
| 1233 | } |
| 1234 | } |
| 1235 | |
| 1236 | |
| 1237 | // start ============================================================================================================================================ |
| 1238 | //start the execution of operations |
| 1239 | void luckyBackupWindowcxx . . $ luckyBackupWindow#::startcxx . . $ luckyBackupWindow#start(49f6e7a06ebc5aa8).() |
| 1240 | { |
| 1241 | TotalOperationscxx . . $ Global/TotalOperations. = uicxx . . $ luckyBackupWindow#ui..listWidget_operationscxx . . $ Ui_luckyBackupWindow#listWidget_operations. -> countcxx . . $ QListWidget#count(455f465bc33b4cdf).(); //set TotalOperations to what it is now |
| 1242 | |
| 1243 | if (!checkOperationListcxx . . $ luckyBackupWindow#checkOperationList(c9857a73d68e59ba).()) //check the Operations list for "errors" (eg nothing is included or the list is empty) |
| 1244 | return; |
| 1245 | |
| 1246 | checkDeclaredcxx . . $ luckyBackupWindow#checkDeclared(49f6e7a06ebc5aa8).(); //Check if the declared data are ok by calling checkBackupDirs, checkSyncDirs accordingly |
| 1247 | |
| 1248 | if (NothingToDocxx . . $ Global/NothingToDo. == true) //if there is nothing to Do anyway then just display a message |
| 1249 | { |
| 1250 | InfoDatacxx . . $ luckyBackupWindow#InfoData. =cxx . . $ QString#`operator=`(b79fde0b0ce9b948). "<font color=red><b>" +cxx . . $ operator+(c75c3ae4eb9af1a8). trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("ERROR") +cxx . . $ operator+(3d22f08efddf8107). "</b></font><br>" +cxx . . $ operator+(3d22f08efddf8107). |
| 1251 | "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br><b>" +cxx . . $ operator+(fab9b4f80031f353). |
| 1252 | trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("You have only included tasks that are going to be skipped") +cxx . . $ operator+(3d22f08efddf8107). "</b><br>" +cxx . . $ operator+(3d22f08efddf8107). |
| 1253 | "..." +cxx . . $ operator+(fab9b4f80031f353). trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("nothing to do") +cxx . . $ operator+(3d22f08efddf8107)." !!"; |
| 1254 | |
| 1255 | uicxx . . $ luckyBackupWindow#ui..textBrowser_infocxx . . $ Ui_luckyBackupWindow#textBrowser_info. -> setTextcxx . . $ QTextEdit#setText(3520e46b33348bf6).(InfoDatacxx . . $ luckyBackupWindow#InfoData.); |
| 1256 | return; |
| 1257 | } |
| 1258 | |
| 1259 | DryRuncxx . . $ Global/DryRun. = uicxx . . $ luckyBackupWindow#ui..checkBox_DryRuncxx . . $ Ui_luckyBackupWindow#checkBox_DryRun. -> isCheckedcxx . . $ QAbstractButton#isChecked(50ce9a9e25b4a850).(); //set bool Dryrun according to checkbox |
| 1260 | |
| 1261 | executeNOWcxx . . $ luckyBackupWindow#executeNOW(49f6e7a06ebc5aa8).(); |
| 1262 | } |
| 1263 | |
| 1264 | // schedule========================================================================================================================================== |
| 1265 | // Displays a new dialog to make a cron job for included operations |
| 1266 | void luckyBackupWindowcxx . . $ luckyBackupWindow#::schedulecxx . . $ luckyBackupWindow#schedule(49f6e7a06ebc5aa8).() |
| 1267 | { |
| 1268 | scheduleDialogcxx . . $ scheduleDialog# scheduledialogcxx . . $ scheduleDialog#scheduleDialog(d194de0c0f68c28b).; |
| 1269 | scheduledialog.execcxx . . $ QDialog#exec(b126dc7c1de90089).(); |
| 1270 | |
| 1271 | if (crontabUpdatedcxx . . $ Global/crontabUpdated.) |
| 1272 | InfoDatacxx . . $ luckyBackupWindow#InfoData. =cxx . . $ QString#`operator=`(b79fde0b0ce9b948). trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("current crontab <font color=green>updated successfully") +cxx . . $ operator+(3d22f08efddf8107). "</font>"; |
| 1273 | uicxx . . $ luckyBackupWindow#ui..textBrowser_infocxx . . $ Ui_luckyBackupWindow#textBrowser_info. -> setTextcxx . . $ QTextEdit#setText(3520e46b33348bf6).(InfoDatacxx . . $ luckyBackupWindow#InfoData.); |
| 1274 | |
| 1275 | crontabUpdatedcxx . . $ Global/crontabUpdated. = false; //this is set true each time the crontab is update |
| 1276 | } |
| 1277 | |
| 1278 | // email========================================================================================================================================== |
| 1279 | // Displays a new dialog to email report after a profile execution |
| 1280 | void luckyBackupWindowcxx . . $ luckyBackupWindow#::emailcxx . . $ luckyBackupWindow#email(49f6e7a06ebc5aa8).() |
| 1281 | { |
| 1282 | emailDialogcxx . . $ emailDialog# emaildialogcxx . . $ emailDialog#emailDialog(d194de0c0f68c28b).; |
| 1283 | emaildialog.execcxx . . $ QDialog#exec(b126dc7c1de90089).(); |
| 1284 | |
| 1285 | if (emaildialog.getGoOncxx . . $ emailDialog#getGoOn(b126dc7c1de90089).() == 0) // everything went ok |
| 1286 | { |
| 1287 | InfoDatacxx . . $ luckyBackupWindow#InfoData. =cxx . . $ QString#`operator=`(b79fde0b0ce9b948). trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("Email preferences have been <font color=green>updated successfully") +cxx . . $ operator+(3d22f08efddf8107). "</font>"; |
| 1288 | uicxx . . $ luckyBackupWindow#ui..textBrowser_infocxx . . $ Ui_luckyBackupWindow#textBrowser_info. -> setTextcxx . . $ QTextEdit#setText(3520e46b33348bf6).(InfoDatacxx . . $ luckyBackupWindow#InfoData.); |
| 1289 | |
| 1290 | savedProfilecxx . . $ luckyBackupWindow#savedProfile. = false; //change profile status to "unsaved" |
| 1291 | uicxx . . $ luckyBackupWindow#ui..actionSavecxx . . $ Ui_luckyBackupWindow#actionSave. -> setEnabledcxx . . $ QAction#setEnabled(b45ddcbc8423892c).(true); |
| 1292 | } |
| 1293 | |
| 1294 | } |
| 1295 | |
| 1296 | // taskStateChanged ================================================================================================================================= |
| 1297 | // Sets the profile state to unsaved if a task checkbox is changed |
| 1298 | void luckyBackupWindowcxx . . $ luckyBackupWindow#::taskStateChangedcxx . . $ luckyBackupWindow#taskStateChanged(49f6e7a06ebc5aa8).() |
| 1299 | { |
| 1300 | //theory (due to connections at luckybackwindow constructor): |
| 1301 | //when an item is just clicked functions called: checkCurrentItem -> taskStateChanged |
| 1302 | //when a checkbox state changes functiond called: taskStateChanged -> checkCurrentItem -> taskStateChanged |
| 1303 | //when a checkbox state changes not by clicking but with SPACEBAR, only taskStateChanged is called !! |
| 1304 | |
| 1305 | if (!taskChangedcxx . . $ luckyBackupWindow#taskChanged.) |
| 1306 | { |
| 1307 | if (taskClickedcxx . . $ luckyBackupWindow#taskClicked.) |
| 1308 | taskClickedcxx . . $ luckyBackupWindow#taskClicked. = false; |
| 1309 | else |
| 1310 | taskChangedcxx . . $ luckyBackupWindow#taskChanged. = true; |
| 1311 | return; |
| 1312 | } |
| 1313 | |
| 1314 | if ( (taskChangedcxx . . $ luckyBackupWindow#taskChanged.) && (taskClickedcxx . . $ luckyBackupWindow#taskClicked.) ) |
| 1315 | { |
| 1316 | savedProfilecxx . . $ luckyBackupWindow#savedProfile. = false; //change profile status to "unsaved" |
| 1317 | uicxx . . $ luckyBackupWindow#ui..actionSavecxx . . $ Ui_luckyBackupWindow#actionSave. -> setEnabledcxx . . $ QAction#setEnabled(b45ddcbc8423892c).(true); |
| 1318 | } |
| 1319 | |
| 1320 | taskClickedcxx . . $ luckyBackupWindow#taskClicked. = false; |
| 1321 | taskChangedcxx . . $ luckyBackupWindow#taskChanged. = false; |
| 1322 | } |
| 1323 | |
| 1324 | // checkCurrentItem ================================================================================================================================= |
| 1325 | // Checks the currently selected operation (if checked) for validity |
| 1326 | void luckyBackupWindowcxx . . $ luckyBackupWindow#::checkCurrentItemcxx . . $ luckyBackupWindow#checkCurrentItem(13c1c8ad030616f4).(QListWidgetItemcxx . . $ QListWidgetItem# *thisIsTheCurrentItem) |
| 1327 | { |
| 1328 | taskClickedcxx . . $ luckyBackupWindow#taskClicked. = true; //this is used at taskStateChanged() to determine if a task state is changed |
| 1329 | |
| 1330 | InfoDatacxx . . $ luckyBackupWindow#InfoData.=cxx . . $ QString#`operator=`(d02845eef0c33901).""; |
| 1331 | CheckedDatacxx . . $ Global/CheckedData. =cxx . . $ QString#`operator=`(d02845eef0c33901). ""; |
| 1332 | |
| 1333 | // use this because when a checkbox state changes and another item is selected, it remains this way. The checked one does not become selected !! |
| 1334 | uicxx . . $ luckyBackupWindow#ui..listWidget_operationscxx . . $ Ui_luckyBackupWindow#listWidget_operations. -> setCurrentItemcxx . . $ QListWidget#setCurrentItem(13c1c8ad030616f4).(thisIsTheCurrentItem); |
| 1335 | currentOperationcxx . . $ Global/currentOperation. = uicxx . . $ luckyBackupWindow#ui..listWidget_operationscxx . . $ Ui_luckyBackupWindow#listWidget_operations. -> currentRowcxx . . $ QListWidget#currentRow(455f465bc33b4cdf).(); |
| 1336 | |
| 1337 | if (currentOperationcxx . . $ Global/currentOperation. < 0) // to avoid segfault when nothing selected |
| 1338 | return; |
| 1339 | |
| 1340 | //first set variables source & dest |
| 1341 | QStringcxx . . $ QString# sourcecxx . . $ QString#QString(ced63f7c635d850d)., destcxx . . $ QString#QString(ced63f7c635d850d).; |
| 1342 | source =cxx . . $ QString#`operator=`(4f35bf974e7f8568). Operationcxx . . $ Global/Operation.[currentOperationcxx . . $ Global/currentOperation.] -> GetSourcecxx . . $ operation#GetSource(6ef7b6c27b00b43d).(); |
| 1343 | dest =cxx . . $ QString#`operator=`(4f35bf974e7f8568). Operationcxx . . $ Global/Operation.[currentOperationcxx . . $ Global/currentOperation.] -> GetDestinationcxx . . $ operation#GetDestination(6ef7b6c27b00b43d).(); |
| 1344 | |
| 1345 | if (Operationcxx . . $ Global/Operation.[currentOperationcxx . . $ Global/currentOperation.] -> GetTypeSynccxx . . $ operation#GetTypeSync(50ce9a9e25b4a850).()) //if the operation is of type "sync dirs' |
| 1346 | { |
| 1347 | uicxx . . $ luckyBackupWindow#ui..action_TaskCreateRestorecxx . . $ Ui_luckyBackupWindow#action_TaskCreateRestore. -> setEnabledcxx . . $ QAction#setEnabled(b45ddcbc8423892c).(false); //grey out the "create restore task" from menu |
| 1348 | uicxx . . $ luckyBackupWindow#ui..action_TaskManageBackupcxx . . $ Ui_luckyBackupWindow#action_TaskManageBackup. -> setTextcxx . . $ QAction#setText(3520e46b33348bf6).(trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("Manage Task","This is a top 'Task' menu action")); |
| 1349 | uicxx . . $ luckyBackupWindow#ui..action_TaskManageBackupcxx . . $ Ui_luckyBackupWindow#action_TaskManageBackup. -> setToolTipcxx . . $ QAction#setToolTip(3520e46b33348bf6).(trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("display information regarding highlighted task", |
| 1350 | "This is a top 'Task' menu action tooltip")); |
| 1351 | } |
| 1352 | else |
| 1353 | { |
| 1354 | uicxx . . $ luckyBackupWindow#ui..action_TaskCreateRestorecxx . . $ Ui_luckyBackupWindow#action_TaskCreateRestore. -> setEnabledcxx . . $ QAction#setEnabled(b45ddcbc8423892c).(true); |
| 1355 | 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")); |
| 1356 | 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", |
| 1357 | "This is a top 'Task' menu action tooltip")); |
| 1358 | } |
| 1359 | |
| 1360 | if (uicxx . . $ luckyBackupWindow#ui..listWidget_operationscxx . . $ Ui_luckyBackupWindow#listWidget_operations. -> currentItemcxx . . $ QListWidget#currentItem(a843e491ce3ee2b1).() -> checkStatecxx . . $ QListWidgetItem#checkState(94511a6609c7e4a7).() == Qtcxx . . $ Qt/::Uncheckedcxx . . $ Qt/Unchecked.) //if the operation is " NOT included" do not check it |
| 1361 | { |
| 1362 | 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).)); |
| 1363 | CheckedDatacxx . . $ Global/CheckedData..appendcxx . . $ QString#append(6a89d0b7f4d2681c).(trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("status") +cxx . . $ operator+(3d22f08efddf8107). ": <font color=blue><b>"+cxx . . $ operator+(fab9b4f80031f353).trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("NOT INCLUDED")+cxx . . $ operator+(3d22f08efddf8107)."</font></b><br>"); |
| 1364 | CheckedDatacxx . . $ Global/CheckedData..appendcxx . . $ QString#append(6a89d0b7f4d2681c).(trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("Checks are disabled. This task will be <b>skipped</b>")); |
| 1365 | uicxx . . $ luckyBackupWindow#ui..textBrowser_infocxx . . $ Ui_luckyBackupWindow#textBrowser_info. -> setTextcxx . . $ QTextEdit#setText(3520e46b33348bf6).(CheckedDatacxx . . $ Global/CheckedData.); |
| 1366 | Operationcxx . . $ Global/Operation.[currentOperationcxx . . $ Global/currentOperation.] -> SetIncludedcxx . . $ operation#SetIncluded(b45ddcbc8423892c).(false); // also set its include state to false |
| 1367 | return; |
| 1368 | } |
| 1369 | |
| 1370 | Operationcxx . . $ Global/Operation.[currentOperationcxx . . $ Global/currentOperation.] -> SetIncludedcxx . . $ operation#SetIncluded(b45ddcbc8423892c).(true); // also set its include state to true |
| 1371 | |
| 1372 | if ( (Operationcxx . . $ Global/Operation.[currentOperationcxx . . $ Global/currentOperation.] -> GetTypeDirContentscxx . . $ operation#GetTypeDirContents(50ce9a9e25b4a850).()) || (Operationcxx . . $ Global/Operation.[currentOperationcxx . . $ Global/currentOperation.] -> GetTypeDirNamecxx . . $ operation#GetTypeDirName(50ce9a9e25b4a850).()) ) |
| 1373 | checkBackupDirscxx . . $ Global/checkBackupDirs(3458fe3960d5051).(sourcecxx . . $ QString#QString(132dd6869045752b).,destcxx . . $ QString#QString(132dd6869045752b).); //if the operation is of type "backup dir ...' |
| 1374 | if (Operationcxx . . $ Global/Operation.[currentOperationcxx . . $ Global/currentOperation.] -> GetTypeSynccxx . . $ operation#GetTypeSync(50ce9a9e25b4a850).()) //if the operation is of type "sync dirs' |
| 1375 | checkSyncDirscxx . . $ Global/checkSyncDirs(3458fe3960d5051).(sourcecxx . . $ QString#QString(132dd6869045752b).,destcxx . . $ QString#QString(132dd6869045752b).); |
| 1376 | |
| 1377 | if (Operationcxx . . $ Global/Operation.[currentOperationcxx . . $ Global/currentOperation.] -> GetOKcxx . . $ operation#GetOK(50ce9a9e25b4a850).()) |
| 1378 | 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).)); |
| 1379 | if (Operationcxx . . $ Global/Operation.[currentOperationcxx . . $ Global/currentOperation.] -> GetWARNINGcxx . . $ operation#GetWARNING(50ce9a9e25b4a850).()) |
| 1380 | 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).)); |
| 1381 | if (Operationcxx . . $ Global/Operation.[currentOperationcxx . . $ Global/currentOperation.] -> GetCRITICALcxx . . $ operation#GetCRITICAL(50ce9a9e25b4a850).()) |
| 1382 | 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).)); |
| 1383 | if (Operationcxx . . $ Global/Operation.[currentOperationcxx . . $ Global/currentOperation.] -> GetSourcePermscxx . . $ operation#GetSourcePerms(50ce9a9e25b4a850).()) |
| 1384 | 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).)); |
| 1385 | if (Operationcxx . . $ Global/Operation.[currentOperationcxx . . $ Global/currentOperation.] -> GetDestPermscxx . . $ operation#GetDestPerms(50ce9a9e25b4a850).()) |
| 1386 | 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).)); |
| 1387 | uicxx . . $ luckyBackupWindow#ui..textBrowser_infocxx . . $ Ui_luckyBackupWindow#textBrowser_info. -> setTextcxx . . $ QTextEdit#setText(3520e46b33348bf6).(CheckedDatacxx . . $ Global/CheckedData.); |
| 1388 | } |
| 1389 | |
| 1390 | // refreshList ====================================================================================================================================== |
| 1391 | // refreshes the task list and the profile combobox when button refresh clicked |
| 1392 | void luckyBackupWindowcxx . . $ luckyBackupWindow#::refreshListcxx . . $ luckyBackupWindow#refreshList(49f6e7a06ebc5aa8).() |
| 1393 | { |
| 1394 | TotalOperationscxx . . $ Global/TotalOperations. = uicxx . . $ luckyBackupWindow#ui..listWidget_operationscxx . . $ Ui_luckyBackupWindow#listWidget_operations. -> countcxx . . $ QListWidget#count(455f465bc33b4cdf).(); //Get the Operations list size |
| 1395 | checkDeclaredcxx . . $ luckyBackupWindow#checkDeclared(49f6e7a06ebc5aa8).(); // Check tasks & set icons |
| 1396 | createProfileCombocxx . . $ luckyBackupWindow#createProfileCombo(49f6e7a06ebc5aa8).(); // update the profile combobox with all existing profiles and set index to currentProfile |
| 1397 | InfoDatacxx . . $ luckyBackupWindow#InfoData. =cxx . . $ QString#`operator=`(b79fde0b0ce9b948). trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("Task list of profile","full phrase: 'Task list of profile <PROFILENAME> and 'profile' drop-down list refreshed'") +cxx . . $ operator+(3d22f08efddf8107). |
| 1398 | " <b>" +cxx . . $ operator+(fab9b4f80031f353). profileNamecxx . . $ Global/profileName. +cxx . . $ operator+(3d22f08efddf8107). "</b><br>" +cxx . . $ operator+(fab9b4f80031f353). |
| 1399 | trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("and 'profile' drop-down list","full phrase: 'Task list of profile <PROFILENAME> and 'profile' drop-down list refreshed'") +cxx . . $ operator+(3d22f08efddf8107). |
| 1400 | "<br>...<font color=blue>" +cxx . . $ operator+(fab9b4f80031f353). trcxx . . $ luckyBackupWindow#tr(75d9f1c324b4579d).("refreshed", |
| 1401 | "full phrase: 'Task list of profile <PROFILENAME> and 'profile' drop-down list refreshed'") +cxx . . $ operator+(3d22f08efddf8107). " !!</font>"; |
| 1402 | uicxx . . $ luckyBackupWindow#ui..textBrowser_infocxx . . $ Ui_luckyBackupWindow#textBrowser_info. -> setTextcxx . . $ QTextEdit#setText(3520e46b33348bf6).(InfoDatacxx . . $ luckyBackupWindow#InfoData.); |
| 1403 | } |
| 1404 | |
| 1405 | //=================================================================================================================================================== |
| 1406 | //end of luckybackupwindow.cpp |