src/modelsubwindow.h

Thu, 15 Jun 2023 16:18:03 +0300

author
Teemu Piippo <teemu.s.piippo@gmail.com>
date
Thu, 15 Jun 2023 16:18:03 +0300
changeset 383
530d23cd4e97
parent 364
39fbdee0c0c8
permissions
-rw-r--r--

Refactor, make selecting elements from the model select the corresponding line from the editor as well

#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