| 1 |
/* |
| 2 |
* SPDX-FileCopyrightText: 2013-2018 CSSlayer <[email protected]> |
| 3 |
* |
| 4 |
* SPDX-License-Identifier: LGPL-2.1-or-later |
| 5 |
* |
| 6 |
*/ |
| 7 |
#ifndef _PINYINDICTMANAGER_BROWSERDIALOG_H_ |
| 8 |
#define _PINYINDICTMANAGER_BROWSERDIALOG_H_ |
| 9 |
|
| 10 |
#include "config.h" |
| 11 |
#include "ui_browserdialog.h" |
| 12 |
#include <QByteArray> |
| 13 |
#include <QDialog> |
| 14 |
#include <QMessageBox> |
| 15 |
#include <QString> |
| 16 |
#include <QUrl> |
| 17 |
#include <QWidget> |
| 18 |
|
| 19 |
namespace fcitx { |
| 20 |
|
| 21 |
class WebPage; |
| 22 |
|
| 23 |
class BrowserDialog : public QDialog, public Ui::BrowserDialog { |
| 24 |
friend class WebPage; |
| 25 |
Q_OBJECT |
| 26 |
public: |
| 27 |
explicit BrowserDialog(QWidget *parent = nullptr); |
| 28 |
virtual ~BrowserDialog(); |
| 29 |
const QUrl &url() const { return url_; } |
| 30 |
const QString &name() const { return name_; } |
| 31 |
|
| 32 |
private: |
| 33 |
bool linkClicked(const QUrl &url); |
| 34 |
QString decodeName(const QByteArray &in); |
| 35 |
QString name_; |
| 36 |
QUrl url_; |
| 37 |
WebPage *page_; |
| 38 |
}; |
| 39 |
|
| 40 |
} // namespace fcitx |
| 41 |
|
| 42 |
#endif // _PINYINDICTMANAGER_BROWSERDIALOG_H_ |