Worker
-
class Worker : public QObject
Public Functions
-
explicit Worker(QObject *parent = nullptr, Project *mProject = nullptr, QString gCurrentPageName = "", QString gCurrentDirName = "", QString gDirTwoLevelUp = "", QString s1 = "", QString s2 = "", std::map<std::string, std::string> CPair_editDis = {}, std::map<std::string, std::set<std::string>> *CPairs = nullptr, std::map<QString, QString> filestructure_fw = {}, QSet<QString> *dict_set1 = {}, QString mRole = "Corrector")
This class is used to execute Save Function of MainWindow class in a multithreaded fashion.
- Parameters:
parent –
mProject –
gCurrentPageName –
gCurrentDirName –
gDirTwoLevelUp –
s1 –
s2 –
CPair_editDis –
CPairs –
filestructure_fw –
Public Slots
-
void doSaveBackend()
This function calls SaveFile_Backend functions and emits finished() whenever the function completes executing.
This functions checks if user has changed any dictionary word or not. If some dictionary word is changed by
the user, we main a log file of the same.
Log filename : DictChanges. Location /Dicts/
Entries are stored as old word New word
See also
SaveFile_Backend()
-
void addCpair()
It adds the replacements done using global-replace to the CPair.
This is done to show better suggestions to the user when he/she right clicks on a word.
-
explicit Worker(QObject *parent = nullptr, Project *mProject = nullptr, QString gCurrentPageName = "", QString gCurrentDirName = "", QString gDirTwoLevelUp = "", QString s1 = "", QString s2 = "", std::map<std::string, std::string> CPair_editDis = {}, std::map<std::string, std::set<std::string>> *CPairs = nullptr, std::map<QString, QString> filestructure_fw = {}, QSet<QString> *dict_set1 = {}, QString mRole = "Corrector")