From e0d4d8376a2481f2f5daeaec1c9967e62b0bb8b0 Mon Sep 17 00:00:00 2001 From: aqua Date: Sun, 4 Sep 2022 14:46:52 +0300 Subject: UrlBar: add completer --- src/urlbar/urlbar.h | 120 ---------------------------------------------------- 1 file changed, 120 deletions(-) delete mode 100644 src/urlbar/urlbar.h (limited to 'src/urlbar/urlbar.h') 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 - * Copyright (C) 2009 by Domrachev Alexandr - * Copyright (C) 2009 by Paweł Prażak - * Copyright (C) 2009-2011 by Lionel Chauvin - * SPDX-License-Identifier: GPL-3.0-only - * Copyright (C) 2022 aqua - * ============================================================ - * Description: URL Bar - * ============================================================ */ - -#pragma once - -#include "../rekonq.hpp" -#include -#include -#include - -class IconButton : public QToolButton { - Q_OBJECT - -public: - explicit IconButton(QWidget *parent = nullptr); - -signals: - void clicked(QPoint); - -protected: - void mouseReleaseEvent(QMouseEvent *event); -}; - -// Definitions -typedef QList 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 _box; - RekonqView *m_currentView = nullptr; - int m_currentView_progress = 0; - - IconButton *_icon; - IconButtonPointerList _rightIconsList; - - const QColor backgroundColor; - const QColor highlightColor; -}; -- cgit v1.2.1