Sat, 14 Dec 2019 23:00:01 +0200
fixed build
#pragma once #include <QMainWindow> #include <QTranslator> #include <QSettings> #include <QKeySequence> #include "documentmanager.h" #include "libraries.h" #include "uiutilities.h" class MainWindow : public QMainWindow { Q_OBJECT public: MainWindow(QWidget *parent = nullptr); ~MainWindow(); private slots: void newModel(); void openModel(); void openModelFromPath(const QString& path); void runSettingsEditor(); void handleDocumentSplitterChange(); void updateRecentlyOpenedDocumentsMenu(); void openRecentFile(); protected: void changeEvent(QEvent* event) override; void closeEvent(QCloseEvent* event) override; private: std::unique_ptr<class Ui_MainWindow> ui; DocumentManager documents; QMap<Model*, QWidget*> modelWidgets; QString currentLanguage = "en"; QTranslator translator; QSettings settings; LibraryManager libraries; QByteArray documentSplitterState; uiutilities::KeySequenceMap defaultKeyboardShortcuts; static constexpr int maxRecentlyOpenedFiles = 10; QStringList recentlyOpenedFiles; void updateTitle(); void saveSettings(); void restoreSettings(); void changeLanguage(QString localeCode); void addRecentlyOpenedFile(const QString& path); void openModelForEditing(const QString& modelName); static QString pathToTranslation(const QString& localeCode); };