11 MainWindow(QWidget *parent = nullptr); |
12 MainWindow(QWidget *parent = nullptr); |
12 ~MainWindow(); |
13 ~MainWindow(); |
13 private slots: |
14 private slots: |
14 void newModel(); |
15 void newModel(); |
15 void openModel(); |
16 void openModel(); |
|
17 void languageChangeRequested(); |
|
18 protected: |
|
19 void changeEvent(QEvent* event); |
16 private: |
20 private: |
17 std::unique_ptr<class Ui_MainWindow> ui; |
21 std::unique_ptr<class Ui_MainWindow> ui; |
18 DocumentManager documents; |
22 DocumentManager documents; |
19 QMap<Model*, QWidget*> modelWidgets; |
23 QMap<Model*, QWidget*> modelWidgets; |
20 QWidget* createWidgetForModel(Model* model); |
24 QWidget* createWidgetForModel(Model* model); |
21 QWidget* getWidgetForModel(Model* model); |
25 QWidget* getWidgetForModel(Model* model); |
|
26 void loadLocales(); |
22 void updateTabs(); |
27 void updateTabs(); |
23 void updateTitle(); |
28 void updateTitle(); |
|
29 void changeLanguage(const QString& localeCode); |
|
30 static QString pathToTranslation(const QString& localeCode); |
|
31 QString currentLanguage = "en"; |
|
32 QTranslator translator; |
24 }; |
33 }; |