mirror of
https://gitee.com/vnotex/vnote.git
synced 2025-07-05 22:09:52 +08:00
47 lines
1.1 KiB
C++
47 lines
1.1 KiB
C++
#ifndef VINSERTLINKDIALOG_H
|
|
#define VINSERTLINKDIALOG_H
|
|
|
|
#include <QDialog>
|
|
#include <QString>
|
|
|
|
class VLineEdit;
|
|
class QLineEdit;
|
|
class QDialogButtonBox;
|
|
|
|
class VInsertLinkDialog : public QDialog
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
VInsertLinkDialog(const QString &p_title,
|
|
const QString &p_text,
|
|
const QString &p_info,
|
|
const QString &p_linkText,
|
|
const QString &p_linkUrl,
|
|
QWidget *p_parent = nullptr);
|
|
|
|
QString getLinkText() const;
|
|
|
|
QString getLinkUrl() const;
|
|
|
|
private slots:
|
|
void handleInputChanged();
|
|
|
|
private:
|
|
void setupUI(const QString &p_title,
|
|
const QString &p_text,
|
|
const QString &p_info,
|
|
const QString &p_linkText,
|
|
const QString &p_linkUrl);
|
|
|
|
// Infer link text/url from clipboard only when text and url are both empty.
|
|
void fetchLinkFromClipboard();
|
|
|
|
VLineEdit *m_linkTextEdit;
|
|
|
|
QLineEdit *m_linkUrlEdit;
|
|
|
|
QDialogButtonBox *m_btnBox;
|
|
};
|
|
|
|
#endif // VINSERTLINKDIALOG_H
|