I forgot to add files again... this time it's modelsubwindow.h

Sun, 09 Apr 2023 16:01:57 +0300

author
Teemu Piippo <teemu.s.piippo@gmail.com>
date
Sun, 09 Apr 2023 16:01:57 +0300
changeset 364
39fbdee0c0c8
parent 363
16f5dcfa7c9f
child 365
9d5cb5635c18

I forgot to add files again... this time it's modelsubwindow.h

src/modelsubwindow.h file | annotate | diff | comparison | revisions
--- /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