diff options
author | aqua <aqua@iserlohn-fortress.net> | 2022-09-04 14:46:52 +0300 |
---|---|---|
committer | aqua <aqua@iserlohn-fortress.net> | 2022-09-05 23:07:42 +0300 |
commit | e0d4d8376a2481f2f5daeaec1c9967e62b0bb8b0 (patch) | |
tree | 346d6e12d32c3997e527625c74513afc18dbc113 /src/urlbar/urlbar.h | |
parent | Close main window after last tab is closed (diff) | |
download | rekonq-e0d4d8376a2481f2f5daeaec1c9967e62b0bb8b0.tar.xz |
UrlBar: add completer
Diffstat (limited to 'src/urlbar/urlbar.h')
-rw-r--r-- | src/urlbar/urlbar.h | 120 |
1 files changed, 0 insertions, 120 deletions
diff --git a/src/urlbar/urlbar.h b/src/urlbar/urlbar.h deleted file mode 100644 index da34151e..00000000 --- a/src/urlbar/urlbar.h +++ /dev/null @@ -1,120 +0,0 @@ -/* ============================================================ - * The rekonq project - * ============================================================ - * SPDX-License-Identifier: GPL-2.0-or-later - * Copyright (C) 2008-2012 by Andrea Diamantini <adjam7 at gmail dot com> - * Copyright (C) 2009 by Domrachev Alexandr <alexandr.domrachev@gmail.com> - * Copyright (C) 2009 by Paweł Prażak <pawelprazak at gmail dot com> - * Copyright (C) 2009-2011 by Lionel Chauvin <megabigbug@yahoo.fr> - * SPDX-License-Identifier: GPL-3.0-only - * Copyright (C) 2022 aqua <aqua@iserlohn-fortress.net> - * ============================================================ - * Description: URL Bar - * ============================================================ */ - -#pragma once - -#include "../rekonq.hpp" -#include <QLineEdit> -#include <QToolButton> -#include <rview.hpp> - -class IconButton : public QToolButton { - Q_OBJECT - -public: - explicit IconButton(QWidget *parent = nullptr); - -signals: - void clicked(QPoint); - -protected: - void mouseReleaseEvent(QMouseEvent *event); -}; - -// Definitions -typedef QList<IconButton *> IconButtonPointerList; - -class UrlBar : public QLineEdit { - Q_OBJECT - -public: - enum Icon { KGet = 0x00000001, RSS = 0x00000010, BK = 0x00001000, SearchEngine = 0x00010000, AdBlock = 0x01000000 }; - - explicit UrlBar(QWidget *parent = nullptr); - ~UrlBar() override = default; - -public slots: - void setCurrentView(RekonqView *view) - { - m_currentView = view; - loadProgress(view->progress()); - setUrl(view->url()); - } - - void setUrl(const QUrl &url); - - /** - * Let us add bookmarks as the major browsers do - * - */ - // void manageBookmarks(); - - void clearUrlbar(); - - void loadRequestedUrl(const QUrl &url, rekonq::OpenType = rekonq::CurrentTab); - - void loadStarted(); - void loadProgress(int); - void loadFinished(); - - // void clearRightIcons(); - // void updateRightIcons(); - - // void detectTypedString(const QString &); - // void suggest(); - - // void manageStarred(QPoint); - // void manageAdBlock(QPoint); - - // void addToFavorites(); - // void removeFromFavorites(); - - // void refreshFavicon(); - - // void pasteAndGo(); - // void pasteAndSearch(); - // void delSlot(); - // bool isValidURL(QString url); - - // void showRSSInfo(QPoint); - // void showSSLInfo(QPoint); - -protected: - void paintEvent(QPaintEvent *event); - void resizeEvent(QResizeEvent *); - /* - void keyReleaseEvent(QKeyEvent *event); - void dropEvent(QDropEvent *event); - void mouseDoubleClickEvent(QMouseEvent *); - void contextMenuEvent(QContextMenuEvent *event); - */ - -private: - /** - * Updates right icon position, given its number in the right icons list - * and considering rekonq window position/dimension - */ - // void updateRightIconPosition(IconButton *, int); - // IconButton *addRightIcon(UrlBar::icon); - - // QWeakPointer<CompletionWidget> _box; - RekonqView *m_currentView = nullptr; - int m_currentView_progress = 0; - - IconButton *_icon; - IconButtonPointerList _rightIconsList; - - const QColor backgroundColor; - const QColor highlightColor; -}; |