src/modelsubwindow.h

changeset 364
39fbdee0c0c8
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/modelsubwindow.h	Sun Apr 09 16:01:57 2023 +0300
@@ -0,0 +1,21 @@
+#pragma once
+#include <QMdiSubWindow>
+#include <QCloseEvent>
+#include "src/basics.h"
+
+class ModelSubWindow : public QMdiSubWindow
+{
+	Q_OBJECT
+public:
+	const ModelId modelId;
+	explicit ModelSubWindow(ModelId modelId, QWidget* widget = nullptr) :
+		QMdiSubWindow{widget},
+		modelId{modelId}
+	{
+	}
+protected:
+	void closeEvent(QCloseEvent* event) override
+	{
+		event->ignore();
+	}
+};

mercurial