1// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
2//
3// SPDX-License-Identifier: GPL-3.0-or-later
4
5#ifndef RENAMEPOPUP_H
6#define RENAMEPOPUP_H
7
8#include "common/common.h"
9
10#include <QWidget>
11
12class RenamePopupPrivate;
13class RenamePopup : public QWidget
14{
15 Q_OBJECT
16 RenamePopupPrivate *const d;
17public:
18 static RenamePopup *instance();
19 explicit RenamePopup(QWidget *parent = nullptr);
20 virtual ~RenamePopup();
21 void setOldName(const QString &name);
22 QString oldName();
23 virtual int exec(const QPoint &pos);
24 virtual int exec();
25
26signals:
27 void editingFinished(const QString &text);
28
29protected:
30 virtual void showEvent(QShowEvent *event);
31 virtual void hideEvent(QHideEvent *event);
32};
33
34#endif // RENAMEPOPUP_H
35