diff -r 593a658cba8e -r 73e448b2943d src/mainwindow.h --- a/src/mainwindow.h Thu Oct 03 11:45:44 2019 +0300 +++ b/src/mainwindow.h Thu Oct 03 23:44:28 2019 +0300 @@ -1,5 +1,6 @@ #pragma once #include +#include #include #include #include "documentmanager.h" @@ -13,12 +14,20 @@ private slots: void newModel(); void openModel(); + void languageChangeRequested(); +protected: + void changeEvent(QEvent* event); private: std::unique_ptr ui; DocumentManager documents; QMap modelWidgets; QWidget* createWidgetForModel(Model* model); QWidget* getWidgetForModel(Model* model); + void loadLocales(); void updateTabs(); void updateTitle(); + void changeLanguage(const QString& localeCode); + static QString pathToTranslation(const QString& localeCode); + QString currentLanguage = "en"; + QTranslator translator; };