| 1 | // SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. |
|---|---|
| 2 | // |
| 3 | // SPDX-License-Identifier: GPL-3.0-or-later |
| 4 | |
| 5 | #ifndef TEXTEDITTITLEBAR_H |
| 6 | #define TEXTEDITTITLEBAR_H |
| 7 | |
| 8 | #include <QStatusBar> |
| 9 | #include <QPushButton> |
| 10 | #include <QLabel> |
| 11 | #include <QMessageBox> |
| 12 | |
| 13 | #include <iostream> |
| 14 | #include <functional> |
| 15 | |
| 16 | class TextEditTitleBarPrivate; |
| 17 | class TextEditTitleBar : public QStatusBar |
| 18 | { |
| 19 | Q_OBJECT |
| 20 | TextEditTitleBarPrivate * const d; |
| 21 | |
| 22 | public: |
| 23 | |
| 24 | enum StandardButton |
| 25 | { |
| 26 | Reload, |
| 27 | Cancel |
| 28 | }; |
| 29 | |
| 30 | explicit TextEditTitleBar(QWidget *parent = nullptr); |
| 31 | virtual ~TextEditTitleBar(); |
| 32 | QPushButton * button(StandardButton button); |
| 33 | static TextEditTitleBar* changedReload(const QString &filePath); |
| 34 | |
| 35 | signals: |
| 36 | void reloadfile(); |
| 37 | |
| 38 | }; |
| 39 | |
| 40 | #endif // TEXTEDITTITLEBAR_H |
| 41 |