aboutsummaryrefslogtreecommitdiff
path: root/src/widgets/urllineedit.h
diff options
context:
space:
mode:
authorAqua-sama <aqua@iserlohn-fortress.net>2017-04-13 19:09:46 +0200
committerAqua-sama <aqua@iserlohn-fortress.net>2017-04-13 19:09:46 +0200
commite7b2d97d99f53ed4ed68a9c1a7773e6d8df6c01e (patch)
tree49705e60b2a00cd961e3644c331fbb0bafd1881d /src/widgets/urllineedit.h
parentAdded page action tool buttons (diff)
downloadsmolbote-e7b2d97d99f53ed4ed68a9c1a7773e6d8df6c01e.tar.xz
Address bar menu and search
Diffstat (limited to 'src/widgets/urllineedit.h')
-rw-r--r--src/widgets/urllineedit.h11
1 files changed, 11 insertions, 0 deletions
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 <QLineEdit>
#include <QTextLayout>
+#include <QMenu>
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