summaryrefslogtreecommitdiff
path: root/include/rview.hpp
blob: f92aee7f779a553e5a1618c6a6bd6f59e686acaf (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
38
39
40
41
42
/* ============================================================
 *     The rekonq project
 * ============================================================
 * SPDX-License-Identifier: GPL-3.0-only
 * Copyright (C) 2022 aqua <aqua@iserlohn-fortress.net>
 * ============================================================
 * Description: rekonq View interface
 * ============================================================ */

#pragma once

#include <QUrl>
#include <QWidget>

class RekonqView : public QWidget {
  Q_OBJECT

public:
  explicit RekonqView(const QUrl & = QUrl(), QWidget *parent = nullptr) : QWidget(parent) {}

  virtual void load(const QUrl &url) = 0;
  [[nodiscard]] virtual int progress() const = 0;

  [[nodiscard]] virtual QIcon icon() const = 0;
  [[nodiscard]] virtual QString title() const = 0;
  [[nodiscard]] virtual QUrl url() const = 0;

public slots:
  virtual void back() = 0;
  virtual void forward() = 0;
  virtual void refresh() = 0;
  virtual void reload() = 0;

signals:
  void loadStarted();
  void loadProgress(int);
  void loadFinished();

  void iconChanged(const QIcon &);
  void titleChanged(const QString &);
  void urlChanged(const QUrl &);
};