summaryrefslogtreecommitdiff
path: root/src/panels/navigationtoolbar.hpp
blob: bdd2d245bcdf21fcefc1de531f7aec27f8c5948a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/* ============================================================
 *     The rekonq project
 * ============================================================
 * SPDX-License-Identifier: GPL-3.0-only
 * Copyright (C) 2022 aqua <aqua@iserlohn-fortress.net>
 * ============================================================ */

#pragma once

#include "rekonq.hpp"
#include "urlbar/urlbar.hpp"
#include <QToolBar>

class RekonqView;
class NavigationToolBar : public QToolBar {
  Q_OBJECT

public:
  explicit NavigationToolBar(QWidget *parent = nullptr);
  ~NavigationToolBar() override = default;

signals:
  void loadUrl(rekonq::DefaultUrl url, rekonq::OpenType type = rekonq::CurrentTab);
  void loadRequestedUrl(const QUrl &url, rekonq::OpenType type = rekonq::CurrentTab);

public slots:
  void setCurrentView(RekonqView *view);

private:
  RekonqView *m_view;
  UrlBar *urlBar;

  QMetaObject::Connection urlChanged_conn;
  QMetaObject::Connection loadStarted_conn;
  QMetaObject::Connection loadProgress_conn;
  QMetaObject::Connection loadFinished_conn;
};