src/mainwindow.h

changeset 201
5d201ee4a9c3
parent 200
ca23936b455b
child 215
34c6e7bc4ee1
--- a/src/mainwindow.h	Mon Jun 06 22:01:22 2022 +0300
+++ b/src/mainwindow.h	Tue Jun 07 01:37:26 2022 +0300
@@ -26,60 +26,3 @@
 #include "libraries.h"
 #include "uiutilities.h"
 #include "ui/canvas.h"
-
-class EditorTabWidget;
-
-class MainWindow : public QMainWindow
-{
-	Q_OBJECT
-public:
-	MainWindow(QWidget *parent = nullptr);
-	~MainWindow() override;
-private Q_SLOTS:
-	void newModel();
-	void openModel();
-	void openModelFromPath(const QString& path);
-	void runSettingsEditor();
-	void handleDocumentSplitterChange();
-	void updateRecentlyOpenedDocumentsMenu();
-	void openRecentFile();
-	void setRenderStyle(gl::RenderStyle renderStyle);
-	Q_SLOT void setDrawAxes(bool drawAxes);
-	void actionSave();
-	void actionSaveAs();
-	void actionClose();
-	void actionDelete();
-	void actionInvert();
-	void handleTabCloseButton(int tabIndex);
-protected:
-	void changeEvent(QEvent* event) override;
-	void closeEvent(QCloseEvent* event) override;
-	void keyReleaseEvent(QKeyEvent *event) override;
-private:
-	std::unique_ptr<class Ui_MainWindow> ui;
-	DocumentManager documents;
-	QString currentLanguage = "en";
-	QTranslator translator;
-	Configuration settings;
-	LibraryManager libraries;
-	QByteArray documentSplitterState;
-	uiutilities::KeySequenceMap defaultKeyboardShortcuts;
-	static constexpr int maxRecentlyOpenedFiles = 10;
-	QStringList recentlyOpenedFiles;
-	ldraw::ColorTable colorTable;
-	gl::RenderPreferences renderPreferences;
-	void updateTitle();
-	void updateRenderPreferences();
-	void saveSettings();
-	void restoreStartupSettings();
-	void restoreSettings();
-	void changeLanguage(QString localeCode);
-	void addRecentlyOpenedFile(const QString& path);
-	void openModelForEditing(const ModelId modelId);
-	static QString pathToTranslation(const QString& localeCode);
-	void loadColors();
-	EditorTabWidget *currentDocument();
-	const EditorTabWidget *currentDocument() const;
-	void closeDocument(EditorTabWidget* document);
-	std::optional<ModelId> findCurrentModelId() const;
-};

mercurial