28#if Q_OS_MSDOS || defined(Q_OS_WIN32) || defined(Q_OS_WINCE)
29 #define VERSION "1.0.0"
49 : myLanguageName{thisLanguageName}, myLangName{thisLangName}, myTsFile{thisTsFile}, myDoxyFile{thisDoxyFile}, myReadMe{thisReadMe}, myLang{thisLang}, mySourceLang{thisSourceLang} {}
68 QString myLanguageName, myLangName, myTsFile, myDoxyFile, myReadMe;
81 explicit MainWindow(QWidget *parent =
nullptr);
149 bool fillForms(const QString &thisProjectID);
156 void checkLanguage(const QString &thisName, const QString &thisLanguage,
bool thisChecked);
159 void createTranslationJob(const QString &thisTranslate, const QString &thisLangCode, const QString &thisSourceLanguage,
bool thisChecked);
198 void removeArgs(const QString &thisString, const QString &thisTransFile);
216 void on_comboBoxTranslationsProjectNames_currentIndexChanged(
int thisIndex);
217 void on_comboBoxLanguage_currentIndexChanged(const QString &thisLanguage);
218 void on_comboBoxSqlDatabaseType_currentIndexChanged(const QString &thisSqlType);
219 void on_comboBoxTranslationSourceLanguage_currentIndexChanged(const QString &arg1);
221 void on_pushButtonSettingsLupdate_clicked();
222 void on_pushButtonSettingsLrelease_clicked();
224 void on_pushButtonSqlDatabaseNameBrowse_clicked();
225 void on_pushButtonSqlPasswordShow_clicked();
226 void on_pushButtonSqlSave_clicked();
228 void on_pushButtonTranslationsAdd_clicked();
229 void on_pushButtonTranslationsSave_clicked();
230 void on_pushButtonTranslationsDelete_clicked();
231 void on_pushButtonTranslationsProjectsBrowser_clicked();
232 void on_pushButtonTranslationsSourceBrowse_clicked();
233 void on_pushButtonTranslationsDoxyfileBrowse_clicked();
234 void on_pushButtonTranslationsProjectFolderBrowse_clicked();
235 void on_pushButtonTranslationsHelp_clicked();
236 void on_pushButtonTranslationsClear_clicked();
238 void on_checkBoxSettingsGoogle_stateChanged(
int thisArg);
239 void on_checkBoxSettingsBing_stateChanged(
int thisArg);
240 void on_checkBoxSettingsYandex_stateChanged(
int thisArg);
241 void on_checkBoxSettignsMessaging_stateChanged(
int thisCheckState);
243 void on_tabWidget_currentChanged(
int index);
258 QClipboard *clipboard;
259 QString myLanguages = "";
260 QString myTranslationConf = "";
261 QString myTranslationQrc = "";
262 QString myLanguageName = "";
263 QString myCurrentLanguage = "";
264 QString myTranslation = "";
265 QString myTranslationError = "";
266 QString mySourceLanguage = "";
267 QString myLastLanguageName = "";
268 QString myUiLanguageName = "";
269 QString myRemoveTransArgs;
271 QStringList myHelpTranslationsFiles;
272 QStringList myHelpFileNames;
273 bool isDebugMessage = true;
274 bool isTranslationLog = false;
275 bool isMainLoaded = false;
276 bool isQtSettingsLoaded = false;
277 bool isSaveSettings = false;
278 bool isTranslationError = false;
279 int myLanguageCombBoxIndex = -1;
281 int myTranslationErrorType = -1;
282 int myIncreameantValue = 60;
283 int myDelayValue = 60*6;
Main Window Constructor. /class MainWindow.
MyConstants * myConstants
myConstants
void clearTabSettings()
clear Tab Settings
void closeEvent(QCloseEvent *event) override
close Event
void createTranslationJob(const QString &thisTranslate, const QString &thisLangCode, const QString &thisSourceLanguage, bool thisChecked)
get Translation String
void removeArgs(const QString &thisString, const QString &thisTransFile)
remove Args like "String %1" list. removeArgs
void writeAllSettings()
write Settings
void readAllSettings()
read Settings
void setLastLanguageName(const QString &thisLastLanguageName)
setLastLanguageName
void clearTabHelp()
clear Tab Help
ActionStatesManager
Action States Manager.
@ Translations
Translations
@ TranslationHelp
TranslationHelp
@ TranslationReadMe
TranslationReadMe
QString translateWithReturn(const QString &text, QOnlineTranslator::Engine engine, QOnlineTranslator::Language translationLang, QOnlineTranslator::Language sourceLang, QOnlineTranslator::Language uiLang)
translate With Return, note this is blocking
void onTranslateHelp()
translate Help Files
void clearForms(int tabNumber)
clear Forms
void setDebugMessage(bool thisState)
set Debug Message
void setLanguageModel(MyLanguageModel *thisLanguageModel)
set Language Model
void loadLanguageComboBox()
load Language ComboBox
void loadLanguageComboBoxSource()
load Language ComboBox Source
void setTabSettings()
set Tab Settings
void closeTransHelp()
close Trans Help
void onCompile()
on Compile
virtual void changeEvent(QEvent *event) override
change Event
QString checkTranslationErrors(const QString &thisTranslations, const QString &thisText, QOnlineTranslator::Engine thisEngine, QOnlineTranslator::Language thisTranslationLang, QOnlineTranslator::Language thisSourceLang, QOnlineTranslator::Language thisUiLang)
check Translation Errors
void readStatesChanges()
read States Changes
void writeStateChanges()
write State Changes
bool getMainLoaded()
get Main Loaded Set to prevent triggers. getMainLoaded
void createReadMeTranslationJob(const QString &thisLanguageName, const QString &thisLangCode, bool thisChecked)
create ReadMe Translation Job
TranslationsErrors
Translations Errors.
@ ErrorTransferring
ErrorTransferring
@ HostNotFound
HostNotFound
void fixTranslationFile(const QString &thisFile)
fix Translation File; mostly Arabic gets the value before the ID on some fields. fixTranslationFile
void setLanguageCode()
set Language Code Lable in UI
void fileRemoveArgs()
file Remove Args "String %1". fileRemoveArgs
void clearTabTranslations()
clear Tab Translations
MainTabs
Tabs must be forced to be int 0 based indexes that match the actual ui for widgetTab,...
@ TabTranslations
TabTranslations
QString getLastLanguageName()
getLastLanguageName
bool getDebugMessage()
get Debug Message
void acceptTranslations()
accept Translations
void setMainLoaded(bool thisState)
set Main Loaded
void readSettingsFirst()
read Settings First
MyMessageTypes
Message Types.
void setActionsDisabled(ActionStatesManager thisAction, bool thisState)
set Actions Disabled
void setCheckMarksTranslation(const QString &thisDbValve)
set Check Marks Translation
MainWindow(QWidget *parent=nullptr)
MainWindow Constructor. MainWindow.
void onInternetProgress()
on Internet Progress
void clearTabProject()
clear Tab Project
QString languageChecked()
language Checked
void setTabAll()
set Tab All
void setTranslationErrorType(const QString &thisTranslations)
set Translation Error Type
void readSqlDatabaseInfo()
read SQL Database Info
void setProjectClass(int tabNumber)
set Project Class
void createHelpTranslationJob(const QString &thisLanguageName, const QString &thisLangCode, bool thisChecked)
create Help Translation Job
QString getComboBoxProjectsID(int thisIndex)
get ComboBox Projects ID
void onClipboard()
on Clipboard
void setMessagingStates(bool thisMessageState)
set Messaging States
void loadQtProjectCombo()
set Qt Project Combo
void setDatabaseModel()
setDatabaseModel
bool fillForms(const QString &thisProjectID)
fill Forms
void setTabTranslations()
set Tab Translations
void checkLanguage(const QString &thisName, const QString &thisLanguage, bool thisChecked)
check Language
void onTranslateReadMe()
Translate ReadMe.
void loadLanguage(const QString &thisLanguage)
loadLanguage
void onRunFirstOnStartup()
on Run First On Startup
void writeSqlDatabaseInfo()
write SQL Database Info
void retranslate()
retranslate none designer components
~MainWindow()
MainWindow Deconstructor. ~MainWindow.
void setMessage(const QString &thisMessage, MainWindow::MyMessageTypes thisMessageType)
set Message
void setSqlBrowseButton()
set SQL Browse Button
void setPrograms()
set Programs
Constants are defined as const QString, starting with MY_ all capps.
Abstact Model used for ComboBox. /class MyLanguageModel.
QString getReadMe() const
void setSourceLang(QOnlineTranslator::Language s)
void setLang(QOnlineTranslator::Language s)
QOnlineTranslator::Language getSourceLang() const
void setTsFile(const QString &s)
void setLanguageName(const QString &s)
void setLangName(const QString &s)
QString getDoxyFile() const
QString getLangName() const
QString getLanguageName() const
void setDoxyFile(const QString &s)
QOnlineTranslator::Language getLang() const
void setReadMe(const QString &s)
MyLingoJobs(const QString &thisLanguageName, const QString &thisLangName, const QString &thisTsFile, const QString &thisDoxyFile, const QString &thisReadMe, QOnlineTranslator::Language thisLang, QOnlineTranslator::Language thisSourceLang)
QString getTsFile() const