From e7b2d97d99f53ed4ed68a9c1a7773e6d8df6c01e Mon Sep 17 00:00:00 2001 From: Aqua-sama Date: Thu, 13 Apr 2017 19:09:46 +0200 Subject: Address bar menu and search --- src/widgets/urllineedit.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/widgets/urllineedit.h') diff --git a/src/widgets/urllineedit.h b/src/widgets/urllineedit.h index d9d11ae..959461c 100644 --- a/src/widgets/urllineedit.h +++ b/src/widgets/urllineedit.h @@ -23,6 +23,7 @@ #include #include +#include class UrlLineEdit : public QLineEdit { @@ -40,11 +41,21 @@ protected: void focusInEvent(QFocusEvent *event); void focusOutEvent(QFocusEvent *event); +private slots: + void showMenu(); + void copyUrl(); + void pasteUrl(); + void pasteUrlAndGo(); + void bookmarkUrl(); + private: void setTextFormat(const QTextLayout::FormatRange &format); void clearTextFormat(); + QUrl urlFromUserInput(const QString &input); + QTextLayout::FormatRange m_hostFormat; + QMenu *m_contextMenu; }; #endif // URLLINEEDIT_H -- cgit v1.2.1