aboutsummaryrefslogtreecommitdiff
path: root/src/lib/navigation/urllineedit.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/navigation/urllineedit.h')
-rw-r--r--src/lib/navigation/urllineedit.h16
1 files changed, 5 insertions, 11 deletions
diff --git a/src/lib/navigation/urllineedit.h b/src/lib/navigation/urllineedit.h
index 73b31a3..9dd73ab 100644
--- a/src/lib/navigation/urllineedit.h
+++ b/src/lib/navigation/urllineedit.h
@@ -11,21 +11,22 @@
#include <QLineEdit>
#include <QTextLayout>
-#include <QListWidget>
#include <QAction>
+class QAbstractItemModel;
class QMenu;
class QLabel;
-class MainWindow;
class UrlLineEdit : public QLineEdit
{
Q_OBJECT
public:
- explicit UrlLineEdit(MainWindow *window, QWidget *parent = nullptr);
+ explicit UrlLineEdit(QWidget *parent = nullptr);
QAction *sslAction();
QAction *pageAction();
+ void setCompleterModel(QAbstractItemModel *model);
+
signals:
void addressEntered(const QUrl &url);
void searchTermEntered(const QString &term);
@@ -36,11 +37,6 @@ public slots:
protected:
void focusInEvent(QFocusEvent *event);
- void resizeEvent(QResizeEvent *event);
- void keyPressEvent(QKeyEvent *event);
-
-private slots:
- void showCompleter(const QString &text);
private:
void setTextFormat(const QTextLayout::FormatRange &format);
@@ -48,7 +44,6 @@ private:
QTextLayout::FormatRange m_hostFormat;
- MainWindow *m_window;
QAction *m_sslAction = nullptr;
QAction *m_pageAction = nullptr;
@@ -56,8 +51,7 @@ private:
QMenu *m_sslMenu;
QLabel *m_sslLabel;
- QMenu *m_menu;
- QListWidget *listWidget;
+ QCompleter *m_completer;
};
#endif // URLLINEEDIT_H