refactor: move file open event handling to standalone file

This commit is contained in:
2024-12-31 10:57:21 +08:00
parent c227c74e23
commit 101f111209
7 changed files with 63 additions and 23 deletions

View File

@ -0,0 +1,21 @@
// SPDX-FileCopyrightText: 2024 Gary Wang <git@blumia.net>
//
// SPDX-License-Identifier: MIT
#pragma once
#include <QObject>
class FileOpenEventHandler : public QObject
{
Q_OBJECT
public:
explicit FileOpenEventHandler(QObject *parent = nullptr);
protected:
bool eventFilter(QObject *obj, QEvent *event) override;
signals:
void fileOpen(const QUrl &url);
};